Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IM-154 add decimal format on response page #424

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading