提交 b22b17c0 编写于 作者: J Jesse Glick

[FIXED JENKINS-10738] Different "build now" text for parameterized builds.

(Not touching the icon since I do not feel like playing with Inkscape; would be a nice pull request for somebody.)
上级 97da1618
......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=rfe>
Different text than “Build Now” for parameterized jobs.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10738">issue 10738</a>)
<li class=bug>
“Build Now” context menu item broken for parameterized jobs.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-17110">issue 17110</a>)
......
......@@ -448,7 +448,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* @since 1.401
*/
public String getBuildNowText() {
return AlternativeUiTextProvider.get(BUILD_NOW_TEXT,this,Messages.AbstractProject_BuildNow());
return AlternativeUiTextProvider.get(BUILD_NOW_TEXT, this, isParameterized() ? Messages.AbstractProject_build_with_parameters() : Messages.AbstractProject_BuildNow());
}
/**
......
......@@ -37,6 +37,7 @@ AbstractProject.Pronoun=Project
AbstractProject.Aborted=Aborted
AbstractProject.BuildInProgress=Build #{0} is already in progress{1}
AbstractProject.BuildNow=Build Now
AbstractProject.build_with_parameters=Build with Parameters
AbstractProject.UpstreamBuildInProgress=Upstream project {0} is already building.
AbstractProject.DownstreamBuildInProgress=Downstream project {0} is already building.
AbstractProject.Disabled=Build disabled
......@@ -345,4 +346,4 @@ BuildAuthorizationToken.InvalidTokenProvided=Invalid token provided.
Jenkins.CheckDisplayName.NameNotUniqueWarning=The display name, "{0}", is used as a name by a job and could cause confusing search results.
Jenkins.CheckDisplayName.DisplayNameNotUniqueWarning=The display name, "{0}", is already in use by another job and could cause confusion and delay.
Jenkins.NotAllowedName="{0}" is not allowed name
\ No newline at end of file
Jenkins.NotAllowedName="{0}" is not allowed name
......@@ -27,10 +27,19 @@ THE SOFTWARE.
<td>
<j:if test="${job.buildable and job.hasPermission(job.BUILD)}">
<a href="${jobBaseUrl}${job.shortUrl}build?delay=0sec">
<img src="${imagesURL}/${subIconSize}/clock.png"
title="${%Schedule a build}" alt="${%Schedule a build}"
onclick="${job.parameterized ? null : 'return build(this)'}"
border="0"/>
<j:choose>
<j:when test="${job.parameterized}">
<img src="${imagesURL}/${subIconSize}/clock.png"
title="${%Schedule a build with parameters}" alt="${%Schedule a build with parameters}"
border="0"/>
</j:when>
<j:otherwise>
<img src="${imagesURL}/${subIconSize}/clock.png"
title="${%Schedule a build}" alt="${%Schedule a build}"
onclick="return build(this)"
border="0"/>
</j:otherwise>
</j:choose>
</a>
<script>
function build(img) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册