Skip to content
Permalink
Browse files

[FIXED JENKINS-18633] Simplified distinction between Jenkins.descript…

…ion and View.description.

Both are shown if defined. The edit description link only applies to View.description.
Properly handle a ViewGroup other than Jenkins itself, such as a folder.
  • Loading branch information...
jglick committed Oct 7, 2013
1 parent ce29cdb commit 04c8a1efc0f6324868638be9a4cfdb085e17744f
@@ -68,6 +68,9 @@
Split matrix authorization strategies into an independent plugin.
<li class='rfe'>
UI Samples plugin fully separated from core. To view samples during plugin development or at any other time, just install from the update center.
<li class=bug>
View description should be clearly separated from the Jenkins system message.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-18633">issue 18633</a>)
<li class=bug>
SCM polling sometimes broken since 1.527 due to a change in how environment variables are calculated.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-19307">issue 19307</a>)
@@ -23,7 +23,6 @@
*/
package hudson.model;

import jenkins.model.Jenkins;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;
@@ -53,11 +52,6 @@ public AllView(String name, ViewGroup owner) {
this.owner = owner;
}

@Override
public String getDescription() {
return Jenkins.getInstance().getDescription();
}

@Override
public boolean isEditable() {
return false;
@@ -82,14 +76,6 @@ public Item doCreateItem(StaplerRequest req, StaplerResponse rsp)
return (Collection)getOwnerItemGroup().getItems();
}

@Override
public synchronized void doSubmitDescription( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
checkPermission(Jenkins.ADMINISTER);

Jenkins.getInstance().setSystemMessage(req.getParameter("description"));
rsp.sendRedirect(".");
}

@Override
public String getPostConstructLandingPage() {
return ""; // there's no configuration page
@@ -27,7 +27,7 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:f="/lib/form" xmlns:l="/lib/layout">
<j:if test="${it.class.name=='hudson.model.Hudson'}">
<j:if test="${it.primaryView != null}">
<j:set var="it" value="${it.primaryView}"/>
</j:if>
<l:ajax>
@@ -31,12 +31,10 @@ THE SOFTWARE.
<st:include page="view-index-top.jelly" it="${it.owner}" optional="true">
<!-- allow the owner to take over the top section, but we also need the default to be backward compatible -->
<div id="view-message">
<j:if test="${it.class.name!='hudson.model.AllView'}">
<div id="systemmessage">
<j:out value="${app.systemMessage!=null ? app.markupFormatter.translate(app.systemMessage) : ''}" />
</div>
</j:if>
<t:editableDescription permission="${app.ADMINISTER}"/>
<t:editableDescription permission="${it.CONFIGURE}"/>
</div>
</st:include>

0 comments on commit 04c8a1e

Please sign in to comment.
You can’t perform that action at this time.