← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12467: Interpretations, enabled embedded maps

 

------------------------------------------------------------
revno: 12467
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-10-07 13:46:08 +0200
message:
  Interpretations, enabled embedded maps
modified:
  dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java
  dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/InternalMapLayer.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css


--
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-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java	2013-10-07 10:19:08 +0000
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java	2013-10-07 11:46:08 +0000
@@ -256,7 +256,6 @@
             
             for ( MapValue mapValue : mapValues )
             {
-                // Get the org unit for this map value
                 OrganisationUnit orgUnit = uidOuMap.get( mapValue.getOu() );
                 
                 if ( orgUnit != null )
@@ -265,6 +264,11 @@
                 }
             }
     
+            if ( !mapLayer.hasMapObjects() )
+            {
+                return null;
+            }
+            
             // Create an interval set for this map layer that distributes its map
             // objects into their respective intervals
             

=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/InternalMapLayer.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/InternalMapLayer.java	2013-10-07 09:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/InternalMapLayer.java	2013-10-07 11:46:08 +0000
@@ -138,7 +138,15 @@
      */
     public void addMapObject( InternalMapObject mapObject )
     {
-        this.mapObjects.add( mapObject );
+        mapObjects.add( mapObject );
+    }
+    
+    /**
+     * Indicates whether this map layer has any map objects.
+     */
+    public boolean hasMapObjects()
+    {
+        return mapObjects != null && !mapObjects.isEmpty();
     }
 
     /**
@@ -285,7 +293,7 @@
         }
         else
         {
-            throw new RuntimeException( "The interval distribution strategy " + strategy + " is not implemented (yet)!" );
+            throw new RuntimeException( "Unsupported distribution strategy: " + strategy );
         }
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm	2013-10-07 10:01:43 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm	2013-10-07 11:46:08 +0000
@@ -33,13 +33,13 @@
 	    #if( $ip.chartInterpretation )
 	        <a href="../dhis-web-visualizer/app/index.html?id=${ip.chart.uid}&date=${format.formatDate( $ip.created )}">
 	        <img style="cursor:pointer" 
-	             src="../api/charts/${ip.chart.uid}/data?date=${format.formatDate( $ip.created )}&width=560&height=300${ou}"
-	             title="$i18n.getString( 'click_to_view_in_data_visualizer' )"></a>
+	            src="../api/charts/${ip.chart.uid}/data?date=${format.formatDate( $ip.created )}&width=558&height=300${ou}"
+	            title="$i18n.getString( 'click_to_view_in_data_visualizer' )"></a>
 	    #elseif( $ip.mapInterpretation )
-	        <a class="bold" 
-	           title="$i18n.getString( 'click_to_view_in_gis' )" 
-	           href="../dhis-web-mapping/app/index.html?id=${ip.map.uid}">
-	           $encoder.htmlEncode( $ip.map.name )</a>
+	        <a href="../dhis-web-mapping/app/index.html?id=${ip.map.uid}">
+	        <img style="cursor:pointer"
+	            src="../api/maps/${ip.map.uid}/data?date=${format.formatDate( $ip.created )}&width=558"
+	            title="$i18n.getString( 'click_to_view_in_gis' )"></a>
 	    #elseif( $ip.reportTableInterpretation )	        
 	        <a class="bold"
 	           title="$i18n.getString( 'click_to_view_report_table' )" 

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css	2013-09-29 19:31:42 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css	2013-10-07 11:46:08 +0000
@@ -488,7 +488,7 @@
   width: 580px;
   border: 1px solid #ddd;
   border-radius: 3px;
-  padding: 25px 20px 20px 20px;
+  padding: 25px;
   margin-bottom: 25px;
   box-shadow: #e1e1e1 0 1px 1px 0;
 }