1 |
2656
|
sgarg
|
<?xml version="1.0"?>
|
2 |
|
|
<!--
|
3 |
|
|
* '$RCSfile$'
|
4 |
|
|
* Authors: Matt Jones, CHad Berkley
|
5 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
6 |
|
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
8 |
|
|
*
|
9 |
|
|
* '$Author$'
|
10 |
|
|
* '$Date$'
|
11 |
|
|
* '$Revision$'
|
12 |
|
|
*
|
13 |
|
|
* This program is free software; you can redistribute it and/or modify
|
14 |
|
|
* it under the terms of the GNU General Public License as published by
|
15 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
16 |
|
|
* (at your option) any later version.
|
17 |
|
|
*
|
18 |
|
|
* This program is distributed in the hope that it will be useful,
|
19 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
|
|
* GNU General Public License for more details.
|
22 |
|
|
*
|
23 |
|
|
* You should have received a copy of the GNU General Public License
|
24 |
|
|
* along with this program; if not, write to the Free Software
|
25 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
26 |
|
|
*
|
27 |
|
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
28 |
|
|
* convert an XML file showing the resultset of a query
|
29 |
|
|
* into an HTML format suitable for rendering with modern web browsers.
|
30 |
|
|
-->
|
31 |
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
32 |
|
|
|
33 |
|
|
<xsl:output method="html"/>
|
34 |
4613
|
walbridge
|
<xsl:param name="cgi-prefix"/>
|
35 |
2656
|
sgarg
|
<xsl:param name="sessid"/>
|
36 |
4006
|
leinfelder
|
<xsl:param name="contextURL"/>
|
37 |
2656
|
sgarg
|
<xsl:param name="qformat">default</xsl:param>
|
38 |
|
|
<xsl:param name="enableediting">false</xsl:param>
|
39 |
2788
|
sgarg
|
<xsl:param name="isModerator">false</xsl:param>
|
40 |
2802
|
sgarg
|
<xsl:param name="message"></xsl:param>
|
41 |
2656
|
sgarg
|
<xsl:template match="/">
|
42 |
|
|
<html>
|
43 |
|
|
<head>
|
44 |
|
|
<link rel="stylesheet" type="text/css"
|
45 |
3780
|
daigle
|
href="{$contextURL}/style/skins/{$qformat}/{$qformat}.css" />
|
46 |
2656
|
sgarg
|
<script language="Javascript" type="text/JavaScript"
|
47 |
3780
|
daigle
|
src="{$contextURL}/style/skins/{$qformat}/{$qformat}.js" />
|
48 |
2656
|
sgarg
|
<script language="Javascript" type="text/JavaScript"
|
49 |
3780
|
daigle
|
src="{$contextURL}/style/common/branding.js" />
|
50 |
2656
|
sgarg
|
<script language="JavaScript">
|
51 |
|
|
<![CDATA[
|
52 |
5985
|
leinfelder
|
function submitform(action,form_id) {
|
53 |
|
|
var form_ref = document.getElementById(form_id);
|
54 |
2656
|
sgarg
|
form_ref.action.value=action;
|
55 |
|
|
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA[";
|
56 |
|
|
form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA[";
|
57 |
|
|
form_ref.submit();
|
58 |
|
|
}
|
59 |
5985
|
leinfelder
|
function submitCGIform(form_id) {
|
60 |
|
|
var form_ref = document.getElementById(form_id);
|
61 |
2852
|
sgarg
|
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA[";
|
62 |
|
|
form_ref.cfg.value="]]><xsl:value-of select="$qformat" /><![CDATA[";
|
63 |
|
|
form_ref.submit();
|
64 |
|
|
}
|
65 |
2656
|
sgarg
|
]]>
|
66 |
|
|
</script>
|
67 |
|
|
</head>
|
68 |
|
|
|
69 |
|
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
70 |
4006
|
leinfelder
|
<script language="JavaScript">
|
71 |
2686
|
sgarg
|
<![CDATA[
|
72 |
4006
|
leinfelder
|
insertTemplateOpening("]]><xsl:value-of select="$contextURL" /><![CDATA[");
|
73 |
|
|
insertSearchBox("]]><xsl:value-of select="$contextURL" /><![CDATA[");
|
74 |
|
|
]]>
|
75 |
|
|
</script>
|
76 |
2802
|
sgarg
|
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="0">
|
77 |
2656
|
sgarg
|
<tr>
|
78 |
2831
|
sgarg
|
<td align="left"><br></br><p class="emphasis"><xsl:value-of select="$message"/><br></br><xsl:number value="count(resultset/document)" /> data set(s) found <xsl:if test="$enableediting ='true' and $isModerator = 'true'">for moderation</xsl:if></p></td>
|
79 |
2656
|
sgarg
|
</tr></table>
|
80 |
|
|
<!-- This tests to see if there are returned documents,
|
81 |
|
|
if there are not then don't show the query results -->
|
82 |
|
|
|
83 |
|
|
<xsl:if test="count(resultset/document) > 0">
|
84 |
|
|
|
85 |
2802
|
sgarg
|
<table width="99%" align="center" border="0" cellpadding="0" cellspacing="0">
|
86 |
2656
|
sgarg
|
<tr>
|
87 |
3780
|
daigle
|
<th class="tablehead_lcorner" align="right" valign="top"><img src="{$contextURL}/style/skins/default/images/transparent1x1.gif" width="1" height="1" /></th>
|
88 |
2656
|
sgarg
|
<th class="tablehead" style="text-align: left">Title</th>
|
89 |
|
|
<th width="15%" class="tablehead" style="text-align: left">Contacts</th>
|
90 |
|
|
<th width="15%" class="tablehead" style="text-align: left">Organization</th>
|
91 |
|
|
<th width="15%" class="tablehead" style="text-align: left">Keywords</th>
|
92 |
|
|
<xsl:if test="$enableediting = 'true'">
|
93 |
|
|
<th width="10%" class="tablehead" style="text-align: middle">Actions</th>
|
94 |
|
|
</xsl:if>
|
95 |
3780
|
daigle
|
<th class="tablehead_rcorner" align="right" valign="top"><img src="{$contextURL}/style/skins/default/images/transparent1x1.gif" width="1" height="1" /></th>
|
96 |
2656
|
sgarg
|
</tr>
|
97 |
|
|
|
98 |
|
|
<xsl:for-each select="resultset/document">
|
99 |
|
|
<xsl:sort select="./param[@name='dataset/title']"/>
|
100 |
|
|
<tr valign="top" class="subpanel">
|
101 |
|
|
<xsl:attribute name="class">
|
102 |
|
|
<xsl:choose>
|
103 |
|
|
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
|
104 |
|
|
<xsl:when test="position() mod 2 = 0">roweven</xsl:when>
|
105 |
|
|
</xsl:choose>
|
106 |
|
|
</xsl:attribute>
|
107 |
|
|
|
108 |
|
|
<td width="10"> </td>
|
109 |
|
|
<td class="text_plain">
|
110 |
2852
|
sgarg
|
|
111 |
|
|
<xsl:choose>
|
112 |
|
|
<xsl:when test="$enableediting = 'true'">
|
113 |
4613
|
walbridge
|
<form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
|
114 |
2656
|
sgarg
|
<xsl:attribute name="name">
|
115 |
|
|
<xsl:value-of select="translate(./docid, '()-.', '____')" />
|
116 |
|
|
</xsl:attribute>
|
117 |
5985
|
leinfelder
|
<xsl:attribute name="id">
|
118 |
|
|
<xsl:value-of select="translate(./docid, '()-.', '____')" />
|
119 |
|
|
</xsl:attribute>
|
120 |
|
|
|
121 |
2852
|
sgarg
|
<input type="hidden" name="cfg" />
|
122 |
|
|
<input type="hidden" name="sessionid" />
|
123 |
|
|
<input type="hidden" name="enableediting" value="{$enableediting}"/>
|
124 |
|
|
<input type="hidden" name="stage" value="read"/>
|
125 |
|
|
<input type="hidden" name="docid">
|
126 |
|
|
<xsl:attribute name="value">
|
127 |
|
|
<xsl:value-of select="./docid"/>
|
128 |
|
|
</xsl:attribute>
|
129 |
|
|
</input>
|
130 |
|
|
<a>
|
131 |
5985
|
leinfelder
|
<xsl:attribute name="href">javascript:submitCGIform("<xsl:value-of select="translate(./docid, '()-.', '____')"/>")</xsl:attribute>
|
132 |
2852
|
sgarg
|
<xsl:text>» </xsl:text>
|
133 |
|
|
<xsl:choose>
|
134 |
|
|
<xsl:when test="./param[@name='dataset/title']!=''">
|
135 |
|
|
<xsl:value-of select="./param[@name='dataset/title']"/>
|
136 |
|
|
</xsl:when>
|
137 |
|
|
<xsl:otherwise>
|
138 |
|
|
<xsl:value-of select="./param[@name='citation/title']"/>
|
139 |
|
|
<xsl:value-of select="./param[@name='software/title']"/>
|
140 |
|
|
<xsl:value-of select="./param[@name='protocol/title']"/>
|
141 |
|
|
</xsl:otherwise>
|
142 |
|
|
</xsl:choose>
|
143 |
|
|
</a><br />
|
144 |
|
|
<br/>
|
145 |
|
|
<p><pre>ID: <xsl:value-of select="./docid"/></pre></p>
|
146 |
|
|
</form>
|
147 |
|
|
</xsl:when>
|
148 |
|
|
<xsl:otherwise>
|
149 |
4006
|
leinfelder
|
<form action="{$contextURL}/metacat" method="POST">
|
150 |
2852
|
sgarg
|
<xsl:attribute name="name">
|
151 |
|
|
<xsl:value-of select="translate(./docid, '()-.', '____')" />
|
152 |
|
|
</xsl:attribute>
|
153 |
5985
|
leinfelder
|
<xsl:attribute name="id">
|
154 |
|
|
<xsl:value-of select="translate(./docid, '()-.', '____')" />
|
155 |
|
|
</xsl:attribute>
|
156 |
2852
|
sgarg
|
|
157 |
2656
|
sgarg
|
<input type="hidden" name="qformat" />
|
158 |
|
|
<input type="hidden" name="sessionid" />
|
159 |
|
|
<xsl:if test="$enableediting = 'true'">
|
160 |
2852
|
sgarg
|
<input type="hidden" name="enableediting" value="{$enableediting}"/>
|
161 |
2656
|
sgarg
|
</xsl:if>
|
162 |
|
|
<input type="hidden" name="action" value="read"/>
|
163 |
|
|
<input type="hidden" name="docid">
|
164 |
|
|
<xsl:attribute name="value">
|
165 |
|
|
<xsl:value-of select="./docid"/>
|
166 |
|
|
</xsl:attribute>
|
167 |
|
|
</input>
|
168 |
|
|
<xsl:for-each select="./relation">
|
169 |
|
|
<input type="hidden" name="docid">
|
170 |
|
|
<xsl:attribute name="value" >
|
171 |
|
|
<xsl:value-of select="./relationdoc" />
|
172 |
|
|
</xsl:attribute>
|
173 |
|
|
</input>
|
174 |
|
|
</xsl:for-each>
|
175 |
|
|
<a>
|
176 |
5985
|
leinfelder
|
<xsl:attribute name="href">javascript:submitform("read", "<xsl:value-of select="translate(./docid, '()-.', '____')"/>")</xsl:attribute>
|
177 |
2656
|
sgarg
|
<xsl:text>» </xsl:text>
|
178 |
|
|
<xsl:choose>
|
179 |
|
|
<xsl:when test="./param[@name='dataset/title']!=''">
|
180 |
|
|
<xsl:value-of select="./param[@name='dataset/title']"/>
|
181 |
|
|
</xsl:when>
|
182 |
|
|
<xsl:otherwise>
|
183 |
|
|
<xsl:value-of select="./param[@name='citation/title']"/>
|
184 |
|
|
<xsl:value-of select="./param[@name='software/title']"/>
|
185 |
|
|
<xsl:value-of select="./param[@name='protocol/title']"/>
|
186 |
|
|
</xsl:otherwise>
|
187 |
|
|
</xsl:choose>
|
188 |
|
|
</a><br />
|
189 |
|
|
<br/>
|
190 |
|
|
<p><pre>ID: <xsl:value-of select="./docid"/></pre></p>
|
191 |
|
|
</form>
|
192 |
2852
|
sgarg
|
</xsl:otherwise>
|
193 |
|
|
</xsl:choose>
|
194 |
2656
|
sgarg
|
</td>
|
195 |
|
|
|
196 |
|
|
<td class="text_plain">
|
197 |
|
|
<xsl:for-each select="./param[@name='originator/individualName/surName']" >
|
198 |
|
|
<xsl:value-of select="." />
|
199 |
|
|
<br/>
|
200 |
|
|
</xsl:for-each>
|
201 |
|
|
<xsl:for-each select="./param[@name='creator/individualName/surName']" >
|
202 |
|
|
<xsl:value-of select="." />
|
203 |
|
|
<br/>
|
204 |
|
|
</xsl:for-each>
|
205 |
|
|
|
206 |
|
|
</td>
|
207 |
|
|
<td class="text_plain">
|
208 |
|
|
<xsl:value-of select="./param[@name='originator/organizationName']" />
|
209 |
|
|
<xsl:value-of select="./param[@name='creator/organizationName']" />
|
210 |
|
|
|
211 |
|
|
</td>
|
212 |
|
|
|
213 |
|
|
<td class="text_plain">
|
214 |
|
|
<xsl:for-each
|
215 |
|
|
select="./param[@name='keyword']">
|
216 |
|
|
<xsl:value-of select="." />
|
217 |
|
|
<br/>
|
218 |
|
|
</xsl:for-each>
|
219 |
|
|
|
220 |
|
|
</td>
|
221 |
|
|
|
222 |
|
|
<xsl:if test="$enableediting = 'true'">
|
223 |
2788
|
sgarg
|
<xsl:choose>
|
224 |
|
|
<xsl:when test="$isModerator = 'true'">
|
225 |
|
|
<td class="text_plain">
|
226 |
4613
|
walbridge
|
<form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
|
227 |
2788
|
sgarg
|
<input type="hidden" name="stage" value="mod_accept"/>
|
228 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
229 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
230 |
|
|
<input type="hidden" name="docid">
|
231 |
|
|
<xsl:attribute name="value">
|
232 |
|
|
<xsl:value-of select="./docid"/>
|
233 |
|
|
</xsl:attribute>
|
234 |
|
|
</input>
|
235 |
|
|
<center>
|
236 |
|
|
<input type="SUBMIT" value=" Accept " name="Accept">
|
237 |
|
|
</input>
|
238 |
|
|
</center>
|
239 |
|
|
</form>
|
240 |
4613
|
walbridge
|
<form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
|
241 |
2788
|
sgarg
|
<input type="hidden" name="stage" value="mod_decline"/>
|
242 |
2756
|
sgarg
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
243 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
244 |
2788
|
sgarg
|
<input type="hidden" name="docid">
|
245 |
|
|
<xsl:attribute name="value">
|
246 |
|
|
<xsl:value-of select="./docid"/>
|
247 |
|
|
</xsl:attribute>
|
248 |
|
|
</input>
|
249 |
|
|
<center>
|
250 |
|
|
<input type="SUBMIT" value="Decline" name="Decline">
|
251 |
|
|
</input>
|
252 |
|
|
</center>
|
253 |
|
|
</form>
|
254 |
4613
|
walbridge
|
<form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
|
255 |
2788
|
sgarg
|
<input type="hidden" name="stage" value="mod_revise"/>
|
256 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
257 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
258 |
|
|
<input type="hidden" name="docid">
|
259 |
|
|
<xsl:attribute name="value">
|
260 |
|
|
<xsl:value-of select="./docid"/>
|
261 |
|
|
</xsl:attribute>
|
262 |
|
|
</input>
|
263 |
|
|
<center>
|
264 |
|
|
<input type="SUBMIT" value=" Revise " name="Revise">
|
265 |
|
|
</input>
|
266 |
|
|
</center>
|
267 |
|
|
</form>
|
268 |
|
|
</td>
|
269 |
|
|
</xsl:when>
|
270 |
|
|
<xsl:otherwise>
|
271 |
|
|
<td class="text_plain">
|
272 |
4613
|
walbridge
|
<form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
|
273 |
2852
|
sgarg
|
<input type="hidden" name="stage" value="read"/>
|
274 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
275 |
2788
|
sgarg
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
276 |
2852
|
sgarg
|
<input type="hidden" name="docid">
|
277 |
|
|
<xsl:attribute name="value">
|
278 |
|
|
<xsl:value-of select="./docid"/>
|
279 |
|
|
</xsl:attribute>
|
280 |
|
|
</input>
|
281 |
|
|
<center>
|
282 |
|
|
<input type="SUBMIT" value=" View " name="View"></input>
|
283 |
|
|
</center>
|
284 |
|
|
</form>
|
285 |
4613
|
walbridge
|
<form action="{$cgi-prefix}/register-dataset.cgi"
|
286 |
2852
|
sgarg
|
method="POST">
|
287 |
2788
|
sgarg
|
<input type="hidden" name="stage" value="modify"/>
|
288 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
289 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
290 |
2656
|
sgarg
|
<input type="hidden" name="docid">
|
291 |
|
|
<xsl:attribute name="value">
|
292 |
|
|
<xsl:value-of select="./docid"/>
|
293 |
|
|
</xsl:attribute>
|
294 |
|
|
</input>
|
295 |
|
|
<center>
|
296 |
2788
|
sgarg
|
<input type="SUBMIT" value=" Edit " name="Edit">
|
297 |
|
|
</input>
|
298 |
|
|
</center>
|
299 |
|
|
</form>
|
300 |
|
|
</td>
|
301 |
|
|
</xsl:otherwise>
|
302 |
|
|
</xsl:choose>
|
303 |
2656
|
sgarg
|
</xsl:if>
|
304 |
|
|
<td width="10"> </td>
|
305 |
|
|
</tr>
|
306 |
|
|
<tr class="searchresultsdivider"><td colspan="6">
|
307 |
3780
|
daigle
|
<img src="{$contextURL}/style/skins/default/images/transparent1x1.gif" width="1" height="1" /></td></tr>
|
308 |
2656
|
sgarg
|
|
309 |
|
|
</xsl:for-each>
|
310 |
|
|
</table>
|
311 |
|
|
|
312 |
|
|
</xsl:if>
|
313 |
|
|
<script language="JavaScript">
|
314 |
4755
|
walbridge
|
<![CDATA[
|
315 |
|
|
insertTemplateClosing("]]><xsl:value-of select="$contextURL" /><![CDATA[");
|
316 |
|
|
]]>
|
317 |
2656
|
sgarg
|
</script>
|
318 |
|
|
</body>
|
319 |
|
|
</html>
|
320 |
|
|
</xsl:template>
|
321 |
|
|
|
322 |
|
|
</xsl:stylesheet>
|