1
|
<?xml version="1.0"?>
|
2
|
<!--
|
3
|
* '$RCSfile$'
|
4
|
* Authors: Matt Jones, Chad Berkley
|
5
|
* Copyright: 2000-2007 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: leinfelder $'
|
10
|
* '$Date: 2013-05-01 17:16:02 -0700 (Wed, 01 May 2013) $'
|
11
|
* '$Revision: 7653 $'
|
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"
|
32
|
version="1.0">
|
33
|
<xsl:template name="resultstablesolr">
|
34
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
35
|
|
36
|
<p class="emphasis">
|
37
|
<xsl:number value="count(response/result/doc)" />
|
38
|
data packages found
|
39
|
</p>
|
40
|
|
41
|
<!-- This tests to see if there are returned documents,
|
42
|
if there are not then don't show the query results -->
|
43
|
<xsl:if test="count(response/result/doc) > 0">
|
44
|
|
45
|
<table class="resultstable" width="95%" align="center" border="0" cellpadding="0" cellspacing="0">
|
46
|
<tr>
|
47
|
<th class="tablehead_lcorner" align="right" valign="top">
|
48
|
<img src="{$contextURL}/style/skins/default/images/transparent1x1.gif" width="1" height="1" />
|
49
|
</th>
|
50
|
<th class="tablehead" style="text-align: left">
|
51
|
Title
|
52
|
</th>
|
53
|
<th width="15%" class="tablehead" style="text-align: left">
|
54
|
Contacts
|
55
|
</th>
|
56
|
<th width="15%" class="tablehead" style="text-align: left">
|
57
|
Organization
|
58
|
</th>
|
59
|
<th width="15%" class="tablehead" style="text-align: left">
|
60
|
Keywords
|
61
|
</th>
|
62
|
<xsl:if test="$enableediting = 'true'">
|
63
|
<th width="10%" class="tablehead" style="text-align: middle">
|
64
|
Actions
|
65
|
</th>
|
66
|
</xsl:if>
|
67
|
<th class="tablehead_rcorner" align="right" valign="top">
|
68
|
<img src="{$contextURL}/style/skins/default/images/transparent1x1.gif" width="1" height="1" />
|
69
|
</th>
|
70
|
</tr>
|
71
|
|
72
|
<xsl:for-each select="response/result/doc">
|
73
|
<xsl:sort select="./str[@name='title']" />
|
74
|
|
75
|
<xsl:variable name="viewLink">
|
76
|
<xsl:value-of select="$contextURL" /><![CDATA[/metacat?action=read]]><![CDATA[&qformat=]]><xsl:value-of select="$qformat" /><![CDATA[&sessionid=]]><xsl:value-of select="$sessid" /><![CDATA[&docid=]]><xsl:value-of select="./str[@name='id']" /><xsl:if test="$enableediting = 'true'"><![CDATA[&enableediting=]]><xsl:value-of select="$enableediting" /></xsl:if>
|
77
|
</xsl:variable>
|
78
|
|
79
|
<tr valign="top" class="subpanel">
|
80
|
<xsl:attribute name="class">
|
81
|
<xsl:choose>
|
82
|
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
|
83
|
<xsl:when test="position() mod 2 = 0">roweven</xsl:when>
|
84
|
</xsl:choose>
|
85
|
</xsl:attribute>
|
86
|
|
87
|
<td width="10"> </td>
|
88
|
<td class="text_plain">
|
89
|
|
90
|
<a>
|
91
|
<xsl:attribute name="href">
|
92
|
<xsl:value-of select="$viewLink" />
|
93
|
</xsl:attribute>
|
94
|
<xsl:text>
|
95
|
» 
|
96
|
</xsl:text>
|
97
|
|
98
|
<!-- <xsl:value-of select="./str[@name='title']" />-->
|
99
|
<!-- <xsl:value-of select="./str[@name='author']" /> -->
|
100
|
<xsl:for-each select="./arr[@name='authorLastName']" >
|
101
|
<xsl:value-of select="./str" />
|
102
|
</xsl:for-each>.
|
103
|
<xsl:value-of select="./str[@name='title']" />. <xsl:value-of select="./str[@name='pubDate']" />
|
104
|
|
105
|
</a>
|
106
|
<p>
|
107
|
<b><xsl:value-of select="./str[@name='id']" /></b>
|
108
|
</p>
|
109
|
<p>
|
110
|
<xsl:value-of select="substring(./str[@name='abstract'], 0, 140)" />...
|
111
|
<a>
|
112
|
<xsl:attribute name="href">
|
113
|
<xsl:value-of select="$viewLink" />
|
114
|
</xsl:attribute>
|
115
|
(more)
|
116
|
</a>
|
117
|
</p>
|
118
|
<br />
|
119
|
</td>
|
120
|
|
121
|
<td class="text_plain">
|
122
|
<xsl:for-each
|
123
|
select="./str[@name='author']">
|
124
|
<xsl:value-of select="." />
|
125
|
<br />
|
126
|
</xsl:for-each>
|
127
|
<xsl:for-each
|
128
|
select="./str[@name='investigator']">
|
129
|
<xsl:value-of select="." />
|
130
|
<br />
|
131
|
</xsl:for-each>
|
132
|
<!--
|
133
|
<xsl:for-each
|
134
|
select="./arr[@name='origin']">
|
135
|
<xsl:value-of select="./str" />
|
136
|
<br />
|
137
|
</xsl:for-each>
|
138
|
-->
|
139
|
<!--
|
140
|
<xsl:for-each
|
141
|
select="./str[@name='rightsHolder']">
|
142
|
<xsl:value-of select="." />
|
143
|
<br />
|
144
|
</xsl:for-each>
|
145
|
-->
|
146
|
|
147
|
</td>
|
148
|
|
149
|
<td class="text_plain">
|
150
|
<xsl:for-each
|
151
|
select="./arr[@name='contactOrganization']">
|
152
|
<xsl:value-of select="./str" />
|
153
|
<br />
|
154
|
</xsl:for-each>
|
155
|
</td>
|
156
|
|
157
|
<td class="text_plain">
|
158
|
<xsl:for-each
|
159
|
select="./arr[@name='keywords']">
|
160
|
<xsl:value-of select="./str" />
|
161
|
<br />
|
162
|
</xsl:for-each>
|
163
|
<xsl:for-each
|
164
|
select="./arr[@name='keyConcept']">
|
165
|
<xsl:value-of select="./str" />
|
166
|
<br />
|
167
|
</xsl:for-each>
|
168
|
</td>
|
169
|
|
170
|
<xsl:if test="$enableediting = 'true'">
|
171
|
<td class="text_plain">
|
172
|
<!-- for cgi-based editing -->
|
173
|
<form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
|
174
|
<input type="hidden" name="stage" value="modify" />
|
175
|
<input type="hidden" name="cfg" value="{$qformat}" />
|
176
|
<input type="hidden" name="sessionid" value="{$sessid}" />
|
177
|
<input type="hidden" name="docid">
|
178
|
<xsl:attribute name="value">
|
179
|
<xsl:value-of select="./str[@name='id']" />
|
180
|
</xsl:attribute>
|
181
|
</input>
|
182
|
<center>
|
183
|
<input type="SUBMIT" value=" Edit " name="Edit">
|
184
|
</input>
|
185
|
</center>
|
186
|
</form>
|
187
|
<form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
|
188
|
<input type="hidden" name="stage" value="delete" />
|
189
|
<input type="hidden" name="cfg" value="{$qformat}" />
|
190
|
<input type="hidden" name="sessionid" value="{$sessid}" />
|
191
|
<input type="hidden" name="docid">
|
192
|
<xsl:attribute name="value">
|
193
|
<xsl:value-of select="./str[@name='id']" />
|
194
|
</xsl:attribute>
|
195
|
</input>
|
196
|
<center>
|
197
|
<input type="SUBMIT" value="Delete" name="Delete">
|
198
|
</input>
|
199
|
</center>
|
200
|
</form>
|
201
|
</td>
|
202
|
</xsl:if>
|
203
|
|
204
|
<td width="10"> </td>
|
205
|
</tr>
|
206
|
<tr>
|
207
|
<td width="10" class="searchresultslead"></td>
|
208
|
<td colspan="5" class="searchresultsdivider"> </td>
|
209
|
</tr>
|
210
|
|
211
|
</xsl:for-each>
|
212
|
</table>
|
213
|
|
214
|
</xsl:if>
|
215
|
</body>
|
216
|
</xsl:template>
|
217
|
|
218
|
</xsl:stylesheet>
|