=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MapController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MapController.java 2011-12-15 19:55:51 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MapController.java 2011-12-15 21:05:08 +0000 @@ -39,6 +39,8 @@ import org.hisp.dhis.mapping.MapView; import org.hisp.dhis.mapping.MappingService; import org.hisp.dhis.mapping.Maps; +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; @@ -58,6 +60,9 @@ @Autowired private MappingService mappingService; + + @Autowired + private OrganisationUnitService organisationUnitService; //------------------------------------------------------------------------------------------------------- // GET @@ -108,8 +113,15 @@ public String getMap( Model model, @RequestParam( value = "in" ) String indicatorUid, @RequestParam( value = "ou" ) String organisationUnitUid, - @RequestParam Integer level ) + @RequestParam( value = "level", required = false ) Integer level ) { + if ( level == null ) + { + OrganisationUnit unit = organisationUnitService.getOrganisationUnit( organisationUnitUid ); + + level = organisationUnitService.getLevelOfOrganisationUnit( unit.getId() ); + } + MapView mapView = mappingService.getIndicatorLastYearMapView( indicatorUid, organisationUnitUid, level ); model.addAttribute( "model", mapView ); === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl' --- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl 2011-12-15 20:23:22 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl 2011-12-15 21:05:08 +0000 @@ -10,9 +10,48 @@ - + + + + + + + + + +
DataResource Data png
widthwidth in px (opt)
heightheight in px (opt)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dynamic Datapng
ouorganisation unit uid (req)
peperiod yyyy-MM-dd (req)
periodsuse periods or org units (opt)
widthwidth in px (opt)
heightheight in px (opt)
skipTitleskip title (opt)

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/document.xsl' --- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/document.xsl 2011-12-15 20:23:22 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/document.xsl 2011-12-15 21:05:08 +0000 @@ -10,7 +10,7 @@ - +
DataResource Data any

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl' --- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl 2011-12-15 20:23:22 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl 2011-12-15 21:05:08 +0000 @@ -8,11 +8,30 @@ - +
DataResource Data png

+ + + + + + + + + + + + + + + + + +
Dynamic Datapng
inindicator uid (req)
ouorganisation unit uid (req)
levelorganisation unit level (opt)

+

Details

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/report.xsl' --- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/report.xsl 2011-12-15 20:23:22 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/report.xsl 2011-12-15 21:05:08 +0000 @@ -10,10 +10,18 @@ - + + + + + + + + +
DataResource Data pdf xls
ouorganisation unit uid (opt)
peperiod yyyy-MM-dd (opt)

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/reportTable.xsl' --- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/reportTable.xsl 2011-12-15 20:23:22 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/reportTable.xsl 2011-12-15 21:05:08 +0000 @@ -10,12 +10,20 @@
- + + + + + + + + +
DataResource Data html pdf xls csv
ouorganisation unit uid (opt)
peperiod yyyy-MM-dd (opt)