source: main/trunk/greenstone3/web/interfaces/default/transform/pages/berry.xsl@ 33106

Last change on this file since 33106 was 33106, checked in by ak19, 2 years ago

First working version of Delete Selected berry baskets. I suspect code is not fully optimal despite trying what I thought were better ways. In any case there's code duplication in deleteAll and deleteSelected and the deletion in the ygDDPlayer's deletion callbacks. Will attempt to refactor as much as possible next time. But this commit works. Will still need to add a selectAll option.

File size: 2.8 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 extension-element-prefixes="java util"
8 exclude-result-prefixes="java util">
9
10 <!-- use the 'main' layout -->
11 <xsl:include href="layouts/main.xsl"/>
12
13 <!-- set page title -->
14 <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'berry.title')"/></xsl:template>
15
16 <!-- set page breadcrumbs -->
17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
18
19 <!-- the page content -->
20 <xsl:template match="/page">
21 <gslib:langfrag name="berry"/>
22 <xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
23 <script type="text/javascript" src="interfaces/default/js/berrybasket/berrycheckout.js"><xsl:text> </xsl:text></script>
24 <xsl:call-template name="customJavascript"/>
25 <script type="text/javascript">
26 <xsl:text disable-output-escaping="yes">
27 var doc;
28 var docList = new Array();
29 </xsl:text>
30 <xsl:for-each select="/page/pageResponse/berryList/item">
31 <xsl:text disable-output-escaping="yes">doc = new Array();</xsl:text>
32 <xsl:for-each select="@*">
33 <xsl:text disable-output-escaping="yes">doc["</xsl:text>
34 <xsl:value-of select="name()" />
35 <xsl:text disable-output-escaping="yes">"]='</xsl:text>
36 <xsl:value-of select="." />
37 <xsl:text disable-output-escaping="yes">';</xsl:text>
38 </xsl:for-each>
39 <xsl:text disable-output-escaping="yes">docList[</xsl:text>
40 <xsl:value-of select="position()-1"/>
41 <xsl:text>] = doc;</xsl:text>
42 </xsl:for-each>
43 </script>
44
45 <table class="navList" id="berryCheckoutOptions">
46 <tr>
47 <td id="fullview" class="current"><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'berry.full_view')"/></span></td>
48 <td id="textview"><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'berry.text_view')"/></span></td>
49 <td id="email"><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'berry.email_view')"/></span></td>
50 </tr>
51 <div class="clear"><xsl:text> </xsl:text></div>
52 </table>
53 <input type="checkbox" name="delsel-checkbox" id="delselected-checkbox" value="delete-all" onclick="deleteSelected()">Delete Selected</input>
54 <input type="checkbox" name="delall-checkbox" id="delall-checkbox" value="delete-all" onclick="deleteAll()">Delete All</input>
55 <div id="berryBasketContent"><span><xsl:text> </xsl:text></span></div>
56
57 </xsl:template>
58
59 <xsl:template name="customJavascript">
60 </xsl:template>
61
62</xsl:stylesheet>
63
Note: See TracBrowser for help on using the repository browser.