提交 04c8a1ef 编写于 作者: J Jesse Glick

[FIXED JENKINS-18633] Simplified distinction between Jenkins.description 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.
上级 ce29cdb3
...@@ -68,6 +68,9 @@ Upcoming changes</a> ...@@ -68,6 +68,9 @@ Upcoming changes</a>
Split matrix authorization strategies into an independent plugin. Split matrix authorization strategies into an independent plugin.
<li class='rfe'> <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. 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> <li class=bug>
SCM polling sometimes broken since 1.527 due to a change in how environment variables are calculated. 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>) (<a href="https://issues.jenkins-ci.org/browse/JENKINS-19307">issue 19307</a>)
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
*/ */
package hudson.model; package hudson.model;
import jenkins.model.Jenkins;
import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.Stapler; import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerRequest;
...@@ -53,11 +52,6 @@ public class AllView extends View { ...@@ -53,11 +52,6 @@ public class AllView extends View {
this.owner = owner; this.owner = owner;
} }
@Override
public String getDescription() {
return Jenkins.getInstance().getDescription();
}
@Override @Override
public boolean isEditable() { public boolean isEditable() {
return false; return false;
...@@ -82,14 +76,6 @@ public class AllView extends View { ...@@ -82,14 +76,6 @@ public class AllView extends View {
return (Collection)getOwnerItemGroup().getItems(); 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 @Override
public String getPostConstructLandingPage() { public String getPostConstructLandingPage() {
return ""; // there's no configuration page return ""; // there's no configuration page
......
...@@ -27,7 +27,7 @@ THE SOFTWARE. ...@@ -27,7 +27,7 @@ THE SOFTWARE.
--> -->
<?jelly escape-by-default='true'?> <?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: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:set var="it" value="${it.primaryView}"/>
</j:if> </j:if>
<l:ajax> <l:ajax>
......
...@@ -31,12 +31,10 @@ THE SOFTWARE. ...@@ -31,12 +31,10 @@ THE SOFTWARE.
<st:include page="view-index-top.jelly" it="${it.owner}" optional="true"> <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 --> <!-- allow the owner to take over the top section, but we also need the default to be backward compatible -->
<div id="view-message"> <div id="view-message">
<j:if test="${it.class.name!='hudson.model.AllView'}">
<div id="systemmessage"> <div id="systemmessage">
<j:out value="${app.systemMessage!=null ? app.markupFormatter.translate(app.systemMessage) : ''}" /> <j:out value="${app.systemMessage!=null ? app.markupFormatter.translate(app.systemMessage) : ''}" />
</div> </div>
</j:if> <t:editableDescription permission="${it.CONFIGURE}"/>
<t:editableDescription permission="${app.ADMINISTER}"/>
</div> </div>
</st:include> </st:include>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册