← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 797: Displaying the Report Configuration menu option only when BIRT is selected as reporting lib. Made...

 

------------------------------------------------------------
revno: 797
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Mon 2009-09-28 21:33:22 +0200
message:
  Displaying the Report Configuration menu option only when BIRT is selected as reporting lib. Made default style configurable through Spring.
modified:
  dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/style/DefaultStyleManager.java
  dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-portal/pom.xml
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm


--
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-options/src/main/java/org/hisp/dhis/options/style/DefaultStyleManager.java'
--- dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/style/DefaultStyleManager.java	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/style/DefaultStyleManager.java	2009-09-28 19:33:22 +0000
@@ -55,7 +55,14 @@
     {
         this.userSettingService = userSettingService;
     }
-    
+
+    private String defaultStyle;
+
+    public void setDefaultStyle( String defaultStyle )
+    {
+        this.defaultStyle = defaultStyle;
+    }
+
     private SortedMap<String, String> styles;
     
     public void setStyles( SortedMap<String, String> styles )
@@ -80,7 +87,7 @@
     
     public String getCurrentStyle()
     {
-        return (String) userSettingService.getUserSetting( SETTING_NAME_STYLE, styles.values().iterator().next() );
+        return (String) userSettingService.getUserSetting( SETTING_NAME_STYLE, styles.get( defaultStyle ) );
     }
     
     public String getCurrentStyleDirectory()

=== modified file 'dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml	2009-07-07 21:34:47 +0000
+++ dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml	2009-09-28 19:33:22 +0000
@@ -118,6 +118,7 @@
     class="org.hisp.dhis.options.style.DefaultStyleManager">
     <property name="userSettingService"
       ref="org.hisp.dhis.user.UserSettingService"/>
+    <property name="defaultStyle" value="light_blue"/>
     <property name="styles">
       <map>
         <entry>

=== modified file 'dhis-2/dhis-web/dhis-web-portal/pom.xml'
--- dhis-2/dhis-web/dhis-web-portal/pom.xml	2009-09-25 06:10:21 +0000
+++ dhis-2/dhis-web/dhis-web-portal/pom.xml	2009-09-28 19:33:22 +0000
@@ -113,13 +113,15 @@
       <artifactId>dhis-web-mapping</artifactId>
       <version>${version}</version>
       <type>war</type>
-    </dependency>  
+    </dependency>
+    <!-- 
 	<dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-excel-reporting</artifactId>
       <version>${version}</version>
       <type>war</type>
     </dependency>
+    -->
     
     <!-- India modules -->
     

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm	2009-08-21 16:44:05 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm	2009-09-28 19:33:22 +0000
@@ -4,8 +4,10 @@
 	<li><a href="displayViewReportFormVerifyConfiguration.action">$i18n.getString( "standard_report" )&nbsp;</a></li>
 	<li><a href="dataSetReport.action">$i18n.getString( "dataset_report" )&nbsp;</a></li>
     <li><a href="displayViewDocumentForm.action">$i18n.getString( "static_report" )&nbsp;</a></li>
-	<li><a href="displayConfigureReportForm.action">$i18n.getString( "report_configuration" )&nbsp;</a></li>
 	<li><a href="tallySheetGenerator.action">$i18n.getString( "tally_sheet_generator" )&nbsp;</a></li>
+	#if( $reportFramework == "birt" )
+    <li><a href="displayConfigureReportForm.action">$i18n.getString( "report_configuration" )&nbsp;</a></li>
+    #end
 </ul>
 
 <h2>$i18n.getString( "chart" )&nbsp;</h2>