Skip to content
Snippets Groups Projects
Commit 5e26aa9c authored by Fernando Pietchaki Domingues's avatar Fernando Pietchaki Domingues
Browse files

Criado tema Participatorio, com base no tema Mirage

parent 46a260ab
Branches
No related tags found
No related merge requests found
Showing
with 3423 additions and 0 deletions
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>
\ No newline at end of file
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<!--
Modifications to the rendering of elements in the administrative aspect.
Author: art.lowel at atmire.com
Author: lieven.droogmans at atmire.com
Author: ben at atmire.com
-->
<xsl:stylesheet xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:mets="http://www.loc.gov/METS/"
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:mods="http://www.loc.gov/mods/v3"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="i18n dri mets xlink xsl dim xhtml mods dc">
<xsl:output indent="yes"/>
<!--Add the class 'tabbed' to the form for administrative pages containing tabs and wrap the tab content with a div with class 'pane',
the rest is just a copy of the default interactive div template-->
<xsl:template match="dri:div[contains(@rend, 'administrative') and dri:list[@rend = 'horizontal']]">
<xsl:apply-templates select="dri:head"/>
<xsl:apply-templates select="@pagination">
<xsl:with-param name="position">top</xsl:with-param>
</xsl:apply-templates>
<form>
<xsl:call-template name="standardAttributes">
<xsl:with-param name="class">ds-interactive-div tabbed</xsl:with-param>
</xsl:call-template>
<xsl:attribute name="action"><xsl:value-of select="@action"/></xsl:attribute>
<xsl:attribute name="method"><xsl:value-of select="@method"/></xsl:attribute>
<xsl:if test="@method='multipart'">
<xsl:attribute name="method">post</xsl:attribute>
<xsl:attribute name="enctype">multipart/form-data</xsl:attribute>
</xsl:if>
<xsl:attribute name="onsubmit">javascript:tSubmit(this);</xsl:attribute>
<!--For Item Submission process, disable ability to submit a form by pressing 'Enter'-->
<xsl:if test="starts-with(@n,'submit')">
<xsl:attribute name="onkeydown">javascript:return disableEnterKey(event);</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="dri:list[@rend = 'horizontal']"/>
<div class="pane">
<xsl:apply-templates select="*[not(name()='head' or @rend = 'horizontal')]"/>
</div>
</form>
<!-- JS to scroll form to DIV parent of "Add" button if jump-to -->
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='jumpTo']">
<script type="text/javascript">
<xsl:text>var button = document.getElementById('</xsl:text>
<xsl:value-of select="translate(@id,'.','_')"/>
<xsl:text>').elements['</xsl:text>
<xsl:value-of select="concat('submit_',/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='jumpTo'],'_add')"/>
<xsl:text>'];</xsl:text>
<xsl:text>
if (button != null) {
var n = button.parentNode;
for (; n != null; n = n.parentNode) {
if (n.tagName == 'DIV') {
n.scrollIntoView(false);
break;
}
}
}
</xsl:text>
</script>
</xsl:if>
<xsl:apply-templates select="@pagination">
<xsl:with-param name="position">bottom</xsl:with-param>
</xsl:apply-templates>
</xsl:template>
<!--the tabs are floating, so give the ul the class 'clearfix' to ensure it has a height-->
<xsl:template match="dri:div[contains(@rend, 'administrative')]/dri:list[@rend = 'horizontal']">
<xsl:apply-templates select="dri:head"/>
<ul>
<xsl:call-template name="standardAttributes">
<xsl:with-param name="class">ds-simple-list clearfix</xsl:with-param>
</xsl:call-template>
<xsl:apply-templates select="*[not(name()='head')]" mode="nested"/>
</ul>
</xsl:template>
<!--give the active tab the class 'active-tab'-->
<xsl:template match="dri:div[contains(@rend, 'administrative')]/dri:list[@rend = 'horizontal']/dri:item[dri:hi[@rend = 'bold']]" mode="nested">
<li class="active-tab">
<xsl:apply-templates />
</li>
</xsl:template>
<!--Template for the bitstream reordering-->
<xsl:template match="dri:cell[starts-with(@id, 'aspect.administrative.item.EditItemBitstreamsForm.cell.bitstream_order_')]" priority="2">
<td>
<xsl:call-template name="standardAttributes"/>
<xsl:apply-templates select="*[not(@type='button')]" />
<!--A div that will indicate the old & the new order-->
<div>
<span>
<!--Give this one an ID so that the javascript can change his value-->
<xsl:attribute name="id">
<xsl:value-of select="dri:field/@id"/>
<xsl:text>_new</xsl:text>
</xsl:attribute>
<xsl:value-of select="dri:field/dri:value"/>
</span>
<xsl:text> (</xsl:text>
<i18n:text>xmlui.administrative.item.EditItemBitstreamsForm.previous_order</i18n:text>
<xsl:value-of select="dri:field/dri:value"/>
<xsl:text>)</xsl:text>
</div>
</td>
<td>
<xsl:apply-templates select="dri:field[@type='button']"/>
</td>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<!--
Rendering of a list of collections (e.g. on a community homepage,
or on the community-list page)
Author: art.lowel at atmire.com
Author: lieven.droogmans at atmire.com
Author: ben at atmire.com
Author: Alexey Maslov
-->
<xsl:stylesheet
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:mets="http://www.loc.gov/METS/"
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:ore="http://www.openarchives.org/ore/terms/"
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:encoder="xalan://java.net.URLEncoder"
xmlns:util="org.dspace.app.xmlui.utils.XSLUtils"
xmlns:confman="org.dspace.core.ConfigurationManager"
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl util confman">
<xsl:output indent="yes"/>
<!-- A collection rendered in the summaryList pattern. Encountered on the community-list page -->
<xsl:template name="collectionSummaryList-DIM">
<xsl:variable name="data" select="./mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim"/>
<div class="artifact-description">
<div class="artifact-title">
<a href="{@OBJID}">
<span class="Z3988">
<xsl:choose>
<xsl:when test="string-length($data/dim:field[@element='title'][1]) &gt; 0">
<xsl:value-of select="$data/dim:field[@element='title'][1]"/>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
</xsl:otherwise>
</xsl:choose>
</span>
</a>
<!--Display community strengths (item counts) if they exist-->
<xsl:if test="string-length($data/dim:field[@element='format'][@qualifier='extent'][1]) &gt; 0">
<xsl:text> [</xsl:text>
<xsl:value-of select="$data/dim:field[@element='format'][@qualifier='extent'][1]"/>
<xsl:text>]</xsl:text>
</xsl:if>
</div>
<xsl:variable name="abstract" select="$data/dim:field[@element = 'description' and @qualifier='abstract']/node()"/>
<xsl:if test="$abstract and string-length($abstract[1]) &gt; 0">
<div class="artifact-info">
<span class="short-description">
<xsl:value-of select="util:shortenString($abstract, 220, 10)"/>
</span>
</div>
</xsl:if>
</div>
</xsl:template>
<!-- A collection rendered in the detailList pattern. Encountered on the item view page as
the "this item is part of these collections" list -->
<xsl:template name="collectionDetailList-DIM">
<xsl:variable name="data" select="./mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim"/>
<a href="{@OBJID}">
<xsl:choose>
<xsl:when test="string-length($data/dim:field[@element='title'][1]) &gt; 0">
<xsl:value-of select="$data/dim:field[@element='title'][1]"/>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
</xsl:otherwise>
</xsl:choose>
</a>
<!--Display collection strengths (item counts) if they exist-->
<xsl:if test="string-length($data/dim:field[@element='format'][@qualifier='extent'][1]) &gt; 0">
<xsl:text> [</xsl:text>
<xsl:value-of select="$data/dim:field[@element='format'][@qualifier='extent'][1]"/>
<xsl:text>]</xsl:text>
</xsl:if>
<br/>
<xsl:choose>
<xsl:when test="$data/dim:field[@element='description' and @qualifier='abstract']">
<xsl:copy-of select="$data/dim:field[@element='description' and @qualifier='abstract']/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$data/dim:field[@element='description'][1]/node()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<!--
Rendering of a list of communities (e.g. on a community homepage,
or on the community-list page)
Author: art.lowel at atmire.com
Author: lieven.droogmans at atmire.com
Author: ben at atmire.com
Author: Alexey Maslov
-->
<xsl:stylesheet
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:mets="http://www.loc.gov/METS/"
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:ore="http://www.openarchives.org/ore/terms/"
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:encoder="xalan://java.net.URLEncoder"
xmlns:util="org.dspace.app.xmlui.utils.XSLUtils"
xmlns:confman="org.dspace.core.ConfigurationManager"
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl util confman">
<xsl:output indent="yes"/>
<!-- A community rendered in the summaryList pattern. Encountered on the community-list and on
on the front page. -->
<xsl:template name="communitySummaryList-DIM">
<xsl:variable name="data" select="./mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim"/>
<div class="artifact-description">
<div class="artifact-title">
<a href="{@OBJID}">
<span class="Z3988">
<xsl:choose>
<xsl:when test="string-length($data/dim:field[@element='title'][1]) &gt; 0">
<xsl:value-of select="$data/dim:field[@element='title'][1]"/>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
</xsl:otherwise>
</xsl:choose>
</span>
</a>
<!--Display community strengths (item counts) if they exist-->
<xsl:if test="string-length($data/dim:field[@element='format'][@qualifier='extent'][1]) &gt; 0">
<xsl:text> [</xsl:text>
<xsl:value-of select="$data/dim:field[@element='format'][@qualifier='extent'][1]"/>
<xsl:text>]</xsl:text>
</xsl:if>
</div>
<xsl:variable name="abstract" select="$data/dim:field[@element = 'description' and @qualifier='abstract']/node()"/>
<xsl:if test="$abstract and string-length($abstract[1]) &gt; 0">
<div class="artifact-info">
<span class="short-description">
<xsl:value-of select="util:shortenString($abstract, 220, 10)"/>
</span>
</div>
</xsl:if>
</div>
</xsl:template>
<!-- A community rendered in the detailList pattern. Not currently used. -->
<xsl:template name="communityDetailList-DIM">
<xsl:variable name="data" select="./mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim"/>
<span class="bold">
<a href="{@OBJID}">
<xsl:choose>
<xsl:when test="string-length($data/dim:field[@element='title'][1]) &gt; 0">
<xsl:value-of select="$data/dim:field[@element='title'][1]"/>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
</xsl:otherwise>
</xsl:choose>
</a>
<!--Display community strengths (item counts) if they exist-->
<xsl:if test="string-length($data/dim:field[@element='format'][@qualifier='extent'][1]) &gt; 0">
<xsl:text> [</xsl:text>
<xsl:value-of select="$data/dim:field[@element='format'][@qualifier='extent'][1]"/>
<xsl:text>]</xsl:text>
</xsl:if>
<br/>
<xsl:choose>
<xsl:when test="$data/dim:field[@element='description' and @qualifier='abstract']">
<xsl:copy-of select="$data/dim:field[@element='description' and @qualifier='abstract']/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$data/dim:field[@element='description'][1]/node()"/>
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:template>
</xsl:stylesheet>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<!--
Rendering of a list of items (e.g. in a search or
browse results page)
Author: art.lowel at atmire.com
Author: lieven.droogmans at atmire.com
Author: ben at atmire.com
Author: Alexey Maslov
-->
<xsl:stylesheet
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:mets="http://www.loc.gov/METS/"
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:ore="http://www.openarchives.org/ore/terms/"
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:encoder="xalan://java.net.URLEncoder"
xmlns:util="org.dspace.app.xmlui.utils.XSLUtils"
xmlns:confman="org.dspace.core.ConfigurationManager"
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl util confman">
<xsl:output indent="yes"/>
<!--these templates are modfied to support the 2 different item list views that
can be configured with the property 'xmlui.theme.mirage.item-list.emphasis' in dspace.cfg-->
<xsl:template name="itemSummaryList-DIM">
<xsl:variable name="itemWithdrawn" select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim/@withdrawn" />
<xsl:variable name="href">
<xsl:choose>
<xsl:when test="$itemWithdrawn">
<xsl:value-of select="@OBJEDIT"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@OBJID"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="emphasis" select="confman:getProperty('xmlui.theme.mirage.item-list.emphasis')"/>
<xsl:choose>
<xsl:when test="'file' = $emphasis">
<div class="item-wrapper clearfix">
<xsl:apply-templates select="./mets:fileSec" mode="artifact-preview"><xsl:with-param name="href" select="$href"/></xsl:apply-templates>
<xsl:apply-templates select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim"
mode="itemSummaryList-DIM-file"><xsl:with-param name="href" select="$href"/></xsl:apply-templates>
</div>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim"
mode="itemSummaryList-DIM-metadata"><xsl:with-param name="href" select="$href"/></xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--handles the rendering of a single item in a list in file mode-->
<xsl:template match="dim:dim" mode="itemSummaryList-DIM-file">
<xsl:param name="href"/>
<xsl:variable name="metadataWidth" select="675 - $thumbnail.maxwidth - 30"/>
<div class="item-metadata" style="width: {$metadataWidth}px;">
<span class="bold"><i18n:text>xmlui.dri2xhtml.pioneer.title</i18n:text><xsl:text>:</xsl:text></span>
<span class="content" style="width: {$metadataWidth - 110}px;">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="$href"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="dim:field[@element='title']">
<xsl:value-of select="dim:field[@element='title'][1]/node()"/>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</span>
<span class="Z3988">
<xsl:attribute name="title">
<xsl:call-template name="renderCOinS"/>
</xsl:attribute>
&#xFEFF; <!-- non-breaking space to force separating the end tag -->
</span>
<span class="bold"><i18n:text>xmlui.dri2xhtml.pioneer.author</i18n:text><xsl:text>:</xsl:text></span>
<span class="content" style="width: {$metadataWidth - 110}px;">
<xsl:choose>
<xsl:when test="dim:field[@element='contributor'][@qualifier='author']">
<xsl:for-each select="dim:field[@element='contributor'][@qualifier='author']">
<span>
<xsl:if test="@authority">
<xsl:attribute name="class">
<xsl:text>ds-dc_contributor_author-authority</xsl:text>
</xsl:attribute>
</xsl:if>
<xsl:copy-of select="node()"/>
</span>
<xsl:if test="count(following-sibling::dim:field[@element='contributor'][@qualifier='author']) != 0">
<xsl:text>; </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="dim:field[@element='creator']">
<xsl:for-each select="dim:field[@element='creator']">
<xsl:copy-of select="node()"/>
<xsl:if test="count(following-sibling::dim:field[@element='creator']) != 0">
<xsl:text>; </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="dim:field[@element='contributor']">
<xsl:for-each select="dim:field[@element='contributor']">
<xsl:copy-of select="node()"/>
<xsl:if test="count(following-sibling::dim:field[@element='contributor']) != 0">
<xsl:text>; </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-author</i18n:text>
</xsl:otherwise>
</xsl:choose>
</span>
<xsl:if test="dim:field[@element='date' and @qualifier='issued'] or dim:field[@element='publisher']">
<span class="bold"><i18n:text>xmlui.dri2xhtml.pioneer.date</i18n:text><xsl:text>:</xsl:text></span>
<span class="content" style="width: {$metadataWidth - 110}px;">
<xsl:value-of
select="substring(dim:field[@element='date' and @qualifier='issued']/node(),1,10)"/>
</span>
</xsl:if>
</div>
</xsl:template>
<!--handles the rendering of a single item in a list in metadata mode-->
<xsl:template match="dim:dim" mode="itemSummaryList-DIM-metadata">
<xsl:param name="href"/>
<div class="artifact-description">
<div class="artifact-title">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="$href"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="dim:field[@element='title']">
<xsl:value-of select="dim:field[@element='title'][1]/node()"/>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<span class="Z3988">
<xsl:attribute name="title">
<xsl:call-template name="renderCOinS"/>
</xsl:attribute>
&#xFEFF; <!-- non-breaking space to force separating the end tag -->
</span>
</div>
<div class="artifact-info">
<span class="author">
<xsl:choose>
<xsl:when test="dim:field[@element='contributor'][@qualifier='author']">
<xsl:for-each select="dim:field[@element='contributor'][@qualifier='author']">
<span>
<xsl:if test="@authority">
<xsl:attribute name="class"><xsl:text>ds-dc_contributor_author-authority</xsl:text></xsl:attribute>
</xsl:if>
<xsl:copy-of select="node()"/>
</span>
<xsl:if test="count(following-sibling::dim:field[@element='contributor'][@qualifier='author']) != 0">
<xsl:text>; </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="dim:field[@element='creator']">
<xsl:for-each select="dim:field[@element='creator']">
<xsl:copy-of select="node()"/>
<xsl:if test="count(following-sibling::dim:field[@element='creator']) != 0">
<xsl:text>; </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="dim:field[@element='contributor']">
<xsl:for-each select="dim:field[@element='contributor']">
<xsl:copy-of select="node()"/>
<xsl:if test="count(following-sibling::dim:field[@element='contributor']) != 0">
<xsl:text>; </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-author</i18n:text>
</xsl:otherwise>
</xsl:choose>
</span>
<xsl:text> </xsl:text>
<xsl:if test="dim:field[@element='date' and @qualifier='issued'] or dim:field[@element='publisher']">
<span class="publisher-date">
<xsl:text>(</xsl:text>
<xsl:if test="dim:field[@element='publisher']">
<span class="publisher">
<xsl:copy-of select="dim:field[@element='publisher']/node()"/>
</span>
<xsl:text>, </xsl:text>
</xsl:if>
<span class="date">
<xsl:value-of select="substring(dim:field[@element='date' and @qualifier='issued']/node(),1,10)"/>
</span>
<xsl:text>)</xsl:text>
</span>
</xsl:if>
</div>
<xsl:if test="dim:field[@element = 'description' and @qualifier='abstract']">
<xsl:variable name="abstract" select="dim:field[@element = 'description' and @qualifier='abstract']/node()"/>
<div class="artifact-abstract">
<xsl:value-of select="util:shortenString($abstract, 220, 10)"/>
</div>
</xsl:if>
</div>
</xsl:template>
<xsl:template name="itemDetailList-DIM">
<xsl:call-template name="itemSummaryList-DIM"/>
</xsl:template>
<xsl:template match="mets:fileSec" mode="artifact-preview">
<xsl:param name="href"/>
<div class="thumbnail-wrapper">
<div class="artifact-preview">
<a class="image-link" href="{$href}">
<xsl:choose>
<xsl:when test="mets:fileGrp[@USE='THUMBNAIL']">
<img alt="Thumbnail">
<xsl:attribute name="src">
<xsl:value-of
select="mets:fileGrp[@USE='THUMBNAIL']/mets:file/mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<img alt="Icon" src="{concat($theme-path, '/images/mime.png')}" style="height: {$thumbnail.maxheight}px;"/>
</xsl:otherwise>
</xsl:choose>
</a>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<!--
Templates to cover the attribute calls.
Author: art.lowel at atmire.com
Author: lieven.droogmans at atmire.com
Author: ben at atmire.com
Author: Alexey Maslov
-->
<xsl:stylesheet xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:mets="http://www.loc.gov/METS/"
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:mods="http://www.loc.gov/mods/v3"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="i18n dri mets xlink xsl dim xhtml mods dc">
<xsl:output indent="yes"/>
<xsl:template match="@pagination">
<xsl:param name="position"/>
<xsl:choose>
<xsl:when test=". = 'simple'">
<div class="pagination clearfix {$position}">
<p class="pagination-info">
<i18n:translate>
<xsl:choose>
<xsl:when test="parent::node()/@itemsTotal = -1">
<i18n:text>xmlui.dri2xhtml.structural.pagination-info.nototal</i18n:text>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.structural.pagination-info</i18n:text>
</xsl:otherwise>
</xsl:choose>
<i18n:param><xsl:value-of select="parent::node()/@firstItemIndex"/></i18n:param>
<i18n:param><xsl:value-of select="parent::node()/@lastItemIndex"/></i18n:param>
<i18n:param><xsl:value-of select="parent::node()/@itemsTotal"/></i18n:param>
</i18n:translate>
<!--
<xsl:text>Now showing items </xsl:text>
<xsl:value-of select="parent::node()/@firstItemIndex"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="parent::node()/@lastItemIndex"/>
<xsl:text> of </xsl:text>
<xsl:value-of select="parent::node()/@itemsTotal"/>
-->
</p>
<ul class="pagination-links">
<li>
<xsl:if test="parent::node()/@previousPage">
<a class="previous-page-link">
<xsl:attribute name="href">
<xsl:value-of select="parent::node()/@previousPage"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.pagination-previous</i18n:text>
</a>
</xsl:if>
</li>
<li>
<xsl:if test="parent::node()/@nextPage">
<a class="next-page-link">
<xsl:attribute name="href">
<xsl:value-of select="parent::node()/@nextPage"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.pagination-next</i18n:text>
</a>
</xsl:if>
</li>
</ul>
</div>
</xsl:when>
<xsl:when test=". = 'masked'">
<div class="pagination-masked clearfix {$position}">
<p class="pagination-info">
<i18n:translate>
<xsl:choose>
<xsl:when test="parent::node()/@itemsTotal = -1">
<i18n:text>xmlui.dri2xhtml.structural.pagination-info.nototal</i18n:text>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.structural.pagination-info</i18n:text>
</xsl:otherwise>
</xsl:choose>
<i18n:param><xsl:value-of select="parent::node()/@firstItemIndex"/></i18n:param>
<i18n:param><xsl:value-of select="parent::node()/@lastItemIndex"/></i18n:param>
<i18n:param><xsl:value-of select="parent::node()/@itemsTotal"/></i18n:param>
</i18n:translate>
</p>
<ul class="pagination-links">
<xsl:if test="not(parent::node()/@firstItemIndex = 0 or parent::node()/@firstItemIndex = 1)">
<li>
<a class="previous-page-link">
<xsl:attribute name="href">
<xsl:value-of
select="substring-before(parent::node()/@pageURLMask,'{pageNum}')"/>
<xsl:value-of select="parent::node()/@currentPage - 1"/>
<xsl:value-of
select="substring-after(parent::node()/@pageURLMask,'{pageNum}')"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.pagination-previous</i18n:text>
</a>
</li>
</xsl:if>
<xsl:if test="(parent::node()/@currentPage - 4) &gt; 0">
<li class="first-page-link">
<a>
<xsl:attribute name="href">
<xsl:value-of select="substring-before(parent::node()/@pageURLMask,'{pageNum}')"/>
<xsl:text>1</xsl:text>
<xsl:value-of select="substring-after(parent::node()/@pageURLMask,'{pageNum}')"/>
</xsl:attribute>
<xsl:text>1</xsl:text>
</a>
<xsl:text> . . . </xsl:text>
</li>
</xsl:if>
<xsl:call-template name="offset-link">
<xsl:with-param name="pageOffset">-3</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="offset-link">
<xsl:with-param name="pageOffset">-2</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="offset-link">
<xsl:with-param name="pageOffset">-1</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="offset-link">
<xsl:with-param name="pageOffset">0</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="offset-link">
<xsl:with-param name="pageOffset">1</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="offset-link">
<xsl:with-param name="pageOffset">2</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="offset-link">
<xsl:with-param name="pageOffset">3</xsl:with-param>
</xsl:call-template>
<xsl:if test="(parent::node()/@currentPage + 4) &lt;= (parent::node()/@pagesTotal)">
<li>
<xsl:text>. . .</xsl:text>
</li>
<li class="last-page-link">
<a>
<xsl:attribute name="href">
<xsl:value-of select="substring-before(parent::node()/@pageURLMask,'{pageNum}')"/>
<xsl:value-of select="parent::node()/@pagesTotal"/>
<xsl:value-of select="substring-after(parent::node()/@pageURLMask,'{pageNum}')"/>
</xsl:attribute>
<xsl:value-of select="parent::node()/@pagesTotal"/>
</a>
</li>
</xsl:if>
<xsl:if test="not(parent::node()/@lastItemIndex = parent::node()/@itemsTotal)">
<li>
<a class="next-page-link">
<xsl:attribute name="href">
<xsl:value-of
select="substring-before(parent::node()/@pageURLMask,'{pageNum}')"/>
<xsl:value-of select="parent::node()/@currentPage + 1"/>
<xsl:value-of
select="substring-after(parent::node()/@pageURLMask,'{pageNum}')"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.pagination-next</i18n:text>
</a>
</li>
</xsl:if>
</ul>
<xsl:if test="parent::node()/dri:div[@n = 'masked-page-control']">
<xsl:apply-templates select="parent::node()/dri:div[@n='masked-page-control']/dri:div">
<xsl:with-param name="position" select="$position"/>
</xsl:apply-templates>
</xsl:if>
</div>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="dri:div[@n = 'masked-page-control']">
<!--Do not render this division, this is handled by the xsl-->
</xsl:template>
<xsl:template match="dri:div[@n ='search-controls-gear']">
<xsl:param name="position"/>
<div>
<xsl:call-template name="standardAttributes">
<xsl:with-param name="class"><xsl:value-of select="$position"/></xsl:with-param>
</xsl:call-template>
<xsl:apply-templates/>
</div>
</xsl:template>
</xsl:stylesheet>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<!--
Templates to cover the common dri elements.
Author: art.lowel at atmire.com
Author: lieven.droogmans at atmire.com
Author: ben at atmire.com
Author: Alexey Maslov
-->
<xsl:stylesheet xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:mets="http://www.loc.gov/METS/"
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:mods="http://www.loc.gov/mods/v3"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="i18n dri mets xlink xsl dim xhtml mods dc">
<xsl:output indent="yes"/>
<!--Removed the automatic font sizing for headers, because while I liked the idea,
in practice it's too unpredictable.
Also made all head's follow the same rule: count the number of ancestors that have
a head, that's the number after the 'h' in the tagname-->
<xsl:template name="renderHead">
<xsl:param name="class"/>
<xsl:variable name="head_count" select="count(ancestor::dri:*[dri:head])"/>
<xsl:element name="h{$head_count}">
<xsl:call-template name="standardAttributes">
<xsl:with-param name="class" select="$class"/>
</xsl:call-template>
<xsl:apply-templates />
</xsl:element>
</xsl:template>
<xsl:template match="dri:div/dri:head" priority="3">
<xsl:call-template name="renderHead">
<xsl:with-param name="class">ds-div-head</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- The second case is the header on tables, which always creates an HTML h3 element -->
<xsl:template match="dri:table/dri:head" priority="2">
<xsl:call-template name="renderHead">
<xsl:with-param name="class">ds-table-head</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- The third case is the header on lists, which creates an HTML h3 element for top level lists and
and h4 elements for all sublists. -->
<xsl:template match="dri:list/dri:head" priority="2" mode="nested">
<xsl:call-template name="renderHead">
<xsl:with-param name="class">ds-list-head</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="dri:list/dri:list/dri:head" priority="3" mode="nested">
<xsl:call-template name="renderHead">
<xsl:with-param name="class">ds-sublist-head</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="dri:referenceSet/dri:head" priority="2">
<xsl:call-template name="renderHead">
<xsl:with-param name="class">ds-list-head</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="dri:options/dri:list/dri:head" priority="3">
<xsl:call-template name="renderHead">
<xsl:with-param name="class">ds-option-set-head</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="dri:head" priority="1">
<xsl:call-template name="renderHead">
<xsl:with-param name="class">ds-head</xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment