How would one go about hiding restricted bitstreams in DSpace 3.1 with
XMLUI, using the Kubrick theme?
On Tue, Jun 18, 2013 at 4:10 AM, helix84 <[email protected]> wrote:
> Hi Jessica,
>
> copy this "mets:file" template over to your theme, in order to override it:
>
> https://github.com/DSpace/DSpace/blob/dspace-3.1/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/aspect/artifactbrowser/item-view.xsl#L388
>
> Them make the following modifications to the XSL file that contains it:
>
> 1) add the following attributes to the xsl:stylesheet element:
>
>
> xmlns:jstring="java.lang.String"
> xmlns:util="org.dspace.app.xmlui.utils.XSLUtils"
> xmlns:rights="http://cosimo.stanford.edu/sdr/metsrights/"
>
>
> modify the "mets:file" template this way:
> 2) replace
>
> <xsl:param name="context" select="."/>
>
> with
>
> <xsl:variable name="context" select="."/>
>
>
> 3) on the following line (after the context variable), add:
>
>
> <xsl:variable name="file_id"
> select="jstring:replaceAll(jstring:replaceAll(string(@ADMID), '_METSRIGHTS',
> ''), 'rightsMD_', '')"/>
> <xsl:variable name="rights_declaration"
> select="../../../mets:amdSec/mets:rightsMD[@ID = concat('rightsMD_',
> $file_id,
> '_METSRIGHTS')]/mets:mdWrap/mets:xmlData/rights:RightsDeclarationMD"/>
> <xsl:variable name="rights_context"
> select="$rights_declaration/rights:Context"/>
> <xsl:if test="($rights_context/@CONTEXTCLASS = 'GENERAL PUBLIC') or not
> ($rights_context/rights:Permissions/@DISPLAY = 'true')">
>
> 4) on the very last line of the template (before </xsl:template>), add:
>
> </xsl:if>
>
>
>
> Regards,
> ~~helix84
>
> Compulsory reading: DSpace Mailing List Etiquette
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
--
Anna Goslen
Media Coordinator and Digital Initiatives Librarian
Swarthmore College Library
(610) 690-5733
[email protected]
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette