Changeset 25563

Show
Ignore:
Timestamp:
10.05.2012 14:16:30 (7 years ago)
Author:
sjm84
Message:

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

Location:
main/trunk/greenstone3/web
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/WEB-INF/classes/interface_default.properties

    r25547 r25563  
    344344################### 
    345345db.doc_basket=Document basket 
     346db.access_denied=Accessed Denied 
    346347 
    347348############################# 
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl

    r25398 r25563  
    2222    <xsl:template match="/page"> 
    2323        <!-- Make sure the user is allowed to use this functionality --> 
    24         <xsl:if test="/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))"> 
    25             <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script> 
    26             <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_dd.js"><xsl:text> </xsl:text></script> 
    27             <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script> 
    28             <script type="text/javascript">YAHOO.util.Event.onDOMReady(initDocumentMaker);</script> 
     24        <xsl:choose> 
     25            <xsl:when test="/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> 
    2930 
    30             <link src="interfaces/{$interface_name}/style/documentbasket.js"/> 
    31             <xsl:for-each select="//item"> 
    32                 <a class="dbdoc"> 
    33                     <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> 
    34                     <xsl:value-of select="@title"/> 
    35                 </a> 
    36             </xsl:for-each> 
    37              
    38             <gslib:langfrag name="dse"/><!--<xsl:call-template name="document-editor-language-fragments"/>--> 
    39         </xsl:if> 
     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><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'db.doc_basket')"/></div> 
     43            </xsl:otherwise> 
     44        </xsl:choose> 
    4045    </xsl:template> 
    4146