1 |
2211
|
jones
|
<?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 |
|
|
<xsl:template match="/">
|
38 |
|
|
<html>
|
39 |
|
|
<head>
|
40 |
|
|
<link rel="stylesheet" type="text/css"
|
41 |
|
|
href="@style-skins-path@/{$qformat}/{$qformat}.css" />
|
42 |
|
|
<script language="Javascript" type="text/JavaScript"
|
43 |
|
|
src="@style-skins-path@/{$qformat}/{$qformat}.js" />
|
44 |
|
|
<script language="Javascript" type="text/JavaScript"
|
45 |
|
|
src="@style-common-path@/branding.js" />
|
46 |
|
|
<script language="JavaScript">
|
47 |
|
|
<![CDATA[
|
48 |
|
|
function submitform(action,form_ref) {
|
49 |
|
|
form_ref.action.value=action;
|
50 |
|
|
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA[";
|
51 |
|
|
form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA[";
|
52 |
|
|
form_ref.submit();
|
53 |
|
|
}
|
54 |
|
|
|
55 |
|
|
]]>
|
56 |
|
|
</script>
|
57 |
|
|
</head>
|
58 |
|
|
|
59 |
|
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
60 |
|
|
<script language="JavaScript">
|
61 |
|
|
insertTemplateOpening();
|
62 |
|
|
insertSearchBox();
|
63 |
|
|
</script>
|
64 |
|
|
<table width="100%" align="center" border="0" cellpadding="5" cellspacing="0">
|
65 |
|
|
<tr>
|
66 |
|
|
<td align="left"><br></br><p class="emphasis"><xsl:number value="count(resultset/document)" /> data packages found</p></td>
|
67 |
|
|
</tr></table>
|
68 |
|
|
<!-- This tests to see if there are returned documents,
|
69 |
|
|
if there are not then don't show the query results -->
|
70 |
|
|
|
71 |
|
|
<xsl:if test="count(resultset/document) > 0">
|
72 |
|
|
|
73 |
|
|
<table width="95%" align="center" border="0" cellpadding="0" cellspacing="0">
|
74 |
|
|
<tr>
|
75 |
|
|
<th class="tablehead_lcorner" align="right" valign="top"><img src="@style-skins-path@/default/images/transparent1x1.gif" width="1" height="1" /></th>
|
76 |
|
|
<th class="tablehead">Title</th>
|
77 |
|
|
<th width="15%" class="tablehead" style="text-align: left">Contacts</th>
|
78 |
|
|
<th width="15%" class="tablehead" style="text-align: left">Organization</th>
|
79 |
|
|
<th width="15%" class="tablehead" style="text-align: left">Keywords</th>
|
80 |
|
|
<xsl:if test="$enableediting = 'true'">
|
81 |
|
|
<th width="10%" class="tablehead" style="text-align: middle">Actions</th>
|
82 |
|
|
</xsl:if>
|
83 |
|
|
<th class="tablehead_rcorner" align="right" valign="top"><img src="@style-skins-path@/default/images/transparent1x1.gif" width="1" height="1" /></th>
|
84 |
|
|
</tr>
|
85 |
|
|
|
86 |
|
|
<xsl:for-each select="resultset/document">
|
87 |
|
|
<xsl:sort select="./param[@name='dataset/title']"/>
|
88 |
|
|
<tr valign="top" class="subpanel">
|
89 |
|
|
<xsl:attribute name="class">
|
90 |
|
|
<xsl:choose>
|
91 |
|
|
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
|
92 |
|
|
<xsl:when test="position() mod 2 = 0">roweven</xsl:when>
|
93 |
|
|
</xsl:choose>
|
94 |
|
|
</xsl:attribute>
|
95 |
|
|
|
96 |
|
|
<td width="10"> </td>
|
97 |
|
|
<td class="text_plain">
|
98 |
|
|
<form action="@servlet-path@" method="POST">
|
99 |
|
|
<xsl:attribute name="name">
|
100 |
|
|
<xsl:value-of select="translate(./docid, '()-.', '')" />
|
101 |
|
|
</xsl:attribute>
|
102 |
|
|
|
103 |
|
|
<input type="hidden" name="qformat" />
|
104 |
|
|
<input type="hidden" name="sessionid" />
|
105 |
|
|
<xsl:if test="$enableediting = 'true'">
|
106 |
|
|
<input type="hidden" name="enableediting" value="{$enableediting}"/>
|
107 |
|
|
</xsl:if>
|
108 |
|
|
<input type="hidden" name="action" value="read"/>
|
109 |
|
|
<input type="hidden" name="docid">
|
110 |
|
|
<xsl:attribute name="value">
|
111 |
|
|
<xsl:value-of select="./docid"/>
|
112 |
|
|
</xsl:attribute>
|
113 |
|
|
</input>
|
114 |
|
|
<xsl:for-each select="./relation">
|
115 |
|
|
<input type="hidden" name="docid">
|
116 |
|
|
<xsl:attribute name="value" >
|
117 |
|
|
<xsl:value-of select="./relationdoc" />
|
118 |
|
|
</xsl:attribute>
|
119 |
|
|
</input>
|
120 |
|
|
</xsl:for-each>
|
121 |
|
|
|
122 |
|
|
<a>
|
123 |
|
|
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '()-.', '')"/>)</xsl:attribute>
|
124 |
|
|
<xsl:text>» </xsl:text>
|
125 |
|
|
<xsl:choose>
|
126 |
|
|
<xsl:when test="./param[@name='dataset/title']!=''">
|
127 |
|
|
<xsl:value-of select="./param[@name='dataset/title']"/>
|
128 |
|
|
</xsl:when>
|
129 |
|
|
<xsl:otherwise>
|
130 |
|
|
<xsl:value-of select="./param[@name='citation/title']"/>
|
131 |
|
|
<xsl:value-of select="./param[@name='software/title']"/>
|
132 |
|
|
<xsl:value-of select="./param[@name='protocol/title']"/>
|
133 |
|
|
</xsl:otherwise>
|
134 |
|
|
</xsl:choose>
|
135 |
|
|
</a><br />
|
136 |
|
|
<br/>
|
137 |
|
|
<p><pre>ID: <xsl:value-of select="./docid"/></pre></p>
|
138 |
|
|
|
139 |
|
|
<xsl:if test="starts-with(./doctype, 'eml://ecoinformatics.org/eml-2.0.0')">
|
140 |
|
|
<a>
|
141 |
2235
|
brooke
|
<xsl:attribute name="href"><![CDATA[http://nebulous.nceas.ucsb.edu:8080/httprenderer/servlet/jalamafrontservlet?action=loadxmlinstance&url=@systemidserver@@servlet-path@%3Faction=read%26qformat=xml%26docid=]]><xsl:value-of select="./docid"/></xsl:attribute>
|
142 |
2236
|
brooke
|
<xsl:attribute name="target">_blank</xsl:attribute>
|
143 |
2211
|
jones
|
<xsl:text>» </xsl:text>
|
144 |
|
|
<b>Create data entry form</b>
|
145 |
|
|
</a><br/>
|
146 |
|
|
</xsl:if>
|
147 |
|
|
|
148 |
|
|
</form>
|
149 |
|
|
</td>
|
150 |
|
|
|
151 |
|
|
<td class="text_plain">
|
152 |
|
|
<xsl:for-each select="./param[@name='originator/individualName/surName']" >
|
153 |
|
|
<xsl:value-of select="." />
|
154 |
|
|
<br/>
|
155 |
|
|
</xsl:for-each>
|
156 |
|
|
<xsl:for-each select="./param[@name='creator/individualName/surName']" >
|
157 |
|
|
<xsl:value-of select="." />
|
158 |
|
|
<br/>
|
159 |
|
|
</xsl:for-each>
|
160 |
|
|
|
161 |
|
|
</td>
|
162 |
|
|
<td class="text_plain">
|
163 |
|
|
<xsl:value-of select="./param[@name='originator/organizationName']" />
|
164 |
|
|
<xsl:value-of select="./param[@name='creator/organizationName']" />
|
165 |
|
|
|
166 |
|
|
</td>
|
167 |
|
|
|
168 |
|
|
<td class="text_plain">
|
169 |
|
|
<xsl:for-each
|
170 |
|
|
select="./param[@name='keyword']">
|
171 |
|
|
<xsl:value-of select="." />
|
172 |
|
|
<br/>
|
173 |
|
|
</xsl:for-each>
|
174 |
|
|
|
175 |
|
|
</td>
|
176 |
|
|
|
177 |
|
|
<xsl:if test="$enableediting = 'true'">
|
178 |
|
|
<td class="text_plain">
|
179 |
|
|
<form action="@servlet-path@" method="POST">
|
180 |
|
|
<input type="hidden" name="action" value="read"/>
|
181 |
|
|
<input type="hidden" name="qformat" value="{$qformat}"/>
|
182 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
183 |
|
|
<input type="hidden" name="docid">
|
184 |
|
|
<xsl:attribute name="value">
|
185 |
|
|
<xsl:value-of select="./docid"/>
|
186 |
|
|
</xsl:attribute>
|
187 |
|
|
</input>
|
188 |
|
|
<center>
|
189 |
|
|
<input type="SUBMIT" value=" View " name="View">
|
190 |
|
|
</input>
|
191 |
|
|
</center>
|
192 |
|
|
</form>
|
193 |
|
|
<form action="@cgi-prefix@/register-dataset.cgi"
|
194 |
|
|
method="POST">
|
195 |
|
|
<input type="hidden" name="stage" value="modify"/>
|
196 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
197 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
198 |
|
|
<input type="hidden" name="docid">
|
199 |
|
|
<xsl:attribute name="value">
|
200 |
|
|
<xsl:value-of select="./docid"/>
|
201 |
|
|
</xsl:attribute>
|
202 |
|
|
</input>
|
203 |
|
|
<center>
|
204 |
|
|
<input type="SUBMIT" value=" Edit " name="Edit">
|
205 |
|
|
</input>
|
206 |
|
|
</center>
|
207 |
|
|
</form>
|
208 |
|
|
<form action="@cgi-prefix@/register-dataset.cgi"
|
209 |
|
|
method="POST">
|
210 |
|
|
<input type="hidden" name="stage" value="delete"/>
|
211 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
212 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
213 |
|
|
<input type="hidden" name="docid">
|
214 |
|
|
<xsl:attribute name="value">
|
215 |
|
|
<xsl:value-of select="./docid"/>
|
216 |
|
|
</xsl:attribute>
|
217 |
|
|
</input>
|
218 |
|
|
<center>
|
219 |
|
|
<input type="SUBMIT" value="Delete" name="Delete">
|
220 |
|
|
</input>
|
221 |
|
|
</center>
|
222 |
|
|
</form>
|
223 |
|
|
</td>
|
224 |
|
|
</xsl:if>
|
225 |
|
|
<td width="10"> </td>
|
226 |
|
|
</tr>
|
227 |
|
|
<tr class="searchresultsdivider"><td colspan="6">
|
228 |
|
|
<img src="@style-skins-path@/default/images/transparent1x1.gif" width="1" height="1" /></td></tr>
|
229 |
|
|
|
230 |
|
|
</xsl:for-each>
|
231 |
|
|
</table>
|
232 |
|
|
|
233 |
|
|
</xsl:if>
|
234 |
|
|
<script language="JavaScript">
|
235 |
|
|
insertTemplateClosing();
|
236 |
|
|
</script>
|
237 |
|
|
</body>
|
238 |
|
|
</html>
|
239 |
|
|
</xsl:template>
|
240 |
|
|
|
241 |
|
|
</xsl:stylesheet>
|