=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java 2011-02-16 17:16:18 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java 2011-02-18 21:50:37 +0000 @@ -38,7 +38,6 @@ import org.apache.commons.collections.CollectionUtils; import org.hisp.dhis.common.GenericIdentifiableObjectStore; -import org.hisp.dhis.common.GenericStore; import org.hisp.dhis.system.util.Filter; import org.hisp.dhis.system.util.FilterUtils; import org.hisp.dhis.system.util.UUIdUtils; === 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 2011-02-02 16:34:41 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2011-02-18 21:50:37 +0000 @@ -84,6 +84,7 @@ executeSql( "DROP TABLE reporttable_categoryoptioncombos" ); executeSql( "DROP TABLE dashboardcontent_datamartexports" ); executeSql( "DROP TABLE customvalue" ); + executeSql( "DROP TABLE reporttable_displaycolumns" ); executeSql( "ALTER TABLE dataelementcategoryoption drop column categoryid" ); executeSql( "ALTER TABLE reporttable DROP column dimensiontype" ); executeSql( "ALTER TABLE categoryoptioncombo DROP COLUMN displayorder" ); @@ -98,7 +99,7 @@ executeSql( "DELETE FROM periodtype WHERE name='Relative'" ); // mapping - executeSql( "DROP TABLE mapOrganisationUnitRelation" ); + executeSql( "DROP TABLE maporganisationunitrelation" ); executeSql( "ALTER TABLE mapview DROP COLUMN mapid" ); executeSql( "DROP TABLE map" ); === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetReportParamsAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetReportParamsAction.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetReportParamsAction.java 2011-02-18 21:50:37 +0000 @@ -195,12 +195,9 @@ for ( int i = 0; i < AVAILABLE_REPORTING_MONTHS; i++ ) { - int month = i + 1; - - cal.add( Calendar.MONTH, -1 ); - - Period period = periodType.createPeriod( cal.getTime() ); - + int month = i + 1; + cal.add( Calendar.MONTH, -1 ); + Period period = periodType.createPeriod( cal.getTime() ); String periodName = format.formatPeriod( period ); reportingPeriods.put( month, periodName ); === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java 2011-02-17 17:14:00 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java 2011-02-18 21:50:37 +0000 @@ -168,19 +168,7 @@ { this.id = id; } - - private String mode; - - public String getMode() - { - return mode; - } - - public void setMode( String mode ) - { - this.mode = mode; - } - + private boolean dimension; public boolean isDimension() @@ -333,36 +321,41 @@ // Available metadata // --------------------------------------------------------------------- - dataElementGroups = new ArrayList( dataElementService.getAllDataElementGroups() ); - - Collections.sort( dataElementGroups, new DataElementGroupNameComparator() ); - - dataElements = new ArrayList( dataElementService.getAllDataElements() ); - - Collections.sort( dataElements, new DataElementNameComparator() ); - - FilterUtils.filter( dataElements, new AggregatableDataElementFilter() ); - - displayPropertyHandler.handle( dataElements ); - - categoryCombos = new ArrayList( categoryService.getAllDataElementCategoryCombos() ); - - Collections.sort( categoryCombos, new DataElementCategoryComboNameComparator() ); - - indicatorGroups = new ArrayList( indicatorService.getAllIndicatorGroups() ); - - Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() ); - - indicators = new ArrayList( indicatorService.getAllIndicators() ); - - Collections.sort( indicators, indicatorComparator ); - - displayPropertyHandler.handle( indicators ); - - dataSets = new ArrayList( dataSetService.getAllDataSets() ); - - Collections.sort( dataSets, new DataSetNameComparator() ); - + if ( dimension ) + { + categoryCombos = new ArrayList( categoryService.getAllDataElementCategoryCombos() ); + + Collections.sort( categoryCombos, new DataElementCategoryComboNameComparator() ); + } + else + { + dataElementGroups = new ArrayList( dataElementService.getAllDataElementGroups() ); + + Collections.sort( dataElementGroups, new DataElementGroupNameComparator() ); + + dataElements = new ArrayList( dataElementService.getAllDataElements() ); + + Collections.sort( dataElements, new DataElementNameComparator() ); + + FilterUtils.filter( dataElements, new AggregatableDataElementFilter() ); + + displayPropertyHandler.handle( dataElements ); + + indicatorGroups = new ArrayList( indicatorService.getAllIndicatorGroups() ); + + Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() ); + + indicators = new ArrayList( indicatorService.getAllIndicators() ); + + Collections.sort( indicators, indicatorComparator ); + + displayPropertyHandler.handle( indicators ); + + dataSets = new ArrayList( dataSetService.getAllDataSets() ); + + Collections.sort( dataSets, new DataSetNameComparator() ); + } + periodTypes = periodService.getAllPeriodTypes(); periods = new MonthlyPeriodType().generatePeriods( new Date() ); @@ -389,11 +382,8 @@ for ( int i = 0; i < AVAILABLE_REPORTING_MONTHS; i++ ) { int month = i + 1; - - cal.add( Calendar.MONTH, -1 ); - - Period period = periodType.createPeriod( cal.getTime() ); - + cal.add( Calendar.MONTH, -1 ); + Period period = periodType.createPeriod( cal.getTime() ); String periodName = format.formatPeriod( period ); reportingPeriods.put( month, periodName ); === 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 2011-02-03 16:35:12 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2011-02-18 21:50:37 +0000 @@ -61,8 +61,7 @@ crosstab_organisation_units= Crosstab organisation units cannot_crosstab_all_dimensions= You cannot crosstabulate all dimensions cannot_crosstab_no_dimensions= Please select at least one dimension -must_select_at_least_one_dataelement= Please select at least one dataelement -must_select_at_least_one_indicator= Please select at least one indicator +must_select_at_least_one_indictor_data_element_data_set = Please select at least one indicator, data element or data set must_select_at_least_one_unit= Please select at least one organisation unit must_select_at_least_one_period= Please select at least one period cannot_include_more_organisation_unit_regression = Cannot include more that one organisation unit with regression @@ -101,7 +100,7 @@ data_completeness_report= Data Completeness Report edit_report= Edit report processing= Processing -report_configuration= Report Configuration +indicators_data_elements_data_sets = Indicators / data elements / data sets set_configuration= Please set the configuration in order for the report module to work properly home_explanation= Home refers to the absolute path to the BIRT viewer web application on the server directory_explanation= Directory refers to the part of the URL coming after the server part pointing to the BIRT viewer web application @@ -145,9 +144,7 @@ quarters_this_year= Quarters this year selected_report_tables= Selected report tables available_report_tables= Available report tables -add_indicator_table= Add Indicator Table -add_dataelement_table= Add Dataelement Table -add_dataset_table= Add Dataset Table +add_report_table = Add Report Table add_dataelement_dimension_table = Add Dataelement Dimension Table preview= Preview generate= Generate === 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 2011-01-31 19:47:04 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm 2011-02-18 21:50:37 +0000 @@ -11,9 +11,9 @@ - - - + + + @@ -23,7 +23,7 @@ - + @@ -47,83 +47,25 @@ - - - #if ( $mode == "dataelements" ) - - - - - - - - #if ( !$dimension ) - - - - - - - - #else - - - - - - #end - - - - - - - - - - - - - - - - + #if( $dimension ) + + + + + + + + #else - #elseif ( $mode == "indicators" ) - @@ -170,10 +112,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - #elseif ( $mode == "datasets" ) - @@ -384,10 +374,7 @@ var i18n_done = '$encoder.jsEscape( $i18n.getString( "done" ), "'")'; var i18n_must_enter_name = '$encoder.jsEscape( $i18n.getString( "must_enter_name" ), "'")'; var i18n_cannot_include_more_organisation_unit_regression = '$encoder.jsEscape( $i18n.getString( "cannot_include_more_organisation_unit_regression" ), "'")'; - var i18n_cannot_crosstab_all_dimensions = '$encoder.jsEscape( $i18n.getString( "cannot_crosstab_all_dimensions" ), "'")'; - var i18n_cannot_crosstab_no_dimensions = '$encoder.jsEscape( $i18n.getString( "cannot_crosstab_no_dimensions" ), "'")'; - var i18n_must_select_at_least_one_dataelement = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_dataelement" ), "'")'; - var i18n_must_select_at_least_one_indicator = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_indicator" ), "'")'; + var i18n_must_select_at_least_one_indictor_data_element_data_set = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_indictor_data_element_data_set" ), "'")'; var i18n_must_select_at_least_one_unit = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_unit" ), "'")'; var i18n_must_select_at_least_one_period = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_period" ), "'")'; var i18n_cannot_select_orgunit_and_parent_orgunit_param = '$encoder.jsEscape( $i18n.getString( "cannot_select_orgunit_and_parent_orgunit_param" ), "'")'; === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm 2011-01-10 10:06:18 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm 2011-02-18 21:50:37 +0000 @@ -76,12 +76,16 @@ @@ -94,3 +98,9 @@ var i18n_please_wait = '$encoder.jsEscape( $i18n.getString( "please_wait" ), "'")'; var i18n_please_select_unit = '$encoder.jsEscape( $i18n.getString( "select_organisation_unit" ), "'")'; + +#if( !$!reportParams.isSet() ) + +#end === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js 2011-01-06 09:03:29 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js 2011-02-18 21:50:37 +0000 @@ -37,21 +37,9 @@ function selectTableForm() { - if ( isNotNull( "selectedDataElements" ) ) - { - selectAllById( "selectedDataElements" ); - } - - if ( isNotNull( "selectedIndicators" ) ) - { - selectAllById( "selectedIndicators" ); - } - - if ( isNotNull( "selectedDataSets" ) ) - { - selectAllById( "selectedDataSets" ); - } - + selectAllById( "selectedDataElements" ); + selectAllById( "selectedIndicators" ); + selectAllById( "selectedDataSets" ); selectAllById( "selectedPeriods" ); selectAllById( "selectedOrganisationUnits" ); } @@ -77,35 +65,14 @@ return false; } - - if ( isChecked( "doIndicators" ) && isChecked( "doPeriods" ) && isChecked( "doOrganisationUnits" ) ) - { - setMessage( i18n_cannot_crosstab_all_dimensions ); - - return false; - } - - if ( !isTrue( "dimension" ) && !isChecked( "doIndicators" ) && !isChecked( "doPeriods" ) && !isChecked( "doOrganisationUnits" ) ) - { - setMessage( i18n_cannot_crosstab_no_dimensions ); - - return false; - } - - if ( isNotNull( "selectedDataElements" ) && !hasElements( "selectedDataElements" ) ) - { - setMessage( i18n_must_select_at_least_one_dataelement ); - - return false; - } - - if ( isNotNull( "selectedIndicators" ) && !hasElements( "selectedIndicators" ) ) - { - setMessage( i18n_must_select_at_least_one_indicator ); - - return false; - } - + + if ( !hasElements( "selectedDataElements" ) && !hasElements( "selectedIndicators" ) && !hasElements( "selectedDataSets" ) ) + { + setMessage( i18n_must_select_at_least_one_indictor_data_element_data_set ); + + return false; + } + if ( !hasElements( "selectedOrganisationUnits" ) && !organisationUnitReportParamsChecked() ) { setMessage( i18n_must_select_at_least_one_unit ); === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTableForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTableForm.vm 2011-01-25 13:49:21 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTableForm.vm 2011-02-18 21:50:37 +0000 @@ -8,10 +8,8 @@
$i18n.getString( "available_dataelements" )
- -
- -
- -
- -
$i18n.getString( "selected_dataelements" )
- -
+ +
$i18n.getString( "available_indicators" )
$i18n.getString( "available_dataelements" )
+ +
+ +
+ +
$i18n.getString( "selected_dataelements" )
+ +
$i18n.getString( "available_datasets" )
+ #if( $!reportParams.isSet() ) + #if ( $mode == "table" ) #elseif ( $mode == "report" ) #end + + #end
#filterDiv( "displayManageTableForm" ) -
-
-
- +
+