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 |
|
|
<xsl:param name="sessid"/>
|
35 |
|
|
<xsl:param name="qformat">default</xsl:param>
|
36 |
|
|
<xsl:param name="enableediting">false</xsl:param>
|
37 |
2788
|
sgarg
|
<xsl:param name="isModerator">false</xsl:param>
|
38 |
2802
|
sgarg
|
<xsl:param name="message"></xsl:param>
|
39 |
2656
|
sgarg
|
<xsl:template match="/">
|
40 |
|
|
<html>
|
41 |
|
|
<head>
|
42 |
|
|
<link rel="stylesheet" type="text/css"
|
43 |
|
|
href="@style-skins-path@/{$qformat}/{$qformat}.css" />
|
44 |
|
|
<script language="Javascript" type="text/JavaScript"
|
45 |
|
|
src="@style-skins-path@/{$qformat}/{$qformat}.js" />
|
46 |
|
|
<script language="Javascript" type="text/JavaScript"
|
47 |
|
|
src="@style-common-path@/branding.js" />
|
48 |
|
|
<script language="JavaScript">
|
49 |
|
|
<![CDATA[
|
50 |
|
|
function submitform(action,form_ref) {
|
51 |
|
|
form_ref.action.value=action;
|
52 |
|
|
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA[";
|
53 |
|
|
form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA[";
|
54 |
|
|
form_ref.submit();
|
55 |
|
|
}
|
56 |
2852
|
sgarg
|
function submitCGIform(form_ref) {
|
57 |
|
|
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA[";
|
58 |
|
|
form_ref.cfg.value="]]><xsl:value-of select="$qformat" /><![CDATA[";
|
59 |
|
|
form_ref.submit();
|
60 |
|
|
}
|
61 |
2656
|
sgarg
|
]]>
|
62 |
|
|
</script>
|
63 |
|
|
</head>
|
64 |
|
|
|
65 |
|
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
66 |
|
|
<script language="JavaScript">
|
67 |
2686
|
sgarg
|
<![CDATA[
|
68 |
2656
|
sgarg
|
insertTemplateOpening();
|
69 |
|
|
insertSearchBox();
|
70 |
2686
|
sgarg
|
]]>
|
71 |
2656
|
sgarg
|
</script>
|
72 |
2802
|
sgarg
|
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="0">
|
73 |
2656
|
sgarg
|
<tr>
|
74 |
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>
|
75 |
2656
|
sgarg
|
</tr></table>
|
76 |
|
|
<!-- This tests to see if there are returned documents,
|
77 |
|
|
if there are not then don't show the query results -->
|
78 |
|
|
|
79 |
|
|
<xsl:if test="count(resultset/document) > 0">
|
80 |
|
|
|
81 |
2802
|
sgarg
|
<table width="99%" align="center" border="0" cellpadding="0" cellspacing="0">
|
82 |
2656
|
sgarg
|
<tr>
|
83 |
|
|
<th class="tablehead_lcorner" align="right" valign="top"><img src="@style-skins-path@/default/images/transparent1x1.gif" width="1" height="1" /></th>
|
84 |
|
|
<th class="tablehead" style="text-align: left">Title</th>
|
85 |
|
|
<th width="15%" class="tablehead" style="text-align: left">Contacts</th>
|
86 |
|
|
<th width="15%" class="tablehead" style="text-align: left">Organization</th>
|
87 |
|
|
<th width="15%" class="tablehead" style="text-align: left">Keywords</th>
|
88 |
|
|
<xsl:if test="$enableediting = 'true'">
|
89 |
|
|
<th width="10%" class="tablehead" style="text-align: middle">Actions</th>
|
90 |
|
|
</xsl:if>
|
91 |
|
|
<th class="tablehead_rcorner" align="right" valign="top"><img src="@style-skins-path@/default/images/transparent1x1.gif" width="1" height="1" /></th>
|
92 |
|
|
</tr>
|
93 |
|
|
|
94 |
|
|
<xsl:for-each select="resultset/document">
|
95 |
|
|
<xsl:sort select="./param[@name='dataset/title']"/>
|
96 |
|
|
<tr valign="top" class="subpanel">
|
97 |
|
|
<xsl:attribute name="class">
|
98 |
|
|
<xsl:choose>
|
99 |
|
|
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
|
100 |
|
|
<xsl:when test="position() mod 2 = 0">roweven</xsl:when>
|
101 |
|
|
</xsl:choose>
|
102 |
|
|
</xsl:attribute>
|
103 |
|
|
|
104 |
|
|
<td width="10"> </td>
|
105 |
|
|
<td class="text_plain">
|
106 |
2852
|
sgarg
|
|
107 |
|
|
<xsl:choose>
|
108 |
|
|
<xsl:when test="$enableediting = 'true'">
|
109 |
|
|
<form action="@cgi-prefix@/register-dataset.cgi" method="POST">
|
110 |
2656
|
sgarg
|
<xsl:attribute name="name">
|
111 |
|
|
<xsl:value-of select="translate(./docid, '()-.', '____')" />
|
112 |
|
|
</xsl:attribute>
|
113 |
|
|
|
114 |
2852
|
sgarg
|
<input type="hidden" name="cfg" />
|
115 |
|
|
<input type="hidden" name="sessionid" />
|
116 |
|
|
<input type="hidden" name="enableediting" value="{$enableediting}"/>
|
117 |
|
|
<input type="hidden" name="stage" value="read"/>
|
118 |
|
|
<input type="hidden" name="docid">
|
119 |
|
|
<xsl:attribute name="value">
|
120 |
|
|
<xsl:value-of select="./docid"/>
|
121 |
|
|
</xsl:attribute>
|
122 |
|
|
</input>
|
123 |
|
|
<a>
|
124 |
|
|
<xsl:attribute name="href">javascript:submitCGIform(document.<xsl:value-of select="translate(./docid, '()-.', '____')"/>)</xsl:attribute>
|
125 |
|
|
<xsl:text>» </xsl:text>
|
126 |
|
|
<xsl:choose>
|
127 |
|
|
<xsl:when test="./param[@name='dataset/title']!=''">
|
128 |
|
|
<xsl:value-of select="./param[@name='dataset/title']"/>
|
129 |
|
|
</xsl:when>
|
130 |
|
|
<xsl:otherwise>
|
131 |
|
|
<xsl:value-of select="./param[@name='citation/title']"/>
|
132 |
|
|
<xsl:value-of select="./param[@name='software/title']"/>
|
133 |
|
|
<xsl:value-of select="./param[@name='protocol/title']"/>
|
134 |
|
|
</xsl:otherwise>
|
135 |
|
|
</xsl:choose>
|
136 |
|
|
</a><br />
|
137 |
|
|
<br/>
|
138 |
|
|
<p><pre>ID: <xsl:value-of select="./docid"/></pre></p>
|
139 |
|
|
</form>
|
140 |
|
|
</xsl:when>
|
141 |
|
|
<xsl:otherwise>
|
142 |
|
|
<form action="@servlet-path@" method="POST">
|
143 |
|
|
<xsl:attribute name="name">
|
144 |
|
|
<xsl:value-of select="translate(./docid, '()-.', '____')" />
|
145 |
|
|
</xsl:attribute>
|
146 |
|
|
|
147 |
2656
|
sgarg
|
<input type="hidden" name="qformat" />
|
148 |
|
|
<input type="hidden" name="sessionid" />
|
149 |
|
|
<xsl:if test="$enableediting = 'true'">
|
150 |
2852
|
sgarg
|
<input type="hidden" name="enableediting" value="{$enableediting}"/>
|
151 |
2656
|
sgarg
|
</xsl:if>
|
152 |
|
|
<input type="hidden" name="action" value="read"/>
|
153 |
|
|
<input type="hidden" name="docid">
|
154 |
|
|
<xsl:attribute name="value">
|
155 |
|
|
<xsl:value-of select="./docid"/>
|
156 |
|
|
</xsl:attribute>
|
157 |
|
|
</input>
|
158 |
|
|
<xsl:for-each select="./relation">
|
159 |
|
|
<input type="hidden" name="docid">
|
160 |
|
|
<xsl:attribute name="value" >
|
161 |
|
|
<xsl:value-of select="./relationdoc" />
|
162 |
|
|
</xsl:attribute>
|
163 |
|
|
</input>
|
164 |
|
|
</xsl:for-each>
|
165 |
|
|
<a>
|
166 |
|
|
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '()-.', '____')"/>)</xsl:attribute>
|
167 |
|
|
<xsl:text>» </xsl:text>
|
168 |
|
|
<xsl:choose>
|
169 |
|
|
<xsl:when test="./param[@name='dataset/title']!=''">
|
170 |
|
|
<xsl:value-of select="./param[@name='dataset/title']"/>
|
171 |
|
|
</xsl:when>
|
172 |
|
|
<xsl:otherwise>
|
173 |
|
|
<xsl:value-of select="./param[@name='citation/title']"/>
|
174 |
|
|
<xsl:value-of select="./param[@name='software/title']"/>
|
175 |
|
|
<xsl:value-of select="./param[@name='protocol/title']"/>
|
176 |
|
|
</xsl:otherwise>
|
177 |
|
|
</xsl:choose>
|
178 |
|
|
</a><br />
|
179 |
|
|
<br/>
|
180 |
|
|
<p><pre>ID: <xsl:value-of select="./docid"/></pre></p>
|
181 |
|
|
</form>
|
182 |
2852
|
sgarg
|
</xsl:otherwise>
|
183 |
|
|
</xsl:choose>
|
184 |
2656
|
sgarg
|
</td>
|
185 |
|
|
|
186 |
|
|
<td class="text_plain">
|
187 |
|
|
<xsl:for-each select="./param[@name='originator/individualName/surName']" >
|
188 |
|
|
<xsl:value-of select="." />
|
189 |
|
|
<br/>
|
190 |
|
|
</xsl:for-each>
|
191 |
|
|
<xsl:for-each select="./param[@name='creator/individualName/surName']" >
|
192 |
|
|
<xsl:value-of select="." />
|
193 |
|
|
<br/>
|
194 |
|
|
</xsl:for-each>
|
195 |
|
|
|
196 |
|
|
</td>
|
197 |
|
|
<td class="text_plain">
|
198 |
|
|
<xsl:value-of select="./param[@name='originator/organizationName']" />
|
199 |
|
|
<xsl:value-of select="./param[@name='creator/organizationName']" />
|
200 |
|
|
|
201 |
|
|
</td>
|
202 |
|
|
|
203 |
|
|
<td class="text_plain">
|
204 |
|
|
<xsl:for-each
|
205 |
|
|
select="./param[@name='keyword']">
|
206 |
|
|
<xsl:value-of select="." />
|
207 |
|
|
<br/>
|
208 |
|
|
</xsl:for-each>
|
209 |
|
|
|
210 |
|
|
</td>
|
211 |
|
|
|
212 |
|
|
<xsl:if test="$enableediting = 'true'">
|
213 |
2788
|
sgarg
|
<xsl:choose>
|
214 |
|
|
<xsl:when test="$isModerator = 'true'">
|
215 |
|
|
<td class="text_plain">
|
216 |
|
|
<form action="@cgi-prefix@/register-dataset.cgi" method="POST">
|
217 |
|
|
<input type="hidden" name="stage" value="mod_accept"/>
|
218 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
219 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
220 |
|
|
<input type="hidden" name="docid">
|
221 |
|
|
<xsl:attribute name="value">
|
222 |
|
|
<xsl:value-of select="./docid"/>
|
223 |
|
|
</xsl:attribute>
|
224 |
|
|
</input>
|
225 |
|
|
<center>
|
226 |
|
|
<input type="SUBMIT" value=" Accept " name="Accept">
|
227 |
|
|
</input>
|
228 |
|
|
</center>
|
229 |
|
|
</form>
|
230 |
|
|
<form action="@cgi-prefix@/register-dataset.cgi" method="POST">
|
231 |
|
|
<input type="hidden" name="stage" value="mod_decline"/>
|
232 |
2756
|
sgarg
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
233 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
234 |
2788
|
sgarg
|
<input type="hidden" name="docid">
|
235 |
|
|
<xsl:attribute name="value">
|
236 |
|
|
<xsl:value-of select="./docid"/>
|
237 |
|
|
</xsl:attribute>
|
238 |
|
|
</input>
|
239 |
|
|
<center>
|
240 |
|
|
<input type="SUBMIT" value="Decline" name="Decline">
|
241 |
|
|
</input>
|
242 |
|
|
</center>
|
243 |
|
|
</form>
|
244 |
|
|
<form action="@cgi-prefix@/register-dataset.cgi" method="POST">
|
245 |
|
|
<input type="hidden" name="stage" value="mod_revise"/>
|
246 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
247 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
248 |
|
|
<input type="hidden" name="docid">
|
249 |
|
|
<xsl:attribute name="value">
|
250 |
|
|
<xsl:value-of select="./docid"/>
|
251 |
|
|
</xsl:attribute>
|
252 |
|
|
</input>
|
253 |
|
|
<center>
|
254 |
|
|
<input type="SUBMIT" value=" Revise " name="Revise">
|
255 |
|
|
</input>
|
256 |
|
|
</center>
|
257 |
|
|
</form>
|
258 |
|
|
</td>
|
259 |
|
|
</xsl:when>
|
260 |
|
|
<xsl:otherwise>
|
261 |
|
|
<td class="text_plain">
|
262 |
2852
|
sgarg
|
<form action="@cgi-prefix@/register-dataset.cgi" method="POST">
|
263 |
|
|
<input type="hidden" name="stage" value="read"/>
|
264 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
265 |
2788
|
sgarg
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
266 |
2852
|
sgarg
|
<input type="hidden" name="docid">
|
267 |
|
|
<xsl:attribute name="value">
|
268 |
|
|
<xsl:value-of select="./docid"/>
|
269 |
|
|
</xsl:attribute>
|
270 |
|
|
</input>
|
271 |
|
|
<center>
|
272 |
|
|
<input type="SUBMIT" value=" View " name="View"></input>
|
273 |
|
|
</center>
|
274 |
|
|
</form>
|
275 |
|
|
<form action="@cgi-prefix@/register-dataset.cgi"
|
276 |
|
|
method="POST">
|
277 |
2788
|
sgarg
|
<input type="hidden" name="stage" value="modify"/>
|
278 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
279 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
280 |
2656
|
sgarg
|
<input type="hidden" name="docid">
|
281 |
|
|
<xsl:attribute name="value">
|
282 |
|
|
<xsl:value-of select="./docid"/>
|
283 |
|
|
</xsl:attribute>
|
284 |
|
|
</input>
|
285 |
|
|
<center>
|
286 |
2788
|
sgarg
|
<input type="SUBMIT" value=" Edit " name="Edit">
|
287 |
|
|
</input>
|
288 |
|
|
</center>
|
289 |
|
|
</form>
|
290 |
|
|
</td>
|
291 |
|
|
</xsl:otherwise>
|
292 |
|
|
</xsl:choose>
|
293 |
2656
|
sgarg
|
</xsl:if>
|
294 |
|
|
<td width="10"> </td>
|
295 |
|
|
</tr>
|
296 |
|
|
<tr class="searchresultsdivider"><td colspan="6">
|
297 |
|
|
<img src="@style-skins-path@/default/images/transparent1x1.gif" width="1" height="1" /></td></tr>
|
298 |
|
|
|
299 |
|
|
</xsl:for-each>
|
300 |
|
|
</table>
|
301 |
|
|
|
302 |
|
|
</xsl:if>
|
303 |
|
|
<script language="JavaScript">
|
304 |
|
|
insertTemplateClosing();
|
305 |
|
|
</script>
|
306 |
|
|
</body>
|
307 |
|
|
</html>
|
308 |
|
|
</xsl:template>
|
309 |
|
|
|
310 |
|
|
</xsl:stylesheet>
|