mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 13:03:11 +00:00
DS-820: SFX button + SFX in Mirage
This commit is contained in:
@@ -221,9 +221,14 @@
|
|||||||
<%
|
<%
|
||||||
if (ConfigurationManager.getProperty("sfx.server.url") != null)
|
if (ConfigurationManager.getProperty("sfx.server.url") != null)
|
||||||
{
|
{
|
||||||
|
String sfximage = ConfigurationManager.getProperty("sfx.server.image_url");
|
||||||
|
if (sfximage == null)
|
||||||
|
{
|
||||||
|
sfximage = request.getContextPath() + "/image/sfx-link.gif";
|
||||||
|
}
|
||||||
%>
|
%>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="<dspace:sfxlink item="<%= item %>"/>" /><img src="<%= request.getContextPath() %>/image/sfx-link.gif" border="0" alt="SFX Query" /></a>
|
<a href="<dspace:sfxlink item="<%= item %>"/>" /><img src="<%= sfximage %>" border="0" alt="SFX Query" /></a>
|
||||||
</p>
|
</p>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
|
@@ -185,6 +185,12 @@ public class ItemViewer extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
sfxserverUrl = sfxserverUrl.trim() +"&" + sfxQuery.trim();
|
sfxserverUrl = sfxserverUrl.trim() +"&" + sfxQuery.trim();
|
||||||
pageMeta.addMetadata("sfx","server").addContent(sfxserverUrl);
|
pageMeta.addMetadata("sfx","server").addContent(sfxserverUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String sfxserverImg = ConfigurationManager.getProperty("sfx.server.image_url");
|
||||||
|
if (sfxserverImg != null && sfxserverImg.length() > 0)
|
||||||
|
{
|
||||||
|
pageMeta.addMetadata("sfx","image_url").addContent(sfxserverImg);
|
||||||
|
}
|
||||||
|
|
||||||
boolean googleEnabled = ConfigurationManager.getBooleanProperty(
|
boolean googleEnabled = ConfigurationManager.getBooleanProperty(
|
||||||
"google-metadata.enable", false);
|
"google-metadata.enable", false);
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
<xsl:apply-templates select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim"
|
<xsl:apply-templates select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim"
|
||||||
mode="itemSummaryView-DIM"/>
|
mode="itemSummaryView-DIM"/>
|
||||||
|
|
||||||
|
<xsl:copy-of select="$SFXLink" />
|
||||||
<!-- Generate the bitstream information from the file section -->
|
<!-- Generate the bitstream information from the file section -->
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="./mets:fileSec/mets:fileGrp[@USE='CONTENT' or @USE='ORIGINAL']">
|
<xsl:when test="./mets:fileSec/mets:fileGrp[@USE='CONTENT' or @USE='ORIGINAL']">
|
||||||
@@ -316,6 +317,7 @@
|
|||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
 <!-- non-breaking space to force separating the end tag -->
|
 <!-- non-breaking space to force separating the end tag -->
|
||||||
</span>
|
</span>
|
||||||
|
<xsl:copy-of select="$SFXLink" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="dim:field" mode="itemDetailView-DIM">
|
<xsl:template match="dim:field" mode="itemDetailView-DIM">
|
||||||
|
@@ -547,4 +547,34 @@
|
|||||||
<xsl:template match="dri:objectMeta" />
|
<xsl:template match="dri:objectMeta" />
|
||||||
<xsl:template match="dri:repositoryMeta" />
|
<xsl:template match="dri:repositoryMeta" />
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This variable contains a link to SFX or a SFX button (link with an image).
|
||||||
|
Relies on sfx.server.url and sfx.server.image_url in the config file, which are transferred in dri:pageMeta.
|
||||||
|
-->
|
||||||
|
<xsl:variable name="SFXLink">
|
||||||
|
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='server']">
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='server']"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='image_url']">
|
||||||
|
<img>
|
||||||
|
<xsl:attribute name="src">
|
||||||
|
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='image_url']"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="alt">
|
||||||
|
<xsl:text>Find Full text</xsl:text>
|
||||||
|
</xsl:attribute>
|
||||||
|
</img>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>Find Full text</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</a>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
@@ -568,17 +568,39 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
||||||
|
|
||||||
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='server']">
|
<xsl:copy-of select="$SFXLink"/>
|
||||||
<a>
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='server']"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:text>Find Full text</xsl:text>
|
|
||||||
</a>
|
|
||||||
</xsl:if>
|
|
||||||
</div>
|
</div>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This variable contains a link to SFX or a SFX button (link with an image).
|
||||||
|
Relies on sfx.server.url and sfx.server.image_url in the config file, which are transferred in dri:pageMeta.
|
||||||
|
-->
|
||||||
|
<xsl:variable name="SFXLink">
|
||||||
|
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='server']">
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='server']"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='image_url']">
|
||||||
|
<img>
|
||||||
|
<xsl:attribute name="src">
|
||||||
|
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='sfx'][@qualifier='image_url']"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="alt">
|
||||||
|
<xsl:text>Find Full text</xsl:text>
|
||||||
|
</xsl:attribute>
|
||||||
|
</img>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>Find Full text</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</a>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The template to handle dri:options. Since it contains only dri:list tags (which carry the actual
|
The template to handle dri:options. Since it contains only dri:list tags (which carry the actual
|
||||||
information), the only things than need to be done is creating the ds-options div and applying
|
information), the only things than need to be done is creating the ds-options div and applying
|
||||||
|
@@ -1528,6 +1528,10 @@ itemmap.author.index = author
|
|||||||
# omitted, SFX support is switched off.
|
# omitted, SFX support is switched off.
|
||||||
# sfx.server.url = http://sfx.myu.edu:8888/sfx?
|
# sfx.server.url = http://sfx.myu.edu:8888/sfx?
|
||||||
|
|
||||||
|
# This image will be displayed in the SFX link. If commented out, the SFX link will be only a text link.
|
||||||
|
# This customization usually contains an institution-branded SFX button.
|
||||||
|
# sfx.server.image_url = http://sfx.my.edu:8888/sfx.gif
|
||||||
|
|
||||||
|
|
||||||
#### Item Recommendation Settings #####
|
#### Item Recommendation Settings #####
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user