dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02609
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 881: add view_data_entry_form in view dataentry status
------------------------------------------------------------
revno: 881
committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
branch nick: trunk
timestamp: Mon 2009-10-19 10:34:36 +0700
message:
add view_data_entry_form in view dataentry status
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelNormal.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelOganiztionGroupListing.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelPeriodColumnListing.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/dataStatusShow.vm
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/datastatus.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-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelNormal.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelNormal.java 2009-10-16 12:26:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelNormal.java 2009-10-19 03:34:36 +0000
@@ -1,5 +1,34 @@
+/*
+ * Copyright (c) 2004-2007, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
package org.hisp.dhis.reportexcel;
+/**
+ * @author Tran Thanh Tri
+ */
public class ReportExcelNormal
extends ReportExcel
@@ -12,7 +41,7 @@
{
super();
}
-
+
@Override
public String getReportType()
{
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelOganiztionGroupListing.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelOganiztionGroupListing.java 2009-10-17 18:36:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelOganiztionGroupListing.java 2009-10-19 03:34:36 +0000
@@ -35,6 +35,7 @@
* @author Chau Thu Tran
*/
+
public class ReportExcelOganiztionGroupListing
extends ReportExcel
{
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelPeriodColumnListing.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelPeriodColumnListing.java 2009-10-16 12:26:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcelPeriodColumnListing.java 2009-10-19 03:34:36 +0000
@@ -31,6 +31,7 @@
* @author Tran Thanh Tri
* @version $Id$
*/
+
public class ReportExcelPeriodColumnListing
extends ReportExcel
{
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/dataStatusShow.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/dataStatusShow.vm 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/dataStatusShow.vm 2009-10-19 03:34:36 +0000
@@ -6,16 +6,19 @@
#set( $mark = false )
#foreach($ds in $dataStatus)
<tr #alternate( $mark )>
- <td width="300px"><h3>$ds.dataSet.name</h3></td>
+ <td width="200px"><h3>$ds.dataSet.name</h3></td>
<td>
<table width="100%" style="background-color:#000000;" cellpadding="2" cellspacing="1">
#foreach($ds_ in $maps.get($ds.dataSet))
<tr style="background-color:white">
- <td rowspan=2 style="width:200px">$format.formatPeriod($ds_.period)</td>
+ <td rowspan=2 style="width:150px">$format.formatPeriod($ds_.period)</td>
+ <td rowspan=2 style="width:25px">
+ <a href="javascript:viewData($ds.dataSet.id,$ds_.period.id,$organisationUnit.id)"><img src="../images/view_report.png" title="$i18n.getString( 'view_data' )"></a>
+ </td>
<td style="width:150px">$i18n.getString( 'number_datavalue' )</td>
- <td ><div style="text-align:center;#if($ds_.getCompletedPercent()>0) padding:2px;color:white; #end width:$ds_.getCompletedPercent()%;background-color:green;">$ds_.getCompletedPercent()%</div></td>
+ <td title="$ds_.numberOfDataValue/$ds_.numberOfDataElement"><div style="text-align:center;#if($ds_.getCompletedPercent()>0) padding:2px;color:white; #end width:$ds_.getCompletedPercent()%;background-color:green;">$ds_.getCompletedPercent()%</div></td>
</tr>
- <tr style="background-color:white">
+ <tr style="background-color:white"title="$ds_.numberOfDataValue/$ds_.numberOfDataElement">
<td>$i18n.getString( 'completed' )</td>
<td >
#if($ds_.completed)
@@ -26,31 +29,8 @@
</td>
</tr>
#end
- </table>
- <!--
- <table width="100%">
- <tr>
- #foreach($ds_ in $maps.get($ds.dataSet))
- <td>
- <table width="100%">
- <tr>
- <th style="background:#DFDFDF">$format.formatPeriod($ds_.period)</th>
- </tr>
- <tr>
- <td style="background-color:#00FF3A;color:white">
- <div style="width:$ds_.getCompletedPercent()%;background-color:green;">$ds_.getCompletedPercent()%</div>
- </td>
- </tr>
- <tr>
- <td style="background-color:#if($ds_.completed)blue #else red #end;color:white">$i18n.getString( 'completed' ) : #if($ds_.completed) $i18n.getString( 'yes' ) #else $i18n.getString( 'no' ) #end</td>
- </tr>
- </table>
- </td>
- #end
- <tr>
- </table>
- -->
- </td>
+ </table>
+
<td>
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/datastatus.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/datastatus.js 2009-09-14 03:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/datastatus.js 2009-10-19 03:34:36 +0000
@@ -2,4 +2,9 @@
{
window.location.reload();
}
-selection.setListenerFunction( organisationUnitSelected );
\ No newline at end of file
+selection.setListenerFunction( organisationUnitSelected );
+
+function viewData(dataSetId, periodId, organisationUnitId){
+ var url = "viewCustomDataSetReport.action?dataSetId=" + dataSetId + "&periodId=" + periodId + "&organisationUnitId=" + organisationUnitId;
+ window.open( url , '_blank', 'width='+document.documentElement.clientWidth+',height='+document.documentElement.clientHeight+',scrollbars=yes' );
+}