← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11940: Add messages and comment of program instance into Message history tab in Dashboard.

 

------------------------------------------------------------
revno: 11940
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-09-06 02:20:05 +0700
message:
  Add messages and comment of program instance into Message history tab in Dashboard.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/eventMessage.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/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-09-02 21:20:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-09-05 19:20:05 +0000
@@ -416,7 +416,7 @@
 please_select_program_stage = Please select program stage
 comment_added = Comment added
 enroll_program = Enroll into program
-comments_and_sms_message = Message history
+comments_and_sms_message = Messages
 no_message = No message
 program_report = Program report
 show_hide_content = Show/Hide content

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/eventMessage.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/eventMessage.vm	2013-08-27 08:37:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/eventMessage.vm	2013-09-05 19:20:05 +0000
@@ -19,6 +19,33 @@
 	</thead>
 	<tbody id='commentReportTB' name="messageTB">
 		#set( $mark = false )
+		#if($programInstance.patientComment)
+			<tr id="comment_$patientComment.id" #alternate( $mark )>
+				<td>$format.formatDateTime($programInstance.patientComment.createdDate)</td>
+				<td>$i18n.getString('all')</td>
+				<td>$programInstance.patientComment.creator</td>
+				<td>$i18n.getString('comment')</td>
+				<td></td>
+				<td>$programInstance.patientComment.commentText</td>
+				<td>
+					<a href="javascript:removeComment( '$programInstance.id', '$programInstance.patientComment.id' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
+				</td>
+			</tr>
+		#end
+		#foreach( $sms in $programInstance.outboundSms )
+			<tr id="tr${sms.id}" #alternate( $mark )>
+				<td>$format.formatDateTime($!sms.date)</td>
+				<td>$i18n.getString('all')</td>
+				<td>$sms.sender</td>
+				<td>$i18n.getString('message')</td>
+				<td #if( $sms.status=='ERROR') style="color:red" #end >$sms.status</td>
+				<td>$sms.message</td>
+				<td>
+					<a href="javascript:removeMessage( $programInstances.id, '', $sms.id )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
+				</td>
+			</tr>
+			#set( $mark = !$mark )
+		#end
 		#foreach($programStageInstance in $programStageInstances)
 			#foreach( $comment in $programStageInstance.patientComments )
 				<tr id="comment_$comment.id" #alternate( $mark )>
@@ -35,20 +62,7 @@
 				#set( $mark = !$mark )
 			#end
 		#end
-		#foreach( $sms in $programInstances.outboundSms )
-			<tr id="tr${sms.id}" #alternate( $mark )>
-				<td>$format.formatDateTime($!sms.date)</td>
-				<td>$programStageInstance.programStage.displayName</td>
-				<td>$sms.sender</td>
-				<td>$i18n.getString('message')</td>
-				<td #if( $sms.status=='ERROR') style="color:red" #end >$sms.status</td>
-				<td>$sms.message</td>
-				<td>
-					<a href="javascript:removeMessage( $programInstances.id, '', $sms.id )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
-				</td>
-			</tr>
-			#set( $mark = !$mark )
-		#end
+	
 		#foreach($programStageInstance in $programStageInstances)
 			#foreach( $sms in $programStageInstance.outboundSms )
 				<tr id="tr${sms.id}" #alternate( $mark )>