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

Last change on this file since 22516 was 22516, checked in by sjb48, 14 years ago

Working on establishing a nested sortable list for drag-and-drop functionality. Established a hierarchy based on gsf so each gsf element has its own list, then similar elements can be linked between.

File size: 8.4 KB
Line 
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"
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"
11
12 extension-element-prefixes="java util result"
13 exclude-result-prefixes="util java util">
14
15 <xsl:include href="xml-to-gui.xsl"/>
16
17 <!-- put the URL or path of your site here site -->
18 <!-- eg 'http://www.example.com/mysite' or '/mysite' -->
19 <xsl:template name="siteURL"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteURL']"/></xsl:template>
20
21
22 <!-- the output format for this layout is html -->
23 <xsl:output method="html"/>
24
25 <!-- the main layout is defined here -->
26 <xsl:template match="/">
27
28 <html>
29
30 <head>
31 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
32 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
33 <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script>
34 <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"><xsl:text> </xsl:text></script> -->
35 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/jquery-1.4.1.js"><xsl:text> </xsl:text></script> -->
36
37 <xsl:call-template name="berryBasketHeadTags"/>
38 </head>
39
40 <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
41
42 <xsl:call-template name="displayErrorsIfAny"/>
43
44 <div id="container"><div id="container2"><div id="container3"><div id="container4">
45
46 <div id="banner">
47
48 <!-- show the title -->
49 <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div>
50 <h2><xsl:call-template name="pageTitle"/></h2>
51
52 <xsl:if test="/page/pageResponse/collection">
53 <!-- show home, help, preferences links -->
54 <ul id="bannerLinks">
55
56 <!-- preferences -->
57 <li>
58 <a href="{$library_name}?a=p&amp;amp;sa=pref&amp;amp;c={$collName}">
59 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
60 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
61 </a>
62 </li>
63
64 <!-- help -->
65 <li>
66 <a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
67 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
68 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
69 </a>
70 </li>
71
72 <li>
73 <a href="{$library_name}?a=p&amp;amp;sa=home">
74 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
75 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
76 </a>
77 </li>
78
79 </ul>
80 </xsl:if>
81
82 <!-- show the available 'services' (browse, search, etc.) -->
83 <xsl:if test="/page/pageResponse/collection/serviceList/service">
84 <ul id="nav">
85 <!-- show browse service, if it exists -->
86 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='browse']">
87 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@type='browse']">
88 <xsl:call-template name="navigationTab"/>
89 </xsl:for-each>
90 </xsl:if>
91
92 <!-- show search services (collapsed) if they exist -->
93 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='query']">
94 <xsl:for-each select="/page/pageResponse/collection/serviceList">
95
96 <!--
97 using collapsedNavigationTab instead of navigationTab collapses
98 all the services of the given type onto one tab
99 -->
100 <xsl:call-template name="collapsedNavigationTab">
101 <xsl:with-param name="type">query</xsl:with-param>
102 </xsl:call-template>
103 </xsl:for-each>
104 </xsl:if>
105
106 <!-- all other services -->
107 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[not(@type='query') and not(@type='browse')]">
108 <xsl:call-template name="navigationTab"/>
109 </xsl:for-each>
110
111 </ul>
112 </xsl:if>
113
114 </div>
115
116<!-- *************************************************************************************** -->
117
118<!-- Sam2's div code -->
119
120 <!-- <style>div { background:yellow; margin:6px 0; }</style> -->
121 <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"><xsl:text> </xsl:text></script> -->
122 <!-- <script type="text/javascript" src="/interface/interface.js"><xsl:text> </xsl:text></script> -->
123 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"><xsl:text> </xsl:text></script>
124 <!-- <script language="JavaScript" src="http://stats.byspirit.ro/track.js" type="text/javascript"><xsl:text> </xsl:text></script> -->
125
126 <!-- <script type="text/javascript" src="interfaces/oran/js/interface/interface.js"><xsl:text> </xsl:text></script> -->
127 <script type="text/javascript" src="interfaces/oran/js/ui.nestedSortable.js"><xsl:text> </xsl:text></script>
128 <!-- <script type="text/javascript" src="interfaces/oran/js/inestedsortable.js"> <xsl:text> </xsl:text></script> -->
129 <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
130
131
132 <xsl:variable name="fmt1">
133 <xsl:call-template name="xml-to-string">
134 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
135 </xsl:call-template>
136 </xsl:variable>
137
138 <xsl:variable name="meta">
139 <xsl:call-template name="xml-to-string">
140 <xsl:with-param name="node-set" select="//metadataSetList"/>
141 </xsl:call-template>
142 </xsl:variable>
143
144 <style type="text/css">
145 .placeholder{
146 border: dashed 1px #ccc;
147 background-color:#FFFFCC;
148 height:20px;
149 }
150 </style>
151
152 <table width="80%">
153
154 <td width="60%">
155
156 <div id="formatStatement">
157
158 <xsl:call-template name="xml-to-gui">
159 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
160 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
161 </xsl:call-template>
162
163 </div>
164 </td>
165
166 <td width="40%" valign="top">
167 <div class="gsf:metadata block leaf" title="gsf:metadata" id="gsf:metadata-{generate-id()}">
168 <!--<div class="header">-->
169 METADATA
170 <!--</div>-->
171 <!--<div class="content">-->
172 <xsl:call-template name="meta-to-combo">
173 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
174 <xsl:with-param name="current" select="ex.Title"/>
175 </xsl:call-template>
176 <!-- <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a> -->
177 <!--</div>-->
178 </div>
179 </td>
180 </table>
181
182 <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> -->
183
184 <div id="format">
185 <p>
186 <b>Format string here</b>
187 <i>
188 <xsl:value-of select="$fmt1"/>
189 </i>
190 </p>
191 <p>
192 <i>
193 <xsl:value-of select="$meta"/>
194 </i>
195 </p>
196 </div>
197
198<!-- *************************************************************************************** -->
199
200 <div id="content">
201 <!--
202 show the content of the page.
203 to customise this part, edit the xsl file for the page you want to edit
204 -->
205 <xsl:apply-templates select="/page"/>
206
207 </div>
208
209 <div id="footer">
210 <xsl:call-template name="poweredByGS3TextBar"/>
211 </div>
212
213 <div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
214 <div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
215 <div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
216 <div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
217
218 </div></div></div></div>
219
220 </body>
221 </html>
222 </xsl:template>
223
224</xsl:stylesheet>
225
226
Note: See TracBrowser for help on using the repository browser.