Skip to content

Commit

Permalink
UBO-342-FSU040THUL-3861 Fixed non scrolling facet values (#402)
Browse files Browse the repository at this point in the history
* UBO-342-FSU040THUL-3861 Fixed non scrolling facet values

* UBO-342-FSU040THUL-3861 Simplified template name="output.facet.value"
  • Loading branch information
Possommi authored Jul 9, 2024
1 parent 35c139c commit c49abbc
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions ubo-common/src/main/resources/xsl/response-facets.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,24 @@
</a>
<a class="mycore-facet-add" href="{$baseURL}{$fq}" title="{$title-include-facet-value}">
<span class="mycore-facet-value">
<xsl:value-of select="$facet-value"/>
<span>
<xsl:if test="string-length($facet-value) &gt; 20">
<xsl:attribute name="class">scroll-on-hover</xsl:attribute>
</xsl:if>
<xsl:value-of select="$facet-value"/>
</span>
</span>
</a>
</xsl:when>
<xsl:otherwise>
<span class="mycore-facet-exclude" />
<span class="mycore-facet-value">
<xsl:value-of select="$facet-value"/>
<span>
<xsl:if test="string-length($facet-value) &gt; 20">
<xsl:attribute name="class">scroll-on-hover</xsl:attribute>
</xsl:if>
<xsl:value-of select="$facet-value"/>
</span>
</span>
</xsl:otherwise>
</xsl:choose>
Expand Down Expand Up @@ -306,23 +316,15 @@
</xsl:if>
</xsl:variable>

<span>
<xsl:choose>
<xsl:when test="string-length($label) ">
<xsl:if test="string-length($label) &gt; 20">
<xsl:attribute name="class">scroll-on-hover</xsl:attribute>
</xsl:if>
<xsl:when test="string-length($label) &gt; 0">
<xsl:value-of select="$label"/>
</xsl:when>
<xsl:when test="$label">
<xsl:if test="string-length($fallback-label) &gt; 20">
<xsl:attribute name="class">scroll-on-hover</xsl:attribute>
</xsl:if>
<xsl:when test="string-length($fallback-label) &gt; 0">
<xsl:value-of select="$fallback-label"/>
</xsl:when>
</xsl:choose>
</span>
</xsl:template>
</xsl:template>

<xsl:template name="get-facet-name">
<xsl:param name="facetName"/>
Expand Down

0 comments on commit c49abbc

Please sign in to comment.