dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19018
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8130: [mobile] display isDead if the person is actually dead.
------------------------------------------------------------
revno: 8130
committer: Long <Long@Long-Laptop>
branch nick: dhis2
timestamp: Wed 2012-09-19 11:37:21 +0700
message:
[mobile] display isDead if the person is actually dead.
modified:
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetFindBeneficiaryFormAction.java
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/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/findBeneficiaryForm.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/namebaseddataentry/action/GetFindBeneficiaryFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetFindBeneficiaryFormAction.java 2012-06-11 10:11:21 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetFindBeneficiaryFormAction.java 2012-09-19 04:37:21 +0000
@@ -34,6 +34,8 @@
import java.util.Set;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.User;
+
import com.opensymphony.xwork2.Action;
public class GetFindBeneficiaryFormAction
@@ -70,11 +72,23 @@
{
this.organisationUnits = organisationUnits;
}
-
- //use in find relation person
-
+
+ private User user;
+
+ public User getUser()
+ {
+ return user;
+ }
+
+ public void setUser( User user )
+ {
+ this.user = user;
+ }
+
+ // use in find relation person
+
private Integer originalPatientId;
-
+
public Integer getOriginalPatientId()
{
return originalPatientId;
@@ -84,9 +98,9 @@
{
this.originalPatientId = originalPatientId;
}
-
+
private Integer relationshipTypeId;
-
+
public Integer getRelationshipTypeId()
{
return relationshipTypeId;
@@ -101,6 +115,7 @@
public String execute()
throws Exception
{
+ user = currentUserService.getCurrentUser();
Collection<OrganisationUnit> basicOrganisationUnits = currentUserService.getCurrentUser()
.getOrganisationUnits();
organisationUnits = new HashSet<OrganisationUnit>();
@@ -117,7 +132,7 @@
{
List<OrganisationUnit> parents = new ArrayList<OrganisationUnit>();
parents.add( organisationUnit );
-
+
while ( organisationUnit.getParent() != null )
{
parents.add( organisationUnit.getParent() );
=== 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-09-06 18:52:44 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-09-19 04:37:21 +0000
@@ -112,4 +112,6 @@
register_location_for=Register Location For
agregate_reporting=Aggregate Reporting
find_or_add_person=Find/Add Person
-search_by_phone_number=Search By Phone Number
\ No newline at end of file
+search_by_phone_number=Search By Phone Number
+dead=Dead
+status=Status
\ No newline at end of file
=== 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-09-17 04:35:16 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm 2012-09-19 04:37:21 +0000
@@ -43,6 +43,7 @@
<li><strong>$i18n.getString("phone_number"):</strong> $patient.getPhoneNumber()</li>
#end
<li><strong>$i18n.getString("orgunit"):</strong> $patient.getOrganisationUnit().getName() <a href="showPatientLocationForm.action?patientId=$patient.id">[$i18n.getString("change")]</a></li>
+ #if($patient.getIsDead() == true) <li><strong>$i18n.getString("status"):</strong> $i18n.getString("dead")</li> #end
#foreach($patientIdentifier in $patientIdentifiers)
#if($patientIdentifier.getIdentifierType())
<li><strong>$patientIdentifier.getIdentifierType().getName():</strong> $patientIdentifier.getIdentifier()</li>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/findBeneficiaryForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/findBeneficiaryForm.vm 2012-09-06 18:52:44 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/findBeneficiaryForm.vm 2012-09-19 04:37:21 +0000
@@ -23,7 +23,7 @@
<select name="organisationUnitId">
<option value="0">$i18n.getString( "all_orgunit" )</option>
#foreach($orgUnit in $organisationUnits)
- <option value="$orgUnit.getId()">$orgUnit.getName()</option>
+ <option value="$orgUnit.getId()" #if($user.getOrganisationUnit().getName() == $orgUnit.getName()) selected="selected" #end>$orgUnit.getName()</option>
#end
</select>
</p>