dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16760
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6456: Added more relative periods to report table
------------------------------------------------------------
revno: 6456
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-30 15:32:44 +0200
message:
Added more relative periods to report table
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.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-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-03-26 13:00:42 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-03-30 13:32:44 +0000
@@ -388,6 +388,7 @@
executeSql( "update reporttable set quarterslastyear = false where quarterslastyear is null" );
executeSql( "update reporttable set lastyear = false where lastyear is null" );
executeSql( "update reporttable set last5years = false where last5years is null" );
+ executeSql( "update reporttable set lastsixmonth = false where lastsixmonth is null" );
executeSql( "update reporttable set last4quarters = false where last4quarters is null" );
executeSql( "update reporttable set last12months = false where last12months is null" );
executeSql( "update reporttable set last6bimonths = false where last6bimonths is null" );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml 2012-02-20 10:20:01 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml 2012-03-30 13:32:44 +0000
@@ -74,6 +74,7 @@
<property name="reportingMonth" />
<property name="reportingBimonth" />
<property name="reportingQuarter" />
+ <property name="lastSixMonth" />
<property name="monthsThisYear" />
<property name="quartersThisYear" />
<property name="thisYear" />
@@ -83,6 +84,7 @@
<property name="last5Years" />
<property name="last12Months" />
<property name="last4Quarters" />
+ <property name="last2SixMonths" />
</component>
<component name="reportParams">
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java 2012-02-20 10:20:01 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java 2012-03-30 13:32:44 +0000
@@ -327,6 +327,13 @@
{
this.last4Quarters = last4Quarters;
}
+
+ private boolean last2SixMonths;
+
+ public void setLast2SixMonths( boolean last2SixMonths )
+ {
+ this.last2SixMonths = last2SixMonths;
+ }
private boolean paramReportingMonth;
@@ -422,7 +429,7 @@
RelativePeriods relatives = new RelativePeriods( reportingMonth, reportingBimonth, reportingQuarter, lastSixMonth,
monthsThisYear, quartersThisYear, thisYear,
monthsLastYear, quartersLastYear, lastYear,
- last5years, last12Months, false, last4Quarters, false );
+ last5years, last12Months, false, last4Quarters, last2SixMonths );
ReportParams reportParams = new ReportParams();
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2012-03-30 12:37:13 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2012-03-30 13:32:44 +0000
@@ -35,6 +35,8 @@
months_this_year=Months this year
quarters_this_year=Quarters this year
this_year=This year
+reporting_sixmonth=Reporting six-month
+last_2_sixmonths=Last 2 six-months
months_last_year=Months last year
quarters_last_year=Quarters last year
last_year=Last year
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm 2012-03-30 09:05:16 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm 2012-03-30 13:32:44 +0000
@@ -465,7 +465,9 @@
<label for="reportingBimonth">$i18n.getString( "reporting_bimonth" )</label>
<input type="checkbox" id="reportingBimonth" name="reportingBimonth" value="true"#if( $reportTable.relatives.isReportingBimonth() ) checked#end>
<label for="reportingQuarter">$i18n.getString( "reporting_quarter" )</label>
- <input type="checkbox" id="reportingQuarter" name="reportingQuarter" value="true"#if( $reportTable.relatives.isReportingQuarter() ) checked#end><br><br>
+ <input type="checkbox" id="reportingQuarter" name="reportingQuarter" value="true"#if( $reportTable.relatives.isReportingQuarter() ) checked#end>
+ <label for="lastSixMonth">$i18n.getString( "reporting_sixmonth" )</label>
+ <input type="checkbox" id="lastSixMonth" name="lastSixMonth" value="true"#if( $reportTable.relatives.isLastSixMonth() ) checked#end><br><br>
<label for="monthsThisYear">$i18n.getString( "months_this_year" )</label>
<input type="checkbox" id="monthsThisYear" name="monthsThisYear" value="true""#if( $reportTable.relatives.isMonthsThisYear() ) checked#end>
@@ -486,7 +488,9 @@
<label for="last12Months">$i18n.getString( "last_12_months" )</label>
<input type="checkbox" id="last12Months" name="last12Months" value="true"#if( $reportTable.relatives.isLast12Months() ) checked#end>
<label for="last4Quarters">$i18n.getString( "last_4_quarters" )</label>
- <input type="checkbox" id="last4Quarters" name="last4Quarters" value="true"#if( $reportTable.relatives.isLast4Quarters() ) checked#end>
+ <input type="checkbox" id="last4Quarters" name="last4Quarters" value="true"#if( $reportTable.relatives.isLast4Quarters() ) checked#end>
+ <label for="last2SixMonths">$i18n.getString( "last_2_sixmonths" )</label>
+ <input type="checkbox" id="last2SixMonths" name="last2SixMonths" value="true"#if( $reportTable.relatives.isLast2SixMonths() ) checked#end>
</td>
</tr>
<tr>