← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14388: sharing ui for userRole

 

------------------------------------------------------------
revno: 14388
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-03-25 09:01:17 +0100
message:
  sharing ui for userRole
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addRoleForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/allRole.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addRoleForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addRoleForm.vm	2013-07-19 08:23:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addRoleForm.vm	2014-03-25 08:01:17 +0000
@@ -33,6 +33,8 @@
 
 <h3>$i18n.getString( "create_new_user_role" )</h3>
 
+#sharingCreateNotification( "userRole" )
+
 <form id="addRoleForm" name="addRoleForm" action="addRole.action" method="post" class="inputForm">
 <table>
   	<col style="width: 120px"/>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/allRole.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/allRole.vm	2014-02-04 09:58:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/allRole.vm	2014-03-25 08:01:17 +0000
@@ -1,3 +1,6 @@
+
+#sharingDialog()
+
 <script type="text/javascript" src="javascript/allRole.js"></script>
 <script type="text/javascript">
 	var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_role" ) , "'")';
@@ -8,8 +11,9 @@
 
 <div id="contextMenu" class="contextMenu">
   <ul id="contextMenuItems" class="contextMenuItems">
-    <li><a data-target-fn="showUpdateRoleForm"><i class="fa fa-edit"></i>&nbsp;&nbsp;$i18n.getString( "edit" )</a></li>
-    <li><a data-target-fn="removeRole"><i class="fa fa-trash-o"></i>&nbsp;&nbsp;$i18n.getString( "remove" )</a></li>
+    <li data-enabled="canManage"><a data-target-fn="showSharingDialogWithContext"><i class="fa fa-share"></i>&nbsp;&nbsp;$i18n.getString( "sharing_settings" )</a></li>
+    <li data-enabled="canUpdate"><a data-target-fn="showUpdateRoleForm"><i class="fa fa-edit"></i>&nbsp;&nbsp;$i18n.getString( "edit" )</a></li>
+    <li data-enabled="canDelete"><a data-target-fn="removeRole"><i class="fa fa-trash-o"></i>&nbsp;&nbsp;$i18n.getString( "remove" )</a></li>
     <li><a data-target-fn="showRoleDetails"><i class="fa fa-info-circle"></i>&nbsp;&nbsp;$i18n.getString( "show_details" )</a></li>
   </ul>
 </div>
@@ -32,7 +36,7 @@
 				</thead>
 				<tbody id="list">
 				#foreach( $userAuthorityGroup in $userAuthorityGroups )
-				<tr id="tr${userAuthorityGroup.id}" data-id="$!userAuthorityGroup.id" data-uid="$!userAuthorityGroup.uid" data-type="UserAuthorityGroup" data-name="$encoder.htmlEncode( $!userAuthorityGroup.displayName )"
+				<tr id="tr${userAuthorityGroup.id}" data-id="$!userAuthorityGroup.id" data-uid="$!userAuthorityGroup.uid" data-type="UserRole" data-name="$encoder.htmlEncode( $!userAuthorityGroup.displayName )"
 				    data-can-manage="$security.canManage( $userAuthorityGroup )"
 				    data-can-update="$security.canUpdate( $userAuthorityGroup )"
 				    data-can-delete="$security.canDelete( $userAuthorityGroup )">