dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31474
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16038: Display attribute-values without program in Tracked entity instance profile tab of TEI Dashboard ...
------------------------------------------------------------
revno: 16038
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-07-09 13:01:46 +0700
message:
Display attribute-values without program in Tracked entity instance profile tab of TEI Dashboard if TEI doesn't enroll into any program.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/TrackedEntityInstanceDashboardAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackedEntityInstanceDashboard.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/java/org/hisp/dhis/caseentry/action/trackedentity/TrackedEntityInstanceDashboardAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/TrackedEntityInstanceDashboardAction.java 2014-04-21 13:16:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/TrackedEntityInstanceDashboardAction.java 2014-07-09 06:01:46 +0000
@@ -94,6 +94,8 @@
private TrackedEntityInstance entityInstance;
private List<TrackedEntityAttribute> attributes;
+
+ private List<TrackedEntityAttribute> displayedAttributes;
private Collection<ProgramInstance> activeProgramInstances;
@@ -121,6 +123,11 @@
return attributeValueMap;
}
+ public List<TrackedEntityAttribute> getDisplayedAttributes()
+ {
+ return displayedAttributes;
+ }
+
public void setAuditService( TrackedEntityAuditService auditService )
{
this.auditService = auditService;
@@ -213,6 +220,8 @@
// ---------------------------------------------------------------------
attributes = new ArrayList<TrackedEntityAttribute>( attributeService.getAllTrackedEntityAttributes() );
+
+ displayedAttributes = new ArrayList<TrackedEntityAttribute>( attributeService.getTrackedEntityAttributesDisplayInList() );
Collections.sort( attributes, IdentifiableObjectNameComparator.INSTANCE );
for ( TrackedEntityAttributeValue attributeValue : entityInstance.getAttributeValues() )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackedEntityInstanceDashboard.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackedEntityInstanceDashboard.vm 2014-06-20 13:08:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackedEntityInstanceDashboard.vm 2014-07-09 06:01:46 +0000
@@ -266,4 +266,13 @@
var i18n_update_success = '$encoder.jsEscape( $i18n.getString( "update_success" ) , "'")';
var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ) , "'")';
var i18n_please_enter_report_date = '$encoder.jsEscape( $i18n.getString( "please_enter_report_date " ) , "'")';
+
+ #foreach($attribute in $displayedAttributes )
+ var value = getInnerHTML('value_attr' + '$attribute.id')
+ .replace(/^\s*/, "")
+ .replace(/\s*$/, "");
+ if(value!=''){
+ $('#row_attr' + '$attribute.id').show();
+ }
+ #end
</script>
\ No newline at end of file