← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6170: Dashboard: included descriptive messages and links which explains what to do when the dashboard i...

 

------------------------------------------------------------
revno: 6170
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-03-05 11:43:47 +0100
message:
  Dashboard: included descriptive messages and links which explains what to do when the dashboard is empty. Added new RSS feed for diseases and conditions.
removed:
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/olap_url.vm
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/rss_hiv_aids.vm
added:
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/rss_diseases.vm
modified:
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ProvideContentAction.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/document.vm
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/map_view.vm
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/report.vm
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/report_table.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-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-02-12 20:32:14 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-03-05 10:43:47 +0000
@@ -181,10 +181,15 @@
   </bean>
 
   <bean id="rssHealthContentProvider" class="org.hisp.dhis.dashboard.provider.RssContentProvider">
-    <property name="url" value="http://health.yahoo.com/news/rss/health"; />
+    <property name="url" value="http://news.yahoo.com/rss/health"; />
     <property name="key" value="healthItems" />
   </bean>
 
+  <bean id="rssDiseasesContentProvider" class="org.hisp.dhis.dashboard.provider.RssContentProvider">
+    <property name="url" value="http://news.yahoo.com/rss/diseases-conditions"; />
+    <property name="key" value="diseasesItems" />
+  </bean>
+
   <!-- Dashboard Manager -->
 
   <bean id="org.hisp.dhis.dashboard.DashboardManager" class="org.hisp.dhis.dashboard.manager.DefaultDashboardManager">
@@ -221,6 +226,12 @@
           </key>
           <ref local="rssHealthContentProvider" />
         </entry>
+        <entry>
+          <key>
+            <value>rss_diseases</value>
+          </key>
+          <ref local="rssDiseasesContentProvider" />
+        </entry>
       </map>
     </property>
   </bean>

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2012-02-16 03:58:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2012-03-05 10:43:47 +0000
@@ -12,9 +12,12 @@
  * 
  * @param defaultUrl if there is not document.referrer, use this url
  */
