dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08268
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1961: Merged r2027 from 2.0.5 branch. Fixed bug: Display columns are not viable for report tables with ...
------------------------------------------------------------
revno: 1961
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2010-10-29 14:39:33 +0200
message:
Merged r2027 from 2.0.5 branch. Fixed bug: Display columns are not viable for report tables with report parameters on column dimensions because they become dynamic.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetDisplayTableOptionsAction.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/displayTableForm.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-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2010-10-18 10:13:27 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2010-10-29 12:39:33 +0000
@@ -608,6 +608,25 @@
// -------------------------------------------------------------------------
/**
+ * Tests whether this report table has report parameters for dimensions which
+ * are on columns.
+ */
+ public boolean hasDynamicColumns()
+ {
+ if ( doUnits && reportParams != null && ( reportParams.isParamOrganisationUnit() || reportParams.isParamParentOrganisationUnit() ) )
+ {
+ return true;
+ }
+
+ if ( doPeriods && reportParams != null && reportParams.isParamReportingMonth() )
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
* Sets the appropriate dimension related properties depending on the dimension
* set type.
*/
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetDisplayTableOptionsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetDisplayTableOptionsAction.java 2010-06-23 17:50:25 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetDisplayTableOptionsAction.java 2010-10-29 12:39:33 +0000
@@ -79,13 +79,17 @@
return reportTable;
}
+ // -------------------------------------------------------------------------
+ // Output
+ // -------------------------------------------------------------------------
+
private List<ReportTableColumn> columns;
public List<ReportTableColumn> getColumns()
{
return columns;
}
-
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
=== 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 2010-10-14 08:54:26 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2010-10-29 12:39:33 +0000
@@ -251,6 +251,7 @@
month = Month
year = Year
total = Total
+cannot_create_display_columns_dynamic_columns = You cannot create display columns because the report table uses report parameters for a column dimension. This means they are dynamic and not viable for static names.
select_dimension = Select dimension
tally_sheet_report = Tally Sheet report
data_completeness_report = Data Completeness Report
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/displayTableForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/displayTableForm.vm 2009-10-13 14:39:39 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/displayTableForm.vm 2010-10-29 12:39:33 +0000
@@ -19,6 +19,13 @@
<h3>$i18n.getString( "display_report_table" )</h3>
+#if( $reportTable.hasDynamicColumns() )
+
+<span id="info">$i18n.getString( 'cannot_create_display_columns_dynamic_columns' )</span>
+<p><input type="button" value="$i18n.getString( "back" )" onclick="window.location.href='displayManageTableForm.action'" style="width:120px"></p>
+
+#else
+
<h4>$encoder.htmlEncode( $reportTable.name )</h4>
<p>
@@ -46,3 +53,5 @@
<p><input type="button" value="$i18n.getString( "save" )" onclick="saveDisplayTable()" style="width:120px"><input
type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='displayManageTableForm.action'" style="width:120px"></p>
+
+#end