Skip to content

Commit

Permalink
IM-154 add decimal format on response page
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrebs committed Oct 18, 2024
1 parent e3bde01 commit bf36599
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ubo-common/src/main/resources/xsl/response-facets.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<xsl:param name="RequestURL" />
<xsl:param name="ServletsBaseURL" />

<xsl:decimal-format name="WesternEurope" decimal-separator="," grouping-separator="."/>

<xsl:variable name="maxFacetValuesDisplayed">5</xsl:variable>
<xsl:variable name="quotes">"</xsl:variable>
<xsl:variable name="fq_not">-</xsl:variable>
Expand Down Expand Up @@ -193,7 +195,7 @@
<xsl:attribute name="style">display:none;</xsl:attribute>
</xsl:if>
<span class="mycore-facet-count">
<xsl:value-of select="text()" />
<xsl:value-of select="format-number(text(), '##.###', 'WesternEurope')" />
</span>
<xsl:variable name="fq" select="encoder:encode(concat(../@name,':', $quotes, solrUtil:escapeSearchValue(@name), $quotes), 'UTF-8')" />
<xsl:variable name="facet-human-readable">
Expand Down
4 changes: 3 additions & 1 deletion ubo-common/src/main/resources/xsl/response.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<xsl:param name="MCR.ORCID2.OAuth.ClientSecret" select="''" />
<xsl:param name="MCR.ORCID2.OAuth.Scope" select="''" />

<xsl:decimal-format name="WesternEurope" decimal-separator="," grouping-separator="."/>

<!-- ==================== Trefferliste Metadaten ==================== -->

<xsl:variable name="numFound" select="/response/result[@name='response']/@numFound" />
Expand Down Expand Up @@ -60,7 +62,7 @@
<xsl:text>: </xsl:text>
<xsl:choose>
<xsl:when test="$numFound > 1">
<xsl:value-of select="$numFound" />
<xsl:value-of select="format-number($numFound, '##.###', 'WesternEurope')" />
<xsl:text> </xsl:text>
<xsl:value-of select="i18n:translate('result.dozbib.publicationMany')"/>
</xsl:when>
Expand Down

0 comments on commit bf36599

Please sign in to comment.