1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sru="http://www.loc.gov/zing/srw/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fcs="http://clarin.eu/fcs/1.0" version="1.0" exclude-result-prefixes="xs sru fcs"> |
---|
3 | |
---|
4 | <!-- |
---|
5 | <purpose>pieces of html wrapped in templates, to be reused by other stylesheets</purpose> |
---|
6 | <history> |
---|
7 | <change on="2011-12-05" type="created" by="vr">copied from cr/html_snippets reworked back to xslt 1.0</change> |
---|
8 | </history> |
---|
9 | |
---|
10 | --> |
---|
11 | <xsl:import href="params.xsl"/> |
---|
12 | |
---|
13 | <xsl:template name="html-head"> |
---|
14 | <title> |
---|
15 | <xsl:value-of select="$title"/> |
---|
16 | </title> |
---|
17 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
18 | <link href="{$scripts_url}/style/jquery/clarindotblue/jquery-ui-1.8.5.custom.css" type="text/css" rel="stylesheet"/> |
---|
19 | <link href="{$scripts_url}/style/cmds-ui.css" type="text/css" rel="stylesheet"/> |
---|
20 | <link href="{$scripts_url}/style/cr.css" type="text/css" rel="stylesheet"/> |
---|
21 | <!-- <xsl:if test="contains($format,'htmljspage')"> |
---|
22 | <link href="{$base_dir}/style/jquery/jquery-treeview/jquery.treeview.css" rel="stylesheet"/> |
---|
23 | </xsl:if>--> |
---|
24 | |
---|
25 | |
---|
26 | <xsl:if test="contains($format,'htmljspage')"> |
---|
27 | <link href="{$scripts_url}/style/jquery/jquery-treeview/jquery.treeview.css" rel="stylesheet" /> |
---|
28 | <link href="{$scripts_url}/style/jquery/treetable/jquery.treeTable.css" rel="stylesheet" ></link> |
---|
29 | <link href="{$scripts_url}/style/jquery/jquery-autocomplete/jquery-ui.css" rel="stylesheet" type="text/css"></link> |
---|
30 | |
---|
31 | <script src="{$scripts_url}/scripts/jquery/js/jquery.min.js" type="text/javascript"></script> |
---|
32 | <script src="{$scripts_url}/scripts/jquery/js/jquery-ui.min.js" type="text/javascript"></script> |
---|
33 | |
---|
34 | <script src="{$scripts_url}/scripts/jquery/jquery-treeview/jquery.treeview.js" type="text/javascript"></script> |
---|
35 | <script src="{$scripts_url}/scripts/jquery/jquery-treeTable/jquery.treeTable.js" type="text/javascript"></script> |
---|
36 | <script src="{$scripts_url}/scripts/jquery/jsTree.v.1.0rc2/jquery.jstree.js" type="text/javascript"></script> |
---|
37 | |
---|
38 | <script src="{$scripts_url}/scripts/mdservice_helpers.js" type="text/javascript"></script> |
---|
39 | <script src="{$scripts_url}/scripts/jquery/jquery-layout/jquery.layout-1.3.0.rc29.12.js" type="text/javascript"></script> |
---|
40 | |
---|
41 | <script src="{$scripts_url}/scripts/mdservice_ui_settings.js" type="text/javascript"></script> |
---|
42 | <script src="{$scripts_url}/scripts/mdservice_helpers.js" type="text/javascript"></script> |
---|
43 | <script src="{$scripts_url}/scripts/mdservice_ui_helpers.js" type="text/javascript"></script> |
---|
44 | <script src="{$scripts_url}/scripts/mdservice_widgets.js" type="text/javascript"></script> |
---|
45 | |
---|
46 | <script src="{$scripts_url}/scripts/mdservice_searchclause.js" type="text/javascript"></script> |
---|
47 | <script src="{$scripts_url}/scripts/mdservice_model.js" type="text/javascript"></script> |
---|
48 | <script src="{$scripts_url}/scripts/mdservice_pz2.js" type="text/javascript"></script> |
---|
49 | <script src="{$scripts_url}/scripts/mdservice_ui_detail.js" type="text/javascript"></script> |
---|
50 | <script src="{$scripts_url}/scripts/mdservice_ui_load.js" type="text/javascript"></script> |
---|
51 | |
---|
52 | <script src="{$scripts_url}/scripts/mdservice_ui.js" type="text/javascript"></script> |
---|
53 | |
---|
54 | </xsl:if> |
---|
55 | </xsl:template> |
---|
56 | <xsl:template name="page-header"> |
---|
57 | <div class="cmds-ui-block" id="titlelogin"> |
---|
58 | <div id="logo"> |
---|
59 | <a href="{$base_url}"> |
---|
60 | <img src="{$site_logo}" alt="{$site_name}"/> |
---|
61 | </a> |
---|
62 | <div id="site-name"> |
---|
63 | <xsl:value-of select="$site_name"/> |
---|
64 | </div> |
---|
65 | </div> |
---|
66 | <div id="top-menu"> |
---|
67 | <div id="user"> |
---|
68 | <xsl:variable name="link_toggle_js" select="''"> |
---|
69 | <!-- |
---|
70 | <xsl:call-template name="formURL"> |
---|
71 | <xsl:with-param name="format"> |
---|
72 | <xsl:choose> |
---|
73 | <xsl:when test="contains($format,'htmljspage')">htmlpage</xsl:when> |
---|
74 | <xsl:otherwise>htmljspage</xsl:otherwise> |
---|
75 | </xsl:choose> |
---|
76 | </xsl:with-param> |
---|
77 | </xsl:call-template> |
---|
78 | --> |
---|
79 | |
---|
80 | </xsl:variable> |
---|
81 | <xsl:choose> |
---|
82 | <xsl:when test="contains($format,'htmljspage')"> |
---|
83 | <a href="{$link_toggle_js}"> none js </a> |
---|
84 | </xsl:when> |
---|
85 | <xsl:otherwise> |
---|
86 | <a href="{$link_toggle_js}"> js </a> |
---|
87 | </xsl:otherwise> |
---|
88 | </xsl:choose> |
---|
89 | <xsl:choose> |
---|
90 | <xsl:when test="$user = ''"> |
---|
91 | <a href="workspace.jsp"> login</a> |
---|
92 | </xsl:when> |
---|
93 | <xsl:otherwise> |
---|
94 | User: <b> |
---|
95 | <xsl:value-of select="$user"/> |
---|
96 | </b> |
---|
97 | <a href="logout.jsp"> logout</a> |
---|
98 | </xsl:otherwise> |
---|
99 | </xsl:choose> |
---|
100 | <a target="_blank" href="static/info"> docs</a> |
---|
101 | </div> |
---|
102 | <div id="notify" class="cmds-elem-plus note"> |
---|
103 | <div id="notifylist" class="note"/> |
---|
104 | </div> |
---|
105 | </div> |
---|
106 | </div> |
---|
107 | </xsl:template> |
---|
108 | <xsl:template name="query-input"> |
---|
109 | |
---|
110 | <!-- QUERYSEARCH - BLOCK --> |
---|
111 | <div class="cmds-ui-block init-show" id="querysearch"> |
---|
112 | <div class="header ui-widget-header ui-state-default ui-corner-top"> |
---|
113 | Search |
---|
114 | </div> |
---|
115 | <div class="content" id="query-input"> |
---|
116 | <!-- fill form@action with <xsl:call-template name="formURL"/> will not work, |
---|
117 | because the parameter have to be encoded as input-elements not in the form-url |
---|
118 | --> |
---|
119 | <form id="searchretrieve" action="{$base_url}" method="get"> |
---|
120 | <input type="hidden" name="x-format" value="{$format}"/> |
---|
121 | <table class="cmds-ui-elem-stretch"> |
---|
122 | <tr> |
---|
123 | <td colspan="2"> |
---|
124 | <label>Context</label> |
---|
125 | <xsl:call-template name="contexts-select"/> |
---|
126 | <input type="text" id="input-simplequery" name="query" value="{$q}" class="queryinput active"/> |
---|
127 | <div id="searchclauselist" class="queryinput inactive"/> |
---|
128 | </td> |
---|
129 | <td> |
---|
130 | <input type="submit" value="submit" id="submit-query"/> |
---|
131 | <br/> |
---|
132 | <span id="switch-input" class="cmd"/> |
---|
133 | <label>Complex query</label> |
---|
134 | </td> |
---|
135 | </tr> |
---|
136 | <tr> |
---|
137 | <td valign="top"> |
---|
138 | |
---|
139 | <!-- |
---|
140 | <select id="repositories_select" name="repository"> |
---|
141 | <option value="">TODO - not implemented yet</option> |
---|
142 | |
---|
143 | TODO: |
---|
144 | <xsl:for-each select="exsl:node-set($repositories)"> |
---|
145 | <option> |
---|
146 | <xsl:attribute name="value"> |
---|
147 | <xsl:value-of select="name"/> |
---|
148 | </xsl:attribute> |
---|
149 | <xsl:value-of select="name"/> |
---|
150 | </option> |
---|
151 | </xsl:for-each> |
---|
152 | </select> --> |
---|
153 | |
---|
154 | |
---|
155 | <!-- selected collections --> |
---|
156 | <!-- <label>Collections</label><br/>--> |
---|
157 | <div id="collections-widget" class="c-widget"/> |
---|
158 | </td> |
---|
159 | <td valign="top"> |
---|
160 | <span class="label">from:</span> |
---|
161 | <span> |
---|
162 | <input type="text" name="startRecord" class="value start_record paging-input"> |
---|
163 | <xsl:attribute name="value"> |
---|
164 | <xsl:value-of select="$startRecord"/> |
---|
165 | </xsl:attribute> |
---|
166 | </input> |
---|
167 | </span> |
---|
168 | <span class="label">max:</span> |
---|
169 | <span> |
---|
170 | <input type="text" name="maximumRecords" class="value maximum_records paging-input"> |
---|
171 | <xsl:attribute name="value"> |
---|
172 | <xsl:choose> |
---|
173 | <xsl:when test="number($numberOfRecords) > 0 and number($numberOfRecords) < number($maximumRecords)"> |
---|
174 | <xsl:value-of select="$numberOfRecords"/> |
---|
175 | </xsl:when> |
---|
176 | <xsl:otherwise> |
---|
177 | <xsl:value-of select="$maximumRecords"/> |
---|
178 | </xsl:otherwise> |
---|
179 | </xsl:choose> |
---|
180 | </xsl:attribute> |
---|
181 | </input> |
---|
182 | </span> |
---|
183 | </td> |
---|
184 | <td/> |
---|
185 | </tr> |
---|
186 | </table> |
---|
187 | </form> |
---|
188 | </div> |
---|
189 | <!-- gs --> |
---|
190 | <div id="termset_autocomplete" /> |
---|
191 | <div id="termset_autocomplete_explain" /> |
---|
192 | <div id="terms_autocomplete" /> |
---|
193 | </div> |
---|
194 | </xsl:template> |
---|
195 | <xsl:template name="prev-next"> |
---|
196 | <input type="submit" value="" class="cmd cmd_reload"/> |
---|
197 | <xsl:variable name="prev_startRecord"> |
---|
198 | <xsl:choose> |
---|
199 | <xsl:when test="number($startRecord) - number($maximumRecords) > 0"> |
---|
200 | <xsl:value-of select="format-number(number($startRecord) - number($maximumRecords),'#')"/> |
---|
201 | </xsl:when> |
---|
202 | <xsl:otherwise> |
---|
203 | <xsl:value-of select="1"/> |
---|
204 | </xsl:otherwise> |
---|
205 | </xsl:choose> |
---|
206 | </xsl:variable> |
---|
207 | <xsl:variable name="next_startRecord"> |
---|
208 | <xsl:choose> |
---|
209 | <xsl:when test="number($startRecord) + number($maximumRecords) > number(numberOfRecords)"> |
---|
210 | <xsl:value-of select="$startRecord"/> |
---|
211 | </xsl:when> |
---|
212 | <xsl:otherwise> |
---|
213 | <xsl:value-of select="format-number(number($startRecord) + number($maximumRecords),'#')"/> |
---|
214 | </xsl:otherwise> |
---|
215 | </xsl:choose> |
---|
216 | </xsl:variable> |
---|
217 | <xsl:variable name="link_prev" select="''"> |
---|
218 | <!-- |
---|
219 | <xsl:call-template name="formURL"> |
---|
220 | <xsl:with-param name="startRecord" select="$prev_startRecord"/> |
---|
221 | <xsl:with-param name="maximumRecords" select="$maximumRecords"/> |
---|
222 | </xsl:call-template> |
---|
223 | --> |
---|
224 | |
---|
225 | </xsl:variable> |
---|
226 | <a class="internal prev" href="{$link_prev}"> |
---|
227 | <span> |
---|
228 | <xsl:choose> |
---|
229 | <xsl:when test="$startRecord = '1'"> |
---|
230 | <xsl:attribute name="class"> |
---|
231 | <xsl:value-of select="'cmd cmd_prev disabled'"/> |
---|
232 | </xsl:attribute> |
---|
233 | </xsl:when> |
---|
234 | <xsl:otherwise> |
---|
235 | <xsl:attribute name="class"> |
---|
236 | <xsl:value-of select="'cmd cmd_prev '"/> |
---|
237 | </xsl:attribute> |
---|
238 | </xsl:otherwise> |
---|
239 | </xsl:choose> |
---|
240 | <xsl:text>prev</xsl:text> |
---|
241 | </span> |
---|
242 | </a> |
---|
243 | <xsl:variable name="link_next" select="''"> |
---|
244 | <!-- |
---|
245 | <xsl:call-template name="formURL"> |
---|
246 | <xsl:with-param name="startRecord" select="$next_startRecord"/> |
---|
247 | <xsl:with-param name="maximumRecords" select="$maximumRecords"/> |
---|
248 | </xsl:call-template> |
---|
249 | --> |
---|
250 | |
---|
251 | </xsl:variable> |
---|
252 | <a class="internal next" href="{$link_next}"> |
---|
253 | <span class="cmd cmd_next"> |
---|
254 | <xsl:choose> |
---|
255 | <xsl:when test="number($startRecord) + number($maximumRecords) >= number(numberOfRecords)"> |
---|
256 | <xsl:attribute name="class"> |
---|
257 | <xsl:value-of select="'cmd cmd_next disabled'"/> |
---|
258 | </xsl:attribute> |
---|
259 | </xsl:when> |
---|
260 | <xsl:otherwise> |
---|
261 | <xsl:attribute name="class"> |
---|
262 | <xsl:value-of select="'cmd cmd_next '"/> |
---|
263 | </xsl:attribute> |
---|
264 | </xsl:otherwise> |
---|
265 | </xsl:choose> |
---|
266 | <xsl:text>next</xsl:text> |
---|
267 | </span> |
---|
268 | </a> |
---|
269 | |
---|
270 | </xsl:template> |
---|
271 | <xsl:template name="query-list"> |
---|
272 | <!-- QUERYLIST BLOCK --> |
---|
273 | <div id="querylistblock" class="cmds-ui-block"> |
---|
274 | <div class="header ui-widget-header ui-state-default ui-corner-top"> |
---|
275 | <span>QUERYLIST</span> |
---|
276 | </div> |
---|
277 | <div class="content" id="querylist"/> |
---|
278 | </div> |
---|
279 | </xsl:template> |
---|
280 | <xsl:template name="detail-space"> |
---|
281 | <div id="detailblock" class="cmds-ui-block"> |
---|
282 | <div class="header ui-widget-header ui-state-default ui-corner-top"> |
---|
283 | <span>DETAIL</span> |
---|
284 | </div> |
---|
285 | <div class="content" id="details"/> |
---|
286 | </div> |
---|
287 | </xsl:template> |
---|
288 | <xsl:template name="public-space"> |
---|
289 | <div id="public-space" class="cmds-ui-block"> |
---|
290 | <div class="header"> |
---|
291 | <span>Public Space</span> |
---|
292 | </div> |
---|
293 | <div id="serverqs" class="content"/> |
---|
294 | </div> |
---|
295 | </xsl:template> |
---|
296 | <xsl:template name="user-space"> |
---|
297 | <div class="cmds-ui-block init-show" id="user-space"> |
---|
298 | <div class="header"> |
---|
299 | <span>Personal Workspace</span> |
---|
300 | </div> |
---|
301 | <div id="userqs" class="content"> |
---|
302 | <div id="userquerysets"> |
---|
303 | <label>Querysets</label> |
---|
304 | <select id="qts_select"/> |
---|
305 | <!-- <button id="qts_add" class="cmd cmd_add" >Add</button> --> |
---|
306 | <span id="qts_add" class="cmd cmd_add"/> |
---|
307 | <span id="qts_delete" class="cmd cmd_del"/> |
---|
308 | </div> |
---|
309 | <label>name</label> |
---|
310 | <input type="text" id="qts_input"/> |
---|
311 | <span id="qts_save" class="cmd cmd_save"/> |
---|
312 | <div id="userqueries"/> |
---|
313 | </div> |
---|
314 | <div id="userbs" class="content"> |
---|
315 | <div id="bookmarksets"> |
---|
316 | <label>Bookmarksets</label> |
---|
317 | <select id="bts_select"/> |
---|
318 | <span id="bts_add" class="cmd cmd_add"/> |
---|
319 | <span id="bts_delete" class="cmd cmd_del"/> |
---|
320 | <span id="bts_publish" class="cmd cmd_publish"/> |
---|
321 | </div> |
---|
322 | <label>name</label> |
---|
323 | <input type="text" id="bts_input"/> |
---|
324 | <span id="bts_save" class="cmd cmd_save"/> |
---|
325 | <div id="bookmarks"/> |
---|
326 | </div> |
---|
327 | </div> |
---|
328 | </xsl:template> |
---|
329 | </xsl:stylesheet> |
---|