dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21624
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10279: Add weekly relative periods into Aggregate report (tracker)
------------------------------------------------------------
revno: 10279
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-18 10:57:53 +0700
message:
Add weekly relative periods into Aggregate report (tracker)
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateAggregateReportAction.java
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/app/app.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.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/java/org/hisp/dhis/caseentry/action/report/GenerateAggregateReportAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateAggregateReportAction.java 2013-03-15 07:28:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateAggregateReportAction.java 2013-03-18 03:57:53 +0000
@@ -351,16 +351,22 @@
List<Period> periods = new ArrayList<Period>();
RelativePeriods rp = new RelativePeriods();
-
- if ( relativePeriods.contains( "reportingMonth" ) )
- {
- rp.clear().setReportingMonth( true );
- periods.addAll( periodService.reloadPeriods( rp.getRelativePeriods() ) );
- }
-
- if ( relativePeriods.contains( "last3Months" ) )
- {
- rp.clear().setLast3Months( true );
+
+ if ( relativePeriods.contains( "lastWeek" ) )
+ {
+ rp.clear().setLastWeek( true );
+ periods.addAll( periodService.reloadPeriods( rp.getRelativePeriods() ) );
+ }
+
+ if ( relativePeriods.contains( "last4Weeks" ) )
+ {
+ rp.clear().setLast4Weeks( true );
+ periods.addAll( periodService.reloadPeriods( rp.getRelativePeriods() ) );
+ }
+
+ if ( relativePeriods.contains( "last12Weeks" ) )
+ {
+ rp.clear().setLast12Weeks( true );
periods.addAll( periodService.reloadPeriods( rp.getRelativePeriods() ) );
}
=== 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-03-15 15:19:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-03-18 03:57:53 +0000
@@ -511,7 +511,7 @@
last_4_quarters = Last 4 quarters
six_months = Six-months
last_six_month = Last six-month
-last_two_six_month = Last two six months
+last_two_six_month = Last 2 six months
years = Years
this_year = This years
last_year = Last year
@@ -601,4 +601,8 @@
complete_quit = Complete/Quit
re_enrol = Re-enrol
overwrite = Overwrite
-remove_confirm_message=Are you sure you want to delete program enrollment?
\ No newline at end of file
+remove_confirm_message=Are you sure you want to delete program enrollment?
+weeks = Weeks
+last_week = Last week
+last_4_weeks = Last 4 weeks
+last_12_weeks = Last 12 weeks
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-03-15 13:44:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-03-18 03:57:53 +0000
@@ -3379,8 +3379,47 @@
items: [
{
xtype: 'panel',
+ columnWidth: 0.32,
+ bodyStyle: 'border-style:none; padding:0 0 0 8px',
+ defaults: {
+ labelSeparator: '',
+ style: 'margin-bottom:2px',
+ listeners: {
+ added: function(chb) {
+ if (chb.xtype === 'checkbox') {
+ TR.cmp.params.relativeperiod.checkbox.push(chb);
+ }
+ }
+ }
+ },
+ items: [
+ {
+ xtype: 'label',
+ text: TR.i18n.weeks,
+ cls: 'tr-label-period-heading'
+ },
+ {
+ xtype: 'checkbox',
+ paramName: 'lastWeek',
+ boxLabel: TR.i18n.last_week
+ },
+ {
+ xtype: 'checkbox',
+ paramName: 'last4Weeks',
+ boxLabel: TR.i18n.last_4_weeks
+ },
+ {
+ xtype: 'checkbox',
+ paramName: 'last12Weeks',
+ boxLabel: TR.i18n.last_12_weeks
+ }
+ ]
+ },
+ {
+ xtype: 'panel',
layout: 'anchor',
- bodyStyle: 'border-style:none; padding:0 0 0 10px',
+ columnWidth: 0.32,
+ bodyStyle: 'border-style:none; padding:0 0 0 20px',
defaults: {
labelSeparator: '',
listeners: {
@@ -3418,6 +3457,7 @@
{
xtype: 'panel',
layout: 'anchor',
+ columnWidth: 0.32,
bodyStyle: 'border-style:none; padding:0 0 0 32px',
defaults: {
labelSeparator: '',
@@ -3446,38 +3486,6 @@
boxLabel: TR.i18n.last_4_quarters
}
]
- },
- {
- xtype: 'panel',
- layout: 'anchor',
- bodyStyle: 'border-style:none; padding:0 0 0 32px',
- defaults: {
- labelSeparator: '',
- listeners: {
- added: function(chb) {
- if (chb.xtype === 'checkbox') {
- TR.cmp.params.relativeperiod.checkbox.push(chb);
- }
- }
- }
- },
- items: [
- {
- xtype: 'label',
- text: TR.i18n.six_months,
- cls: 'tr-label-period-heading'
- },
- {
- xtype: 'checkbox',
- paramName: 'lastSixMonth',
- boxLabel: TR.i18n.last_six_month
- },
- {
- xtype: 'checkbox',
- paramName: 'last2SixMonths',
- boxLabel: TR.i18n.last_two_six_month
- }
- ]
}
]
},
@@ -3486,43 +3494,94 @@
layout: 'column',
bodyStyle: 'border-style:none',
items: [
- {
- xtype: 'panel',
- layout: 'anchor',
- bodyStyle: 'border-style:none; padding:5px 0 0 10px',
- defaults: {
- labelSeparator: '',
- listeners: {
- added: function(chb) {
- if (chb.xtype === 'checkbox') {
- TR.cmp.params.relativeperiod.checkbox.push(chb);
+ {
+ xtype: 'panel',
+ columnWidth: 0.32,
+ bodyStyle: 'border-style:none; padding:0 0 0 8px',
+ defaults: {
+ labelSeparator: '',
+ style: 'margin-bottom:2px',
+ listeners: {
+ added: function(chb) {
+ if (chb.xtype === 'checkbox') {
+ TR.cmp.params.relativeperiod.checkbox.push(chb);
+ }
+ }
+ }
+ },
+ items: [
+ {
+ xtype: 'label',
+ text: TR.i18n.six_months,
+ cls: 'tr-label-period-heading'
+ },
+ {
+ xtype: 'checkbox',
+ paramName: 'lastSixMonth',
+ boxLabel: TR.i18n.last_six_month
+ },
+ {
+ xtype: 'checkbox',
+ paramName: 'last2SixMonths',
+ boxLabel: TR.i18n.last_two_six_month
+ }
+ ]
+ },
+ {
+ xtype: 'panel',
+ columnWidth: 0.32,
+ bodyStyle: 'border-style:none; padding:0 0 0 8px',
+ defaults: {
+ labelSeparator: '',
+ style: 'margin-bottom:2px',
+ listeners: {
+ added: function(chb) {
+ if (chb.xtype === 'checkbox') {
+ TR.cmp.params.relativeperiod.checkbox.push(chb);
+ }
+ }
+ }
+ },
+ items: [
+ {
+ xtype: 'panel',
+ layout: 'anchor',
+ bodyStyle: 'border-style:none; padding:5px 0 0 10px',
+ defaults: {
+ labelSeparator: '',
+ listeners: {
+ added: function(chb) {
+ if (chb.xtype === 'checkbox') {
+ TR.cmp.params.relativeperiod.checkbox.push(chb);
+ }
}
}
- }
- },
- items: [
- {
- xtype: 'label',
- text: TR.i18n.years,
- cls: 'tr-label-period-heading'
- },
- {
- xtype: 'checkbox',
- paramName: 'thisYear',
- boxLabel: TR.i18n.this_year
- },
- {
- xtype: 'checkbox',
- paramName: 'lastYear',
- boxLabel: TR.i18n.last_year
- },
- {
- xtype: 'checkbox',
- paramName: 'last5Years',
- boxLabel: TR.i18n.last_5_years
- }
- ]
- }
+ },
+ items: [
+ {
+ xtype: 'label',
+ text: TR.i18n.years,
+ cls: 'tr-label-period-heading'
+ },
+ {
+ xtype: 'checkbox',
+ paramName: 'thisYear',
+ boxLabel: TR.i18n.this_year
+ },
+ {
+ xtype: 'checkbox',
+ paramName: 'lastYear',
+ boxLabel: TR.i18n.last_year
+ },
+ {
+ xtype: 'checkbox',
+ paramName: 'last5Years',
+ boxLabel: TR.i18n.last_5_years
+ }
+ ]
+ }
+ ]
+ }
]
}
],
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm 2013-03-06 15:47:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm 2013-03-18 03:57:53 +0000
@@ -170,5 +170,9 @@
verified: '$encoder.jsEscape($i18n.getString( 'verified' ) , "'")',
declared: '$encoder.jsEscape($i18n.getString( 'declared' ) , "'")',
approximated: '$encoder.jsEscape($i18n.getString( 'approximated' ) , "'")',
-remove: '$encoder.jsEscape($i18n.getString( 'remove' ) , "'")'
+remove: '$encoder.jsEscape($i18n.getString( 'remove' ) , "'")',
+weeks: '$encoder.jsEscape($i18n.getString( 'weeks' ) , "'")',
+last_week: '$encoder.jsEscape($i18n.getString( 'last_week' ) , "'")',
+last_4_weeks: '$encoder.jsEscape($i18n.getString( 'last_4_weeks' ) , "'")',
+last_12_weeks: '$encoder.jsEscape($i18n.getString( 'last_12_weeks' ) , "'")'
};
\ No newline at end of file