-function referrerBack( defaultUrl ) {
-	if(document.referrer !== undefined && document.referrer != "") {
-		if(document.referrer.indexOf("login.action") == -1) {
+function referrerBack( defaultUrl ) 
+{
+	if ( document.referrer !== undefined && document.referrer != "" ) 
+	{
+		if ( document.referrer.indexOf( "login.action" ) == -1 ) 
+		{
 			location.href = document.referrer;
 			return;
 		}

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ProvideContentAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ProvideContentAction.java	2012-02-24 10:55:25 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ProvideContentAction.java	2012-03-05 10:43:47 +0000
@@ -128,7 +128,7 @@
         ActionContext.getContext().getActionInvocation().getStack().push( content );
 
         providerNames = manager.getContentProviderNames();
-
+        
         charts = new ArrayList<Chart>( chartService.getSystemAndUserCharts() );
 
         Collections.sort( charts, IdentifiableObjectNameComparator.INSTANCE );

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties	2012-02-24 10:55:25 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties	2012-03-05 10:43:47 +0000
@@ -2,18 +2,15 @@
 insert=Insert
 close=Close
 clear= Clear
-
 rss_health=RSS Health
-rss_hiv_aids= RSS HIV/AIDS
+rss_diseases=RSS Diseases
 report=Reports
 document=Resources
 report_table=Report tables
-olap_url=OLAP URLs
 map_view=Map views
-
-this_is_a_link_area=This is a link area
-this_is_a_chart_area=This is a chart area
-
+this_is_a_link_area=This is a link area, click 'insert' and select links
+this_is_a_chart_area=This is a chart area, click 'insert' and select a chart
+insert_links_by_going_to=Insert links by going to
 messages=Messages
 sender=Sender
 date=Date

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/document.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/document.vm	2011-04-07 13:48:56 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/document.vm	2012-03-05 10:43:47 +0000
@@ -20,3 +20,8 @@
     </tr>
     #end
 </table>
+
+#if( $documents.size() == 0 )
+<div class="labelText">$i18n.getString( "insert_links_by_going_to" ) 
+<a href="../dhis-web-reporting/displayViewDocumentForm.action">$i18n.getString( "document" )</a></div>
+#end
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm	2012-02-24 10:55:25 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm	2012-03-05 10:43:47 +0000
@@ -1,5 +1,5 @@
 
-#macro ( dropDownButtonDiv $dropDownId $areaDivId )
+#macro ( linkDropDownButtonDiv $dropDownId $areaDivId )
 <div class="buttonArea">
     <a href="javascript:showDropDown( '${dropDownId}' )">$i18n.getString( "insert" )</a>
     <a href="javascript:hideDropDown()">$i18n.getString( "close" )</a>
@@ -30,7 +30,7 @@
     #if ( $page )
         #parse( "/dhis-web-dashboard-integration/${page}.vm" )
     #else
-        <span class="labelText">$i18n.getString( 'this_is_a_link_area' )</span>
+        <div class="labelText">$i18n.getString( 'this_is_a_link_area' )</div>
     #end
 </div>
 #end
@@ -47,7 +47,7 @@
     #if ( $chart )
         <img style="cursor:pointer" src="getChart.action?id=${chart.id}" onclick="viewChart( 'getChart.action?id=${chart.id}&width=700&height=500' )">
     #else
-        <span class="labelText">$i18n.getString( 'this_is_a_chart_area' )</span>
+        <div class="labelText">$i18n.getString( 'this_is_a_chart_area' )</div>
     #end
 </div>
 #end
@@ -59,13 +59,13 @@
 <table cellspacing="0" cellpadding="0" style="width:960px">
 <tr>
     <td style="width:305px">        
-        #dropDownButtonDiv( "dropDownA" "areaA" )
+        #linkDropDownButtonDiv( "dropDownA" "areaA" )
         #linkDropDownListDiv( "areaA" "dropDownA" $areaA )
 
-        #dropDownButtonDiv( "dropDownB" "areaB" )
+        #linkDropDownButtonDiv( "dropDownB" "areaB" )
         #linkDropDownListDiv( "areaB" "dropDownB" $areaB )
 
-        #dropDownButtonDiv( "dropDownC" "areaC" )
+        #linkDropDownButtonDiv( "dropDownC" "areaC" )
         #linkDropDownListDiv( "areaC" "dropDownC" $areaC )      
     </td>
 	<td>

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/map_view.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/map_view.vm	2009-09-09 17:28:50 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/map_view.vm	2012-03-05 10:43:47 +0000
@@ -15,3 +15,8 @@
     </tr>
     #end
 </table>
+
+#if( $mapViews.size() == 0 )
+<div class="labelText">$i18n.getString( "insert_links_by_going_to" ) 
+<a href="../dhis-web-mapping/mapping/index.html">$i18n.getString( "map_view" )</a></div>
+#end
\ No newline at end of file

=== removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/olap_url.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/olap_url.vm	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/olap_url.vm	1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-
-<table class="contentProviderTable">
-    <tr>
-    	<th colspan="2">$i18n.getString( "olap_url" )</th>
-    </tr>
-    #foreach ( $url in $olapUrls )
-    <tr>
-    	<td>
-    		<a href="../dhis-web-openhealth-integration/display.action?${url.url}">$url.name</a>
-    	</td>
-        <td style="width:16px">
-            <a href="javascript:window.location.href='removeOlapUrl.action?id=$url.id'" title="$i18n.getString( 'remove' )">
-            <img src="../images/close.png" alt="$i18n.getString( 'remove' )"></a>
-        </td>
-    </tr>
-    #end
-</table>

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/report.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/report.vm	2011-02-22 23:05:45 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/report.vm	2012-03-05 10:43:47 +0000
@@ -15,3 +15,8 @@
     </tr>
     #end
 </table>
+
+#if( $reports.size() == 0 )
+<div class="labelText">$i18n.getString( "insert_links_by_going_to" ) 
+<a href="../dhis-web-reporting/displayViewReportForm.action">$i18n.getString( "report" )</a></div>
+#end
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/report_table.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/report_table.vm	2011-01-20 08:46:49 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/report_table.vm	2012-03-05 10:43:47 +0000
@@ -14,4 +14,9 @@
         </td>
     </tr>
     #end
-</table>
\ No newline at end of file
+</table>
+
+#if( $reportTables.size() == 0 )
+<div class="labelText">$i18n.getString( "insert_links_by_going_to" ) 
+<a href="../dhis-web-reporting/displayManageTableForm.action">$i18n.getString( "report_table" )</a></div>
+#end
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/rss_diseases.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/rss_diseases.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/rss_diseases.vm	2012-03-05 10:43:47 +0000
@@ -0,0 +1,7 @@
+
+<table class="contentProviderTable">
+    <tr><th>$i18n.getString( "rss_diseases" )</th></tr>
+    #foreach ( $item in $diseasesItems )
+    <tr><td><a href="$item.link" target="_blank">$item.title</a>&nbsp;$item.date</td></tr>
+    #end
+</table>

=== removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/rss_hiv_aids.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/rss_hiv_aids.vm	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/rss_hiv_aids.vm	1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-
-<table class="contentProviderTable">
-    <tr><th>$i18n.getString( "rss_hiv_aids" )</th></tr>
-    #foreach ( $item in $hivAidsItems )
-    <tr><td><a href="$item.link" target="_blank">$item.title</a>&nbsp;$item.date</td></tr>
-    #end
-</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	2012-03-02 18:05:06 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css	2012-03-05 10:43:47 +0000
@@ -30,6 +30,11 @@
   position:absolute;
 }
 
+.linkArea div
+{
+  position:absolute;
+}
+
 .chartArea
 {
   border:1px solid #d0d0d0;
@@ -53,6 +58,7 @@
 .labelText
 {
   color:#808080;
+  padding:3px;
 }
 
 /*----------------------------------------------------------------------------*/