source: main/trunk/greenstone3/web/interfaces/oran/transform/layouts/main.xsl@ 23255

Last change on this file since 23255 was 23255, checked in by sjb48, 13 years ago
File size: 12.7 KB
RevLine 
[19856]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:java="http://xml.apache.org/xslt/java"
5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 xmlns:gslib="http://www.greenstone.org/skinning"
[22516]7 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
8
9 xmlns:lxslt="http://xml.apache.org/xslt"
10 xmlns:result="http://www.example.com/results"
[22598]11 xmlns:exsl="http://exslt.org/common"
[22516]12
[22598]13 extension-element-prefixes="java util result exsl"
[19856]14 exclude-result-prefixes="util java util">
15
[22458]16 <xsl:include href="xml-to-gui.xsl"/>
[22598]17 <xsl:include href="xml-to-gui-templates.xsl"/>
[22458]18
[19988]19 <!-- put the URL or path of your site here site -->
20 <!-- eg 'http://www.example.com/mysite' or '/mysite' -->
[20380]21 <xsl:template name="siteURL"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteURL']"/></xsl:template>
[19856]22
[19988]23
[19856]24 <!-- the output format for this layout is html -->
25 <xsl:output method="html"/>
26
27 <!-- the main layout is defined here -->
28 <xsl:template match="/">
29
30 <html>
31
32 <head>
[19988]33 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
[19856]34 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
[22569]35 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script> -->
[22676]36 <script type="text/javascript" src="interfaces/oran/js/jquery-1.4.2.js"><xsl:text> </xsl:text></script>
[22768]37 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8.2.custom.min.js"><xsl:text> </xsl:text></script> -->
[22829]38 <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/ui/jquery-ui.js"><xsl:text> </xsl:text></script>
[23135]39 <script type="text/javascript" src="interfaces/oran/js/jquery.selectboxes.js"><xsl:text> </xsl:text></script>
[22933]40 <!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"><xsl:text> </xsl:text></script> -->
[22516]41 <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"><xsl:text> </xsl:text></script> -->
42 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/jquery-1.4.1.js"><xsl:text> </xsl:text></script> -->
43
[19856]44 <xsl:call-template name="berryBasketHeadTags"/>
45 </head>
46
[19988]47 <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
[19856]48
[19988]49 <xsl:call-template name="displayErrorsIfAny"/>
50
[19856]51 <div id="container"><div id="container2"><div id="container3"><div id="container4">
52
[22783]53 <div id="gs_banner">
[19856]54
55 <!-- show the title -->
[19988]56 <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div>
57 <h2><xsl:call-template name="pageTitle"/></h2>
[19856]58
[20404]59 <xsl:if test="/page/pageResponse/collection">
60 <!-- show home, help, preferences links -->
61 <ul id="bannerLinks">
[19856]62
[20404]63 <!-- preferences -->
64 <li>
65 <a href="{$library_name}?a=p&amp;amp;sa=pref&amp;amp;c={$collName}">
66 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
67 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
68 </a>
69 </li>
[19856]70
[20404]71 <!-- help -->
72 <li>
73 <a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
74 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
75 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
76 </a>
77 </li>
[19856]78
[20404]79 <li>
80 <a href="{$library_name}?a=p&amp;amp;sa=home">
81 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
82 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
83 </a>
84 </li>
[19856]85
[20404]86 </ul>
87 </xsl:if>
[19856]88
89 <!-- show the available 'services' (browse, search, etc.) -->
90 <xsl:if test="/page/pageResponse/collection/serviceList/service">
91 <ul id="nav">
[20466]92 <!-- show browse service, if it exists -->
[20465]93 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='browse']">
94 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@type='browse']">
95 <xsl:call-template name="navigationTab"/>
96 </xsl:for-each>
97 </xsl:if>
[20466]98
99 <!-- show search services (collapsed) if they exist -->
[20465]100 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='query']">
[20466]101 <xsl:for-each select="/page/pageResponse/collection/serviceList">
102
103 <!--
104 using collapsedNavigationTab instead of navigationTab collapses
105 all the services of the given type onto one tab
106 -->
107 <xsl:call-template name="collapsedNavigationTab">
108 <xsl:with-param name="type">query</xsl:with-param>
109 </xsl:call-template>
[20465]110 </xsl:for-each>
111 </xsl:if>
[20466]112
113 <!-- all other services -->
114 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[not(@type='query') and not(@type='browse')]">
115 <xsl:call-template name="navigationTab"/>
116 </xsl:for-each>
117
[19856]118 </ul>
119 </xsl:if>
120
121 </div>
122
[22458]123<!-- *************************************************************************************** -->
124
[23135]125 <!-- <xsl:variable name="foo"> -->
126 <!-- <xsl:value-of select="/page/pageRequest/paramList[@name='formatedit']"/> -->
127
128 <xsl:if test="/page/pageRequest/paramList/param[(@name='formatedit') and (@value='1')]">
129
[22458]130<!-- Sam2's div code -->
131
[22473]132 <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
[22516]133
[22598]134 <xsl:call-template name="xml-to-gui-templates">
135 <xsl:with-param name="node-set" select="test"/>
136 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
137 </xsl:call-template>
138
[22458]139 <xsl:variable name="fmt1">
140 <xsl:call-template name="xml-to-string">
141 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
142 </xsl:call-template>
143 </xsl:variable>
144
145 <xsl:variable name="meta">
146 <xsl:call-template name="xml-to-string">
147 <xsl:with-param name="node-set" select="//metadataSetList"/>
148 </xsl:call-template>
149 </xsl:variable>
150
[22516]151 <style type="text/css">
[23046]152 .placeholder{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; height:20px; }
[22569]153
[23046]154 .placeholder_td{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; width:20px; }
[22768]155
[23046]156 .header { background-color: #AFCCAF; border: solid 1px #117711; padding: 5px; padding-left: 10px;}
157
[22569]158 .resizable { width: 150px; height: 150px; padding: 0.5em; }
[22598]159
[23046]160 .block { margin-left: 15px; border-left: dashed 1px black;}
[22569]161
[22676]162 .droppable { background-color: #99dd99;}
163 .droppable_hl { border: dashed 1px #ccc; background-color:#FFFFCC; }
164
[22569]165 <!-- .gsf_metadata { border: solid 2px #0000BB; background-color: #440077; } -->
166
[22598]167 <!-- .gsf_choose_metadata { border: solid 1px #000000; background-color: #223344; } -->
[22516]168 </style>
[22458]169
[22569]170 <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
[22516]171
[22569]172 <table width="100%" border="1">
173
[22598]174 <td width="75%">
[22516]175
176 <div id="formatStatement">
177
[22458]178 <xsl:call-template name="xml-to-gui">
179 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
180 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
181 </xsl:call-template>
182
[22473]183 </div>
[22516]184 </td>
[22473]185
[22569]186
[22598]187 <td width="25%" valign="top">
[22569]188 <h2> Elements to add </h2>
[23255]189 <!-- <div class="header element_type_gsf_template css_gsf_template" title="gsf:template">TEMPLATE</div> -->
190 <div class="draggable_gsf_template css_gsf_template block" title="gsf:template"><table class="header"><tbody><tr><td class="header">MATCH=<input type="text" name="rawtextinput" size="10"/></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table><table border="1"><tr class="tr"><td class="droppable" width="10px"></td></tr></table></div><br/>
191
192 <div class="draggable_gsf_choose css_gsf_choose_metadata block" title="gsf:choose-metadata"><table class="header"><tbody><tr><td class="header">CHOOSE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>
193
194 <div class="draggable_gsf_metadata css_gsf_metadata block" title="gsf:metadata"><table class="header"><tbody><tr><td class="header"><xsl:call-template name="meta-to-combo">
[23046]195 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
196 <xsl:with-param name="current" select="ex.Title"/>
197 </xsl:call-template></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>
[23255]198
[23135]199 <div class="draggable_gsf_link css_gsf_link block" title="gsf:link"><table class="header"><tbody><tr><td class="header">LINK<select>
200 <option value = "document" selected = "document">Document</option>
201 <option value = "classifier">Classifier</option>
202 <option value = "source">Source</option>
203 <option value = "horizontal">Horizontal</option>
204 </select></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
[23255]205
206 <div class="draggable_gsf_switch css_gsf_switch block" title="gsf:switch"><table class="header"><tbody><tr><td class="header">SWITCH</td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
207
208 <div class="draggable_gsf_when css_gsf_when block" title="gsf:when"><table class="header"><tbody><tr><td class="header">WHEN<xsl:value-of select="@test"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
209
210 <div class="draggable_gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise"><table class="header"><tbody><tr><td class="header">OTHERWISE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
211
212 <div class="draggable_gsf_icon css_gsf_icon block" title="gsf:icon"><table class="header"><tbody><tr><td class="header">ICON<select><option value = "document" selected = "document">Document</option><option value = "classifier">Classifier</option><option value = "source">Source</option></select></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
[22569]213 <br/>
[22598]214 <div class="element_type_text css_text" title="text">TEXT</div>
215 <div class="element_type_table css_table" title="gsf:table">NEW TABLE</div>
216 <div class="element_type_tr css_tr" title="gsf:row">NEW TABLE ROW</div>
217 <div class="element_type_td css_td" title="gsf:column">NEW TABLE COLUMN</div>
[22569]218
[22516]219 </td>
220 </table>
221
[23135]222 <div id="format">
[22458]223 <p>
224 <b>Format string here</b>
225 <i>
226 <xsl:value-of select="$fmt1"/>
227 </i>
228 </p>
[23135]229 </div>
230 <!-- <p>
[22458]231 <i>
232 <xsl:value-of select="$meta"/>
233 </i>
234 </p>
[23046]235 </div> -->
[23135]236 </xsl:if>
[22458]237
238<!-- *************************************************************************************** -->
239
[22783]240 <div id="gs_content">
[19856]241 <!--
242 show the content of the page.
243 to customise this part, edit the xsl file for the page you want to edit
244 -->
245 <xsl:apply-templates select="/page"/>
[19988]246
[19856]247 </div>
248
[22783]249 <div id="gs_footer">
[19856]250 <xsl:call-template name="poweredByGS3TextBar"/>
251 </div>
252
253 <div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
254 <div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
255 <div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
256 <div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
257
258 </div></div></div></div>
259
260 </body>
261 </html>
262 </xsl:template>
263
264</xsl:stylesheet>
265
266
Note: See TracBrowser for help on using the repository browser.