Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'hudson-core/src/main/resources/hudson')
-rw-r--r--hudson-core/src/main/resources/hudson/model/ComputerSet/_new.jelly49
-rw-r--r--hudson-core/src/main/resources/hudson/model/ComputerSet/new.jelly31
-rw-r--r--hudson-core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly27
-rw-r--r--hudson-core/src/main/resources/hudson/model/View/sidepanel2.jelly10
4 files changed, 70 insertions, 47 deletions
diff --git a/hudson-core/src/main/resources/hudson/model/ComputerSet/_new.jelly b/hudson-core/src/main/resources/hudson/model/ComputerSet/_new.jelly
index caed786f..21a88086 100644
--- a/hudson-core/src/main/resources/hudson/model/ComputerSet/_new.jelly
+++ b/hudson-core/src/main/resources/hudson/model/ComputerSet/_new.jelly
@@ -21,28 +21,35 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form">
- <l:layout norefresh="true" permission="${app.ADMINISTER}">
- <st:include page="sidepanel.jelly"/>
- <l:main-panel>
- <h1>
- <img width="48" height="48" src="${imagesURL}/48x48/setting.png" alt="" style="margin-right:10px"/>
- ${%Node Configurations}
- </h1>
- <f:form method="post" action="doCreateItem">
- <f:entry title="${%Name}" help="/help/system-config/master-slave/name.html">
- <f:textbox name="name" value="${request.getParameter('name')}" clazz="required" checkMessage="${%Name is mandatory}"/>
- </f:entry>
+ <j:if test="${app.isTeamManagementEnabled()}">
+ <j:getStatic var="permission" className="hudson.model.Computer" field="CREATE"/>
+ </j:if>
+ <j:if test="${!app.isTeamManagementEnabled()}">
+ <j:set var="permission" value="${app.ADMINISTER}" />
+ </j:if>
+ <l:layout norefresh="true" permission="${permission}">
+
+ <st:include page="sidepanel.jelly"/>
+ <l:main-panel>
+ <h1>
+ <img width="48" height="48" src="${imagesURL}/48x48/setting.png" alt="" style="margin-right:10px"/>
+ ${%Node Configurations}
+ </h1>
+ <f:form method="post" action="doCreateItem">
+ <f:entry title="${%Name}" help="/help/system-config/master-slave/name.html">
+ <f:textbox name="name" value="${request.getParameter('name')}" clazz="required" checkMessage="${%Name is mandatory}"/>
+ </f:entry>
- <!-- main body of the configuration -->
- <j:set var="it" value="${null}" />
- <st:include class="${requestScope.descriptor.clazz}" page="configure-entries.jelly" />
+ <!-- main body of the configuration -->
+ <j:set var="it" value="${null}" />
+ <st:include class="${requestScope.descriptor.clazz}" page="configure-entries.jelly" />
- <f:block>
- <input type="hidden" name="type" value="${request.getParameter('mode')}"/>
+ <f:block>
+ <input type="hidden" name="type" value="${request.getParameter('mode')}"/>
- <f:submit value="${%Save}"/>
- </f:block>
- </f:form>
- </l:main-panel>
- </l:layout>
+ <f:submit value="${%Save}"/>
+ </f:block>
+ </f:form>
+ </l:main-panel>
+ </l:layout>
</j:jelly>
diff --git a/hudson-core/src/main/resources/hudson/model/ComputerSet/new.jelly b/hudson-core/src/main/resources/hudson/model/ComputerSet/new.jelly
index dfe6b94b..018dc146 100644
--- a/hudson-core/src/main/resources/hudson/model/ComputerSet/new.jelly
+++ b/hudson-core/src/main/resources/hudson/model/ComputerSet/new.jelly
@@ -24,16 +24,23 @@
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form">
- <l:layout norefresh="true" permission="${app.ADMINISTER}">
- <st:include page="sidepanel.jelly" />
- <l:main-panel>
- <h1>
- <img width="48" height="48" src="${imagesURL}/48x48/computer.png" alt="" style="margin: 2px;"/>
- ${%New Node}
- </h1>
- <j:invokeStatic var="slaves" className="hudson.slaves.NodeDescriptor" method="allInstantiable" />
- <n:form nameTitle="${%Node name}" copyTitle="${%Copy Existing Node}" copyNames="${it._slaveNames}"
- descriptors="${slaves}" checkUrl="computer/checkName" xmlns:n="/lib/hudson/newFromList" />
- </l:main-panel>
- </l:layout>
+
+ <j:if test="${app.isTeamManagementEnabled()}">
+ <j:getStatic var="permission" className="hudson.model.Computer" field="CREATE"/>
+ </j:if>
+ <j:if test="${!app.isTeamManagementEnabled()}">
+ <j:set var="permission" value="${app.ADMINISTER}" />
+ </j:if>
+ <l:layout norefresh="true" permission="${permission}">
+ <st:include page="sidepanel.jelly" />
+ <l:main-panel>
+ <h1>
+ <img width="48" height="48" src="${imagesURL}/48x48/computer.png" alt="" style="margin: 2px;"/>
+ ${%New Node}
+ </h1>
+ <j:invokeStatic var="slaves" className="hudson.slaves.NodeDescriptor" method="allInstantiable" />
+ <n:form nameTitle="${%Node name}" copyTitle="${%Copy Existing Node}" copyNames="${it._slaveNames}"
+ descriptors="${slaves}" checkUrl="computer/checkName" xmlns:n="/lib/hudson/newFromList" />
+ </l:main-panel>
+ </l:layout>
</j:jelly>
diff --git a/hudson-core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly b/hudson-core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
index 24b1b127..431fade6 100644
--- a/hudson-core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
+++ b/hudson-core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
@@ -14,20 +14,25 @@
#
#************************************************************************** -->
-
<!--
Side panel
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form">
- <l:header />
- <l:side-panel>
- <l:tasks>
- <l:task icon="images/24x24/up.png" href="${rootURL}/" title="${%Back to Main Dashboard}" />
- <l:task icon="images/24x24/new-computer.png" href="new" title="${%New Node}" permission="${app.ADMINISTER}" />
- <l:task icon="images/24x24/setting.png" href="configure" title="${%Configure}" permission="${app.ADMINISTER}" />
- </l:tasks>
- <t:queue items="${app.queue.items}" />
- <t:executors />
- </l:side-panel>
+ <l:header />
+ <l:side-panel>
+ <l:tasks>
+ <l:task icon="images/24x24/up.png" href="${rootURL}/" title="${%Back to Main Dashboard}" />
+ <j:if test="${app.isTeamManagementEnabled()}">
+ <j:getStatic var="permission" className="hudson.model.Computer" field="CREATE"/>
+ <l:task icon="images/24x24/new-computer.png" href="new" title="${%New Node}" permission="${permission}" />
+ </j:if>
+ <j:if test="${!app.isTeamManagementEnabled()}">
+ <l:task icon="images/24x24/new-computer.png" href="new" title="${%New Node}" permission="${app.ADMINISTER}" />
+ </j:if>
+ <l:task icon="images/24x24/setting.png" href="configure" title="${%Configure}" permission="${app.ADMINISTER}" />
+ </l:tasks>
+ <t:queue items="${app.queue.items}" />
+ <t:executors />
+ </l:side-panel>
</j:jelly>
diff --git a/hudson-core/src/main/resources/hudson/model/View/sidepanel2.jelly b/hudson-core/src/main/resources/hudson/model/View/sidepanel2.jelly
index 1a74a323..6661b981 100644
--- a/hudson-core/src/main/resources/hudson/model/View/sidepanel2.jelly
+++ b/hudson-core/src/main/resources/hudson/model/View/sidepanel2.jelly
@@ -19,7 +19,11 @@
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form">
- <j:if test="${it.hasPermission(it.CREATE)}">
- <l:task icon="images/32x32/folder.png" href="${rootURL}/newView" title="${%New View}" permission="${it.CONFIGURE}"/>
- </j:if>
+ <j:if test="${it.hasPermission(it.CREATE)}">
+ <l:task icon="images/32x32/folder.png" href="${rootURL}/newView" title="${%New View}" permission="${it.CONFIGURE}"/>
+ </j:if>
+ <j:if test="${app.isTeamManagementEnabled()}">
+ <j:getStatic var="permission" className="hudson.model.Computer" field="CREATE"/>
+ <l:task icon="images/24x24/new-computer.png" href="${rootURL}/computer/new" title="${%New Node}" permission="${permission}" />
+ </j:if>
</j:jelly>

Back to the top