dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11686
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3397: Merging Code from 2.1 - work in progress
------------------------------------------------------------
revno: 3397
committer: Bharath <chbharathk@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-04-15 17:05:33 +0530
message:
Merging Code from 2.1 - work in progress
modified:
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusFront.vm
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusResult.vm
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/groupWiseDataStatusResult.vm
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/summarySatusResult.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 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusFront.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusFront.vm 2011-03-01 09:42:21 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusFront.vm 2011-04-15 11:35:33 +0000
@@ -1,70 +1,70 @@
-<style type='text/css'>
- .hidden{ display: none; }
-</style>
-
-<script>
- // Global Variables
- var selCategory = "";
- var selFacility = "";
- var ouName = "";
- var dsName = "";
- var sDateIndex = 0;
- var eDateIndex = 0;
- var sDate = "";
- var eDate = "";
- var curPeriodType = "";
-</script>
-
-<h3>DataStatus Form</h3>
-<hr />
-
-<form id="ChartGenerationForm" name="ChartGenerationForm" method="get" target="chartWindow1">
- <table align="center" style="border-collapse: collapse; margin-top: 0;" cellpadding="0" cellspacing="0" width="80%" border="0">
- <tr>
- <td class="NormalB">
- $i18n.getString( "ds_dataset_list" ) : <br>
- <select id="selectedDataSets" name="selectedDataSets" onchange="getdSetPeriods()" style="width:300px">
- #foreach ( $dataSet in $dataSetList )
- <option value='$dataSet.id' title='$dataSet.name'>$dataSet.name</option>
- #end
- </select>
- <br/><br/>
- $i18n.getString( "ga_facilityby" )<br/>
- <select id="facilityLB" name="facilityLB" onchange="facilityChangeFunction(event)" style="width:300px">
- <option value="random" >Selected</option>
- <option value="immChildren" selected>Immediate Children</option>
- <option value="children" >Child Tree</option>
- </select>
- <br/>
- <select class='hidden' id="categoryLB" name="categoryLB" onchange="categoryChangeFunction(event)" disabled>
- <option value="period">Period</option>
- <option value="facility" selected>Facility</option>
- </select>
- <br/>
- <input type="button" name="ViewStatus" value="View DataStatus" style="width:300px;height:25px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('DataStatus')"/><br/><br/>
- <input type="button" name="ViewGroupWise" value="View By Data Element Group" style="width:300px;height:25px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('GroupWiseStatus')"/><br/><br/>
- <input type="button" name="ViewSummary" value="View DataSummary" style="width:300px;height:25px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('SummaryStatus')"/><br/><br/>
- <input type="button" name="LastUpdatedStatus" value="User Details" style="width:300px;height:25px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('LastUpdatedStatus')"/><br/><br/>
- <input type="button" name="ValidationStatus" value="Validation Status" style="width:300px;height:25px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('ValidationStatus')"/>
- </td>
- <td class="NormalB">
- <input type="checkbox" name="includeZeros" id="includeZeros" checked> Include Zero
- <br/><br/>
- $i18n.getString( "ga_orgunit" )<br />
- <select name="orgUnitListCB" id="orgUnitListCB" multiple style="width:250px;height:125px" ondblclick="remOUFunction()">
- </select>
- <br/><br/>
- $i18n.getString( "ga_from" )<br />
- <select id="sDateLB" name="sDateLB" style="width:250px"></select>
- <br/><br/>
- $i18n.getString( "ga_to" )<br />
- <select id="eDateLB" name="eDateLB" style="width:250px"></select>
- </td>
- </tr>
- </table>
- <input type="hidden" name="selectedButton" id="selectedButton"/>
-</form>
-
-<script>
- getdSetPeriods();
+<style type='text/css'>
+ .hidden{ display: none; }
+</style>
+
+<script>
+ // Global Variables
+ var selCategory = "";
+ var selFacility = "";
+ var ouName = "";
+ var dsName = "";
+ var sDateIndex = 0;
+ var eDateIndex = 0;
+ var sDate = "";
+ var eDate = "";
+ var curPeriodType = "";
+</script>
+
+<h3>DataStatus Form</h3>
+<hr />
+
+<form id="ChartGenerationForm" name="ChartGenerationForm" method="get" target="chartWindow1">
+ <table align="center" style="border-collapse: collapse; margin-top: 0;" cellpadding="0" cellspacing="0" width="80%" border="0">
+ <tr>
+ <td class="NormalB">
+ 1. $i18n.getString( "ds_dataset_list" ) : <br/>
+ <select id="selectedDataSets" name="selectedDataSets" onchange="getdSetPeriods()" style="width:300px">
+ #foreach ( $dataSet in $dataSetList )
+ <option value='$dataSet.id' title='$dataSet.name'>$dataSet.name</option>
+ #end
+ </select>
+ <br/><br/>
+ 2. $i18n.getString( "ga_facilityby" )<br/>
+ <select id="facilityLB" name="facilityLB" onchange="facilityChangeFunction(event)" style="width:300px">
+ <option value="random" >Selected</option>
+ <option value="immChildren" selected>Immediate Children</option>
+ <option value="children" >Child Tree</option>
+ </select>
+ <br/>
+ <select class='hidden' id="categoryLB" name="categoryLB" onchange="categoryChangeFunction(event)" disabled>
+ <option value="period">Period</option>
+ <option value="facility" selected>Facility</option>
+ </select>
+ <br/>
+ 3. $i18n.getString( "ga_orgunit" )<br />
+ <select name="orgUnitListCB" id="orgUnitListCB" multiple style="width:300px;height:80px" ondblclick="remOUFunction()">
+ </select>
+ <br/><br/>
+ 4. $i18n.getString( "ga_from" )<br />
+ <select id="sDateLB" name="sDateLB" style="width:300px"></select>
+ <br/><br/>
+ 5. $i18n.getString( "ga_to" )<br />
+ <select id="eDateLB" name="eDateLB" style="width:300px"></select>
+ </td>
+ <td class="NormalB">
+ <input type="checkbox" name="includeZeros" id="includeZeros" checked> Include Zero
+ <br/><br/>
+ <input type="button" name="ViewStatus" value="View DataStatus" style="width:250px;height:30px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('DataStatus')"/><br/><br/>
+ <input type="button" name="ViewGroupWise" value="View By Data Element Group" style="width:250px;height:30px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('GroupWiseStatus')"/><br/><br/>
+ <input type="button" name="ViewSummary" value="View DataSummary" style="width:250px;height:30px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('SummaryStatus')"/><br/><br/>
+ <input type="button" name="LastUpdatedStatus" value="User Details" style="width:250px;height:30px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('LastUpdatedStatus')"/><br/><br/>
+ <input type="button" name="ValidationStatus" value="Validation Status" style="width:250px;height:30px;font-family: Arial; font-weight: bold; color: rgb(0, 0, 0);" onclick="textvalue('ValidationStatus')"/>
+ </td>
+ </tr>
+ </table>
+ <input type="hidden" name="selectedButton" id="selectedButton"/>
+</form>
+
+<script>
+ getdSetPeriods();
</script>
\ No newline at end of file
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusResult.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusResult.vm 2010-08-31 11:27:36 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusResult.vm 2011-04-15 11:35:33 +0000
@@ -1,127 +1,118 @@
<html>
- <head>
- <title>DataStatus Result</title>
- <link type="text/css" rel="stylesheet" media="screen" href="css/StylesForTags.css">
+ <head>
+ <title>DataStatus Result</title>
+ <link type="text/css" rel="stylesheet" media="screen" href="css/StylesForTags.css">
<script>
- var startDate = "$sDateLB";
- var endDate = "$eDateLB";
- var dsType = "$selectedButton";
-
- function getImmChildInfo(evt, dsId, selOrgUnit)
- {
+ var startDate = "$sDateLB";
+ var endDate = "$eDateLB";
+ var dsType = "$selectedButton";
- immChildOption = "yes";
- if( document.getElementById('includeZeros').checked )
- {
- evt.target.href = "dataStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit+"&selectedButton="+dsType+"&includeZeros="+includeZeros;
- }
- else
- {
+ function getImmChildInfo( evt, dsId, selOrgUnit )
+ {
+ immChildOption = "yes";
+ if( document.getElementById('includeZeros').checked )
+ {
+ evt.target.href = "dataStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit+"&selectedButton="+dsType+"&includeZeros="+includeZeros;
+ }
+ else
+ {
evt.target.href = "dataStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit+"&selectedButton="+dsType;
- }
- }
-
- function exportDataStatusResultToWorkBook()
- {
- document.getElementById('htmlCode').value = document.getElementById('formResult').innerHTML;
-
- return true;
- }
- </script>
- </head>
- <body>
-
-#if( "$!ouMapDataStatusResult" == "" || $ouMapDataStatusResult.isEmpty() || $ouMapDataStatusResult.size() == 0 )
-
- <div align="center" class="NormalB">Selected OrgUnit and its Children are Not assigned to $selDataSet.name</div>
-
-#else
-
-
-
- <form id="form1" name="form1" action="exportDataStatusToExcel.action" method="post" onsubmit="return exportDataStatusResultToWorkBook()" target="_newtab">
- <input type="hidden" name="htmlCode" id="htmlCode" />
-
-
- <div align="right" class="NormalB">
- <input type="checkbox" name="includeZeros" id="includeZeros" #if($includeZeros) checked #end /> Include Zero<br />
- <input type="submit" name="ExportToWorkBook" value="Export To WorkBook" style="width: 160; height: 25; font-family:Arial; font-weight:bold; color:#000000">
- </div>
-
- <div id="formResult">
- <div align="center" class="NormalB">Data Entry Status</div>
- <div align="right">
- <table width="30%">
- <tr class="TableDataCellStyles" >
- <td bgcolor="#a0c0a0"> </td>
- <td align="left"> Completed (75+)</td>
- </tr>
- <tr class="TableDataCellStyles">
- <td bgcolor="#a0a0ff"> </td>
- <td align="left"> Partially Completed (41 - 75)</td>
- </tr>
- <tr class="TableDataCellStyles">
- <td bgcolor="#905090"> </td>
- <td align="left"> Not Completed (1 - 40)</td>
- </tr>
- <tr class="TableDataCellStyles">
- <td bgcolor="#ff0000"> </td>
- <td align="left"> Not Entered ( 0 )</td>
- </tr>
- </table>
- </div>
- #set($count2 = 0)
-
- <br><br>
- <div align="left" class="NormalB">DataSet : $selDataSet.name</div>
- <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
- <tr class="TableHeadingCellStyles" align="center">
- #foreach($levelName in $levelNames)
- <th>$!levelName</th>
- #end
-
-
- #foreach($periodname in $periodNameList)
- <th>$periodname</th>
- #end
- </tr>
-
- #foreach($chiildorgUnit in $orgUnitList)
- #set($count1 = $minOULevel)
- #set($curOrgUnitLevel = $organisationUnitService.getLevelOfOrganisationUnit($chiildorgUnit))
- <tr class="TableHeadingCellStyles">
- #foreach($levelName in $levelNames)
- #if($count1 == $curOrgUnitLevel)
- <td><a href="#" onclick="javascript:getImmChildInfo(event, '$selDataSet.id', '$chiildorgUnit.id')" target="_blank">$chiildorgUnit.name</a></td>
- #else
- <td> </td>
- #end
- #set($count1 = $count1 + 1)
- #end
- #set($dsresultList = $ouMapDataStatusResult.get($chiildorgUnit))
- #foreach($result in $dsresultList)
-
- #set($count2 = $count2 + 1)
- #if($result < 0)
- <td bgcolor="white"> </td>
- #elseif($result == 0)
- <td align="center" bgcolor="#ff0000"><font color="#ffffff">$result</font></td>
- #elseif($result > 75)
- <td align="center" bgcolor="#a0c0a0"><font color="#ffffff">$result</font></td>
- #elseif($result > 40 && $result <= 75 )
- <td align="center" bgcolor="#a0a0ff"><font color="#ffffff">$result</font></td>
- #else
- <td align="center" bgcolor="#905090"><font color="#ffffff">$result</font></td>
- #end
- #end
- </tr>
- #end
- </table>
-
- </div>
- </form>
-
-#end
+ }
+ }
+
+ function exportDataStatusResultToWorkBook()
+ {
+ document.getElementById('htmlCode').value = document.getElementById('formResult').innerHTML;
+ return true;
+ }
+ </script>
+ </head>
+ <body>
+
+ #if( "$!ouMapDataStatusResult" == "" || $ouMapDataStatusResult.isEmpty() || $ouMapDataStatusResult.size() == 0 )
+ <div align="center" class="NormalB">Selected OrgUnit and its Children are Not assigned to $selDataSet.name</div>
+ #else
+ <form id="form1" name="form1" action="exportDataStatusToExcel.action" method="post" onsubmit="return exportDataStatusResultToWorkBook()" target="_newtab">
+ <input type="hidden" name="htmlCode" id="htmlCode" />
+
+ <div align="right" class="NormalB">
+ <input type="checkbox" name="includeZeros" id="includeZeros" #if($includeZeros) checked #end /> Include Zero<br />
+ <input type="submit" name="ExportToWorkBook" value="Export To WorkBook" style="width: 160; height: 25; font-family:Arial; font-weight:bold; color:#000000">
+ </div>
+
+ <div id="formResult">
+ <div align="center" class="NormalB">Data Entry Status</div>
+ <div align="right">
+ <table width="30%">
+ <tr class="TableDataCellStyles" >
+ <td bgcolor="#a0c0a0"> </td>
+ <td align="left"> Completed (75+) %</td>
+ </tr>
+ <tr class="TableDataCellStyles">
+ <td bgcolor="#a0a0ff"> </td>
+ <td align="left"> Partially Completed (41 - 75) %</td>
+ </tr>
+ <tr class="TableDataCellStyles">
+ <td bgcolor="#905090"> </td>
+ <td align="left"> Not Completed (1 - 40) %</td>
+ </tr>
+ <tr class="TableDataCellStyles">
+ <td bgcolor="#ff0000"> </td>
+ <td align="left"> Not Entered ( 0 ) %</td>
+ </tr>
+ </table>
+ </div>
+
+ <br><br>
+ <div align="left" class="NormalB">DataSet : $selDataSet.name ( $dataSetMemberCount1 )</div>
+ <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
+ <tr class="TableHeadingCellStyles" align="center">
+ #foreach($levelName in $levelNames)
+ <th>$!levelName</th>
+ #end
+
+ #foreach($periodname in $periodNameList)
+ <th>$periodname</th>
+ #end
+ </tr>
+
+ #foreach( $chiildorgUnit in $orgUnitList )
+ #set( $count1 = $minOULevel )
+ #set( $curOrgUnitLevel = $organisationUnitService.getLevelOfOrganisationUnit( $chiildorgUnit ) )
+ <tr class="TableHeadingCellStyles">
+ #foreach( $levelName in $levelNames )
+ #if( $count1 == $curOrgUnitLevel )
+ <td><a href="#" onclick="javascript:getImmChildInfo(event, '$selDataSet.id', '$chiildorgUnit.id')" target="_blank">$chiildorgUnit.name</a></td>
+ #else
+ <td> </td>
+ #end
+ #set($count1 = $count1 + 1)
+ #end
+
+ #set( $dsresultList = $ouMapDataStatusResult.get( $chiildorgUnit ) )
+ #set( $dataElementCounts = $ouMapDataElementCount.get( $chiildorgUnit ) )
+ #set( $count2 = 0 )
+ #foreach( $result in $dsresultList )
+ #set( $deCount = $dataElementCounts.get( $count2 ) )
+ #if( $result < 0 )
+ <td bgcolor="white"> </td>
+ #elseif( $result == 0 )
+ <td align="center" bgcolor="#ff0000"><font color="#ffffff">$result% #if( $deCount != -1 ) ( $deCount ) #end</font></td>
+ #elseif( $result > 75 )
+ <td align="center" bgcolor="#a0c0a0"><font color="#ffffff">$result% #if( $deCount != -1 ) ( $deCount ) #end</font></td>
+ #elseif( $result > 40 && $result <= 75 )
+ <td align="center" bgcolor="#a0a0ff"><font color="#ffffff">$result% #if( $deCount != -1 ) ( $deCount ) #end</font></td>
+ #else
+ <td align="center" bgcolor="#905090"><font color="#ffffff">$result% #if( $deCount != -1 ) ( $deCount ) #end</font></td>
+ #end
+ #set( $count2 = $count2 + 1 )
+ #end
+ </tr>
+ #end
+ </table>
+ </div>
+ </form>
+ #end
</body>
</html>
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/groupWiseDataStatusResult.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/groupWiseDataStatusResult.vm 2010-11-25 14:13:58 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/groupWiseDataStatusResult.vm 2011-04-15 11:35:33 +0000
@@ -1,18 +1,18 @@
<html>
- <head>
- <title>DataStatus Result</title>
+ <head>
+ <title>DataStatus Result</title>
<link type="text/css" rel="stylesheet" media="screen" href="css/StylesForTags.css">
<script>
- var startDate = "$sDateLB";
- var endDate = "$eDateLB";
- var dsType = "$selectedButton";
-
- function getImmChildInfo(evt, dsId, selOrgUnit)
- {
- immChildOption = "yes";
-
- //evt.target.href = "groupWiseDataStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit;
+ var startDate = "$sDateLB";
+ var endDate = "$eDateLB";
+ var dsType = "$selectedButton";
+
+ function getImmChildInfo(evt, dsId, selOrgUnit)
+ {
+ immChildOption = "yes";
+
+ //evt.target.href = "groupWiseDataStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit;
if( document.getElementById('includeZeros').checked )
{
@@ -21,98 +21,100 @@
else
{
evt.target.href = "groupWiseDataStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit+"&selectedButton="+dsType;
- }
- }
-
- function exportDataStatusResultToWorkBook()
- {
- document.getElementById('htmlCode').value = document.getElementById('formResult').innerHTML;
-
- opener.focus();
-
- return true;
- }
- </script>
- </head>
- <body>
+ }
+ }
+
+ function exportDataStatusResultToWorkBook()
+ {
+ document.getElementById('htmlCode').value = document.getElementById('formResult').innerHTML;
+
+ opener.focus();
+
+ return true;
+ }
+ </script>
+ </head>
+ <body>
- <form id="form1" name="form1" action="exportDataStatusToExcel.action" method="post" onsubmit="return exportDataStatusResultToWorkBook()" target="_newtab">
- <input type="hidden" name="htmlCode" id="htmlCode" />
- <div align="right" class="NormalB">
- <input type="checkbox" name="includeZeros" id="includeZeros" #if($includeZeros) checked #end /> Include Zero<br />
- <input type="submit" name="ExportToWorkBook" value="Export To WorkBook" style="width: 160; height: 25; font-family:Arial; font-weight:bold; color:#000000">
- </div>
-
- <div id="formResult">
- <div align="center" class="NormalB">Data Entry Status by Data Element Groups Of Data Set : $selDataSet.name </div>
+ <form id="form1" name="form1" action="exportDataStatusToExcel.action" method="post" onsubmit="return exportDataStatusResultToWorkBook()" target="_newtab">
+ <input type="hidden" name="htmlCode" id="htmlCode" />
+ <div align="right" class="NormalB">
+ <input type="checkbox" name="includeZeros" id="includeZeros" #if($includeZeros) checked #end /> Include Zero<br />
+ <input type="submit" name="ExportToWorkBook" value="Export To WorkBook" style="width: 160; height: 25; font-family:Arial; font-weight:bold; color:#000000">
+ </div>
+
+ <div id="formResult">
+ <div align="center" class="NormalB">Data Entry Status by Data Element Groups Of Data Set : $selDataSet.name </div>
<div align="right">
- <table width="30%">
- <tr class="TableDataCellStyles" >
- <td bgcolor="#a0c0a0"> </td>
- <td align="left"> Completed (75+)</td>
- </tr>
- <tr class="TableDataCellStyles">
- <td bgcolor="#a0a0ff"> </td>
- <td align="left"> Partially Completed (41 - 75)</td>
- </tr>
- <tr class="TableDataCellStyles">
- <td bgcolor="#905090"> </td>
- <td align="left"> Not Completed (1 - 40)</td>
- </tr>
- <tr class="TableDataCellStyles">
- <td bgcolor="#ff0000"> </td>
- <td align="left"> Not Entered ( 0 )</td>
- </tr>
- </table>
- </div>
- #set($count2 = 0)
- #foreach($dataElementGroup in $dataElementGroups)
+ <table width="30%">
+ <tr class="TableDataCellStyles" >
+ <td bgcolor="#a0c0a0"> </td>
+ <td align="left"> Completed (75+) %</td>
+ </tr>
+ <tr class="TableDataCellStyles">
+ <td bgcolor="#a0a0ff"> </td>
+ <td align="left"> Partially Completed (41 - 75) %</td>
+ </tr>
+ <tr class="TableDataCellStyles">
+ <td bgcolor="#905090"> </td>
+ <td align="left"> Not Completed (1 - 40) %</td>
+ </tr>
+ <tr class="TableDataCellStyles">
+ <td bgcolor="#ff0000"> </td>
+ <td align="left"> Not Entered ( 0 ) %</td>
+ </tr>
+ </table>
+ </div>
+ #set($count2 = 0)
+ #foreach($dataElementGroup in $dataElementGroups)
<br><br>
- #set( $deGroupCount = $deMapGroupCount.get($dataElementGroup) )
- <div align="left" class="NormalB">Data Element Group : $dataElementGroup.name ( $!deGroupCount )</div>
- <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
- <tr class="TableHeadingCellStyles" align="center">
- #foreach($levelName in $levelNames)
- <th>$!levelName</th>
- #end
-
- #foreach($periodname in $periodNameList)
- <th>$periodname</th>
- #end
- </tr>
- #foreach($chiildorgUnit in $orgUnitList)
- #set($count1 = $minOULevel)
- #set($curOrgUnitLevel = $organisationUnitService.getLevelOfOrganisationUnit($chiildorgUnit))
- <tr class="TableHeadingCellStyles">
- #foreach($levelName in $levelNames)
- #if($count1 == $curOrgUnitLevel)
- <td><a href="#" onclick="javascript:getImmChildInfo(event, '$selDataSet.id', '$chiildorgUnit.id')" target="_blank">$chiildorgUnit.name</a></td>
- #else
- <td> </td>
- #end
- #set($count1 = $count1 + 1)
- #end
- #set($periods = $dataSetPeriods.get($selDataSet))
- #foreach($period in $periods)
- #set($result = $results.get($count2))
- #set($count2 = $count2 + 1)
- #if($result < 0)
+ #set( $deGroupCount = $deMapGroupCount.get($dataElementGroup) )
+ <div align="left" class="NormalB">Data Element Group : $dataElementGroup.name ( $!deGroupCount )</div>
+ <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
+ <tr class="TableHeadingCellStyles" align="center">
+ #foreach($levelName in $levelNames)
+ <th>$!levelName</th>
+ #end
+
+ #foreach($periodname in $periodNameList)
+ <th>$periodname</th>
+ #end
+ </tr>
+ #foreach($chiildorgUnit in $orgUnitList)
+ #set($count1 = $minOULevel)
+ #set($curOrgUnitLevel = $organisationUnitService.getLevelOfOrganisationUnit($chiildorgUnit))
+ <tr class="TableHeadingCellStyles">
+ #foreach($levelName in $levelNames)
+ #if($count1 == $curOrgUnitLevel)
+ <td><a href="#" onclick="javascript:getImmChildInfo(event, '$selDataSet.id', '$chiildorgUnit.id')" target="_blank">$chiildorgUnit.name</a></td>
+ #else
+ <td> </td>
+ #end
+ #set($count1 = $count1 + 1)
+ #end
+ #set($periods = $dataSetPeriods.get($selDataSet))
+ #foreach($period in $periods)
+ #set($result = $results.get($count2))
+ #set($dataElement = $dataElementCount.get($count2))
+
+ #if($result < 0)
<td bgcolor="white"> </td>
- #elseif($result == 0)
- <td align="center" bgcolor="#ff0000"><font color="#ffffff">$result</font></td>
- #elseif($result > 75)
- <td align="center" bgcolor="#a0c0a0"><font color="#ffffff">$result</font></td>
- #elseif($result > 40 && $result <= 75 )
- <td align="center" bgcolor="#a0a0ff"><font color="#ffffff">$result</font></td>
- #else
- <td align="center" bgcolor="#905090"><font color="#ffffff">$result</font></td>
- #end
- #end
- </tr>
+ #elseif($result == 0)
+ <td align="center" bgcolor="#ff0000"><font color="#ffffff">$result% #if( $dataElement != -1 ) ( $dataElement ) #end</font></td>
+ #elseif($result > 75)
+ <td align="center" bgcolor="#a0c0a0"><font color="#ffffff">$result% #if( $dataElement != -1 ) ( $dataElement ) #end</font></td>
+ #elseif($result > 40 && $result <= 75 )
+ <td align="center" bgcolor="#a0a0ff"><font color="#ffffff">$result% #if( $dataElement != -1 ) ( $dataElement ) #end</font></td>
+ #else
+ <td align="center" bgcolor="#905090"><font color="#ffffff">$result% #if( $dataElement != -1 ) ( $dataElement ) #end</font></td>
+ #end
+ #set($count2 = $count2 + 1)
+ #end
+ </tr>
#end
</table>
- #end
- </div>
- </form>
+ #end
+ </div>
+ </form>
</body>
</html>
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/summarySatusResult.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/summarySatusResult.vm 2011-03-01 09:42:21 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/summarySatusResult.vm 2011-04-15 11:35:33 +0000
@@ -1,107 +1,114 @@
<html>
- <head>
- <title>SummaryStatus Result</title>
- <link type="text/css" rel="stylesheet" media="screen" href="css/StylesForTags.css">
- <script>
- var startDate = "$sDateLB";
- var endDate = "$eDateLB";
- var dsType = "$selectedButton";
-
- function getImmChildInfo(evt, dsId, selOrgUnit)
- {
- immChildOption = "yes";
+ <head>
+ <title>SummaryStatus Result</title>
+ <link type="text/css" rel="stylesheet" media="screen" href="css/StylesForTags.css">
+ <script>
+ var startDate = "$sDateLB";
+ var endDate = "$eDateLB";
+ var dsType = "$selectedButton";
+
+ function getImmChildInfo(evt, dsId, selOrgUnit)
+ {
+ immChildOption = "yes";
+
+ if( document.getElementById('includeZeros').checked )
+ {
+ evt.target.href = "summaryStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit+"&selectedButton="+dsType+"&includeZeros="+includeZeros;
+ }
+ else
+ {
+ evt.target.href = "summaryStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit+"&selectedButton="+dsType;
+ }
+ }
- if( document.getElementById('includeZeros').checked )
- {
- evt.target.href = "summaryStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit+"&selectedButton="+dsType+"&includeZeros="+includeZeros;
- }
- else
- {
- evt.target.href = "summaryStatusResult.action?immChildOption="+immChildOption+"&dsId="+dsId+"&sDateLB="+startDate+"&eDateLB="+endDate+"&ouId="+selOrgUnit+"&selectedButton="+dsType;
- }
- }
-
- function exportDataStatusResultToWorkBook()
- {
- document.getElementById('htmlCode').value = document.getElementById('formResult').innerHTML;
-
- return true;
- }
- </script>
- </head>
- <body>
-
- <form id="form1" name="form1" action="exportDataStatusToExcel.action" method="post" onsubmit="return exportDataStatusResultToWorkBook()" target="_newtab">
- <input type="hidden" name="htmlCode" id="htmlCode" />
- <div align="right" class="NormalB">
- <input type="checkbox" name="includeZeros" id="includeZeros" #if($includeZeros) checked #end /> Include Zero<br />
- <input type="submit" name="ExportToWorkBook" value="Export To WorkBook" style="width: 160; height: 25; font-family:Arial; font-weight:bold; color:#000000">
- </div>
-
- <div id="formResult">
- <div align="center" class="NormalB">Summary Status</div>
- <div align="right">
- <table width="30%">
- <tr class="TableDataCellStyles" >
- <td bgcolor="#a0c0a0"> </td>
- <td align="left"> Completed (5+)</td>
- </tr>
-
- <tr class="TableDataCellStyles">
- <td bgcolor="#ff0000"> </td>
- <td align="left"> Not Entered ( 0-5 )</td>
- </tr>
- </table>
- </div>
- #set($count2 = 0)
-
- <br><br>
- <div align="left" class="NormalB">DataSet : $selDataSet.name</div>
- <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
- <tr class="TableHeadingCellStyles" align="center">
- #foreach($levelName in $levelNames)
- <th>$!levelName</th>
- #end
-
-
- #foreach($periodname in $periodNameList)
- <th>$periodname</th>
- #end
- </tr>
-
- #foreach($chiildorgUnit in $orgUnitList)
- #set($count1 = $minOULevel)
- #set($curOrgUnitLevel = $organisationUnitService.getLevelOfOrganisationUnit($chiildorgUnit))
- ##set( $curOrgUnitLevel = $chiildorgUnit.getLevel() )
- <tr class="TableHeadingCellStyles">
- #foreach($levelName in $levelNames)
- #if($count1 == $curOrgUnitLevel)
- <td><a href="#" onclick="javascript:getImmChildInfo(event, '$selDataSet.id', '$chiildorgUnit.id')" target="_blank">$chiildorgUnit.name</a></td>
- #else
- <td> </td>
- #end
- #set($count1 = $count1 + 1)
- #end
- #set($dsSummaryResults = $ouMapSummaryStatusResult.get($chiildorgUnit))
- #foreach($result in $dsSummaryResults)
-
- #set($count2 = $count2 + 1)
- #if($result < 0)
- <td bgcolor="white"> </td>
- #elseif($result == 0)
- <td align="center" bgcolor="#ff0000"><font color="#ffffff">0</font></td>
- #elseif($result == 1)
- <td align="center" bgcolor="#a0c0a0"><font color="#ffffff">1</font></td>
- #elseif($result > 1)
- <td align="center" bgcolor="#a0c0a0"><font color="#ffffff">$result</font></td>
- #end
- #end
- </tr>
- #end
- </table>
-
- </div>
- </form>
+ function exportDataStatusResultToWorkBook()
+ {
+ document.getElementById('htmlCode').value = document.getElementById('formResult').innerHTML;
+
+ return true;
+ }
+ </script>
+ </head>
+
+ <body>
+ <form id="form1" name="form1" action="exportDataStatusToExcel.action" method="post" onsubmit="return exportDataStatusResultToWorkBook()" target="_newtab">
+ <input type="hidden" name="htmlCode" id="htmlCode" />
+ <div align="right" class="NormalB">
+ <input type="checkbox" name="includeZeros" id="includeZeros" #if($includeZeros) checked #end /> Include Zero<br />
+ <input type="submit" name="ExportToWorkBook" value="Export To WorkBook" style="width: 160; height: 25; font-family:Arial; font-weight:bold; color:#000000">
+ </div>
+
+ <div id="formResult">
+ <div align="center" class="NormalB">Summary Status</div>
+ <div align="right">
+ <table width="30%">
+ <tr class="TableDataCellStyles" >
+ <td bgcolor="#a0c0a0"> </td>
+ <td align="left"> Entered</td>
+ </tr>
+
+ <tr class="TableDataCellStyles">
+ <td bgcolor="#ff0000"> </td>
+ <td align="left"> Not Entered ( 0-5 )</td>
+ </tr>
+ </table>
+ </div>
+
+
+ <br><br>
+
+ <div align="left" class="NormalB">DataSet : $selDataSet.name</div>
+ <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
+ <tr class="TableHeadingCellStyles" align="center">
+ #foreach($levelName in $levelNames)
+ <th>$!levelName</th>
+ #end
+ #foreach($periodname in $periodNameList)
+ <th>$periodname</th>
+ #end
+ </tr>
+
+ #foreach($chiildorgUnit in $orgUnitList)
+ #set( $count1 = $minOULevel )
+ #set( $curOrgUnitLevel = $organisationUnitService.getLevelOfOrganisationUnit( $chiildorgUnit ) )
+ #set( $orgunitCount = $ouMapForChildDSAssociation.get( $chiildorgUnit ) )
+ #set( $orgunitColor = $ouMapForColor.get( $chiildorgUnit ) )
+
+ <tr class="TableHeadingCellStyles">
+ #foreach( $levelName in $levelNames )
+ #if( $count1 == $curOrgUnitLevel )
+ <td><a href="#" onclick="javascript:getImmChildInfo(event, '$selDataSet.id', '$chiildorgUnit.id')" target="_blank">$chiildorgUnit.name #if( $orgunitCount !=-1 ) ( $orgunitCount ) #end</a></td>
+ #else
+ <td> </td>
+ #end
+ #set($count1 = $count1 + 1)
+ #end
+
+ #set( $dsSummaryResults = $ouMapSummaryStatusResult.get( $chiildorgUnit ) )
+ #set( $dsStatusResults = $ouMapStatusResult.get( $chiildorgUnit ) )
+ #set( $count2 = 0 )
+
+ #foreach( $result in $dsSummaryResults )
+
+ #set( $dsStatusResult = $dsStatusResults.get( $count2 ) )
+
+ #if($result < 0)
+ <td bgcolor="white"> </td>
+ #elseif( $result == 0 )
+ <td align="center" #if( $orgunitColor == 1 ) bgcolor="#ff0000" #end><font #if( $orgunitColor == 1 ) color="#ffffff" #end>0 #if( $dsStatusResult != -1 ) ( $dsStatusResult % )#end</font></td>
+ #elseif( $result == 1 )
+ <td align="center" #if( $orgunitColor == 1 ) bgcolor="#a0c0a0" #end><font #if( $orgunitColor == 1 ) color="#ffffff" #end>1 #if( $dsStatusResult != -1 ) ( $dsStatusResult % )#end</font></td>
+ #elseif( $result > 1 )
+ <td align="center" #if( $orgunitColor == 1 ) bgcolor="#a0c0a0" #end><font #if( $orgunitColor == 1 ) color="#ffffff" #end>$result #if( $dsStatusResult != -1 ) ( $dsStatusResult % )#end </font></td>
+ #end
+
+ #set($count2 = $count2 + 1)
+ #end
+ </tr>
+ #end
+ </table>
+ </div>
+ </form>
</body>
-</html>
+</html>
\ No newline at end of file