Changeset 25001
- Timestamp:
- 2012-01-26T14:19:06+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl
r24907 r25001 4 4 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" 5 5 xmlns:gslib="http://www.greenstone.org/skinning" 6 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" 6 7 extension-element-prefixes="java util" 7 exclude-result-prefixes="java util ">8 exclude-result-prefixes="java util gsf"> 8 9 9 10 <xsl:include href="../query-common.xsl"/> … … 25 26 <xsl:template name="create-html-header"> 26 27 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title> 28 <link rel="stylesheet" href="interfaces/{$interface_name}/style/jquery-ui-1.8.16.custom.css" type="text/css"/> 27 29 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/> 28 30 <link rel="shortcut icon" href="favicon.ico"/> 29 <!--<script type="text/javascript" src="interfaces/{$interface_name}/js/direct-edit.js"><xsl:text> </xsl:text></script>--> 30 31 32 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"><xsl:text> </xsl:text></script> 33 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"><xsl:text> </xsl:text></script> 34 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.themeswitcher.min.js"><xsl:text> </xsl:text></script> 35 36 <script type="text/javascript" src="interfaces/{$interface_name}/js/direct-edit.js"><xsl:text> </xsl:text></script> 37 38 <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'"> 39 <xsl:call-template name="map-scripts"/> 40 </xsl:if> 31 41 <!--<xsl:call-template name="init-seaweed"/>--> 32 42 <xsl:call-template name="setup-gs-variable"/> … … 37 47 <!-- This template should be overridden in the collectionConfig.xml file if you want to add extra header content --> 38 48 </xsl:template> 39 49 40 50 <xsl:template name="init-seaweed"> 41 51 <script type="text/javascript"> … … 45 55 de.init(); 46 56 47 48 49 50 51 52 57 de.doc.declarePropertySets({ 58 metadata: { 59 phMarkup: '[Enter metadata value]', 60 name: "metadata" 61 } 62 }); 53 63 } 54 64 catch (err) { 55 //alert("Seaweed failed to initialise: " + err.message);65 alert("Seaweed failed to initialise: " + err.message); 56 66 } 57 67 }); … … 61 71 62 72 <!-- ***** HEADER LAYOUT TEMPLATE ***** --> 63 <xsl:template name="create-banner"> 64 <div id=" breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div>65 <table id="titlesearchcontainer">66 <tr>67 <xsl:call-template name="page-title-area"/>68 <xsl:call-template name="quick-search-area"/>69 </tr>70 </table>71 <xsl:call-template name="home-help-preferences"/>72 < xsl:call-template name="browsing-tabs"/>73 <xsl:template name="create-banner"> 74 <div id="gs_banner" class="ui-widget-header ui-corner-bottom"> 75 <table id="titlesearchcontainer"> 76 <tr> 77 <xsl:call-template name="page-title-area"/> 78 <xsl:call-template name="quick-search-area"/> 79 </tr> 80 </table> 81 <xsl:call-template name="browsing-tabs"/> 82 </div> 73 83 </xsl:template> 74 84 … … 81 91 <!-- Loop through each classifier --> 82 92 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier"> 83 <xsl:element name="li"> 84 <!-- If this tab is selected then colour it differently (right part) --> 85 <xsl:if test="@name = /page/pageRequest/paramList/param[@name = 'cl' and /page/pageRequest/@action = 'b']/@value"> 86 <xsl:attribute name='style'>background: transparent url('interfaces/oran/images/tab-right-selected.png') scroll no-repeat 100% -100px;</xsl:attribute> 87 </xsl:if> 93 <li> 94 <xsl:choose> 95 <!-- If this tab is selected then colour it differently --> 96 <xsl:when test="@name = /page/pageRequest/paramList/param[@name = 'cl' and /page/pageRequest/@action = 'b']/@value"> 97 <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute> 98 </xsl:when> 99 <xsl:otherwise> 100 <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute> 101 </xsl:otherwise> 102 </xsl:choose> 88 103 89 <xsl:element name="a"> 90 <!-- If this tab is selected then colour it differently (left part) --> 91 <xsl:if test="@name = /page/pageRequest/paramList/param[@name = 'cl' and /page/pageRequest/@action = 'b']/@value"> 92 <xsl:attribute name='style'>background: transparent url('interfaces/oran/images/tab-left-selected.png') no-repeat scroll 0 -100px;</xsl:attribute> 93 </xsl:if> 94 104 <a> 95 105 <!-- Add a title element to the <a> tag if a description exists for this classifier --> 96 106 <xsl:if test="displayItem[@name='description']"> … … 110 120 <!-- Add the actual text of the <a> tag --> 111 121 <xsl:value-of select="displayItem[@name='name']"/> 112 </ xsl:element>113 </ xsl:element>122 </a> 123 </li> 114 124 </xsl:for-each> 115 125 </xsl:if> … … 123 133 </xsl:template> 124 134 125 <!-- ***** HOME HELP PREFERENCES ***** -->135 <!-- ***** HOME HELP PREFERENCES LOGIN ***** --> 126 136 <xsl:template name="home-help-preferences"> 127 137 <xsl:if test="/page/pageResponse/collection"> 128 138 <ul id="bannerLinks"> 129 130 139 <!-- preferences --> 131 <li >140 <li class="ui-state-default ui-corner-all"> 132 141 <a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collNameChecked}"> 133 142 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 134 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 143 <ul> 144 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></span></li> 145 <li><span class="ui-icon ui-icon-wrench"><xsl:text> </xsl:text></span></li> 146 </ul> 135 147 </a> 136 148 </li> 137 149 138 150 <!-- help --> 139 <li >151 <li class="ui-state-default ui-corner-all"> 140 152 <a href="{$library_name}?a=p&amp;sa=help&amp;c={$collNameChecked}"> 141 153 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute> 142 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 154 <ul> 155 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></span></li> 156 <li><span class="ui-icon ui-icon-help"><xsl:text> </xsl:text></span></li> 157 </ul> 143 158 </a> 144 159 </li> 145 160 146 161 <!-- home --> 147 <li >162 <li class="ui-state-default ui-corner-all"> 148 163 <a href="{$library_name}?a=p&amp;sa=home"> 149 164 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute> 150 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/> 165 <ul> 166 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/></span></li> 167 <li><span class="ui-icon ui-icon-home"><xsl:text> </xsl:text></span></li> 168 </ul> 151 169 </a> 170 </li> 171 172 <!-- login --> 173 <li class="ui-state-default ui-corner-all"> 174 <xsl:choose> 175 <xsl:when test="/page/pageResponse/authenticationNode/service/@asn = '1'"> 176 <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.asn=&s1.aup=Login"> 177 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'logout_tip')"/></xsl:attribute> 178 <ul> 179 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'logout_b')"/></span></li> 180 <li><span class="ui-icon ui-icon-unlocked"><xsl:text> </xsl:text></span></li> 181 </ul> 182 </a> 183 </xsl:when> 184 <xsl:otherwise> 185 <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.asn=&s1.aup=Login"> 186 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute> 187 <ul> 188 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_b')"/></span></li> 189 <li><span class="ui-icon ui-icon-locked"><xsl:text> </xsl:text></span></li> 190 </ul> 191 </a> 192 </xsl:otherwise> 193 </xsl:choose> 152 194 </li> 153 195 </ul> … … 164 206 <xsl:choose> 165 207 <xsl:when test="string-length($pageTitleVar) < 20"> 166 <xsl:text>font-size: 1.5em; line-height: 1.5em;</xsl:text>208 <xsl:text>font-size: 1.5em;</xsl:text> 167 209 </xsl:when> 168 210 <xsl:when test="string-length($pageTitleVar) < 30"> 169 <xsl:text>font-size: 1.4em; line-height: 1.4em;</xsl:text>211 <xsl:text>font-size: 1.4em;</xsl:text> 170 212 </xsl:when> 171 213 <xsl:when test="string-length($pageTitleVar) < 40"> 172 <xsl:text>font-size: 1.3em; line-height: 1.3em;</xsl:text>214 <xsl:text>font-size: 1.3em;</xsl:text> 173 215 </xsl:when> 174 216 <xsl:when test="string-length($pageTitleVar) < 50"> 175 <xsl:text>font-size: 1.2em; line-height: 1.2em;</xsl:text>217 <xsl:text>font-size: 1.2em;</xsl:text> 176 218 </xsl:when> 177 219 <xsl:when test="string-length($pageTitleVar) < 60"> 178 <xsl:text>font-size: 1.1em; line-height: 1.2em;</xsl:text>220 <xsl:text>font-size: 1.1em;</xsl:text> 179 221 </xsl:when> 180 222 <xsl:when test="string-length($pageTitleVar) < 70"> 181 <xsl:text>font-size: 1em; line-height: 1.1em;</xsl:text>223 <xsl:text>font-size: 1em;</xsl:text> 182 224 </xsl:when> 183 225 <xsl:when test="string-length($pageTitleVar) < 80"> 184 <xsl:text>font-size: 0.9em; line-height: 1em;</xsl:text>226 <xsl:text>font-size: 0.9em;</xsl:text> 185 227 </xsl:when> 186 228 <xsl:when test="string-length($pageTitleVar) < 90"> 187 <xsl:text>font-size: 0.8em; line-height: 0.9em;</xsl:text>229 <xsl:text>font-size: 0.8em;</xsl:text> 188 230 </xsl:when> 189 231 <xsl:otherwise> 190 <xsl:text>font-size: 0.7em; line-height: 0.9em;</xsl:text>232 <xsl:text>font-size: 0.7em;</xsl:text> 191 233 </xsl:otherwise> 192 234 </xsl:choose> … … 233 275 </xsl:if> 234 276 <!-- The submit button --> 235 <input type="submit" >277 <input type="submit" id="quickSearchSubmitButton"> 236 278 <xsl:attribute name="value"> 237 279 <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/> … … 240 282 <br/> 241 283 <!-- The list of other search types --> 242 <table> 243 <tr> 244 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']"> 245 <td> 246 <a> 247 <xsl:attribute name="href"> 248 <xsl:value-of select="$library_name"/>?a=q&rt=d&c=<xsl:value-of select="$collNameChecked"/>&s=<xsl:value-of select="@name"/> 249 </xsl:attribute> 250 <xsl:value-of select="displayItem[@name='name']"/> 251 </a> 252 </td> 253 </xsl:for-each> 254 </tr> 255 </table> 284 <ul> 285 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']"> 286 <li class="ui-state-default ui-corner-all"> 287 <a> 288 <xsl:attribute name="href"> 289 <xsl:value-of select="$library_name"/>?a=q&rt=d&c=<xsl:value-of select="$collNameChecked"/>&s=<xsl:value-of select="@name"/> 290 </xsl:attribute> 291 <xsl:value-of select="displayItem[@name='name']"/> 292 </a> 293 </li> 294 </xsl:for-each> 295 </ul> 256 296 </form> 257 297 </td> 258 298 </xsl:if> 259 299 </xsl:template> 300 301 <xsl:template name="map-scripts"> 302 <meta content="initial-scale=1.0, user-scalable=no" name="viewport"/> 303 <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"><xsl:text> </xsl:text></script> 304 <script src="sites/localsite/collect/tipple-paradise-gardens/js/map-scripts.js" type="text/javascript"><xsl:text> </xsl:text></script> 305 <script type="text/javascript">$(window).load(initializeMapScripts);</script> 306 </xsl:template> 260 307 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.