index.jelly 3.4 KB
Newer Older
K
kohsuke 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<!--
The MIT License

Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, Stephen Connolly, Tom Huybrechts

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

K
kohsuke 已提交
25 26 27 28 29
<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" xmlns:i="jelly:fmt">
  <l:layout title="${it.displayName}">
    <st:include page="sidepanel.jelly" />
    <l:main-panel>
      <!-- temporarily offline switch -->
K
kohsuke 已提交
30
      <l:isAdmin>
K
kohsuke 已提交
31
      <div style="float:right">
32
        <form method="post" action="toggleOffline">
K
kohsuke 已提交
33
          <j:if test="${it.temporarilyOffline}">
S
sogabe 已提交
34
            <f:submit value="${%submit.temporarilyOffline}"  />
K
kohsuke 已提交
35 36
          </j:if>
          <j:if test="${!it.temporarilyOffline}">
S
sogabe 已提交
37
            <f:submit value="${%submit.not.temporarilyOffline}"  />
38
            <br/><input name="offlineMessage" size="40"/>
K
kohsuke 已提交
39 40 41
          </j:if>
        </form>
      </div>
K
kohsuke 已提交
42
      </l:isAdmin>
K
kohsuke 已提交
43 44

      <h1>
45
        <img src="${imagesURL}/48x48/${it.icon}" width="48" height="48" alt=""/>
K
kohsuke 已提交
46 47 48 49
        ${it.caption}
        <j:if test="${!empty(it.node.nodeDescription)}">
          <span style="font-size:smaller">(${it.node.nodeDescription})</span>
        </j:if>
K
kohsuke 已提交
50
      </h1>
K
kohsuke 已提交
51

52 53 54 55
      <j:if test="${it.offlineCause!=null}">
        <st:include it="${it.offlineCause}" page="cause.jelly" />
      </j:if>

56 57 58 59
      <j:if test="${it.manualLaunchAllowed}">
        <st:include from="${it.launcher}" page="main.jelly" optional="true"/>
      </j:if>

60
      <j:if test="${it.offline and !it.manualLaunchAllowed and it.launchSupported}">
61 62 63
        <p>${%title.no_manual_launch(it.retentionStrategy.descriptor.displayName)}</p>
      </j:if>

K
kohsuke 已提交
64

65
        <j:if test="${it.node.assignedLabels.size() gt 1}">
66
        <div>
S
sogabe 已提交
67
          ${%Labels:}
68 69 70 71 72 73 74 75 76 77
          <j:forEach var="l" items="${it.node.assignedLabels}">
            <j:if test="${l!=it.node.selfLabel}">
              <a href="${rootURL}/label/${l.name}">${l.name}</a>
              <st:nbsp/>
            </j:if>
          </j:forEach>
        </div>
      </j:if>


S
sogabe 已提交
78
      <h2>${%title.projects_tied_on(it.displayName)}</h2>
K
kohsuke 已提交
79 80 81 82
      <j:set var="jobs" value="${it.tiedJobs}" />
      <j:choose>
        <j:when test="${empty(jobs)}">
          <p>
S
sogabe 已提交
83
            ${%None}
K
kohsuke 已提交
84 85 86
          </p>
        </j:when>
        <j:otherwise>
87
          <t:projectView jobs="${it.tiedJobs}" jobBaseUrl="${rootURL}/" />
K
kohsuke 已提交
88 89 90
        </j:otherwise>
      </j:choose>

91
      <st:include page="main.jelly" optional="true"/>
K
kohsuke 已提交
92 93
    </l:main-panel>
  </l:layout>
K
kohsuke 已提交
94
</j:jelly>