← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9335: Display details of persons when to click on a number in statistical program report (DONE).

 

------------------------------------------------------------
revno: 9335
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-12-17 10:12:41 +0700
message:
  Display details of persons when to click on a number in statistical program report (DONE).
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramDetailsReport.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReport.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReportSelect.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css


--
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/javascript/statisticalReport.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js	2012-12-17 02:42:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js	2012-12-17 03:12:41 +0000
@@ -73,3 +73,28 @@
 	showById('reportTbl');
 	hideById('detailsDiv');
 }
+
+function loadDataEntry( programStageInstanceId ) 
+{
+	jQuery('#viewRecordsDiv' )
+		.load( 'viewProgramStageRecords.action?programStageInstanceId=' + programStageInstanceId
+		,function(){
+			jQuery("#viewRecordsDiv :input" ).attr("disabled", true);
+			jQuery("#viewRecordsDiv :input" ).datepicker("destroy");
+			showById("reportTitle");
+			hideById("patientInforTB");
+			jQuery(".ui-combobox" ).hide();
+			hideById('inputCriteriaDiv');
+		})
+		.dialog({
+			title: i18n_reports,
+			maximize: true, 
+			closable: true,
+			modal:false,
+			overlay:{background:'#000000', opacity:0.1},
+			width: 840,
+			height: 400
+		});
+}
+
+function entryFormContainerOnReady(){}
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramDetailsReport.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramDetailsReport.vm	2012-12-17 02:46:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramDetailsReport.vm	2012-12-17 03:12:41 +0000
@@ -7,11 +7,10 @@
 </script>
 
 <input type="hidden" id="programStageName" name="programStageName" value="$!encoder.jsEncode($programStage.name)">
-<table>
+<table width="100%">
 	<tr>
 		<td>
 			<table class="listTable gridTable">
-				<colgroup>
 					 <col width="30"/>
 					 <col/>
 					 <col/>
@@ -19,16 +18,18 @@
 					 <col/>
 					 <col/>
 					 <col/>
-				</colgroup>
+				
 				<thead>
 					<tr>
 						<th>#</th>
+						<th>$i18n.getString( "orgunit" )</th>	
 						<th>$i18n.getString('full_name')</th>
 						<th>$i18n.getString( "gender" )</th>
 						<th>$i18n.getString( "date_of_birth" )</th> 
 						<th>$i18n.getString( "age" )</th>
 						<th>$i18n.getString( "phone_number" )</th>
-						<th>$i18n.getString( "orgunit" )</th>	
+						<th>$i18n.getString( "due_date" )</th>
+						<th>$i18n.getString( "report_date" )</th>
 					</tr>
 				</thead>
 				<tbody>
@@ -39,12 +40,18 @@
 							#set( $nr = ( ( $paging.getCurrentPage() - 1  ) * $paging.pageSize ) + $velocityCount )
 							$nr
 						</td>
+						<td>$!encoder.htmlEncode($!patient.organisationUnit.name)</td>
 						<td>$!encoder.htmlEncode($patient.getFullName())</td>
 						<td>$i18n.getString($!patient.gender)</td>
 						<td>$format.formatDate( $!patient.birthDate)</td>
 						<td>$!patient.getAge()</td>
 						<td>$!patient.phoneNumber</td>
-						<td>$!encoder.htmlEncode($!patient.organisationUnit.name)</td>
+						<td>$format.formatDate($!programStageInstance.dueDate)</td>
+						<td>
+							#if($programStageInstance.executionDate)
+								<a href="javascript:loadDataEntry($programStageInstance.id)">$format.formatDate($programStageInstance.executionDate)</a>
+							#end
+						</td>
 					</tr>
 					#end
 				</tbody>
@@ -61,6 +68,8 @@
   </tr>
 </table>
 
+<div id="viewRecordsDiv"></div>
+
 <script>
 	jQuery(document).ready(function(){
 		setTableStyles();

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReport.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReport.vm	2012-12-17 02:46:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReport.vm	2012-12-17 03:12:41 +0000
@@ -2,7 +2,7 @@
 
 <div id="reportTbl" name="reportTbl">
 	<h5 id="gridSubtitle">$!encoder.htmlEncode( $grid.subtitle )</h5>
-	<table class="listTable gridTable">
+	<table class="listTable gridTable" width="150px;">
 		<thead>
 			<tr>
 				#foreach( $header in $grid.getVisibleHeaders() )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReportSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReportSelect.vm	2012-12-17 02:42:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramReportSelect.vm	2012-12-17 03:12:41 +0000
@@ -74,4 +74,5 @@
 	var i18n_scheduled = '$encoder.jsEscape( $i18n.getString( "scheduled" ), "'")';    	
 	var i18n_overdue = '$encoder.jsEscape( $i18n.getString( "overdue" ), "'")';   
 	var i18n_total_result = '$encoder.jsEscape( $i18n.getString( "total_result" ), "'")'; 	
+	var i18n_reports = '$encoder.jsEscape( $i18n.getString( "reports" ), "'")'; 	
 </script>   

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-12-17 02:42:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-12-17 03:12:41 +0000
@@ -500,6 +500,5 @@
 
 .gridTable th, .gridTable td {
     line-height: 170%;
-    width: 150px;
 }