dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30971
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15748: Move the program-instance which is completed automatically after completing an event to Complete ...
------------------------------------------------------------
revno: 15748
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-06-18 21:30:41 +0800
message:
Move the program-instance which is completed automatically after completing an event to Complete program box in TEI Dashboard
removed:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonResponseProgramCompleted.vm
added:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonResponseProgramCompleted.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackedEntityInstanceRegistrationList.vm
modified:
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CompleteDataEntryAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
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/javascript/entry.js
--
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-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java 2014-05-20 16:30:51 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java 2014-06-18 13:30:41 +0000
@@ -529,7 +529,8 @@
for ( ProgramStageInstance stageInstance : stageInstances )
{
- if ( !stageInstance.isCompleted() || stageInstance.getProgramStage().getIrregular() )
+ if ( (!stageInstance.isCompleted() && stageInstance.getStatus().intValue() != ProgramStageInstance.SKIPPED_STATUS)
+ || stageInstance.getProgramStage().getIrregular() )
{
return false;
}
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2014-05-21 08:04:49 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2014-06-18 13:30:41 +0000
@@ -367,6 +367,23 @@
// ---------------------------------------------------------------------
updateProgramStageInstance( programStageInstance );
+
+ // ---------------------------------------------------------------------
+ // Check Completed status for all of ProgramStageInstance of
+ // ProgramInstance
+ // ---------------------------------------------------------------------
+
+ if ( !programStageInstance.getProgramInstance().getProgram().getType()
+ .equals( Program.SINGLE_EVENT_WITHOUT_REGISTRATION ) )
+ {
+ boolean canCompleted = programInstanceService.canAutoCompleteProgramInstanceStatus( programStageInstance
+ .getProgramInstance() );
+ if ( canCompleted )
+ {
+ programInstanceService.completeProgramInstanceStatus( programStageInstance.getProgramInstance() );
+ }
+ }
+
}
@Override
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CompleteDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CompleteDataEntryAction.java 2014-03-26 14:01:14 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CompleteDataEntryAction.java 2014-06-18 13:30:41 +0000
@@ -29,7 +29,7 @@
*/
import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.program.Program;
+import org.hisp.dhis.program.ProgramInstance;
import org.hisp.dhis.program.ProgramInstanceService;
import org.hisp.dhis.program.ProgramStageInstance;
import org.hisp.dhis.program.ProgramStageInstanceService;
@@ -53,13 +53,6 @@
this.programStageInstanceService = programStageInstanceService;
}
- private ProgramInstanceService programInstanceService;
-
- public void setProgramInstanceService( ProgramInstanceService programInstanceService )
- {
- this.programInstanceService = programInstanceService;
- }
-
private I18nFormat format;
public void setFormat( I18nFormat format )
@@ -112,24 +105,11 @@
programStageInstanceService.completeProgramStageInstance( programStageInstance, format );
- // ---------------------------------------------------------------------
- // Check Completed status for all of ProgramStageInstance of
- // ProgramInstance
- // ---------------------------------------------------------------------
-
- if ( !programStageInstance.getProgramInstance().getProgram().getType()
- .equals( Program.SINGLE_EVENT_WITHOUT_REGISTRATION ) )
+ if(programStageInstance.getProgramInstance().getStatus()==ProgramInstance.STATUS_COMPLETED )
{
- boolean canCompleted = programInstanceService.canAutoCompleteProgramInstanceStatus( programStageInstance
- .getProgramInstance() );
- if ( !canCompleted )
- {
- return SUCCESS;
- }
-
- programInstanceService.completeProgramInstanceStatus( programStageInstance.getProgramInstance() );
+ return "programCompleted";
}
- return "programcompleted";
+ return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2014-06-17 14:11:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2014-06-18 13:30:41 +0000
@@ -83,7 +83,6 @@
scope="prototype">
<property name="programStageInstanceService"
ref="org.hisp.dhis.program.ProgramStageInstanceService" />
- <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
</bean>
<bean
=== 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 2014-06-17 08:15:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2014-06-18 13:30:41 +0000
@@ -73,9 +73,11 @@
<action name="completeDataEntry"
class="org.hisp.dhis.caseentry.action.caseentry.CompleteDataEntryAction">
+ <result name="input" type="velocity-json">/dhis-web-commons/ajax/jsonResponseInput.vm
+ </result>
<result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm
</result>
- <result name="programcompleted" type="velocity-json">/dhis-web-caseentry/jsonResponseProgramCompleted.vm
+ <result name="programCompleted" type="velocity-json">/dhis-web-caseentry/jsonResponseProgramCompleted.vm
</result>
<param name="requiredAuthorities">F_TRACKED_ENTITY_DATAVALUE_ADD,F_TRACKED_ENTITY_DATAVALUE_DELETE</param>
</action>
=== 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 2014-06-10 11:21:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2014-06-18 13:30:41 +0000
@@ -1207,112 +1207,66 @@
showSuccessMessage(i18n_enrol_success);
});
}
+
function unenrollmentForm(programInstanceId, status) {
var comfirmMessage = i18n_complete_program_confirm_message;
if (status == 2)
comfirmMessage = i18n_quit_confirm_message;
if ( confirm(comfirmMessage) ) {
- $.ajax({
- type : "POST",
- url : 'setProgramInstanceStatus.action',
- data : "programInstanceId=" + programInstanceId
- + "&status=" + status,
- success : function(json) {
- var type = $("#tr1_" + programInstanceId).attr('type');
- var programStageInstanceId = $(
- "#tr1_" + programInstanceId).attr(
- 'programStageInstanceId');
- var completed = "<tr id='tr1_"
- + programInstanceId
- + "' type='"
- + type
- + "' programStageInstanceId='"
- + programStageInstanceId
- + "' onclick='javascript:loadActiveProgramStageRecords("
- + programInstanceId + ");' >";
- completed += $('#td_' + programInstanceId).parent()
- .html()
- + "</tr>";
- var activeEvent2 = $("#tr2_" + programInstanceId);
- if (activeEvent2.length > 0) {
- completed += "<tr class='hidden'>"
- + activeEvent2.parent().html() + "</tr>";
- }
- $('#completedTB').prepend(completed);
- $('#activeTB [id=tr1_' + programInstanceId + ']')
- .remove();
- $('#activeTB [id=tr2_' + programInstanceId + ']')
- .remove();
- $("[id=tab-2] :input").prop('disabled', true);
- $("[id=tab-3] :input").prop('disabled', true);
- $("[id=tab-4] :input").prop('disabled', true);
- $("[id=tab-5] :input").prop('disabled', true);
- $("[id=tab-3] :input").datepicker("destroy");
- $("#completeProgram").attr('disabled', true);
- $("#incompleteProgram").attr('disabled', false);
- // disable remove event icons
- $('[id=tab-3]').find('img').parent().removeAttr("href");
- if (status == 1) {
- showSuccessMessage(i18n_complete_success);
- } else if (status == 2) {
- showSuccessMessage(i18n_program_cancelled_success);
- } else {
- showSuccessMessage(i18n_program_active_success);
- }
- }
- });
+ $.ajax({
+ type : "POST",
+ url : 'setProgramInstanceStatus.action',
+ data : "programInstanceId=" + programInstanceId + "&status=" + status,
+ success : function(json) {
+ moveToCompleteDiv( programInstanceId, programStageInstanceId );
+
+ $("[id=tab-2] :input").prop('disabled', true);
+ $("[id=tab-3] :input").prop('disabled', true);
+ $("[id=tab-4] :input").prop('disabled', true);
+ $("[id=tab-5] :input").prop('disabled', true);
+ $("[id=tab-3] :input").datepicker("destroy");
+ $("#completeProgram").attr('disabled', true);
+ $("#incompleteProgram").attr('disabled', false);
+ // disable remove event icons
+ $('[id=tab-3]').find('img').parent().removeAttr("href");
+ if (status == 1) {
+ showSuccessMessage(i18n_complete_success);
+ } else if (status == 2) {
+ showSuccessMessage(i18n_program_cancelled_success);
+ } else {
+ showSuccessMessage(i18n_program_active_success);
+ }
+ }
+ });
}
}
+
function reenrollmentForm(programInstanceId) {
if ( confirm(i18n_reenrollment_confirm_message) ) {
-$.ajax({
- type : "POST",
- url : 'setProgramInstanceStatus.action',
- data : "programInstanceId=" + programInstanceId
- + "&completed=false",
- success : function(json) {
- var type = jQuery("#tr1_" + programInstanceId).attr(
- 'type');
- var programStageInstanceId = jQuery(
- "#tr1_" + programInstanceId).attr(
- 'programStageInstanceId');
- var completed = "<tr type='"
- + type
- + "' programStageInstanceId='"
- + programStageInstanceId
- + "' onclick='javascript:loadActiveProgramStageRecords("
- + programInstanceId + ");' >";
- completed += $('#td_' + programInstanceId).parent()
- .html()
- + "</tr>";
- var activeEvent = $("#tr2_" + programInstanceId);
- if (activeEvent.length > 0) {
- completed += "<tr>" + activeEvent.parent().html()
- + "</tr>";
- }
- $('#activeTB').prepend(completed);
- $('#completedTB [id=tr1_' + programInstanceId + ']')
- .remove();
- $('#completedTB [id=tr2_' + programInstanceId + ']')
- .remove();
- $("[id=tab-1] :input").prop('disabled', false);
- // Disable skipped events
- $("[id=tab-1] [status=5]").prop('disabled', true);
- $("[id=tab-2] :input").prop('disabled', false);
- $("[id=tab-3] :input").prop('disabled', false);
- $("[id=tab-4] :input").prop('disabled', false);
- $("[id=tab-5] :input").prop('disabled', false);
- $("#completeProgram").attr('disabled', false);
- $("#incompleteProgram").attr('disabled', true);
- $("[id=tab-3] :input").datepicker("destroy");
- // enable remove event icons
- $('[id=tab-3]').find('img').parent().each(function() {
- var e = $(this);
- e.attr('href', e.attr("link"));
- });
- showSuccessMessage(i18n_reenrol_success);
- }
+ $.ajax({
+ type : "POST",
+ url : 'setProgramInstanceStatus.action',
+ data : "programInstanceId=" + programInstanceId + "&completed=false",
+ success : function(json) {
+ moveToActiveDiv( programInstanceId, programStageInstanceId );
+ $("[id=tab-1] :input").prop('disabled', false);
+ // Disable skipped events
+ $("[id=tab-1] [status=5]").prop('disabled', true);
+ $("[id=tab-2] :input").prop('disabled', false);
+ $("[id=tab-3] :input").prop('disabled', false);
+ $("[id=tab-4] :input").prop('disabled', false);
+ $("[id=tab-5] :input").prop('disabled', false);
+ $("#completeProgram").attr('disabled', false);
+ $("#incompleteProgram").attr('disabled', true);
+ $("[id=tab-3] :input").datepicker("destroy");
+ // enable remove event icons
+ $('[id=tab-3]').find('img').parent().each(function() {
+ var e = $(this);
+ e.attr('href', e.attr("link"));
});
+ showSuccessMessage(i18n_reenrol_success);
+ }
+ });
}
}
function removeProgramInstance(programInstanceId) {
@@ -1921,3 +1875,45 @@
hideById('showSearchCriteriaDiv');
}
+// ----------------------------------------------------------------------------
+// Program boxes in Dashboard
+// ----------------------------------------------------------------------------
+
+function moveToCompleteDiv( programInstanceId, programStageInstanceId )
+{
+ var type = $("#tr1_" + programInstanceId).attr('type');
+ var programStageInstanceId = $( "#tr1_" + programInstanceId).attr('programStageInstanceId');
+
+ var completed = "<tr id='tr1_"
+ + programInstanceId
+ + "' type='" + type
+ + "' programStageInstanceId='" + programStageInstanceId
+ + "' onclick='javascript:loadActiveProgramStageRecords(" + programInstanceId + ");' >";
+ completed += $('#td_' + programInstanceId).parent().html() + "</tr>";
+
+ var activeEvent2 = $("#tr2_" + programInstanceId);
+ if (activeEvent2.length > 0) {
+ completed += "<tr class='hidden'>" + activeEvent2.parent().html() + "</tr>";
+ }
+ $('#completedTB').prepend(completed);
+ $('#activeTB [id=tr1_' + programInstanceId + ']').remove();
+ $('#activeTB [id=tr2_' + programInstanceId + ']').remove();
+}
+
+function moveToActiveDiv( programInstanceId, programStageInstanceId )
+{
+ var type = jQuery("#tr1_" + programInstanceId).attr( 'type');
+ var programStageInstanceId = jQuery( "#tr1_" + programInstanceId).attr('programStageInstanceId');
+ var completed = "<tr type='" + type
+ + "' programStageInstanceId='" + programStageInstanceId
+ + "' onclick='javascript:loadActiveProgramStageRecords(" + programInstanceId + ");' >";
+ completed += $('#td_' + programInstanceId).parent().html() + "</tr>";
+ var activeEvent = $("#tr2_" + programInstanceId);
+ if (activeEvent.length > 0) {
+ completed += "<tr>" + activeEvent.parent().html() + "</tr>";
+ }
+ $('#activeTB').prepend(completed);
+ $('#completedTB [id=tr1_' + programInstanceId + ']').remove();
+ $('#completedTB [id=tr2_' + programInstanceId + ']').remove();
+}
+
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2014-06-01 13:44:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2014-06-18 13:30:41 +0000
@@ -569,12 +569,13 @@
return;
} else {
if( confirm(i18n_complete_confirm_message) ) {
+ var programStageInstanceId = getFieldValue( 'programStageInstanceId' );
$.ajax({
url: 'completeDataEntry.action',
dataType: 'json',
cache: false,
data: {
- programStageInstanceId: getFieldValue( 'programStageInstanceId' )
+ programStageInstanceId: programStageInstanceId
},
type: 'POST'
} ).done(function(json) {
@@ -591,9 +592,8 @@
showCreateNewEvent(programInstanceId, programStageUid);
}
- if( getProgramType() == '2' || json.response == 'programcompleted' ) {
- var completedRow = $('#td_' + programInstanceId).html();
- $('#completedList').append('<option value="' + programInstanceId + '">' + getInnerHTML('infor_' + programInstanceId) + '</option>');
+ if( getProgramType() == '2' || json.response == 'programCompleted' ) {
+ moveToCompleteDiv( programInstanceId, programStageInstanceId );
}
var blocked = $('#entryFormContainer [id=blockEntryForm]').val();
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonResponseProgramCompleted.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonResponseProgramCompleted.vm 2012-12-10 12:54:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonResponseProgramCompleted.vm 1970-01-01 00:00:00 +0000
@@ -1,4 +0,0 @@
-{
- "response": "programcompleted",
- "message": "$!encoder.jsonEncode( ${message} )"
-}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonResponseProgramCompleted.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonResponseProgramCompleted.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonResponseProgramCompleted.vm 2014-06-18 13:30:41 +0000
@@ -0,0 +1,4 @@
+{
+ "response": "programCompleted",
+ "message": "$!encoder.jsonEncode( ${message} )"
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackedEntityInstanceRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackedEntityInstanceRegistrationList.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackedEntityInstanceRegistrationList.vm 2014-06-18 13:30:41 +0000
@@ -0,0 +1,180 @@
+<table>
+ <tr>
+ <td class='text-column'>
+ $i18n.getString( "the_following_tracked_entity_instances_found_in" ) <span id='orgunitInfor'></span> <span id='enrollmentInfor'></span>
+ <script>
+ setInnerHTML('orgunitForSearch',"$organisationUnit.name");
+ var i18n_for = '$encoder.jsEscape( $i18n.getString( "for_infor" ), "'")';
+ var i18n_enrollments_in = '$encoder.jsEscape( $i18n.getString( "enrollments_in" ), "'")';
+ var i18n_program = '$encoder.jsEscape( $i18n.getString( "program_infor" ), "'")';
+ if( getFieldValue('programIdAddTrackedEntity') != "" )
+ {
+ var status = jQuery('#statusEnrollment option:selected').text();
+ var programName = jQuery('#programIdAddTrackedEntity option:selected').text();
+ var title = i18n_for + " " + status + " " + i18n_enrollments_in + " " + programName + " " + i18n_program;
+ setInnerHTML('enrollmentInfor', title);
+ }
+ </script>
+ </td>
+ </tr>
+ <tr>
+ <td class='text-column' >
+ #if( $!total != 0)
+ $i18n.getString( "total_result" ): $!total
+ #else
+ $i18n.getString("no_result_found")
+ #end
+ </td>
+ </tr>
+</table>
+
+#if( $entityInstances.size() > 0 )
+<table class="mainPageTable">
+ <tr>
+ <td>
+ <table class="listTable" id="entityInstanceList" width='100%'>
+ <col width="30"/>
+ #if($program)
+ #foreach( $programAttribute in $program.attributes )
+ #if($programAttribute.displayInList=='true')
+ <col/>
+ #end
+ #end
+ #else
+ #foreach( $attribute in $attributes)
+ <col/>
+ #end
+ #end
+
+ <col width="200"/>
+
+ <thead>
+ <tr>
+ <th>#</th>
+ #if($program)
+ #foreach( $programAttribute in $program.attributes )
+ #if($programAttribute.displayInList=='true')
+ <th id="attributeName">$encoder.htmlEncode($programAttribute.attribute.displayName)</th>
+ #end
+ #end
+ #else
+ #foreach( $attribute in $attributes)
+ <th id="attributeName">$encoder.htmlEncode($attribute.displayName)</th>
+ #end
+ #end
+
+ <th style="text-align:center">$i18n.getString( "operations" )</th>
+ </tr>
+ </thead>
+
+ <tbody id="list">
+ #foreach( $entityInstance in $entityInstances )
+ <tr id="tr${entityInstance.id}">
+
+ <td>
+ #set( $nr = ( ( $paging.getCurrentPage() - 1 ) * $paging.pageSize ) + $velocityCount )
+ $nr
+ </td>
+ #if($program)
+ #foreach( $programAttribute in $program.attributes )
+ #set($value="")
+ #if($programAttribute.displayInList=='true')
+ <td style="cursor:pointer;" onclick="javascript:isDashboard=true;showTrackedEntityInstanceDashboardForm( '$entityInstance.uid' )">
+ #foreach( $attributeValue in $entityInstance.attributeValues)
+ #if($!attributeValue.attribute.id==$programAttribute.attribute.id)
+ #set($value=$attributeValue.value)
+ #if( $programAttribute.attribute.valueType == 'bool')
+ #set($value=$i18n.getString($attributeValue.value))
+ #elseif( $programAttribute.attribute.valueType == 'users')
+ #set($value=$mapUsers.get($attributeValue.value))
+ #end
+ #end
+ #end
+ <a>$!encoder.htmlEncode($value)</a>
+ </td>
+ #end
+ #end
+ #else
+ #foreach( $attribute in $attributes)
+ #set($value="")
+ <td style="cursor:pointer;" onclick="javascript:isDashboard=true;showTrackedEntityInstanceDashboardForm( '$entityInstance.uid' )">
+ #foreach( $attributeValue in $entityInstance.attributeValues)
+ #if($!attributeValue.attribute.id==$attribute.id)
+ #set($value=$attributeValue.value)
+ #if( $attribute.valueType == 'bool')
+ #set($value=$i18n.getString($attributeValue.value))
+ #elseif( $attribute.valueType == 'users')
+ #set($value=$mapUsers.get($attributeValue.value))
+ #end
+ #end
+ #end
+ <a>$!encoder.htmlEncode($value)</a>
+ </td>
+ #end
+ #end
+
+ <td>
+ <a href="javascript:isDashboard=true;showTrackedEntityInstanceDashboardForm( '$entityInstance.uid' )" title='$i18n.getString( "dashboard" )'><img src="../images/enroll.png" alt='$i18n.getString( "dashboard" )'></a>
+ <a href="javascript:isDashboard=false;showUpdateTrackedEntityInstanceForm( '$entityInstance.uid' )" title='$i18n.getString( "edit_profile" )'><img src="../images/edit.png" alt='$i18n.getString( "edit_profile" )'></a>
+ <a href="javascript:setFieldValue( 'isShowTrackedEntityInstanceList', 'false' ); showRelationshipList('$entityInstance.uid')" title='$i18n.getString( "manage_relationship" )'><img src="../images/relationship.png" alt='$i18n.getString( "manage_relationship" )'></a>
+ #if( $auth.hasAccess( "dhis-web-caseentry", "getTrackedEntityInstanceLocation" ) )
+ <a href="javascript:isDashboard=false;getTrackedEntityInstanceLocation( '$entityInstance.uid' );" title='$i18n.getString( "change_location" )'><img src="../icons/dataentry.png" alt='$i18n.getString( "change_tracked_entity_instance_location" )' style='width:25px; height:25px'></a>
+ #end
+ <a href="javascript:removeTrackedEntityInstance( '$entityInstance.uid' )" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
+ <a href="javascript:showTrackedEntityInstanceHistory( '$entityInstance.uid' )" title='$i18n.getString( "tracked_entity_instance_details_and_history" )'><img src="../images/information.png" alt='$i18n.getString( "tracked_entity_instance_details_and_history" )'></a>
+ </td>
+
+ </tr>
+ #end
+ </tbody>
+
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="6">
+ <p></p>
+ <div class="paging-container">
+ #parse( "/dhis-web-commons/paging/paging.vm" )
+ </div>
+ </td>
+ <td></td>
+ </tr>
+</table>
+<div id="detailsInfo"></div>
+
+#end
+<script type="text/javascript">
+ jQuery(document).ready(function(){
+ setTableStyles();
+ });
+ var i18n_tracked_entity_instance_details_and_history = '$encoder.jsEscape( $i18n.getString( "tracked_entity_instance_details_and_history" ) , "'" )';
+ var i18n_id = '$encoder.jsEscape( $i18n.getString( "id" ), "'")';
+ var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
+ var i18n_select = '[' + '$encoder.jsEscape( $i18n.getString( "select" ), "'")' + ']';
+ var i18n_program_stages_history_plan = '$encoder.jsEscape( $i18n.getString( "program_stages_history_plan" ) , "'")';
+ var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
+ var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
+ var i18n_value_must_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_positive_integer" ) , "'")';
+ var i18n_value_must_zero_or_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_zero_or_positive_integer" ) , "'")';
+ var i18n_value_must_negative_integer = '$encoder.jsEscape( $i18n.getString( "value_must_negative_integer" ) , "'")';
+ var i18n_value_must_unit_interval = '$encoder.jsEscape( $i18n.getString( "value_must_unit_interval" ) , "'")';
+ var i18n_invalid_date = '$encoder.jsEscape( $i18n.getString( "invalid_date" ) , "'")' + ".\n " + '$encoder.jsEscape( $i18n.getString( "format_date" ) , "'")' + " '" + dateFormat.replace('yy', 'yyyy') + " '" ;
+ var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';
+ var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
+ var i18n_searching_tracked_entity_instance_failed = '$encoder.jsEscape( $i18n.getString( "searching_tracked_entity_instance_failed" ) , "'")';
+ var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
+ var i18n_quit_confirm_message = '$encoder.jsEscape( $i18n.getString( "quit_confirm_message" ) , "'")';
+ var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
+ var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
+ var i18n_date_is_greater_then_or_equals_due_date = '$encoder.jsEscape( $i18n.getString( "date_is_greater_then_or_equals_due_date" ) , "'")';
+ var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
+ var i18n_scheduled_for = '$encoder.jsEscape( $i18n.getString( "scheduled_for" ) , "'")';
+ var i18n_show_all_items = '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'")';
+ var i18n_create_new_event = '$encoder.jsEscape( $i18n.getString( "create_new_event" ) , "'")';
+ var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ) , "'")';
+ var i18n_color_quick_help = '$encoder.jsEscape( $i18n.getString( "color_quick_help" ) , "'")';
+ var i18n_reenrollment_confirm_message = '$encoder.jsEscape( $i18n.getString( "reenrollment_confirm_message" ) , "'")';
+ var i18n_confirm_delete_tracked_entity_instance = '$encoder.jsEscape( $i18n.getString( "confirm_delete_tracked_entity_instance" ) , "'")';
+ var i18n_complete_program_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_program_confirm_message" ) , "'")';
+</script>