New Book Lists: Final correction to title links
authorTerran McCanna <tmccanna@georgialibraries.org>
Wed, 18 Jan 2017 16:06:15 +0000 (11:06 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 26 May 2017 13:24:09 +0000 (09:24 -0400)
This was already applied to production during the upgrade process -
adding to GIT here for future reference.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Conflicts:
Open-ILS/xsl/ATOM2XHTML.xsl

Open-ILS/xsl/ATOM2XHTML.xsl

index c36813d..66ff174 100644 (file)
@@ -338,7 +338,20 @@ To-do list:
     
 
        <xsl:template match="atom:entry | item | //rss1:item | //rss9:item"> <!-- match="" must match the select="" earlier on -->
-               <xsl:variable name="url"><xsl:call-template name="resolvelink"><xsl:with-param name="url" select="(atom:link[not(@rel) or @rel='alternate' or @rel='']/@href | link | guid[@isPermaLink='true'] | rss1:link | rss9:link)[1]" /></xsl:call-template></xsl:variable>
+               <!-- PINES - create url instead of using one brought in 
+            <xsl:variable name="url"><xsl:call-template name="resolvelink"><xsl:with-param name="url" select="(atom:link[not(@rel) or @rel='alternate' or @rel='']/@href | link | guid[@isPermaLink='true'] | rss1:link | rss9:link)[1]" /></xsl:call-template></xsl:variable>
+        -->
+        <xsl:variable name="url">
+            <xsl:variable name="tcnraw"><xsl:value-of select="substring-after(.,'TCN:')"/></xsl:variable>
+            <xsl:choose>
+                <xsl:when test="contains($tcnraw, '&#10;')">
+                    <xsl:value-of select="concat('/eg/opac/record/', substring-before($tcnraw,'&#10;'))" />
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="concat('/eg/opac/record/', $tcnraw)" />
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
                <!-- item title -->
                <dt>
             <span class="booktitle">