source: main/trunk/greenstone3/web/interfaces/default/transform/pages/favourites.xsl@ 37334

Last change on this file since 37334 was 37334, checked in by kjdon, 16 months ago

now we use (un)selected_favourite_icon_url everywhere, instead of building the path each time. This now comes from interface_default.properties, instead of having hte image name hard coded in gslib. This matches other image definitions, and allows easier customization for a new interface. Note, I needed to define the gsf:variables in a couple places. at the start of gslib, can't use gsf:variable here. gsf:variable neded to make the js variable

File size: 3.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 extension-element-prefixes="java util"
9 exclude-result-prefixes="java util">
10
11 <!-- use the 'main' layout -->
12 <xsl:include href="layouts/main.xsl"/>
13
14 <!-- set page title -->
15 <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.title')"/></xsl:template>
16
17 <!-- set page breadcrumbs -->
18 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
19
20 <!-- the page content -->
21 <xsl:template match="/page">
22 <!-- these two variables defined here, then used by javascript-->
23 <gsf:variable name="selected_favourite_icon_url"><gsf:interfaceText name="favourite_star_selected_image"/></gsf:variable>
24 <gsf:variable name="unselected_favourite_icon_url"><gsf:interfaceText name="favourite_star_image"/></gsf:variable>
25 <gslib:langfrag name="favourites"/>
26 <xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
27 <script type="text/javascript" src="interfaces/{$interface_name}/js/favouritebasket/favouritecheckout.js"><xsl:text> </xsl:text></script>
28 <xsl:call-template name="customJavascript"/>
29 <xsl:call-template name="customCSS"/>
30 <script type="text/javascript">
31 <xsl:text disable-output-escaping="yes">
32 var doc;
33 var docList = new Array();
34 </xsl:text>
35 <xsl:for-each select="/page/pageResponse/favouriteList/item">
36 <xsl:text disable-output-escaping="yes">doc = new Array();</xsl:text>
37 <xsl:for-each select="@*">
38 <xsl:text disable-output-escaping="yes">doc["</xsl:text>
39 <xsl:value-of select="name()" />
40 <xsl:text disable-output-escaping="yes">"]='</xsl:text>
41 <xsl:value-of select="." />
42 <xsl:text disable-output-escaping="yes">';</xsl:text>
43 </xsl:for-each>
44 <xsl:text disable-output-escaping="yes">docList[</xsl:text>
45 <xsl:value-of select="position()-1"/>
46 <xsl:text>] = doc;</xsl:text>
47 </xsl:for-each>
48 </script>
49
50 <table class="navList" id="berryCheckoutOptions">
51 <tr>
52 <td id="fullview" class="current"><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.full_view')"/></span></td>
53 <td id="textview"><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.text_view')"/></span></td>
54 <td id="email"><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.email_view')"/></span></td>
55 </tr>
56 <div class="clear"><xsl:text> </xsl:text></div>
57 </table>
58
59 <div id="berryBasketContent"><span><xsl:text> </xsl:text></span></div>
60
61 <div id="delOptions">
62 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.delete_help')"/> <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.delete_else')"/><xsl:text> </xsl:text>
63
64 <div id="bbdeleteallbutton" class="ui-button ui-widget ui-state-default ui-corner-all" onclick="deleteAll()">
65 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.delete_all')"/>
66 </div>
67 </div>
68
69 </xsl:template>
70
71 <xsl:template name="customJavascript">
72 </xsl:template>
73
74 <xsl:template name="customCSS">
75 </xsl:template>
76
77</xsl:stylesheet>
78
Note: See TracBrowser for help on using the repository browser.