Changeset 36819


Ignore:
Timestamp:
2022-10-16T23:13:03+13:00 (19 months ago)
Author:
davidb
Message:

Changed with the way that renderWave=1 is added to gsf:link. Essentially it is to define a new version of the gsf-expand rule, which factors out parts not needed, but adds in the extra argument we need to the href that is formed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/mars/trunk/sites/mars/collect/amc-essentia/etc/collectionConfig.xml

    r34812 r36819  
    125125        </classifier>
    126126        <format>
     127         
     128          <xsl:template name="gsf-link-render-wave">
     129            <xsl:variable name="collNameLocal" select="/page/pageResponse/collection/@name"/>
     130            <xsl:variable name="opt-title">                 
     131              <xsl:choose>
     132            <xsl:when test="@title">
     133              <xsl:attribute name="title">
     134                <xsl:value-of select="@title"/>
     135              </xsl:attribute>
     136            </xsl:when>
     137            <xsl:when test="@titlekey">
     138              <xsl:attribute name="title">
     139                <xsl:value-of disable-output-escaping="yes" select="util:getCollectionText($collNameLocal, $site_name, /page/@lang, '{@titlekey}')"/>
     140              </xsl:attribute>
     141            </xsl:when>
     142              </xsl:choose>
     143            </xsl:variable>
     144           
     145            <a>
     146            <xsl:if test="@target">
     147              <xsl:attribute name='target'>
     148            <xsl:value-of select='@target'/>
     149              </xsl:attribute>   
     150            </xsl:if>
     151           
     152           
     153            <xsl:copy-of select="$opt-title"/>
     154            <xsl:attribute name="href">
     155              <xsl:value-of select='$library_name'/>
     156              <xsl:text>/collection/</xsl:text>
     157              <xsl:value-of select='/page/pageResponse/collection/@name'/>
     158              <xsl:text>/document/</xsl:text>
     159              <xsl:choose>
     160            <xsl:when test="@OID">
     161              <xsl:value-of select="@OID"/>
     162            </xsl:when>
     163            <xsl:when test="@OIDmetadata">
     164              <xsl:variable name="OIDmeta" select="@OIDmetadata"/>
     165              <xsl:value-of select="(.//metadataList)[last()]/metadata[@name='{$OIDmeta}']"/>
     166            </xsl:when>
     167            <xsl:otherwise>
     168              <xsl:value-of select='@nodeID'/>
     169            </xsl:otherwise>
     170              </xsl:choose>
     171              <xsl:text>?renderWave=1</xsl:text>
     172            </xsl:attribute>           
     173            [Traditional Wave Display]
     174            </a>
     175          </xsl:template>
     176
    127177            <gsf:template match="documentNode">
    128178                <td valign="top">
     
    152202
    153203                    <gsf:space />
    154                     <span id="renderWave">
     204                    <!--
     205                     <gsf:variable name="AssocEssentiaJSON"><gsf:OID/>-AssocEssentia.json</gsf:variable>
     206                     <a download="{$AssocEssentiaJSON}" href="{$httpCollection}/index/assoc/{$assocFilePath}/{$AssocEssentiaJSON}">Download Audio Features</a>
     207                    -->
     208
     209                    <xsl:call-template name="gsf-link-render-wave"/>
     210
     211                    <!--
     212                    <span id="renderWave">                   
    155213                      <gsf:link type="document">[Traditional Wave Display]</gsf:link>
    156214                    </span>
    157215
     216                   
    158217                    <gsf:script>
    159218                      var $alink = $('#renderWave a');
     
    165224                    </gsf:script>
    166225
     226                    -->
     227                   
    167228                </td>
    168229            </gsf:template>
Note: See TracChangeset for help on using the changeset viewer.