=== 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 @@
- Data |
+ Resource Data |
png |
+
+ width |
+ width in px (opt) |
+
+
+ height |
+ height in px (opt) |
+
+
+
+
+
+ Dynamic Data |
+ png |
+
+
+ ou |
+ organisation unit uid (req) |
+
+
+ pe |
+ period yyyy-MM-dd (req) |
+
+
+ periods |
+ use periods or org units (opt) |
+
+
+ width |
+ width in px (opt) |
+
+
+ height |
+ height in px (opt) |
+
+
+ skipTitle |
+ skip 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 @@
- Data |
+ Resource 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 @@
- Data |
+ Resource Data |
png |
+
+
+ Dynamic Data |
+ png |
+
+
+ in |
+ indicator uid (req) |
+
+
+ ou |
+ organisation unit uid (req) |
+
+
+ level |
+ organisation 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 @@
- Data |
+ Resource Data |
pdf |
xls |
+
+ ou |
+ organisation unit uid (opt) |
+
+
+ pe |
+ period 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 @@
- Data |
+ Resource Data |
html |
pdf |
xls |
csv |
+
+ ou |
+ organisation unit uid (opt) |
+
+
+ pe |
+ period yyyy-MM-dd (opt) |
+