dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18230
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7611: (mobile) minor changes, redirect to patient overview after registration (for enrollment, etc). Sh...
------------------------------------------------------------
revno: 7611
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-07-15 10:10:03 +0300
message:
(mobile) minor changes, redirect to patient overview after registration (for enrollment, etc). Show message when there are noe programs, relationsships, etc available.
modified:
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java
dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties
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/enrollment/enrollmentProgramList.vm
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/registration/beneficiaryRegistrationForm.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/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java 2012-07-11 09:13:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java 2012-07-15 07:10:03 +0000
@@ -27,13 +27,15 @@
package org.hisp.dhis.light.beneficiaryregistration.action;
-import java.util.Collection;
+import com.opensymphony.xwork2.Action;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeService;
import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.patient.PatientIdentifierTypeService;
+import org.hisp.dhis.program.Program;
+import org.hisp.dhis.program.ProgramService;
-import com.opensymphony.xwork2.Action;
+import java.util.Collection;
public class RegisterBeneficiaryAction
implements Action
@@ -66,6 +68,13 @@
this.patientAttributeService = patientAttributeService;
}
+ private ProgramService programService;
+
+ public void setProgramService( ProgramService programService )
+ {
+ this.programService = programService;
+ }
+
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
@@ -106,13 +115,17 @@
this.patientAttributes = patientAttributes;
}
+ // -------------------------------------------------------------------------
+ // Action Implementation
+ // -------------------------------------------------------------------------
+
@Override
public String execute()
throws Exception
{
patientIdentifierTypes = patientIdentifierTypeService.getAllPatientIdentifierTypes();
patientAttributes = patientAttributeService.getAllPatientAttributes();
+
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-07-13 09:18:09 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-07-15 07:10:03 +0000
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="org.hisp.dhis.light.action.NoAction" class="org.hisp.dhis.light.action.NoAction"
@@ -151,11 +151,11 @@
<bean
id="org.hisp.dhis.light.namebaseddataentry.action.GetProgramStageFormAction"
class="org.hisp.dhis.light.namebaseddataentry.action.GetProgramStageFormAction">
- <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
- <property name="programStageInstanceService"
- ref="org.hisp.dhis.program.ProgramStageInstanceService" />
- <property name="patientDataValueService"
- ref="org.hisp.dhis.patientdatavalue.PatientDataValueService" />
+ <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
+ <property name="programStageInstanceService"
+ ref="org.hisp.dhis.program.ProgramStageInstanceService" />
+ <property name="patientDataValueService"
+ ref="org.hisp.dhis.patientdatavalue.PatientDataValueService" />
<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
</bean>
@@ -171,11 +171,11 @@
<property name="activityReportingService"
ref="org.hisp.dhis.mobile.api.ActivityReportingService" />
<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- <property name="dataElementCategoryService"
- ref="org.hisp.dhis.dataelement.DataElementCategoryService" />
- <property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
+ <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
+ <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+ <property name="dataElementCategoryService"
+ ref="org.hisp.dhis.dataelement.DataElementCategoryService" />
+ <property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
<property name="programStageDataElementService" ref="org.hisp.dhis.program.ProgramStageDataElementService" />
</bean>
@@ -183,73 +183,73 @@
id="org.hisp.dhis.light.namebaseddataentry.action.GetBeneficiaryDetailAction"
class="org.hisp.dhis.light.namebaseddataentry.action.GetBeneficiaryDetailAction">
<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.light.namebaseddataentry.action.GetFindBeneficiaryFormAction"
- class="org.hisp.dhis.light.namebaseddataentry.action.GetFindBeneficiaryFormAction">
- <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.light.namebaseddataentry.action.FindBeneficiarytAction"
- class="org.hisp.dhis.light.namebaseddataentry.action.FindBeneficiarytAction">
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.light.namebaseddataentry.action.GetPatientProgramListAction"
- class="org.hisp.dhis.light.namebaseddataentry.action.GetPatientProgramListAction">
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
- <property name="relationshipService"
- ref="org.hisp.dhis.relationship.RelationshipService" />
- <property name="relationshipTypeService"
- ref="org.hisp.dhis.relationship.RelationshipTypeService" />
- <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
- <property name="patientIdentifierService" ref="org.hisp.dhis.patient.PatientIdentifierService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.light.namebaseddataentry.action.GetProgramStageListAction"
- class="org.hisp.dhis.light.namebaseddataentry.action.GetProgramStageListAction">
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.light.namebaseddataentry.action.GetRepeatableEventRegistrationFormAction"
- class="org.hisp.dhis.light.namebaseddataentry.action.GetRepeatableEventRegistrationFormAction">
- <property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
- <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.light.namebaseddataentry.action.SaveRepeatableEventAction"
- class="org.hisp.dhis.light.namebaseddataentry.action.SaveRepeatableEventAction">
- <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
- <property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
- <property name="programStageInstanceService"
- ref="org.hisp.dhis.program.ProgramStageInstanceService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.light.namebaseddataentry.action.GetAddNewRelationshipFormAction"
- class="org.hisp.dhis.light.namebaseddataentry.action.GetAddNewRelationshipFormAction">
- <property name="relationshipTypeService"
- ref="org.hisp.dhis.relationship.RelationshipTypeService" />
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.light.namebaseddataentry.action.AddNewRalationshipAction"
- class="org.hisp.dhis.light.namebaseddataentry.action.AddNewRalationshipAction">
- <property name="relationshipTypeService"
- ref="org.hisp.dhis.relationship.RelationshipTypeService" />
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- <property name="relationshipService"
- ref="org.hisp.dhis.relationship.RelationshipService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.light.namebaseddataentry.action.GetFindBeneficiaryFormAction"
+ class="org.hisp.dhis.light.namebaseddataentry.action.GetFindBeneficiaryFormAction">
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.light.namebaseddataentry.action.FindBeneficiarytAction"
+ class="org.hisp.dhis.light.namebaseddataentry.action.FindBeneficiarytAction">
+ <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.light.namebaseddataentry.action.GetPatientProgramListAction"
+ class="org.hisp.dhis.light.namebaseddataentry.action.GetPatientProgramListAction">
+ <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+ <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
+ <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
+ <property name="relationshipService"
+ ref="org.hisp.dhis.relationship.RelationshipService" />
+ <property name="relationshipTypeService"
+ ref="org.hisp.dhis.relationship.RelationshipTypeService" />
+ <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
+ <property name="patientIdentifierService" ref="org.hisp.dhis.patient.PatientIdentifierService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.light.namebaseddataentry.action.GetProgramStageListAction"
+ class="org.hisp.dhis.light.namebaseddataentry.action.GetProgramStageListAction">
+ <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+ <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.light.namebaseddataentry.action.GetRepeatableEventRegistrationFormAction"
+ class="org.hisp.dhis.light.namebaseddataentry.action.GetRepeatableEventRegistrationFormAction">
+ <property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
+ <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.light.namebaseddataentry.action.SaveRepeatableEventAction"
+ class="org.hisp.dhis.light.namebaseddataentry.action.SaveRepeatableEventAction">
+ <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
+ <property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
+ <property name="programStageInstanceService"
+ ref="org.hisp.dhis.program.ProgramStageInstanceService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.light.namebaseddataentry.action.GetAddNewRelationshipFormAction"
+ class="org.hisp.dhis.light.namebaseddataentry.action.GetAddNewRelationshipFormAction">
+ <property name="relationshipTypeService"
+ ref="org.hisp.dhis.relationship.RelationshipTypeService" />
+ <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.light.namebaseddataentry.action.AddNewRalationshipAction"
+ class="org.hisp.dhis.light.namebaseddataentry.action.AddNewRalationshipAction">
+ <property name="relationshipTypeService"
+ ref="org.hisp.dhis.relationship.RelationshipTypeService" />
+ <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+ <property name="relationshipService"
+ ref="org.hisp.dhis.relationship.RelationshipService" />
</bean>
<!-- Beneficiary Registration -->
@@ -263,9 +263,10 @@
<bean
id="org.hisp.dhis.light.beneficiaryregistration.action.RegisterBeneficiaryAction"
class="org.hisp.dhis.light.beneficiaryregistration.action.RegisterBeneficiaryAction"
- scope="prototype">
- <property name="patientIdentifierTypeService" ref="org.hisp.dhis.patient.PatientIdentifierTypeService" />
+ scope="prototype">
+ <property name="patientIdentifierTypeService" ref="org.hisp.dhis.patient.PatientIdentifierTypeService" />
<property name="patientAttributeService" ref="org.hisp.dhis.patient.PatientAttributeService" />
+ <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
</bean>
<bean
@@ -274,9 +275,9 @@
scope="prototype">
<property name="organisationUnitService"
ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- <property name="patientIdentifierTypeService" ref="org.hisp.dhis.patient.PatientIdentifierTypeService" />
- <property name="patientAttributeService" ref="org.hisp.dhis.patient.PatientAttributeService" />
+ <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+ <property name="patientIdentifierTypeService" ref="org.hisp.dhis.patient.PatientIdentifierTypeService" />
+ <property name="patientAttributeService" ref="org.hisp.dhis.patient.PatientAttributeService" />
<property name="patientAttributeOptionService" ref="org.hisp.dhis.patient.PatientAttributeOptionService" />
</bean>
@@ -362,17 +363,17 @@
<bean id="org.hisp.dhis.light.singleevent.action.SaveSingleEventAction"
class="org.hisp.dhis.light.singleevent.action.SaveSingleEventAction"
scope="prototype">
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
- <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
- <property name="programStageInstanceService"
- ref="org.hisp.dhis.program.ProgramStageInstanceService" />
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- <property name="patientDataValueService"
- ref="org.hisp.dhis.patientdatavalue.PatientDataValueService" />
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
+ <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
+ <property name="programStageInstanceService"
+ ref="org.hisp.dhis.program.ProgramStageInstanceService" />
+ <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
+ <property name="patientDataValueService"
+ ref="org.hisp.dhis.patientdatavalue.PatientDataValueService" />
+ <property name="organisationUnitService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
<property name="programStageDataElementService" ref="org.hisp.dhis.program.ProgramStageDataElementService" />
</bean>
@@ -443,29 +444,29 @@
<bean id="org.hisp.dhis.light.message.action.SendFeedbackAction"
class="org.hisp.dhis.light.message.action.SendFeedbackAction" scope="prototype">
<property name="messageService" ref="org.hisp.dhis.message.MessageService" />
- </bean>
- <bean
- id="org.hisp.dhis.light.anonymous.action.GetAllAnonymousProgramAction"
- class="org.hisp.dhis.light.anonymous.action.GetAllAnonymousProgramAction"
- scope="prototype">
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
- </bean>
-
- <bean id="org.hisp.dhis.light.anonymous.action.ShowAnonymousFormAction"
- class="org.hisp.dhis.light.anonymous.action.ShowAnonymousFormAction"
- scope="prototype">
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
- </bean>
-
- <bean id="org.hisp.dhis.light.anonymous.action.SaveAnonymousProgramAction"
- class="org.hisp.dhis.light.anonymous.action.SaveAnonymousProgramAction"
- scope="prototype">
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
- <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="programStageInstanceService" ref="org.hisp.dhis.program.ProgramStageInstanceService" />
- <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
- <property name="patientDataValueService" ref="org.hisp.dhis.patientdatavalue.PatientDataValueService" />
- <property name="programStageDataElementService" ref="org.hisp.dhis.program.ProgramStageDataElementService" />
- </bean>
-</beans>
+ </bean>
+ <bean
+ id="org.hisp.dhis.light.anonymous.action.GetAllAnonymousProgramAction"
+ class="org.hisp.dhis.light.anonymous.action.GetAllAnonymousProgramAction"
+ scope="prototype">
+ <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.light.anonymous.action.ShowAnonymousFormAction"
+ class="org.hisp.dhis.light.anonymous.action.ShowAnonymousFormAction"
+ scope="prototype">
+ <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.light.anonymous.action.SaveAnonymousProgramAction"
+ class="org.hisp.dhis.light.anonymous.action.SaveAnonymousProgramAction"
+ scope="prototype">
+ <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
+ <property name="util" ref="org.hisp.dhis.light.utils.NamebasedUtils" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="programStageInstanceService" ref="org.hisp.dhis.program.ProgramStageInstanceService" />
+ <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
+ <property name="patientDataValueService" ref="org.hisp.dhis.patientdatavalue.PatientDataValueService" />
+ <property name="programStageDataElementService" ref="org.hisp.dhis.program.ProgramStageDataElementService" />
+ </bean>
+</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-07-13 09:18:09 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-07-15 07:10:03 +0000
@@ -68,6 +68,8 @@
search=Search
enrolled_programs=Enrolled Program(s)
other_programs=Other Programs
+available_programs=Available Programs
+no_enrolled_programs=No Enrolled Programs
enroll=Enroll
enrollment_date=Enrollment Date
incident_date=Incident Date
@@ -87,6 +89,7 @@
please_select=Please Select
enroll_in_program=Enroll In Program
relationships=Relationships
+no_relationships=No Relationships
phone_number=Phone Number
add_relationships=Add Relationships
related_person_search=Related Person Search
@@ -97,4 +100,4 @@
approximated=Approximated
declared=Declared
verified=Verified
-anomynous_program_list=Anomynous Program List
\ No newline at end of file
+anomynous_program_list=Anonymous Program List
=== 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-12 10:33:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2012-07-15 07:10:03 +0000
@@ -221,7 +221,7 @@
<action name="saveBeneficiary"
class="org.hisp.dhis.light.beneficiaryregistration.action.SaveBeneficiaryAction">
- <result name="success" type="redirect">/light/selectEnrollmentProgram.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>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm 2012-05-24 14:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm 2012-07-15 07:10:03 +0000
@@ -8,13 +8,17 @@
#end
<p>
<ul>
-#foreach( $program in $enrolledProgramList )
- <li>$program.getName()</li>
+#if( $enrolledProgramList.size() > 0)
+ #foreach( $program in $enrolledProgramList )
+ <li>$program.getName()</li>
+ #end
+#else
+ <li>$i18n.getString( "no_enrolled_programs" )</li>
#end
</ul>
</p>
-<h2>$i18n.getString( "other_programs" )</h2>
+<h2>$i18n.getString( "available_programs" )</h2>
<p>
<ul>
#foreach( $program in $programList )
=== 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-11 09:13:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm 2012-07-15 07:10:03 +0000
@@ -8,19 +8,23 @@
#end
<p>
<ul>
- #foreach( $programInstance in $programInstances )
- <li>
- <a href="showPatientProgramStageList.action?patientId=$patientId&programInstanceId=$programInstance.getId()&programId=$programInstance.getProgram().getId()&validated=false">
- $programInstance.getProgram().getName()
- </a>
- </li>
- #set($nextStage = $util.getNextStage( $programInstance.getProgramStageInstances()))
- #if($nextStage)
- <li>
- <a href="showProgramStageForm.action?programId=$programInstance.getProgram().getId()&programStageId=$nextStage.getProgramStage().getId()&programStageInstanceId=$nextStage.getId()&patientId=$patient.getId()&programInstanceId=$programInstance.getId()&orgUnitId=0"> - Next: $nextStage.getProgramStage().getName()</a>
- </li>
- #end
- #end
+ #if( $programInstances.size() > 0)
+ #foreach( $programInstance in $programInstances )
+ <li>
+ <a href="showPatientProgramStageList.action?patientId=$patientId&programInstanceId=$programInstance.getId()&programId=$programInstance.getProgram().getId()&validated=false">
+ $programInstance.getProgram().getName()
+ </a>
+ </li>
+ #set($nextStage = $util.getNextStage( $programInstance.getProgramStageInstances()))
+ #if($nextStage)
+ <li>
+ <a href="showProgramStageForm.action?programId=$programInstance.getProgram().getId()&programStageId=$nextStage.getProgramStage().getId()&programStageInstanceId=$nextStage.getId()&patientId=$patient.getId()&programInstanceId=$programInstance.getId()&orgUnitId=0"> - Next: $nextStage.getProgramStage().getName()</a>
+ </li>
+ #end
+ #end
+ #else
+ <li>$i18n.getString("no_enrolled_programs")</li>
+ #end
</ul>
</p>
@@ -56,9 +60,13 @@
<h2>$i18n.getString("relationships")</h2>
<p>
<ul>
- #foreach( $person in $relatedPeople )
- <li><a href="showPatientProgramList.action?patientId=$person.id">$!encoder.htmlEncode( ${person.getFullName()} )</a></li>
- #end
+ #if( $relatedPeople.size() > 0)
+ #foreach( $person in $relatedPeople )
+ <li><a href="showPatientProgramList.action?patientId=$person.id">$!encoder.htmlEncode( ${person.getFullName()} )</a></li>
+ #end
+ #else
+ <li>$i18n.getString("no_relationships")</li>
+ #end
</ul>
</p>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm 2012-07-13 09:18:09 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm 2012-07-15 07:10:03 +0000
@@ -104,8 +104,6 @@
#end
#end
#end
-
-
</p>
</div>