dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23081
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11219: Login page. Introduced configurable page footer. Allowed custom HTML in application intro, notifi...
------------------------------------------------------------
revno: 11219
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-06-17 19:39:32 +0200
message:
Login page. Introduced configurable page footer. Allowed custom HTML in application intro, notification and footer.
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 2013-04-25 09:07:24 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2013-06-17 17:39:32 +0000
@@ -47,6 +47,7 @@
final String KEY_APPLICATION_TITLE = "applicationTitle";
final String KEY_APPLICATION_INTRO = "keyApplicationIntro";
final String KEY_APPLICATION_NOTIFICATION = "keyApplicationNotification";
+ final String KEY_APPLICATION_FOOTER = "keyApplicationFooter";
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-11-28 12:36:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css 2013-06-17 17:39:32 +0000
@@ -113,6 +113,22 @@
border-radius: 3px;
}
+#notificationArea a {
+ color: #6b90b8;
+}
+
+#footerArea
+{
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ padding: 10px 0 9px 50px;
+ font-size: 12px;
+ border-top: 1px solid #416f9d;
+ color: #6b90b8;
+ width: 100%;
+}
+
.greenButtonLink
{
padding: 6px 12px;
=== 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-12-19 14:35:23 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2013-06-17 17:39:32 +0000
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
- <title>$encoder.htmlEncode( $applicationTitle )</title>
+ <title>$encoder.htmlEncode( ${applicationTitle} )</title>
<script type="text/javascript" src="../javascripts/jQuery/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
@@ -20,17 +20,17 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
- <h1 style="display:none">$encoder.htmlEncode( $applicationTitle )</h1>
+ <h1 style="display:none">$encoder.htmlEncode( ${applicationTitle} )</h1>
<div style="display:none">DHIS 2</div>
<div>
#if ( $keyFlag )
<img id="flagArea" src="../flags/${keyFlagImage}">
#end
#if ( $applicationTitle )
- <span id="titleArea">$encoder.htmlEncode( $applicationTitle )</span>
+ <span id="titleArea">$encoder.htmlEncode( ${applicationTitle} )</span>
#end
#if ( $keyApplicationIntro )
- <span id="introArea">$encoder.htmlEncode( $keyApplicationIntro )</span>
+ <span id="introArea">${keyApplicationIntro}</span>
#end
</div>
#if ( $keyConfig.selfRegistrationAllowed() )
@@ -39,7 +39,7 @@
</div>
#end
<div id="loginField">
- <div id="bannerArea"><a href="http://dhis2.org"><img src="logo_front.png" style="border:none"></a></div>
+ <div id="bannerArea"><a href="http://www.dhis2.org"><img src="logo_front.png" style="border:none"></a></div>
<form id="loginForm" action="../../dhis-web-commons-security/login.action" method="post">
<table>
@@ -77,8 +77,9 @@
<span id="loginMessage">Wrong username or password</span>
#end
#if ( $keyApplicationNotification )
- <div id="notificationArea">$encoder.htmlEncode( $keyApplicationNotification )</div>
+ <div id="notificationArea">${keyApplicationNotification}</div>
#end
</div>
+ <div id="footerArea"><span>Powered by <a href="http://www.dhis2.org">DHIS 2</a> ${keyApplicationFooter}</div>
</body>
</html>
=== 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-12-07 21:28:50 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2013-06-17 17:39:32 +0000
@@ -85,6 +85,7 @@
map.put( KEY_APPLICATION_TITLE, systemSettingManager.getSystemSetting( KEY_APPLICATION_TITLE, DEFAULT_APPLICATION_TITLE ) );
map.put( KEY_APPLICATION_INTRO, systemSettingManager.getSystemSetting( KEY_APPLICATION_INTRO ) );
map.put( KEY_APPLICATION_NOTIFICATION, systemSettingManager.getSystemSetting( KEY_APPLICATION_NOTIFICATION ) );
+ map.put( KEY_APPLICATION_FOOTER, systemSettingManager.getSystemSetting( KEY_APPLICATION_FOOTER ) );
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-11-19 15:39:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java 2013-06-17 17:39:32 +0000
@@ -30,6 +30,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_APPLICATION_NOTIFICATION;
+import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_FOOTER;
import static org.hisp.dhis.setting.SystemSettingManager.KEY_FLAG;
import static org.hisp.dhis.setting.SystemSettingManager.KEY_START_MODULE;
@@ -89,6 +90,13 @@
{
this.applicationNotification = applicationNotification;
}
+
+ private String applicationFooter;
+
+ public void setApplicationFooter( String applicationFooter )
+ {
+ this.applicationFooter = applicationFooter;
+ }
private String flag;
@@ -134,6 +142,7 @@
applicationIntro = StringUtils.trimToNull( applicationIntro );
applicationTitle = StringUtils.trimToNull( applicationTitle );
applicationNotification = StringUtils.trimToNull( applicationNotification );
+ applicationFooter = StringUtils.trimToNull( applicationFooter );
if ( flag != null && flag.equals( "NO_FLAG" ) )
{
@@ -148,6 +157,7 @@
systemSettingManager.saveSystemSetting( KEY_APPLICATION_TITLE, applicationTitle );
systemSettingManager.saveSystemSetting( KEY_APPLICATION_INTRO, applicationIntro );
systemSettingManager.saveSystemSetting( KEY_APPLICATION_NOTIFICATION, applicationNotification );
+ systemSettingManager.saveSystemSetting( KEY_APPLICATION_FOOTER, applicationFooter );
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 2013-04-25 09:07:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2013-06-17 17:39:32 +0000
@@ -59,4 +59,6 @@
application_notification=Application notification
multi_organisation_unit_forms=Enable multi-organisation unit forms
port=Port
-tls=TLS
\ No newline at end of file
+tls=TLS
+allows_html=allows HTML
+application_footer=Application footer
\ 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-11-13 11:12:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm 2013-06-17 17:39:32 +0000
@@ -5,6 +5,7 @@
applicationTitle: getFieldValue( 'applicationTitle' ),
applicationIntro: getFieldValue( 'applicationIntro' ),
applicationNotification: getFieldValue( 'applicationNotification' ),
+ applicationFooter: getFieldValue( 'applicationFooter' ),
currentStyle: getFieldValue( 'currentStyle' ),
flag: getFieldValue( 'flag' ),
startModule: getFieldValue( 'startModule' )
@@ -23,14 +24,18 @@
<div class="setting"><input type="text" id="applicationTitle" name="applicationTitle" maxlength="40" value="$!{applicationTitle}"/></div>
-<div class="settingLabel">$i18n.getString( "application_introduction" )</div>
-
-<div class="setting"><input type="text" id="applicationIntro" name="applicationIntro" maxlength="80" value="$!{keyApplicationIntro}"/></div>
-
-<div class="settingLabel">$i18n.getString( "application_notification" )</div>
+<div class="settingLabel">$i18n.getString( "application_introduction" ) <span class="tipText">($i18n.getString( "allows_html" ))</span></div>
+
+<div class="setting"><textarea id="applicationIntro" name="applicationIntro">$!{keyApplicationIntro}</textarea></div>
+
+<div class="settingLabel">$i18n.getString( "application_notification" ) <span class="tipText">($i18n.getString( "allows_html" ))</span></div>
<div class="setting"><textarea id="applicationNotification" name="applicationNotification">$!{keyApplicationNotification}</textarea></div>
+<div class="settingLabel">$i18n.getString( "application_footer" ) <span class="tipText">($i18n.getString( "allows_html" ))</span></div>
+
+<div class="setting"><textarea id="applicationFooter" name="applicationFooter">$!{keyApplicationFooter}</textarea></div>
+
<div class="settingLabel">$i18n.getString( "style" )</div>
<div class="setting">