Skip to content

Commit

Permalink
Rendring DOIs if present, if not rendering URIs if present. New messa…
Browse files Browse the repository at this point in the history
…ge string for DOIs.
  • Loading branch information
jcreel committed Mar 3, 2017
1 parent 3f2dd53 commit 71805c1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,25 +284,46 @@
</div>
</xsl:template>

<!-- TAMU CUstomization - Preferentially show DOIs over URIs if they are present -->
<xsl:template name="itemSummaryView-DIM-URI">
<xsl:if test="dim:field[@element='identifier' and @qualifier='uri' and descendant::text()]">
<div class="simple-item-view-uri item-page-field-wrapper table">
<h5><i18n:text>xmlui.dri2xhtml.METS-1.0.item-uri</i18n:text></h5>
<span>
<xsl:for-each select="dim:field[@element='identifier' and @qualifier='uri']">
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="dim:field[@element='identifier' and @qualifier='doi' and descendant::text()]">
<div class="simple-item-view-uri item-page-field-wrapper table">
<h5><i18n:text>xmlui.dri2xhtml.METS-1.0.item-doi</i18n:text></h5>
<span>
<xsl:for-each select="dim:field[@element='identifier' and @qualifier='doi']">
<a>
<xsl:attribute name="href">
<xsl:copy-of select="./node()"/>
</xsl:attribute>
<xsl:copy-of select="./node()"/>
</xsl:attribute>
<xsl:copy-of select="./node()"/>
</a>
<xsl:if test="count(following-sibling::dim:field[@element='identifier' and @qualifier='uri']) != 0">
<br/>
</xsl:if>
</xsl:for-each>
</span>
</div>
</xsl:if>
</a>
<xsl:if test="count(following-sibling::dim:field[@element='identifier' and @qualifier='doi']) != 0">
<br/>
</xsl:if>
</xsl:for-each>
</span>
</div>
</xsl:when>
<xsl:otherwise>
<div class="simple-item-view-uri item-page-field-wrapper table">
<h5><i18n:text>xmlui.dri2xhtml.METS-1.0.item-uri</i18n:text></h5>
<span>
<xsl:for-each select="dim:field[@element='identifier' and @qualifier='uri']">
<a>
<xsl:attribute name="href">
<xsl:copy-of select="./node()"/>
</xsl:attribute>
<xsl:copy-of select="./node()"/>
</a>
<xsl:if test="count(following-sibling::dim:field[@element='identifier' and @qualifier='uri']) != 0">
<br/>
</xsl:if>
</xsl:for-each>
</span>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- TAMU CUstomization -->
Expand Down
2 changes: 2 additions & 0 deletions dspace/modules/xmlui/src/main/webapp/i18n/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2239,6 +2239,8 @@
<message key="xmlui.dri2xhtml.METS-1.0.item-abstract">Abstract</message>
<message key="xmlui.dri2xhtml.METS-1.0.item-description">Description</message>
<message key="xmlui.dri2xhtml.METS-1.0.item-uri">URI</message>
<!-- TAMU Customization -->
<message key="xmlui.dri2xhtml.METS-1.0.item-doi">DOI</message>
<message key="xmlui.dri2xhtml.METS-1.0.item-date">Date</message>
<message key="xmlui.dri2xhtml.METS-1.0.item-publisher">Publisher</message>
<message key="xmlui.dri2xhtml.METS-1.0.item-subject">Subject</message>
Expand Down

0 comments on commit 71805c1

Please sign in to comment.