dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19450
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8482: Impl configurable option for displaying a short system introduction on the front page as a system...
------------------------------------------------------------
revno: 8482
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-10-11 13:56:28 +0200
message:
Impl configurable option for displaying a short system introduction on the front page as a system setting
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.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/resources/org/hisp/dhis/settings/i18n_module.properties
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-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2012-10-10 08:50:17 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2012-10-11 11:56:28 +0000
@@ -27,8 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_SCHEDULED_PERIOD_TYPES;
-
import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;
@@ -48,6 +46,7 @@
final String KEY_SYSTEM_IDENTIFIER = "keySystemIdentifier";
final String KEY_APPLICATION_TITLE = "applicationTitle";
+ final String KEY_APPLICATION_INTRO = "applicationIntro";
final String KEY_FLAG = "keyFlag";
final String KEY_FLAG_IMAGE = "keyFlagImage";
final String KEY_START_MODULE = "startModule";
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css 2012-10-03 10:33:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css 2012-10-11 11:56:28 +0000
@@ -40,20 +40,30 @@
position: absolute;
top: 17px;
left: 145px;
- font-size: 18px;
+ font-size: 19px;
+}
+
+#introArea
+{
+ width: 250px;
+ position: absolute;
+ top: 46px;
+ left: 145px;
+ font-size: 17px;
+ color: #bfd9f2;
}
#loginField
{
position: relative;
- margin: 120px auto 0 auto;
+ margin: 130px auto 0 auto;
width: 350px;
text-align: center;
}
#bannerArea
{
- margin-bottom: 42px;
+ margin-bottom: 35px;
border: none;
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2012-10-06 11:04:48 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2012-10-11 11:56:28 +0000
@@ -25,6 +25,9 @@
#end
#if ( $applicationTitle )
<span id="titleArea">$encoder.htmlEncode( $applicationTitle )</span>
+ #end
+ #if ( $applicationIntro )
+ <span id="introArea">$encoder.htmlEncode( $applicationIntro )</span>
#end
</div>
<div id="loginField">
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2012-10-03 18:12:37 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2012-10-11 11:56:28 +0000
@@ -31,6 +31,7 @@
import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_FACTOR_OF_DEVIATION;
import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_START_MODULE;
import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_TITLE;
+import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_INTRO;
import static org.hisp.dhis.setting.SystemSettingManager.KEY_CACHE_STRATEGY;
import static org.hisp.dhis.setting.SystemSettingManager.KEY_COMPLETENESS_OFFSET;
import static org.hisp.dhis.setting.SystemSettingManager.KEY_FACTOR_OF_DEVIATION;
@@ -87,6 +88,7 @@
map.put( KEY_SYSTEM_IDENTIFIER, systemSettingManager.getSystemIdentifier() ); //TODO remove
map.put( KEY_CACHE_STRATEGY, systemSettingManager.getSystemSetting( KEY_CACHE_STRATEGY ) );
map.put( KEY_APPLICATION_TITLE, systemSettingManager.getSystemSetting( KEY_APPLICATION_TITLE ) );
+ map.put( KEY_APPLICATION_INTRO, systemSettingManager.getSystemSetting( KEY_APPLICATION_INTRO ) );
map.put( KEY_FLAG, systemSettingManager.getSystemSetting( KEY_FLAG ) );
map.put( KEY_FLAG_IMAGE, systemSettingManager.getFlagImage() );
map.put( KEY_START_MODULE, systemSettingManager.getSystemSetting( KEY_START_MODULE, DEFAULT_START_MODULE ) );
=== 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 2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java 2012-10-11 11:56:28 +0000
@@ -28,6 +28,7 @@
*/
import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_TITLE;
+import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_INTRO;
import static org.hisp.dhis.setting.SystemSettingManager.KEY_FLAG;
import static org.hisp.dhis.setting.SystemSettingManager.KEY_START_MODULE;
@@ -73,6 +74,13 @@
{
this.applicationTitle = applicationTitle;
}
+
+ private String applicationIntro;
+
+ public void setApplicationIntro( String applicationIntro )
+ {
+ this.applicationIntro = applicationIntro;
+ }
private String flag;
@@ -128,6 +136,7 @@
}
systemSettingManager.saveSystemSetting( KEY_APPLICATION_TITLE, applicationTitle );
+ systemSettingManager.saveSystemSetting( KEY_APPLICATION_INTRO, applicationIntro );
systemSettingManager.saveSystemSetting( KEY_FLAG, flag );
systemSettingManager.saveSystemSetting( KEY_START_MODULE, startModule );
styleManager.setSystemStyle( currentStyle );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2012-10-08 07:10:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2012-10-11 11:56:28 +0000
@@ -103,4 +103,4 @@
solomon_islands=Solomon Islands
vanuatu=Vanuatu
timor_leste=Timor-Leste
-
+application_introduction=Application introduction
\ No newline at end of file
=== 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 2012-04-16 12:26:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm 2012-10-11 11:56:28 +0000
@@ -3,6 +3,7 @@
jQuery("input[type=button]").click(function() {
jQuery.postUTF8( 'setSystemAppearanceSettings.action', {
applicationTitle: getFieldValue( 'applicationTitle' ),
+ applicationIntro: getFieldValue( 'applicationIntro' ),
currentStyle: getFieldValue( 'currentStyle' ),
flag: getFieldValue( 'flag' ),
startModule: getFieldValue( 'startModule' )
@@ -18,7 +19,11 @@
<h4>$i18n.getString( "application_title" )</h4>
-<p><input type="text" id="applicationTitle" name="applicationTitle" style="width:30em" maxlength="40" value="$!applicationTitle"/></p>
+<p><input type="text" id="applicationTitle" name="applicationTitle" style="width:30em" maxlength="40" value="$!{applicationTitle}"/></p>
+
+<h4>$i18n.getString( "application_introduction" )</h4>
+
+<p><input type="text" id="applicationIntro" name="applicationIntro" style="width:30em" maxlength="80" value="$!{applicationIntro}"/></p>
<h4>$i18n.getString( "style" )</h4>