← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7612: (mobile) removed program enrollment from main menu, it is now only part of the person page. Chang...

 

------------------------------------------------------------
revno: 7612
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-07-15 10:44:23 +0300
message:
  (mobile) removed program enrollment from main menu, it is now only part of the person page. Changed from list to select in program list (on person page). Made enrollment redirect back to person page. Do not display add program/relationship if there are no available.
modified:
  dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/trackingMenu.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-light/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml	2012-07-15 07:10:03 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml	2012-07-15 07:44:23 +0000
@@ -221,7 +221,7 @@
 
     <action name="saveBeneficiary"
         class="org.hisp.dhis.light.beneficiaryregistration.action.SaveBeneficiaryAction">
-		<result name="success" type="redirect">/light/showPatientProgramList.action?patientId=${patientId}</result>
+      <result name="success" type="redirect">/light/showPatientProgramList.action?patientId=${patientId}</result>
       <result name="error" type="velocity">/dhis-web-light/main.vm</result>
       <param name="page">/dhis-web-light/registration/beneficiaryRegistrationForm.vm</param>
     </action>
@@ -260,7 +260,7 @@
 
     <action name="saveMobileProgramEnrollment"
         class="org.hisp.dhis.light.beneficiaryenrollment.action.SaveMobileProgramEnrollmentAction">
-      <result name="success" type="redirect">/light/selectEnrollmentProgram.action?patientId=${patientId}&amp;validated=true</result>
+      <result name="success" type="redirect">/light/showPatientProgramList.action?patientId=${patientId}</result>
       <result name="error" type="velocity">/dhis-web-light/main.vm</result>
       <param name="page">/dhis-web-light/enrollment/programEnrollmentForm.vm</param>
     </action>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm	2012-07-15 07:10:03 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm	2012-07-15 07:44:23 +0000
@@ -47,15 +47,27 @@
 					
 	</ul>
 </p>
-	
+
+#if( $enrollmentProgramList.size() > 0)
 <h2>$i18n.getString("enroll_in_program")</h2>
-<p>
-	<ul>
+<form action="showProgramEnrollmentForm.action">
+<div class="header-box" align="center">
+    <input type="hidden" name="patientId" value="$patient.id" />
+
+    <p style="text-align: left;border: none; background-color: white; width: 97%;">
+
+    <select name="programId">
 		#foreach( $program in $enrollmentProgramList )
-			<li><a href="showProgramEnrollmentForm.action?patientId=$patient.Id&programId=$program.Id">$program.getName()</a></li>
+		    <option value="$program.id">$program.getName()</option>
 		#end
-	</ul>
-</p>
+	</select>
+
+    <input type="submit" style="width: 100%;" value="$i18n.getString("enroll")" />
+    </p>
+</div>
+</form>
+#end
+<!-- <option><a href="showProgramEnrollmentForm.action?patientId=$patient.Id&programId=$program.Id">$program.getName()</a></li> -->
 
 <h2>$i18n.getString("relationships")</h2>
 <p>
@@ -70,6 +82,7 @@
 	</ul>
 </p>
 
+#if( $relationshipTypes.size() > 0)
 <h2>$i18n.getString("add_relationships")</h2>
 <p>
 	<ul>
@@ -78,11 +91,12 @@
 		#end
 	</ul>
 </p>
-	
+#end
+
 <div id="footer">
 	<h2>$i18n.getString( "navigate_to" )</h2>
 	<ul>
 		<li> <a href="showFindBeneficiaryForm.action"> $i18n.getString("find_beneficiary")</a></li>
 		<li><a href="index.action">$i18n.getString("home")</a></li>
 	</ul>
-</div>
\ No newline at end of file
+</div>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/trackingMenu.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/trackingMenu.vm	2012-05-15 07:40:06 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/trackingMenu.vm	2012-07-15 07:44:23 +0000
@@ -21,9 +21,9 @@
 <p>
 <ul>
     <li><a href="showFindBeneficiaryForm.action">$i18n.getString( "find_beneficiary" )</a></li>
+    <li><a href="selectRegistrationOrganisationUnit.action">$i18n.getString( "beneficiary_registration" )</a></li>
+    <!-- <li><a href="showBeneficiarySearchingForm.action">$i18n.getString( "beneficiary_enrollment" )</a></li> -->
     <li><a href="selectNamebasedOrganisationUnit.action">$i18n.getString( "activity_plan" )</a></li>
-    <li><a href="showBeneficiarySearchingForm.action">$i18n.getString( "beneficiary_enrollment" )</a></li>
-    <li><a href="selectRegistrationOrganisationUnit.action">$i18n.getString( "beneficiary_registration" )</a></li>
 </ul>
 </p>