← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17388: Start page setting, adding default option

 

------------------------------------------------------------
revno: 17388
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-11-07 20:36:59 +0100
message:
  Start page setting, adding default option
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.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-services/dhis-service-core/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties	2014-10-21 07:11:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties	2014-11-07 19:36:59 +0000
@@ -204,6 +204,7 @@
 no_user_credentials=No user credentials
 user_does_not_have_valid_email=User does not have a valid email
 user_has_critical_authorities=User has critical authorities
+default=Default
 
 #-- PeriodTypes ----------------------------------------------------------------#
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java	2014-10-02 11:00:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java	2014-11-07 19:36:59 +0000
@@ -63,7 +63,7 @@
     {
         String startModule = (String) systemSettingManager.getSystemSetting( KEY_START_MODULE );
 
-        if ( startModule != null )
+        if ( startModule != null && !startModule.trim().isEmpty() )
         {
             if ( startModule.startsWith( "app:" ) )
             {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java	2014-10-16 06:17:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java	2014-11-07 19:36:59 +0000
@@ -166,6 +166,8 @@
         applicationTitle = StringUtils.trimToNull( applicationTitle );
         applicationNotification = StringUtils.trimToNull( applicationNotification );
         applicationFooter = StringUtils.trimToNull( applicationFooter );
+        flag = StringUtils.trimToNull( flag );
+        startModule = StringUtils.trimToNull( startModule );
 
         if ( flag != null && flag.equals( "NO_FLAG" ) )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm	2014-10-02 09:58:38 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm	2014-11-07 19:36:59 +0000
@@ -64,16 +64,12 @@
 
 <div class="setting">
 <select id="startModule" name="startModule">
-    <option value="NO_START_PAGE">$i18n.getString( "system_overview" )</option>
+    <option value="">[ $i18n.getString( "default" ) ]</option>
     #foreach ( $module in $modules )
     <option value="$module.name" #if( $module.name == $startModule )selected="selected"#end>$i18n.getString( "$module.name" )</option>
     #end
-    #if( $apps.size() > 0 )
-    <optgroup label="Apps">
-        #foreach ( $app in $apps )
-        <option value="app:${app.name}" #if( "app:${app.name}" == $startModule )selected="selected"#end>$i18n.getString( "$app.name" )</option>
-        #end
-    </optgroup>
+    #foreach ( $app in $apps )
+    <option value="app:${app.name}" #if( "app:${app.name}" == $startModule )selected="selected"#end>$i18n.getString( "$app.name" )</option>
     #end
 </select>
 </div>