dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28737
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14386: sharing ui for optionSet, sqlView
------------------------------------------------------------
revno: 14386
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-03-25 08:48:07 +0100
message:
sharing ui for optionSet, sqlView
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/optionSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sqlView.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-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm 2012-10-18 13:27:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm 2014-03-25 07:48:07 +0000
@@ -14,6 +14,8 @@
<h3>$i18n.getString( "add_option_set" )</h3>
+#sharingCreateNotification( "optionSet" )
+
<form id="addOptionSetForm" name="addOptionSetForm" action="addOptionSet.action" method="post" class="inputForm">
<table>
<colgroup>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm 2013-10-02 14:05:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm 2014-03-25 07:48:07 +0000
@@ -2,6 +2,8 @@
<h3>$encoder.htmlEncode( $i18n.getString( "add_new_sql_view" ) )</h3>
+#sharingCreateNotification( "sqlView" )
+
<form id="addSqlViewForm" action="addSqlView.action" method="post" class="inputForm">
<table>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/optionSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/optionSet.vm 2013-12-04 10:20:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/optionSet.vm 2014-03-25 07:48:07 +0000
@@ -1,3 +1,6 @@
+
+#sharingDialog()
+
<script type="text/javascript">
jQuery(document).ready(function() {
tableSorter( 'listTable' );
@@ -15,9 +18,10 @@
<div id="contextMenu" class="contextMenu">
<ul id="contextMenuItems" class="contextMenuItems">
- <li><a data-target-fn="showUpdateOptionSetForm"><i class="fa fa-edit"></i> $i18n.getString( "edit" )</a></li>
- <li><a data-target-fn="translateWithContext"><i class="fa fa-globe"></i> $i18n.getString( "translation_translate" )</a></li>
- <li><a data-target-fn="removeOptionSet"><i class="fa fa-trash-o"></i> $i18n.getString( "remove" )</a></li>
+ <li data-enabled="canManage"><a data-target-fn="showSharingDialogWithContext"><i class="fa fa-share"></i> $i18n.getString( "sharing_settings" )</a></li>
+ <li data-enabled="canUpdate"><a data-target-fn="showUpdateOptionSetForm"><i class="fa fa-edit"></i> $i18n.getString( "edit" )</a></li>
+ <li data-enabled="canUpdate"><a data-target-fn="translateWithContext"><i class="fa fa-globe"></i> $i18n.getString( "translation_translate" )</a></li>
+ <li data-enabled="canDelete"><a data-target-fn="removeOptionSet"><i class="fa fa-trash-o"></i> $i18n.getString( "remove" )</a></li>
<li><a data-target-fn="showOptionSetDetails"><i class="fa fa-info-circle"></i> $i18n.getString( "show_details" )</a></li>
</ul>
</div>
@@ -45,7 +49,10 @@
<tbody id="list">
#foreach( $optionSet in $optionSets )
<tr id="tr${optionSet.id}">
- <td data-id="$!optionSet.id" data-uid="$!optionSet.uid" data-type="OptionSet" data-name="$encoder.htmlEncode( $!optionSet.displayName )">
+ <td data-id="$!optionSet.id" data-uid="$!optionSet.uid" data-type="OptionSet" data-name="$encoder.htmlEncode( $!optionSet.displayName )"
+ data-can-manage="$security.canManage( $optionSet )"
+ data-can-update="$security.canUpdate( $optionSet )"
+ data-can-delete="$security.canDelete( $optionSet )">
$encoder.htmlEncode( $!optionSet.displayName )
</td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sqlView.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sqlView.vm 2013-12-04 10:20:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/sqlView.vm 2014-03-25 07:48:07 +0000
@@ -1,3 +1,6 @@
+
+#sharingDialog()
+
<script type="text/javascript">
jQuery(document).ready(function(){
tableSorter( 'listTable' );
@@ -16,10 +19,11 @@
<div id="contextMenu" class="contextMenu">
<ul id="contextMenuItems" class="contextMenuItems">
+ <li data-enabled="canManage"><a data-target-fn="showSharingDialogWithContext"><i class="fa fa-share"></i> $i18n.getString( "sharing_settings" )</a></li>
<li><a data-target-fn="runSqlViewQuery"><i class="fa fa-caret-square-o-right"></i> $i18n.getString( "run" )</a></li>
<li><a data-target-fn="showDataSqlViewForm"><i class="fa fa-table"></i> $i18n.getString( "show_sql_view" )</a></li>
- <li><a data-target-fn="showUpdateSqlViewForm"><i class="fa fa-edit"></i> $i18n.getString( "edit" )</a></li>
- <li><a data-target-fn="removeSqlViewObject"><i class="fa fa-trash-o"></i> $i18n.getString( "remove" )</a></li>
+ <li data-enabled="canUpdate"><a data-target-fn="showUpdateSqlViewForm"><i class="fa fa-edit"></i> $i18n.getString( "edit" )</a></li>
+ <li data-enabled="canDelete"><a data-target-fn="removeSqlViewObject"><i class="fa fa-trash-o"></i> $i18n.getString( "remove" )</a></li>
<li><a data-target-fn="showSqlViewDetails"><i class="fa fa-info-circle"></i> $i18n.getString( "show_details" )</a></li>
</ul>
</div>
@@ -44,9 +48,12 @@
<tbody id="list">
#foreach( $sqlViewObject in $sqlViewObjectList )
<tr id="tr${sqlViewObject.id}">
- <td data-id="$!sqlViewObject.id" data-uid="$!sqlViewObject.uid" data-type="SqlViewObject" data-name="$encoder.htmlEncode( $!sqlViewObject.displayName )">
- $encoder.htmlEncode( $!sqlViewObject.displayName )
- </td>
+ <td data-id="$!sqlViewObject.id" data-uid="$!sqlViewObject.uid" data-type="SqlView" data-name="$encoder.htmlEncode( $!sqlViewObject.displayName )"
+ data-can-manage="$security.canManage( $sqlViewObject )"
+ data-can-update="$security.canUpdate( $sqlViewObject )"
+ data-can-delete="$security.canDelete( $sqlViewObject )">
+ $encoder.htmlEncode( $!sqlViewObject.displayName )
+ </td>
</tr>
#end
</tbody>