Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordmills2013-02-27 04:53:08 -0500
committerdmills2013-02-27 04:53:08 -0500
commit434908e1a74476bfa413ca4cf58c145aed1392fa (patch)
tree4e04f8fb9fb9e5ca2a977f56afa927b10f6050fc
parentb1d5f3797bfd7dac8ab06ea5b7b22873e25dff68 (diff)
downloadorg.eclipse.hudson.core-434908e1a74476bfa413ca4cf58c145aed1392fa.tar.gz
org.eclipse.hudson.core-434908e1a74476bfa413ca4cf58c145aed1392fa.tar.xz
org.eclipse.hudson.core-434908e1a74476bfa413ca4cf58c145aed1392fa.zip
Added basic privacy message capability as the first part of enhancement: 401754
-rw-r--r--hudson-core/src/main/java/hudson/model/Hudson.java29
-rw-r--r--hudson-core/src/main/resources/hudson/model/Hudson/configure.jelly8
-rw-r--r--hudson-core/src/main/resources/lib/layout/layout.jelly9
-rw-r--r--hudson-war/src/main/webapp/css/style.css18
4 files changed, 52 insertions, 12 deletions
diff --git a/hudson-core/src/main/java/hudson/model/Hudson.java b/hudson-core/src/main/java/hudson/model/Hudson.java
index 5de153ed..2e6db68d 100644
--- a/hudson-core/src/main/java/hudson/model/Hudson.java
+++ b/hudson-core/src/main/java/hudson/model/Hudson.java
@@ -1,6 +1,6 @@
/*******************************************************************************
*
- * Copyright (c) 2004-2012 Oracle Corporation.
+ * Copyright (c) 2004-2013 Oracle Corporation.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -10,7 +10,7 @@
* Contributors:
*
* Kohsuke Kawaguchi, Winston Prakash, Nikita Levyankov, Erik Ramfelt, Koichi Fujikawa,
- * Seiji Sogabe, Stephen Connolly, Tom Huybrechts, Alan Harder
+ * Seiji Sogabe, Stephen Connolly, Tom Huybrechts, Alan Harder, Duncan Mills
*
*******************************************************************************/
@@ -256,6 +256,14 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
* Message displayed in the top page.
*/
private String systemMessage;
+
+ /**
+ * Optional privacy message to be printed at the base of each page, this can be used for
+ * CopyRight, Confidentiality information and so forth
+ * Introduced Hudson 3.0.1
+ */
+ private String privacyMessage;
+
private static transient final String HUDSON_WORKSPACES_PROPERTY_KEY = "HUDSON_WORKSPACES";
/**
* Workspace root dir which could be configured by setting HUDSON_WORKSPACES
@@ -1067,6 +1075,21 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
this.systemMessage = message;
save();
}
+
+ /**
+ * Get the Privacy Message
+ */
+ public String getPrivacyMessage() {
+ return privacyMessage;
+ }
+
+ /**
+ * Sets the privacy message.
+ */
+ public void setPrivacyMessage(String message) throws IOException {
+ this.privacyMessage = message;
+ save();
+ }
public FederatedLoginService getFederatedLoginService(String name) {
for (FederatedLoginService fls : FederatedLoginService.all()) {
@@ -2487,6 +2510,8 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
scmCheckoutRetryCount = json.getInt("retry_count");
systemMessage = Util.nullify(req.getParameter("system_message"));
+
+ privacyMessage = json.optString("privacy_message","");
jdks.clear();
jdks.addAll(req.bindJSONToList(JDK.class, json.get("jdks")));
diff --git a/hudson-core/src/main/resources/hudson/model/Hudson/configure.jelly b/hudson-core/src/main/resources/hudson/model/Hudson/configure.jelly
index 21d4f38d..96fb8beb 100644
--- a/hudson-core/src/main/resources/hudson/model/Hudson/configure.jelly
+++ b/hudson-core/src/main/resources/hudson/model/Hudson/configure.jelly
@@ -1,6 +1,6 @@
<!-- **************************************************************************
#
-# Copyright (c) 2004-2012 Oracle Corporation.
+# Copyright (c) 2004-2013 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
@@ -10,7 +10,8 @@
# Contributors:
#
# Kohsuke Kawaguchi, Winston Prakash,
-# Erik Ramfelt, Jean-Baptiste Quenot, Stephen Connolly, Tom Huybrechts, Yahoo! Inc.
+# Erik Ramfelt, Jean-Baptiste Quenot, Stephen Connolly,
+# Tom Huybrechts, Yahoo! Inc., Duncan Mills
#
#************************************************************************** -->
@@ -39,6 +40,9 @@
<f:entry title="${%System Message}" help="/help/system-config/systemMessage.html">
<f:textarea name="system_message" value="${it.systemMessage}" />
</f:entry>
+ <f:entry title="${%Privacy Message}" help="/help/system-config/privacyMessage.html">
+ <f:textbox name="privacy_message" value="${it.privacyMessage}" />
+ </f:entry>
<f:entry title="${%# of executors}" field="numExecutors">
<f:textbox />
</f:entry>
diff --git a/hudson-core/src/main/resources/lib/layout/layout.jelly b/hudson-core/src/main/resources/lib/layout/layout.jelly
index 7374bacf..4a75c4e8 100644
--- a/hudson-core/src/main/resources/lib/layout/layout.jelly
+++ b/hudson-core/src/main/resources/lib/layout/layout.jelly
@@ -1,6 +1,6 @@
<!-- **************************************************************************
#
-# Copyright (c) 2004-2012 Oracle Corporation.
+# Copyright (c) 2004-2013 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
@@ -9,7 +9,7 @@
#
# Contributors:
#
-# Kohsuke Kawaguchi, Winston Prakash, Nikita Levyankov
+# Kohsuke Kawaguchi, Winston Prakash, Nikita Levyankov, Duncan Mills
#
#************************************************************************** -->
@@ -297,7 +297,10 @@
<tr>
<table width="100%">
<tr>
- <td id="footer">
+ <td class="footer">
+ <j:out value="${app.privacyMessage}"/>
+ </td>
+ <td id="footer-right-panel" class="footer">
<span style="padding-right:2em;">
${%Page generated}:
<i:formatDate value="${h.getCurrentTime()}" type="both" dateStyle="medium" timeStyle="medium"/>
diff --git a/hudson-war/src/main/webapp/css/style.css b/hudson-war/src/main/webapp/css/style.css
index 9e6a17cf..4bf879a0 100644
--- a/hudson-war/src/main/webapp/css/style.css
+++ b/hudson-war/src/main/webapp/css/style.css
@@ -1,6 +1,6 @@
/*******************************************************************************
*
- * Copyright (c) 2004-2012 Oracle Corporation.
+ * Copyright (c) 2004-2013 Oracle Corporation.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,7 +9,8 @@
*
* Contributors:
*
- * Kohsuke Kawaguchi, Winston Prakash, Daniel Dyer, Stephen Connolly, Nikita Levyankov, Anton Kozak
+ * Kohsuke Kawaguchi, Winston Prakash, Daniel Dyer, Stephen Connolly,
+ * Nikita Levyankov, Anton Kozak, Duncan Mills
*
*******************************************************************************/
@@ -119,19 +120,26 @@ dt {
width: 220px;
}
-#footer {
- text-align: right;
+
+.footer {
font-size: 8pt;
margin-top: 10em;
padding: 10px;
border-top: 1px solid #d4bde6;
color: #a58fb5;
+ text-align: left;
}
-#footer a {
+.footer a {
color: #a58fb5;
}
+#footer-right-panel {
+ text-align: right;
+}
+
+
+
#tasks {
padding: 4px;
}

Back to the top