← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8290: Create dynamic left side menus based on access authorities in web-caseentry.

 

------------------------------------------------------------
revno: 8290
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-09-27 17:20:26 +0700
message:
  Create dynamic left side menus based on access authorities in web-caseentry.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-09-27 08:00:40 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-09-27 10:20:26 +0000
@@ -235,6 +235,7 @@
 rightSide=Right side
 in_range_due_date_plus_or_minus=In range due date +/-
 activity_planning=Visit Schedule
+intro_activity_planning=Visit Schedule provide the user at a facility or in an area with a list of upcoming visits. to better plan for daily/weekly activities
 back_to_main_menu=Back to main menu
 of=of
 show_all_items=Show all items

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm	2012-09-15 04:18:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm	2012-09-27 10:20:26 +0000
@@ -2,13 +2,32 @@
 <h3>$i18n.getString( "dhis-web-caseentry" )</h3>
 
 <ul class="introList">
-	#introListImgItem( "patient.action" "find_and_add_person" "patient" )
-	#introListImgItem( "multipledataEntrySelect.action" "multiple_individual_records" "dataentry" )
-	#introListImgItem( "singleEventSelect.action" "single_event_with_registration" "dataentry" )
-    #introListImgItem( "anonymousRegistration.action" "anonymous_events" "dataentry" )
-	#introListImgItem( "reportSelect.action" "program_summary" "summaryreport" )
-	#introListImgItem( "app/index.html" "tabular_report" "summaryreport" )
-    #introListImgItem( "caseAggregationForm.action" "case_aggregation" "caseaggregation" )
-	#introListImgItem( "activityPlanSelect.action" "activity_plan" "attribute" )
-	#introListImgItem( "smsReminderSelect.action" "program_tracking" "attribute" )
+	#if( $auth.hasAccess( "dhis-web-caseentry", "patient" ) )
+		#introListImgItem( "patient.action" "find_and_add_person" "patient" )
+	#end
+	
+	#if( $auth.hasAccess( "dhis-web-caseentry", "activityPlanSelect" ) )
+		#introListImgItem( "activityPlanSelect.action" "activity_planning" "dhis-web-mapping" )
+	#end
+	#if( $auth.hasAccess( "dhis-web-caseentry", "smsReminderSelect" ) )
+		#introListImgItem( "smsReminderSelect.action" "program_tracking" "summaryreport" )
+	#end
+		
+	#if( $auth.hasAccess( "dhis-web-caseentry", "multipledataEntrySelect" ) )
+		#introListImgItem( "multipledataEntrySelect.action" "multiple_individual_records" "dhis-web-maintenance-dataset" )
+		#introListImgItem( "singleEventSelect.action" "single_event_with_registration" "dhis-web-maintenance-dataset" )
+		#introListImgItem( "anonymousRegistration.action" "anonymous_events" "dhis-web-maintenance-dataset" )
+	#end
+	
+	#if( $auth.hasAccess( "dhis-web-caseentry", "reportSelect" ) )
+		#introListImgItem( "reportSelect.action" "program_summary" "summaryreport" )
+	#end
+	
+	#if( $auth.hasAccess( "dhis-web-caseentry", "generateTabularReport" ) )
+		#introListImgItem( "app/index.html" "tabular_report" "summaryreport" )
+	#end
+	
+	#if( $auth.hasAccess( "dhis-web-caseentry", "caseAggregationForm" ) )
+		#introListImgItem( "caseAggregationForm.action" "case_aggregation" "caseaggregation" )
+	#end
 </ul>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.vm	2012-09-19 13:49:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.vm	2012-09-27 10:20:26 +0000
@@ -1,29 +1,49 @@
 
+#if( $auth.hasAccess( "dhis-web-caseentry", "patient" ) )
 <h2>$i18n.getString( "patient" )&nbsp;</h2>
 <ul>
 	<li><a href="patient.action">$i18n.getString( "find_and_add_person" )</a></li>
 </ul>
+#end
 
+#if( $auth.hasAccess( "dhis-web-caseentry", "activityPlanSelect" ) 
+	|| $auth.hasAccess( "dhis-web-caseentry", "smsReminderSelect" ) )
 <h2>$i18n.getString( "tracking" )&nbsp;</h2>
+#end
 <ul>
-    <li><a href="activityPlanSelect.action">$i18n.getString( "activity_plan" )</a></li>     
-    <li><a href="smsReminderSelect.action">$i18n.getString( "program_tracking" )</a></li>     
+    #if( $auth.hasAccess( "dhis-web-caseentry", "activityPlanSelect" ) )
+		<li><a href="activityPlanSelect.action">$i18n.getString( "activity_plan" )</a></li>     
+	#end
+	#if( $auth.hasAccess( "dhis-web-caseentry", "smsReminderSelect" ) )
+		<li><a href="smsReminderSelect.action">$i18n.getString( "program_tracking" )</a></li>     
+	#end
 </ul>
 
+#if( $auth.hasAccess( "dhis-web-caseentry", "multipledataEntrySelect" ) )
 <h2>$i18n.getString( "data_entry" )&nbsp;</h2>
 <ul>
 	<li><a href="multipledataEntrySelect.action">$i18n.getString( "multiple_individual_records" )&nbsp;</a></li>
 	<li><a href="singleEventSelect.action">$i18n.getString( "single_event_with_registration" )</a></li>
 	<li><a href="anonymousRegistration.action">$i18n.getString( "anonymous_events" )</a></li>
 </ul>
+#end
 
+#if( $auth.hasAccess( "dhis-web-caseentry", "reportSelect" ) 
+	&& $auth.hasAccess( "dhis-web-caseentry", "generateTabularReport" ) )	
 <h2>$i18n.getString( "reports" )&nbsp;</h2>
+#end
 <ul>
-    <li><a href="reportSelect.action">$i18n.getString( "program_summary" )&nbsp;</a></li> 
-	<li><a href="app/index.html"> $i18n.getString( "tabular_report" )&nbsp;</a></li> 
+    #if( $auth.hasAccess( "dhis-web-caseentry", "reportSelect" ) )
+		<li><a href="reportSelect.action">$i18n.getString( "program_summary" )&nbsp;</a></li> 
+	#end
+	#if( $auth.hasAccess( "dhis-web-caseentry", "generateTabularReport" ) )
+	<li><a href="app/index.html"> $i18n.getString( "tabular_report" )&nbsp;</a></li>
+	#end
 </ul>
 
+#if( $auth.hasAccess( "dhis-web-caseentry", "caseAggregationForm" ) )	
 <h2>$i18n.getString( "case_aggregation" )&nbsp;</h2>
 <ul>
     <li><a href="caseAggregationForm.action">$i18n.getString( "case_aggregation" )</a></li>     
 </ul>
+#end