提交 352b06e5 编写于 作者: R rseguy

Added a new hudson.footerURL system property to tweak the link displayed at the bottom of the UI

上级 5b858c69
......@@ -71,6 +71,9 @@ Upcoming changes</a>
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-5577">issue 5577</a>)
<li class=rfe>
Making views more reusable outside the root object.
<li class=ref>
Added a new hudson.footerURL system property to tweak the link displayed at
the bottom of the UI
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -2,7 +2,8 @@
* The MIT License
*
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
* Yahoo! Inc., Stephen Connolly, Tom Huybrechts, Alan Harder, Romain Seguy
* Yahoo! Inc., Stephen Connolly, Tom Huybrechts, Alan Harder, Manufacture
* Francaise des Pneumatiques Michelin, Romain Seguy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -108,6 +109,7 @@ import java.util.logging.LogManager;
import java.util.logging.LogRecord;
import java.util.logging.SimpleFormatter;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
/**
* Utility functions used in views.
......@@ -648,6 +650,20 @@ public class Functions {
return buf.toString();
}
/**
* Returns the link to be displayed in the footer of the UI.
*/
public static String getFooterURL() {
if(footerURL == null) {
footerURL = System.getProperty("hudson.footerURL");
if(StringUtils.isBlank(footerURL)) {
footerURL = "http://jenkins-ci.org/";
}
}
return footerURL;
}
private static String footerURL = null;
public static List<JobPropertyDescriptor> getJobPropertyDescriptors(Class<? extends Job> clazz) {
return JobPropertyDescriptor.getPropertyDescriptors(clazz);
}
......
......@@ -2,7 +2,8 @@
The MIT License
Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
Daniel Dyer, Seiji Sogabe, Tom Huybrechts
Daniel Dyer, Seiji Sogabe, Tom Huybrechts, Manufacture Francaise des Pneumatiques
Michelin, Romain Seguy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......@@ -259,7 +260,7 @@ THE SOFTWARE.
${%Page generated}:
<i:formatDate value="${h.getCurrentTime()}" type="both" dateStyle="medium" timeStyle="medium"/>
</span>
<a href="http://jenkins-ci.org/">Jenkins ver. ${h.version}</a>
<a href="${h.getFooterURL()}">Jenkins ver. ${h.version}</a>
</td></tr>
</table>
<j:forEach var="pd" items="${h.pageDecorators}">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册