Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Foster2014-05-27 02:48:22 -0400
committerBob Foster2014-05-27 02:48:22 -0400
commite6f0ad2ed2d26706712289b5543cfda089844aaa (patch)
treeacf9f982f75cb5cbb655f86701944ca525be895e
parenta862ad4da569f2dfe2f62579c0dc9046afd1ceb4 (diff)
downloadorg.eclipse.hudson.core-e6f0ad2ed2d26706712289b5543cfda089844aaa.tar.gz
org.eclipse.hudson.core-e6f0ad2ed2d26706712289b5543cfda089844aaa.tar.xz
org.eclipse.hudson.core-e6f0ad2ed2d26706712289b5543cfda089844aaa.zip
Don't show Workspace link on job page unless there is a workspace.
It's a basic human interface principle not to offer choices that can only lead to errors. In this case, it's compounded because the Workspace link enables the Wipe Out workspace link, which, if there is no workspace, will produce a truly meaningless error message blaming the SCM.
-rw-r--r--hudson-core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly8
1 files changed, 5 insertions, 3 deletions
diff --git a/hudson-core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly b/hudson-core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly
index 48ec1dbe..0c46fb51 100644
--- a/hudson-core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly
+++ b/hudson-core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly
@@ -31,9 +31,11 @@
<l:task icon="images/24x24/up.png" href="${rootURL}/" title="${%Back to Main Dashboard}" />
<l:task icon="images/24x24/search.png" href="${url}/" title="${%Status}" />
<l:task icon="images/24x24/notepad.png" href="${url}/changes" title="${%Changes}" />
- <l:task icon="images/24x24/folder.png" href="${url}/ws/" title="${%Workspace}" permission="${it.WORKSPACE}">
- <l:task icon="images/24x24/folder-delete.png" href="${url}/wipeOutWorkspace" title="${%Wipe Out Workspace}" permission="${h.isWipeOutPermissionEnabled() ? it.WIPEOUT : it.BUILD}" />
- </l:task>
+ <j:if test="${it.workspace != null}">
+ <l:task icon="images/24x24/folder.png" href="${url}/ws/" title="${%Workspace}" permission="${it.WORKSPACE}">
+ <l:task icon="images/24x24/folder-delete.png" href="${url}/wipeOutWorkspace" title="${%Wipe Out Workspace}" permission="${h.isWipeOutPermissionEnabled() ? it.WIPEOUT : it.BUILD}" />
+ </l:task>
+ </j:if>
<j:if test="${it.configurable}">
<j:if test="${it.buildable}">
<l:task icon="images/24x24/clock.png" href="${url}/build?delay=0sec" title="${%Build Now}"

Back to the top