← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8264: Make an authority for Seach person in all facilities.

 

------------------------------------------------------------
revno: 8264
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-09-26 15:42:25 +0700
message:
  Make an authority for Seach person in all facilities.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties


--
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/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2012-09-25 02:50:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2012-09-26 08:42:25 +0000
@@ -32,6 +32,12 @@
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
 
+		<action name="searchAllFacilities"
+			class="org.hisp.dhis.caseentry.action.NoAction">
+			<result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+			<param name="requiredAuthorities">F_SEARCH_PATIENT_IN_ALL_FACILITIES</param>
+		</action>
+		
 		<action name="searchPatient"
 			class="org.hisp.dhis.caseentry.action.patient.SearchPatientAction">
 			<result name="success" type="velocity">/content.vm</result>
@@ -546,14 +552,14 @@
 			class="org.hisp.dhis.caseentry.action.patient.ProgramEnrollmentSelectAction">
 			<result name="success" type="velocity">/content.vm</result>
 			<param name="page">/dhis-web-caseentry/programEnrollmentSelectForm.vm</param>
-			<param name="requiredAuthorities">F_PATIENT_UPDATE</param>
+			<param name="requiredAuthorities">F_PROGRAM_ENROLLMENT</param>
 		</action>
 
 		<action name="enrollmentform"
 			class="org.hisp.dhis.caseentry.action.patient.ProgramEnrollmentAction">
 			<result name="success" type="velocity">/content.vm</result>
 			<param name="page">/dhis-web-caseentry/programEnrollmentForm.vm</param>
-			<param name="requiredAuthorities">F_PATIENT_UPDATE</param>
+			<param name="requiredAuthorities">F_LOAD_PERSON_EVENTS_MANAGEMENT</param>
 		</action>
 
 		<action name="validatePatientProgramEnrollment"

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-09-26 05:19:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-09-26 08:42:25 +0000
@@ -1575,7 +1575,7 @@
 	$('#eventMessagesDiv').load("getEventMessages.action", {programInstanceId:programInstanceId});
 }
 
-function dashboardHistoryToggle()
+function dashboardHistoryToggle(evt)
 {
 	jQuery('#dashboardHistoryDiv').toggle();
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2012-09-26 05:19:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2012-09-26 08:42:25 +0000
@@ -15,7 +15,9 @@
 								<tr><th>
 									$i18n.getString("demographics")
 									<a href="javascript:showUpdatePatientForm( '$patient.id', true );"><label class='bold'>&laquo;$i18n.getString("edit_profile")&raquo;</label></a>
+									#if( $auth.hasAccess( "dhis-web-caseentry", "getPatientLocation" ) )
 									<a href="javascript:getPatientLocation( '$patient.id', true );"><label class='bold'> &laquo;$i18n.getString("change_location")&raquo;</label></a>
+									#end
 								</th></tr>
 							</table>
 							<div class="contentProviderTable">

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-09-21 01:14:43 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-09-26 08:42:25 +0000
@@ -73,10 +73,14 @@
 				<td>
 					<input type="button" class='small-button' value='+' onclick='addAttributeOption();'>
 				</td>
+				#if( $auth.hasAccess( "dhis-web-caseentry", "searchAllFacilities" ) )
 				<td id='searchBySelectedUnitTD'>
 					$i18n.getString('search_in_all_facilities')
 					<input type='checkbox' id='searchInAllFacility' name='searchInAllFacility' />
 				</td>
+				#else
+					<input type='hidden' id='searchInAllFacility' name='searchInAllFacility' />
+				#end
 				<td>
 					<input type="button" class='large-button' value='$i18n.getString( "search" )' onclick='validateAdvancedSearch();' id='searchPatientBtn'>
 				</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2012-09-25 09:12:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2012-09-26 08:42:25 +0000
@@ -135,6 +135,8 @@
 F_PATIENT_UPDATE=Update Person
 F_PATIENT_DELETE=Delete Person
 F_PATIENT_CHANGE_LOCATION = Change Person Location
+F_SEARCH_PATIENT_IN_ALL_FACILITIES = Seach Person In All Facilities
+F_LOAD_PERSON_EVENTS_MANAGEMENT = Load Person-Event Managenent
 F_PROGRAM_ADD=Add Program
 F_PROGRAM_UPDATE=Update Program
 F_PROGRAM_DELETE=Delete Program