root/main/trunk/greenstone3/web/interfaces/default/transform/pages/documentbasket.xsl @ 33140

Revision 25565, 2.9 KB (checked in by sjm84, 8 years ago)

This page will now display an "Accessed Denied" message when a non-admin/collection-editor

  • Property svn:executable set to *
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
2    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3    xmlns:java="http://xml.apache.org/xslt/java"
4    xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
5    xmlns:gslib="http://www.greenstone.org/skinning"
6    extension-element-prefixes="java util"
7    exclude-result-prefixes="java util gsf">
8
9    <!-- use the 'main' layout -->
10    <xsl:import href="layouts/main.xsl"/>
11   
12    <!-- set page title -->
13    <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'db.doc_basket')"/></xsl:template>
14   
15    <!-- set page breadcrumbs -->
16    <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/>
17    <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
18
19    <xsl:template name="init-seaweed"/>
20   
21    <!-- the page content -->
22    <xsl:template match="/page">
23        <!-- Make sure the user is allowed to use this functionality -->
24        <xsl:choose>
25            <xsl:when test="util:equals(util:getGlobalProperty('disable.collection.building'),'false') and /page/pageRequest/userInformation and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
26                <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>
27                <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_dd.js"><xsl:text> </xsl:text></script>
28                <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script>
29                <script type="text/javascript">YAHOO.util.Event.onDOMReady(initDocumentMaker);</script>
30
31                <link src="interfaces/{$interface_name}/style/documentbasket.js"/>
32                <xsl:for-each select="//item">
33                    <a class="dbdoc">
34                        <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;dt=hierarchy&amp;d=<xsl:value-of select="@name"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;ed=1</xsl:attribute>
35                        <xsl:value-of select="@title"/>
36                    </a>
37                </xsl:for-each>
38               
39                <gslib:langfrag name="dse"/><!--<xsl:call-template name="document-editor-language-fragments"/>-->
40            </xsl:when>
41            <xsl:otherwise>
42                <div>
43                    <xsl:choose>
44                        <xsl:when test="util:equals(util:getGlobalProperty('disable.collection.building'),'true')">
45                            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'db.no_collection_building')"/>
46                        </xsl:when>
47                        <xsl:otherwise>
48                            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'db.access_denied')"/>
49                        </xsl:otherwise>
50                    </xsl:choose>
51                </div>
52            </xsl:otherwise>
53        </xsl:choose>
54    </xsl:template>
55
56</xsl:stylesheet> 
57
58
59
Note: See TracBrowser for help on using the browser.