forked from Kitware/CDash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manageSubproject.xsl
243 lines (221 loc) · 8.59 KB
/
manageSubproject.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<xsl:include href="footer.xsl"/>
<xsl:include href="headscripts.xsl"/>
<xsl:include href="headeradminproject.xsl"/>
<!-- Local includes -->
<xsl:include href="local/footer.xsl"/>
<xsl:include href="local/headscripts.xsl"/>
<xsl:include href="local/headeradminproject.xsl"/>
<xsl:output method="xml" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="cdash/title"/></title>
<meta name="robots" content="noindex,nofollow" />
<link rel="StyleSheet" type="text/css">
<xsl:attribute name="href"><xsl:value-of select="cdash/cssfile"/></xsl:attribute>
</link>
<xsl:comment><![CDATA[[if IE]>
<link rel="stylesheet" href="tabs_ie.css" type="text/css" media="projection, screen" />
<![endif]]]></xsl:comment>
<script src="javascript/jquery-1.6.2.js" type="text/javascript"></script>
<script src="javascript/ui.tabs.js" type="text/javascript"></script>
<script src="javascript/cdashManageSubproject.js" type="text/javascript"></script>
</head>
<body bgcolor="#ffffff">
<xsl:choose>
<xsl:when test="/cdash/uselocaldirectory=1">
<xsl:call-template name="headeradminproject_local"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="headeradminproject"/>
</xsl:otherwise>
</xsl:choose>
<br/>
<xsl:if test="string-length(cdash/warning)>0">
<b>Warning: <xsl:value-of select="cdash/warning"/></b><br/><br/>
</xsl:if>
<table border="0">
<tr>
<td width="10%"><div align="right"><strong>Project:</strong></div></td>
<td width="40%" >
<form name="form1" method="post">
<xsl:attribute name="action">manageSubproject.php?projectid=<xsl:value-of select="cdash/project/id"/></xsl:attribute>
<select onchange="location = 'manageSubproject.php?projectid='+this.options[this.selectedIndex].value;" name="projectSelection">
<option>
<xsl:attribute name="value">-1</xsl:attribute>
Choose...
</option>
<xsl:for-each select="cdash/availableproject">
<option>
<xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
<xsl:if test="selected=1">
<xsl:attribute name="selected"></xsl:attribute>
</xsl:if>
<xsl:value-of select="name"/>
</option>
</xsl:for-each>
</select>
</form>
</td>
<td width="10%"><div align="right"><strong>Display:</strong></div></td>
<td width="10%" >
<select id="displayChooser">
<option>All</option>
<option>Non-Core</option>
<option>Core</option>
<option>Third Party</option>
</select>
</td>
</tr>
</table>
<!-- If a project has been selected -->
<xsl:if test="cdash/project/id > -1">
<div id="wizard">
<ul>
<li>
<a href="#fragment-1"><span>Current Subprojects</span></a></li>
<li>
<a href="#fragment-2"><span>Add a subproject</span></a></li>
</ul>
<div id="fragment-1" class="tab_content" >
<div class="tab_help"></div>
<table width="800" border="0">
<tr>
<td><div align="right"></div></td>
<td ><strong>Current Subprojects</strong></td>
</tr>
<xsl:for-each select="cdash/project/subproject">
<xsl:sort select="name"/>
<tr>
<!-- set class to subproject group. Used to filter display. -->
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="core=0">noncore</xsl:when>
<xsl:when test="core=1">core</xsl:when>
<xsl:when test="core=2">thirdparty</xsl:when>
</xsl:choose>
</xsl:attribute>
<td width="10%"></td>
<td width="90%">
<table width="100%" border="0">
<tr>
<td width="15%"><xsl:value-of select="name"/></td>
<td align="left" width="5%"><a><xsl:attribute name="href">manageSubproject.php?projectid=<xsl:value-of select="/cdash/project/id"/>&delete=<xsl:value-of select="id"/>
</xsl:attribute>
[x]</a></td>
<td align="right" width="30%">
<div>
<select class="subproject_core">
<option value="0">
<xsl:if test="core=0">
<xsl:attribute name="selected"></xsl:attribute>
</xsl:if>
Non-Core</option>
<option value="1">
<xsl:if test="core=1">
<xsl:attribute name="selected"></xsl:attribute>
</xsl:if>
Core</option>
<option value="2">
<xsl:if test="core=2">
<xsl:attribute name="selected"></xsl:attribute>
</xsl:if>
Third Party</option>
</select>
<button class="changeSubprojectGroup" disabled="disabled">
<xsl:attribute name="data-projectid">
<xsl:value-of select="/cdash/project/id"/>
</xsl:attribute>
<xsl:attribute name="data-subprojectid">
<xsl:value-of select="id"/>
</xsl:attribute>
Modify
</button>
</div>
</td>
<td align="right" width="60%">
<form method="post">
<xsl:attribute name="action">manageSubproject.php?projectid=<xsl:value-of select="/cdash/project/id"/></xsl:attribute>
<xsl:attribute name="name">form_add_dependency_<xsl:value-of select="id"/></xsl:attribute>
Add dependency:
<input type="hidden" name="dependencyid">
<xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
</input>
<select class="dependency_selector">
<xsl:attribute name="name">dependency_selection_<xsl:value-of select="id"/></xsl:attribute>
<option>
<xsl:attribute name="value">-1</xsl:attribute>
Choose...
</option>
<xsl:for-each select="availabledependency">
<option>
<xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
<xsl:if test="selected=1">
<xsl:attribute name="selected"></xsl:attribute>
</xsl:if>
<xsl:value-of select="name"/>
</option>
</xsl:for-each>
</select>
<input type="submit" name="addDependency" value="Add" disabled="disabled" />
</form>
</td>
</tr>
<tr> <!-- List the dependencies for that subproject -->
<td width="100%" colspan="3">
<xsl:for-each select="dependency">
- <xsl:value-of select="name"/> <a><xsl:attribute name="href">manageSubproject.php?projectid=<xsl:value-of select="/cdash/project/id"/>&removeDependency=<xsl:value-of select="id"/>&dependency=<xsl:value-of select="../id"/>
</xsl:attribute>[x]</a>
<br/>
</xsl:for-each>
</td>
</tr>
<tr><td width="100%" colspan="3"><hr/></td></tr>
</table>
</td>
</tr>
</xsl:for-each>
</table>
</div>
<div id="fragment-2" class="tab_content" >
<div class="tab_help"></div>
<form name="formnewgroup" method="post">
<xsl:attribute name="action">manageSubproject.php?projectid=<xsl:value-of select="cdash/project/id"/></xsl:attribute>
<table width="100%" border="0">
<tr>
<td><div align="right"></div></td>
<td ><strong>Add a subproject</strong></td>
</tr>
<tr>
<td width="10%"></td>
<td width="90%">
<input name="newsubproject" type="text"></input>
</td>
</tr>
<tr>
<td><div align="right"></div></td>
<td><input type="submit" name="addSubproject" value="Add subproject >>"/><br/><br/></td>
</tr>
</table>
</form>
</div>
</div>
</xsl:if>
<br/>
<!-- FOOTER -->
<br/>
<xsl:choose>
<xsl:when test="/cdash/uselocaldirectory=1">
<xsl:call-template name="footer_local"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="footer"/>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template>
</xsl:stylesheet>