← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8449: Add reminder-templates of program-stage into details div.

 

------------------------------------------------------------
revno: 8449
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-10-09 17:03:00 +0700
message:
  Add reminder-templates of program-stage into details div. 
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResultDetails.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.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/webapp/dhis-web-caseentry/caseAggregationResultDetails.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResultDetails.vm	2012-02-14 08:31:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResultDetails.vm	2012-10-09 10:03:00 +0000
@@ -44,7 +44,6 @@
 				#end
 			#end
 		#end
-	
 	#else
 		<tr height='5em'>
 			<th>$i18n.getString('program_stage')</th>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm	2012-10-05 05:02:45 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm	2012-10-09 10:03:00 +0000
@@ -13,7 +13,7 @@
 			<td></td>
 			<td>
 				<input type="button" class='button' value="$i18n.getString( 'update' )" onclick='updateEnrollment($programInstance.patient.id, $programInstance.program.id, $programInstance.id, "$programInstance.program.name")'/>
-				<input type="button" class='button' value="$i18n.getString( 'unenroll' )" onclick='unenrollmentForm($programInstance.id)'/>
+				<input type="button" class='button' value="$i18n.getString( 'complete' )" onclick='unenrollmentForm($programInstance.id)'/>
 			</td>
 		</tr>
 	</table>

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm	2012-09-25 03:50:14 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm	2012-10-09 10:03:00 +0000
@@ -3,13 +3,19 @@
     "id": "${programStage.id}",
 	"name": "$!encoder.jsonEncode( ${programStage.name} )",
 	"description": "$!encoder.jsonEncode( ${programStage.description} )",
-	"stageInProgram": "${programStage.stageInProgram}",
 	"minDaysFromStart": "${programStage.minDaysFromStart}",
 	"dataElementCount": "${programStageDataElements.size()}",
 	"standardInterval": "$!programStage.standardInterval",
 	"reportDateDescription": "$!encoder.jsonEncode( ${programStage.reportDateDescription} )",
-	"daysAllowedSendMessage": "$!programStage.daysAllowedSendMessage",
-	"templateMessage": "$!encoder.jsonEncode( ${programStage.templateMessage} )",
+	"patientReminders":[
+	#foreach($patientReminder in $programStage.patientReminders)
+	  {
+		"daysAllowedSendMessage": "$!patientReminder.daysAllowedSendMessage",
+		"templateMessage": "$!encoder.jsonEncode( ${patientReminder.templateMessage} )"
+	  }#if( $velocityCount < $programStage.patientReminders.size() ),#end
+	#end 
+	],
+	
 	"irregular": "$!programStage.irregular",
 	"autoGenerateEvent": "$!programStage.autoGenerateEvent",
 	

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2012-10-08 16:00:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2012-10-09 10:03:00 +0000
@@ -42,7 +42,6 @@
 assign_program_to_orgunits=Assign program to organisation units
 programs=Programs
 no_of_dataelements=Number of data elements to be collected
-stage_in_program=Visit stage in program
 adding_program_stage_failed=Adding program stage failed
 updating_program_stage_failed=Updating program stage failed
 confirm_delete_prorgam_stage=Are you sure you want to delete this program stage?

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js	2012-10-03 04:27:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js	2012-10-09 10:03:00 +0000
@@ -54,7 +54,6 @@
 	jQuery.getJSON( 'getProgramStage.action', { id: programStageId }, function ( json ) {
 		setInnerHTML( 'nameField', json.programStage.name );	
 		setInnerHTML( 'descriptionField', json.programStage.description );
-		setInnerHTML( 'stageInProgramField', json.programStage.stageInProgram );   
 		setInnerHTML( 'scheduledDaysFromStartField', json.programStage.minDaysFromStart ); 
 
 		var irregular = (json.programStage.irregular=='true') ? i18n_yes : i18n_no;
@@ -66,8 +65,17 @@
 		setInnerHTML( 'standardIntervalField', json.programStage.standardInterval );  
 		setInnerHTML( 'dataElementCountField', json.programStage.dataElementCount );   
 		setInnerHTML( 'reportDateDescriptionField', json.programStage.reportDateDescription );
-		setInnerHTML( 'daysAllowedSendMessageField', json.programStage.daysAllowedSendMessage );
-		setInnerHTML( 'templateMessageField', json.programStage.templateMessage );
+		
+		var templateMessage = "";
+		for(var i in json.programStage.patientReminders){
+			var index = eval(i) + 1;
+			templateMessage += "<p class='bold'>" + i18n_template_reminder_message + " " + index + "</p>";
+			templateMessage += "<p class='bold'>" + i18n_days_before_after_due_date + ":</p>" ;
+			templateMessage	+= "<p>" + json.programStage.patientReminders[i].templateMessage + "</p>";
+			templateMessage	+= "<p class='bold'>" + i18n_message + ":</p>";
+			templateMessage	+= "<p>" + json.programStage.patientReminders[i].daysAllowedSendMessage + "</p>";
+		}
+		setInnerHTML('templateMessageField', templateMessage);
 		
 		showDetails();
 	});

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm	2012-06-22 16:46:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm	2012-10-09 10:03:00 +0000
@@ -29,4 +29,7 @@
 	var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ), "'")';
 	var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ), "'")';
 	var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ), "'")';
+	var i18n_template_reminder_message = '$encoder.jsEscape( $i18n.getString( "template_reminder_message" ), "'")';
+	var i18n_days_before_after_due_date = '$encoder.jsEscape( $i18n.getString( "days_before_after_due_date" ), "'")';
+	var i18n_message = '$encoder.jsEscape( $i18n.getString( "message" ), "'")';
 </script>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm	2012-09-25 03:50:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm	2012-10-09 10:03:00 +0000
@@ -43,15 +43,13 @@
 				</div>				
 				<p><label class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
 				<p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>				
-				<p><label class="bold">$i18n.getString( "stage_in_program" ):</label><br><span id="stageInProgramField"></span></p>
 				<p><label class="bold">$i18n.getString( "scheduled_days_from_start" ):</label><br><span id="scheduledDaysFromStartField"></span></p>
 				<p><label class="bold">$i18n.getString( "auto_generate_event" ):</label><br><span id="autoGenerateEventField"></span></p>
 				<p><label class="bold">$i18n.getString( "irregular" ):</label><br><span id="irregularField"></span></p>
 				<p><label class="bold">$i18n.getString( "standard_interval_days" ):</label><br><span id="standardIntervalField"></span></p>
 				<p><label class="bold">$i18n.getString( "report_date_description" ):</label><br><span id="reportDateDescriptionField"></span></p>
 				<p><label class="bold">$i18n.getString( "no_of_dataelements" ):</label><br><span id="dataElementCountField"></span></p>		
-				<p><label class="bold">$i18n.getString( "days_before_due_date" ):</label><br><span id="daysAllowedSendMessageField"></span></p>
-				<p><label class="bold">$i18n.getString( "template_message" ):</label><br><span id="templateMessageField"></span></p>
+				<p><span id="templateMessageField"></span></p>
 			</div>
 		</td>
 	</tr>