From 11147d7146652a2b965b15dc66e9e894701570c2 Mon Sep 17 00:00:00 2001 From: Nicolas Karrer <nkarrer@snowflake.ch> Date: Fri, 18 Jul 2014 10:26:56 -0400 Subject: [PATCH] Localization support for number-formats --- languages/de.ini | 2 + languages/en.ini | 2 + .../View/Helper/Root/LocalizedNumber.php | 86 +++++++++++++++++++ .../templates/Recommend/SideFacets.phtml | 2 +- .../templates/Recommend/TopFacets.phtml | 2 +- .../templates/RecordTab/collectionlist.phtml | 4 +- .../templates/admin/statistics/home.phtml | 12 +-- themes/blueprint/templates/browse/home.phtml | 6 +- .../blueprint/templates/collection/view.phtml | 2 +- .../templates/combined/results-list.phtml | 6 +- .../templates/myresearch/mylist.phtml | 4 +- themes/blueprint/templates/record/view.phtml | 2 +- .../templates/search/history-table.phtml | 2 +- .../templates/search/reservessearch.phtml | 8 +- .../blueprint/templates/search/results.phtml | 6 +- .../templates/Recommend/SideFacets.phtml | 4 +- .../templates/Recommend/TopFacets.phtml | 2 +- .../templates/RecordTab/collectionlist.phtml | 4 +- .../templates/admin/statistics/home.phtml | 12 +-- themes/bootstrap/templates/browse/home.phtml | 6 +- .../bootstrap/templates/collection/view.phtml | 2 +- .../templates/combined/results-list.phtml | 6 +- .../templates/myresearch/mylist.phtml | 4 +- themes/bootstrap/templates/record/view.phtml | 2 +- .../templates/search/history-table.phtml | 2 +- .../templates/search/reservessearch.phtml | 8 +- .../bootstrap/templates/search/results.phtml | 6 +- .../templates/Recommend/SideFacets.phtml | 2 +- .../templates/Recommend/TopFacets.phtml | 2 +- .../templates/RecordTab/collectionlist.phtml | 4 +- .../templates/admin/statistics/home.phtml | 12 +-- themes/bootstrap3/templates/browse/home.phtml | 6 +- .../templates/collection/view.phtml | 2 +- .../templates/combined/results-list.phtml | 6 +- .../templates/myresearch/mylist.phtml | 4 +- themes/bootstrap3/templates/record/view.phtml | 2 +- .../templates/search/history-table.phtml | 2 +- .../templates/search/reservessearch.phtml | 8 +- .../bootstrap3/templates/search/results.phtml | 6 +- .../Recommend/SideFacets-dialog.phtml | 4 +- .../templates/RecordTab/collectionlist.phtml | 4 +- .../jquerymobile/templates/browse/home.phtml | 6 +- .../templates/combined/results-list.phtml | 2 +- .../templates/myresearch/mylist.phtml | 4 +- .../templates/search/history-table.phtml | 2 +- .../templates/search/reservessearch.phtml | 2 +- .../templates/search/results.phtml | 4 +- themes/root/theme.config.php | 1 + 48 files changed, 190 insertions(+), 99 deletions(-) create mode 100644 module/VuFind/src/VuFind/View/Helper/Root/LocalizedNumber.php diff --git a/languages/de.ini b/languages/de.ini index 65d02d0d6d8..a30494c0fd4 100644 --- a/languages/de.ini +++ b/languages/de.ini @@ -615,6 +615,8 @@ not_applicable = "n/a" no_description = "Keine Beschreibung verfügbar." no_items_selected = "Sie haben nichts ausgewählt" Number = Nummer +number_decimal_point = "," +number_thousands_separator = "." OAI Server = "OAI-Server" of = von old_password = "Bisheriges Passwort" diff --git a/languages/en.ini b/languages/en.ini index 0f7ade2dcc0..bb7fc04957c 100644 --- a/languages/en.ini +++ b/languages/en.ini @@ -617,6 +617,8 @@ not_applicable = "n/a" no_description = "Description not available." no_items_selected = "No Items were Selected" Number = Number +number_decimal_point = "." +number_thousands_separator = "," OAI Server = "OAI Server" of = of old_password = "Old Password" diff --git a/module/VuFind/src/VuFind/View/Helper/Root/LocalizedNumber.php b/module/VuFind/src/VuFind/View/Helper/Root/LocalizedNumber.php new file mode 100644 index 00000000000..65cb509dc78 --- /dev/null +++ b/module/VuFind/src/VuFind/View/Helper/Root/LocalizedNumber.php @@ -0,0 +1,86 @@ +<?php +/** + * Localization based number formatting + * + * PHP version 5 + * + * Copyright (C) snowflake productions gmbh 2014. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category VuFind2 + * @package View_Helpers + * @author Nicolas Karrer <nkarrer@snowflake.ch> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link http://vufind.org/wiki/vufind2:developer_manual Wiki + */ +namespace VuFind\View\Helper\Root; +use Zend\View\Helper\AbstractHelper; + +/** + * Class NumberFormat + * allows localization based formating of numbers in view + * + * @category VuFind2 + * @package View_Helpers + * @author Nicolas Karrer <nkarrer@snowflake.ch> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link http://vufind.org/wiki/vufind2:developer_manual Wiki + */ +class LocalizedNumber extends AbstractHelper +{ + /** + * Default decimal point character + * + * @var string + */ + protected $defaultDecimalPoint = '.'; + + /** + * Default thousands separator character + * + * @var string + */ + protected $defaultThousandSep = ','; + + /** + * Localize number + * + * @param int|float $number Number to format + * @param int $decimals How many decimal places? + * @param bool $escapeHtml Should we escape the resulting text as HTML? + * + * @return string + */ + public function __invoke($number, $decimals = 0, $escapeHtml = true) + { + $translator = $this->getView()->plugin('translate'); + + $decimalPoint = $translator( + 'number_decimal_point', array(), $this->defaultDecimalPoint + ); + $thousandSep = $translator( + 'number_thousands_separator', array(), $this->defaultThousandSep + ); + $formattedNumber = number_format( + $number, $decimals, $decimalPoint, $thousandSep + ); + if ($escapeHtml) { + $escaper = $this->getView()->plugin('escapeHtml'); + $formattedNumber = $escaper($formattedNumber); + } + + return $formattedNumber; + } +} \ No newline at end of file diff --git a/themes/blueprint/templates/Recommend/SideFacets.phtml b/themes/blueprint/templates/Recommend/SideFacets.phtml index e0eec75f487..f932a1a2892 100644 --- a/themes/blueprint/templates/Recommend/SideFacets.phtml +++ b/themes/blueprint/templates/Recommend/SideFacets.phtml @@ -73,7 +73,7 @@ <dd class="facet<?=$thisFacet['operator'] ?> applied"<? if($thisFacet['operator'] == 'OR'): ?> href="<?=$this->currentPath().$results->getUrlQuery()->removeFacet($title, $thisFacet['value'], true, $thisFacet['operator']) ?>"<? endif ?>><?=$this->escapeHtml($thisFacet['displayText'])?> <img src="<?=$this->imageLink('silk/tick.png')?>" alt="Selected"/></dd> <? else: ?> <dd> - <a class="facet<?=$thisFacet['operator'] ?>" href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> (<?=$this->escapeHtml($thisFacet['count'])?>) + <a class="facet<?=$thisFacet['operator'] ?>" href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> (<?=$this->localizedNumber($thisFacet['count'])?>) <? if ($allowExclude): ?> <a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>" title="<?=$this->transEsc('exclude_facet')?>"><img src="<?=$this->imageLink('fugue/cross-small.png')?>" alt="Delete"/></a> <? endif; ?> diff --git a/themes/blueprint/templates/Recommend/TopFacets.phtml b/themes/blueprint/templates/Recommend/TopFacets.phtml index 72d571f612c..ce8ca7d5d23 100644 --- a/themes/blueprint/templates/Recommend/TopFacets.phtml +++ b/themes/blueprint/templates/Recommend/TopFacets.phtml @@ -21,7 +21,7 @@ <? if ($thisFacet['isApplied']): ?> <?=$this->escapeHtml($thisFacet['displayText'])?> <img src="<?=$this->imageLink('silk/tick.png')?>" alt="<?=$this->transEsc('Selected') ?>"/> <? else: ?> - <a href="<?=$this->currentPath().$this->recommend->getResults()->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> (<?=$thisFacet['count'] ?>) + <a href="<?=$this->currentPath().$this->recommend->getResults()->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> (<?=$this->localizedNumber($thisFacet['count']) ?>) <? if ($allowExclude): ?> <a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>"><?=$this->transEsc('exclude_facet')?></a> <? endif; ?> diff --git a/themes/blueprint/templates/RecordTab/collectionlist.phtml b/themes/blueprint/templates/RecordTab/collectionlist.phtml index e7ca52d1ba6..90fe820d68a 100644 --- a/themes/blueprint/templates/RecordTab/collectionlist.phtml +++ b/themes/blueprint/templates/RecordTab/collectionlist.phtml @@ -12,9 +12,9 @@ <?=$this->recommend($current)?> <? endforeach; ?> <?=$this->transEsc("Showing")?> - <strong><?=$results->getStartRecord()?></strong> - <strong><?=$results->getEndRecord()?></strong> + <strong><?=$this->localizedNumber($results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($results->getEndRecord())?></strong> <? if (!isset($this->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=$recordTotal?></strong> <?=$this->transEsc('Items')?> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <?=$this->transEsc('Items')?> <? endif; ?> <?=$this->render('search/controls/sort.phtml', $searchDetails)?> <?=$this->render('search/controls/view.phtml', $searchDetails)?> diff --git a/themes/blueprint/templates/admin/statistics/home.phtml b/themes/blueprint/templates/admin/statistics/home.phtml index 96ed8ef92a2..a6a7710fc4b 100644 --- a/themes/blueprint/templates/admin/statistics/home.phtml +++ b/themes/blueprint/templates/admin/statistics/home.phtml @@ -34,14 +34,14 @@ tr td:first-child { <span style="font-size:14px"><?=$source ?></span> <table> <? foreach($searches as $search): ?> - <tr><td><?=$search['value'] ?></td><td><?=$search['count'] ?></td></tr> + <tr><td><?=$search['value'] ?></td><td><?=$this->localizedNumber($search['count']) ?></td></tr> <? endforeach; ?> </table> <? endforeach; ?> <? else: ?> <table> <? foreach($this->topSearches as $search): ?> - <tr><td><?=$search['value'] ?></td><td><?=$search['count'] ?></td><td><?=$search['source'] ?></td></tr> + <tr><td><?=$search['value'] ?></td><td><?=$this->localizedNumber($search['count']) ?></td><td><?=$search['source'] ?></td></tr> <? endforeach; ?> </table> <? endif; ?> @@ -54,14 +54,14 @@ tr td:first-child { <span style="font-size:14px"><?=$source ?></span> <table> <? foreach($records as $record): ?> - <tr><td><?=$record['value'] ?></td><td><?=$record['count'] ?></td></tr> + <tr><td><?=$record['value'] ?></td><td><?=$this->localizedNumber($record['count']) ?></td></tr> <? endforeach; ?> </table> <? endforeach; ?> <? else: ?> <table> <? foreach($this->topRecords as $record): ?> - <tr><td><?=$record['value'] ?></td><td><?=$record['count'] ?></td><td><?=$record['source'] ?></td></tr> + <tr><td><?=$record['value'] ?></td><td><?=$this->localizedNumber($record['count']) ?></td><td><?=$record['source'] ?></td></tr> <? endforeach; ?> </table> <? endif; ?> @@ -77,12 +77,12 @@ tr td:first-child { ?> <table> <? foreach($this->browserStats as $browser): ?> - <tr><td><?=$browser['browserName'] ?></td><td><?=$browser['count'] ?></td><td><?=round($browser['count']*100/$total, 2) ?>%</td></tr> + <tr><td><?=$browser['browserName'] ?></td><td><?=$this->localizedNumber($browser['count']) ?></td><td><?=$this->localizedNumber($browser['count']*100/$total, 2) ?>%</td></tr> <? endforeach; ?> </table> <h4 style="display:inline">Top Versions</h4>: <? foreach($this->topVersions as $i=>$browser): ?> - <span style="padding:0 3px<? if($this->currentBrowser == $browser['browserName']): ?>;background:#E5ECF9<? endif; ?>"><?=$browser['browserName'] ?> (<?=$browser['count'] ?>)</span><? if(++$i < count($this->topVersions)): ?>,<? endif; ?> + <span style="padding:0 3px<? if($this->currentBrowser == $browser['browserName']): ?>;background:#E5ECF9<? endif; ?>"><?=$browser['browserName'] ?> (<?=$this->localizedNumber($browser['count']) ?>)</span><? if(++$i < count($this->topVersions)): ?>,<? endif; ?> <? endforeach; ?> <? endif; ?> diff --git a/themes/blueprint/templates/browse/home.phtml b/themes/blueprint/templates/browse/home.phtml index 178a3cf1248..73f7bca099b 100644 --- a/themes/blueprint/templates/browse/home.phtml +++ b/themes/blueprint/templates/browse/home.phtml @@ -23,7 +23,7 @@ <? if(is_string($category)): ?> <?=$this->transEsc($category)?> <? else: ?> - <?=$this->transEsc($category['text'])?> (<?=number_format($category['count'])?>) + <?=$this->transEsc($category['text'])?> (<?=$this->localizedNumber($category['count'])?>) <? endif; ?> </a> </li> @@ -40,7 +40,7 @@ <? if (!empty($this->categoryList) && $this->currentAction != 'Tag' && $this->findby != 'alphabetical'):?> <a href="<?=$SEARCH_BASE ?>?lookfor=<? if ($this->filter): ?>&filter[]=<?=urlencode($this->filter) ?>%3A<?=str_replace('+AND+','&filter[]=', urlencode($secondary['value'])) ?><? endif; ?>&filter[]=<?=$this->browse()->getSolrField($this->currentAction) ?>%3A[* TO *]" class="viewRecords"><?=$this->transEsc('View Records') ?></a> <? endif; ?> - <a href="<?=$BROWSE_BASE ?>?findby=<?=urlencode($this->findby) ?>&category=<?=urlencode($this->category) ?>&query=<?=urlencode($secondary['value']) ?><? if ($this->facetPrefix): ?>&facet_prefix=<?=urlencode($secondary['displayText']) ?><? endif; ?><? if ($this->secondaryParams): foreach($this->secondaryParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($secondary['displayText']) ?><? if ($this->findby != 'alphabetical'): ?> (<?=$secondary['count'] ?>)<? endif; ?></a> </li> + <a href="<?=$BROWSE_BASE ?>?findby=<?=urlencode($this->findby) ?>&category=<?=urlencode($this->category) ?>&query=<?=urlencode($secondary['value']) ?><? if ($this->facetPrefix): ?>&facet_prefix=<?=urlencode($secondary['displayText']) ?><? endif; ?><? if ($this->secondaryParams): foreach($this->secondaryParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($secondary['displayText']) ?><? if ($this->findby != 'alphabetical'): ?> (<?=$this->localizedNumber($secondary['count']) ?>)<? endif; ?></a> </li> <? endforeach; ?> </ul> </div> @@ -50,7 +50,7 @@ <div class="span-5 browseNav"> <ul class="browse" id="list4"> <? foreach($this->resultList as $result): ?> - <li><a href="<?=$SEARCH_BASE ?>?<?=$this->paramTitle ?><?=urlencode($result['result']) ?><? if ($this->searchParams): foreach($this->searchParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($result['result'])/*html*/?> (<?=$result['count'] ?>)</a></li> + <li><a href="<?=$SEARCH_BASE ?>?<?=$this->paramTitle ?><?=urlencode($result['result']) ?><? if ($this->searchParams): foreach($this->searchParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($result['result'])/*html*/?> (<?=$this->localizedNumber($result['count']) ?>)</a></li> <? endforeach; ?> </ul> </div> diff --git a/themes/blueprint/templates/collection/view.phtml b/themes/blueprint/templates/collection/view.phtml index 0d1de2dfbf3..7ec1cc2db6d 100644 --- a/themes/blueprint/templates/collection/view.phtml +++ b/themes/blueprint/templates/collection/view.phtml @@ -25,7 +25,7 @@ <? if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> <div class="resultscroller"> <? if ($this->scrollData['previousRecord']): ?><a href="<?=$this->recordLink()->getUrl($this->scrollData['previousRecord'])?>">« <?=$this->transEsc('Prev')?></a><? endif; ?> - #<?=$this->escapeHtml($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . $this->escapeHtml($this->scrollData['resultTotal'])?> + #<?=$this->localizedNumber($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . $this->localizedNumber($this->scrollData['resultTotal'])?> <? if ($this->scrollData['nextRecord']): ?><a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>"><?=$this->transEsc('Next')?> »</a><? endif; ?> </div> <? endif; ?> diff --git a/themes/blueprint/templates/combined/results-list.phtml b/themes/blueprint/templates/combined/results-list.phtml index 9d4f6ebc88b..ca50b75a6f5 100644 --- a/themes/blueprint/templates/combined/results-list.phtml +++ b/themes/blueprint/templates/combined/results-list.phtml @@ -24,9 +24,9 @@ <div class="floatleft"> <? if ($recordTotal > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=$results->getStartRecord()?></strong> - <strong><?=$results->getEndRecord()?></strong> + <strong><?=$this->localizedNumber($results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($results->getEndRecord())?></strong> <? if (!isset($view->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=$recordTotal?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <? endif; ?> <? if (isset($view->overrideSearchHeading)): ?> <?=$view->overrideSearchHeading?> @@ -34,7 +34,7 @@ <?=$this->transEsc('for search')?>: <strong>'<?=$this->escapeHtml($lookfor)?>'</strong>, <? endif; ?> <? if ($qtime = $results->getQuerySpeed()): ?> - <?=$this->transEsc('query time')?>: <?=$this->escapeHtml(round($qtime, 2))?>s + <?=$this->transEsc('query time')?>: <?=$this->localizedNumber($qtime, 2)?>s <? endif; ?> <?=$this->search()->renderSpellingSuggestions('<strong>' . $this->transEsc('spell_suggest') . '</strong>:', $results, $this); ?> <? else: ?> diff --git a/themes/blueprint/templates/myresearch/mylist.phtml b/themes/blueprint/templates/myresearch/mylist.phtml index 31cf0cf50b2..342ab2b0470 100644 --- a/themes/blueprint/templates/myresearch/mylist.phtml +++ b/themes/blueprint/templates/myresearch/mylist.phtml @@ -39,8 +39,8 @@ <div class="resulthead"> <div class="floatleft"> <?=$this->transEsc("Showing")?> - <strong><?=$this->escapeHtml($this->results->getStartRecord())?></strong> - <strong><?=$this->escapeHtml($this->results->getEndRecord())?></strong> - <?=$this->transEsc('of')?> <strong><?=$this->escapeHtml($recordTotal)?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> </div> <div class="floatright"> <?=$this->render('search/controls/sort.phtml')?> diff --git a/themes/blueprint/templates/record/view.phtml b/themes/blueprint/templates/record/view.phtml index 2635c53f858..91aa7d79b9e 100644 --- a/themes/blueprint/templates/record/view.phtml +++ b/themes/blueprint/templates/record/view.phtml @@ -21,7 +21,7 @@ <? if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> <div class="resultscroller"> <? if ($this->scrollData['previousRecord']): ?><a href="<?=$this->recordLink()->getUrl($this->scrollData['previousRecord'])?>">« <?=$this->transEsc('Prev')?></a><? endif; ?> - #<?=$this->escapeHtml($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . $this->escapeHtml($this->scrollData['resultTotal'])?> + #<?=$this->localizedNumber($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . $this->localizedNumber($this->scrollData['resultTotal'])?> <? if ($this->scrollData['nextRecord']): ?><a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>"><?=$this->transEsc('Next')?> »</a><? endif; ?> </div> <? endif; ?> diff --git a/themes/blueprint/templates/search/history-table.phtml b/themes/blueprint/templates/search/history-table.phtml index 74892f5d9f4..1181a65f794 100644 --- a/themes/blueprint/templates/search/history-table.phtml +++ b/themes/blueprint/templates/search/history-table.phtml @@ -24,7 +24,7 @@ <? endforeach; ?> <? endforeach; ?> </td> - <td><?=$this->escapeHtml(number_format($info->getResultTotal()))?></td> + <td><?=$this->escapeHtml($this->localizedNumber($info->getResultTotal()))?></td> <td> <? if ($this->showSaved): ?> <a href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($info->getSearchId())?>&mode=history" class="delete"><?=$this->transEsc("history_delete_link")?></a> diff --git a/themes/blueprint/templates/search/reservessearch.phtml b/themes/blueprint/templates/search/reservessearch.phtml index 9f93b9d06ff..b9e11593819 100644 --- a/themes/blueprint/templates/search/reservessearch.phtml +++ b/themes/blueprint/templates/search/reservessearch.phtml @@ -22,12 +22,12 @@ <div class="floatleft"> <? if (($recordTotal = $this->results->getResultTotal()) > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=$this->results->getStartRecord()?></strong> - <strong><?=$this->results->getEndRecord()?></strong> - <?=$this->transEsc('of')?> <strong><?=$this->escapeHtml($recordTotal)?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <?=$this->transEsc('for search')?>: <strong>'<?=$this->escapeHtml($reservesLookfor)?>'</strong>, <? endif; ?> <? if ($qtime = $this->results->getQuerySpeed()): ?> - <?=$this->transEsc('query time')?>: <?=$this->escapeHtml(round($qtime, 2))?>s + <?=$this->transEsc('query time')?>: <?=$this->localizedNumber($qtime, 2)?>s <? endif; ?> </div> @@ -62,7 +62,7 @@ <td class="department"><a href="<?=$url?>"><?=$this->escapeHtml($record->getDepartment())?></a></td> <td class="course"><a href="<?=$url?>"><?=$this->escapeHtml($record->getCourse())?></a></td> <td class="instructor"><a href="<?=$url?>"><?=$this->escapeHtml($record->getInstructor())?></a></td> - <td class="items"><?=$this->escapeHtml($record->getItemCount())?></td> + <td class="items"><?=$this->localizedNumber($record->getItemCount())?></td> </tr> <? endforeach; ?> </table> diff --git a/themes/blueprint/templates/search/results.phtml b/themes/blueprint/templates/search/results.phtml index 2cc26f3f1e9..d94feeccb4f 100644 --- a/themes/blueprint/templates/search/results.phtml +++ b/themes/blueprint/templates/search/results.phtml @@ -51,9 +51,9 @@ <div class="floatleft"> <? if ($recordTotal > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=$this->results->getStartRecord()?></strong> - <strong><?=$this->results->getEndRecord()?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> <? if (!isset($this->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=$recordTotal?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <? endif; ?> <? if (isset($this->overrideSearchHeading)): ?> <?=$this->overrideSearchHeading?> @@ -61,7 +61,7 @@ <?=$this->transEsc('for search')?>: <strong>'<?=$this->escapeHtml($lookfor)?>'</strong>, <? endif; ?> <? if ($qtime = $this->results->getQuerySpeed()): ?> - <?=$this->transEsc('query time')?>: <?=$this->escapeHtml(round($qtime, 2))?>s + <?=$this->transEsc('query time')?>: <?=$this->localizedNumber($qtime, 2)?>s <? endif; ?> <?=$this->search()->renderSpellingSuggestions('<strong>' . $this->transEsc('spell_suggest') . '</strong>:', $this->results, $this); ?> <? else: ?> diff --git a/themes/bootstrap/templates/Recommend/SideFacets.phtml b/themes/bootstrap/templates/Recommend/SideFacets.phtml index 2c730dee4e9..8a42bdd0751 100644 --- a/themes/bootstrap/templates/Recommend/SideFacets.phtml +++ b/themes/bootstrap/templates/Recommend/SideFacets.phtml @@ -131,9 +131,9 @@ JS; <li class="facet<?=$thisFacet['operator'] ?><? if ($i>5): ?> <?=$moreClass ?><?endif ?>"> <span class="pull-right small"> <? if ($allowExclude): ?> - <?=number_format($thisFacet['count'])?><a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT') ?>" title="<?=$this->transEsc('exclude_facet') ?>"><i class="icon-remove"></i></a> + <?=$this->localizedNumber($thisFacet['count'])?><a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT') ?>" title="<?=$this->transEsc('exclude_facet') ?>"><i class="icon-remove"></i></a> <? else: ?> - <?=number_format($thisFacet['count'])?> + <?=$this->localizedNumber($thisFacet['count'])?> <? endif; ?> </span> <a class="main" href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"> diff --git a/themes/bootstrap/templates/Recommend/TopFacets.phtml b/themes/bootstrap/templates/Recommend/TopFacets.phtml index 1079917fe9b..342473e7b15 100644 --- a/themes/bootstrap/templates/Recommend/TopFacets.phtml +++ b/themes/bootstrap/templates/Recommend/TopFacets.phtml @@ -21,7 +21,7 @@ <? if ($thisFacet['isApplied']): ?> <?=$this->escapeHtml($thisFacet['displayText'])?> <img src="<?=$this->imageLink('silk/tick.png')?>" alt="<?=$this->transEsc('Selected') ?>"/> <? else: ?> - <a href="<?=$this->currentPath().$this->recommend->getResults()->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> (<?=number_format($thisFacet['count']) ?>) + <a href="<?=$this->currentPath().$this->recommend->getResults()->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> (<?=$this->localizedNumber($thisFacet['count']) ?>) <? if ($allowExclude): ?> <a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>"><?=$this->transEsc('exclude_facet')?></a> <? endif; ?> diff --git a/themes/bootstrap/templates/RecordTab/collectionlist.phtml b/themes/bootstrap/templates/RecordTab/collectionlist.phtml index 014c7e7fdaa..f227b709edd 100644 --- a/themes/bootstrap/templates/RecordTab/collectionlist.phtml +++ b/themes/bootstrap/templates/RecordTab/collectionlist.phtml @@ -13,9 +13,9 @@ <? endforeach; ?> <div class="clearfix"> <?=$this->transEsc("Showing")?> - <strong><?=$results->getStartRecord()?></strong> - <strong><?=$results->getEndRecord()?></strong> + <strong><?=$this->localizedNumber($results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($results->getEndRecord())?></strong> <? if (!isset($this->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> <?=$this->transEsc('Items')?> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <?=$this->transEsc('Items')?> <? endif; ?> <?=$this->render('search/controls/sort.phtml', $searchDetails)?> <br/><br/> diff --git a/themes/bootstrap/templates/admin/statistics/home.phtml b/themes/bootstrap/templates/admin/statistics/home.phtml index ff208f4f867..f7543c1878e 100644 --- a/themes/bootstrap/templates/admin/statistics/home.phtml +++ b/themes/bootstrap/templates/admin/statistics/home.phtml @@ -30,14 +30,14 @@ tr td:first-child { <span style="font-size:14px"><?=$source ?></span> <table class="table table-striped"> <? foreach($searches as $search): ?> - <tr><td><?=$search['value'] ?></td><td><?=$search['count'] ?></td></tr> + <tr><td><?=$search['value'] ?></td><td><?=$this->localizedNumber($search['count']) ?></td></tr> <? endforeach; ?> </table> <? endforeach; ?> <? else: ?> <table class="table table-striped"> <? foreach($this->topSearches as $search): ?> - <tr><td><?=$search['value'] ?></td><td><?=$search['count'] ?></td><td><?=$search['source'] ?></td></tr> + <tr><td><?=$search['value'] ?></td><td><?=$this->localizedNumber($search['count']) ?></td><td><?=$search['source'] ?></td></tr> <? endforeach; ?> </table> <? endif; ?> @@ -50,14 +50,14 @@ tr td:first-child { <span style="font-size:14px"><?=$source ?></span> <table class="table table-striped"> <? foreach($records as $record): ?> - <tr><td><?=$record['value'] ?></td><td><?=$record['count'] ?></td></tr> + <tr><td><?=$record['value'] ?></td><td><?=$this->localizedNumber($record['count']) ?></td></tr> <? endforeach; ?> </table> <? endforeach; ?> <? else: ?> <table class="table table-striped"> <? foreach($this->topRecords as $record): ?> - <tr><td><?=$record['value'] ?></td><td><?=$record['count'] ?></td><td><?=$record['source'] ?></td></tr> + <tr><td><?=$record['value'] ?></td><td><?=$this->localizedNumber($record['count']) ?></td><td><?=$record['source'] ?></td></tr> <? endforeach; ?> </table> <? endif; ?> @@ -73,12 +73,12 @@ tr td:first-child { ?> <table class="table table-striped"> <? foreach($this->browserStats as $browser): ?> - <tr><td><?=$browser['browserName'] ?></td><td><?=$browser['count'] ?></td><td><?=round($browser['count']*100/$total, 2) ?>%</td></tr> + <tr><td><?=$browser['browserName'] ?></td><td><?=$this->localizedNumber($browser['count']) ?></td><td><?=$this->localizedNumber($browser['count']*100/$total, 2) ?>%</td></tr> <? endforeach; ?> </table> <h4 style="display:inline">Top Versions</h4>: <? foreach($this->topVersions as $i=>$browser): ?> - <span style="padding:0 3px<? if($this->currentBrowser == $browser['browserName']): ?>;background:#E5ECF9<? endif; ?>"><?=$browser['browserName'] ?> (<?=$browser['count'] ?>)</span><? if(++$i < count($this->topVersions)): ?>,<? endif; ?> + <span style="padding:0 3px<? if($this->currentBrowser == $browser['browserName']): ?>;background:#E5ECF9<? endif; ?>"><?=$browser['browserName'] ?> (<?=$this->localizedNumber($browser['count']) ?>)</span><? if(++$i < count($this->topVersions)): ?>,<? endif; ?> <? endforeach; ?> <? endif; ?> diff --git a/themes/bootstrap/templates/browse/home.phtml b/themes/bootstrap/templates/browse/home.phtml index 5bc13cf3840..519a8bc60d2 100644 --- a/themes/bootstrap/templates/browse/home.phtml +++ b/themes/bootstrap/templates/browse/home.phtml @@ -31,7 +31,7 @@ <?=$this->transEsc($category)?> <i class="icon-angle-right pull-right"></i> <? else: ?> - <?=$this->transEsc($category['text'])?> (<?=number_format($category['count'])?>) + <?=$this->transEsc($category['text'])?> (<?=$this->localizedNumber($category['count'])?>) <? endif; ?> </a> </li> @@ -48,7 +48,7 @@ <? if (!empty($this->categoryList) && $this->currentAction != 'Tag' && $this->findby != 'alphabetical'):?> <small><a class="pull-right muted" href="<?=$SEARCH_BASE ?>?lookfor=<? if ($this->filter): ?>&filter[]=<?=urlencode($this->filter) ?>%3A<?=str_replace('+AND+','&filter[]=', urlencode($secondary['value'])) ?><? endif; ?>&filter[]=<?=$this->browse()->getSolrField($this->currentAction) ?>%3A[* TO *]"><?=$this->transEsc('View Records') ?></a></small> <? endif; ?> - <a href="<?=$BROWSE_BASE ?>?findby=<?=urlencode($this->findby) ?>&category=<?=urlencode($this->category) ?>&query=<?=urlencode($secondary['value']) ?><? if ($this->facetPrefix): ?>&facet_prefix=<?=urlencode($secondary['displayText']) ?><? endif; ?><? if ($this->secondaryParams): foreach($this->secondaryParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($secondary['displayText']) ?><? if ($this->findby != 'alphabetical'): ?> (<?=$secondary['count'] ?>)<? endif; ?> + <a href="<?=$BROWSE_BASE ?>?findby=<?=urlencode($this->findby) ?>&category=<?=urlencode($this->category) ?>&query=<?=urlencode($secondary['value']) ?><? if ($this->facetPrefix): ?>&facet_prefix=<?=urlencode($secondary['displayText']) ?><? endif; ?><? if ($this->secondaryParams): foreach($this->secondaryParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($secondary['displayText']) ?><? if ($this->findby != 'alphabetical'): ?> (<?=$this->localizedNumber($secondary['count']) ?>)<? endif; ?> <i class="icon-angle-right pull-right"></i></a> </li> <? endforeach; ?> @@ -60,7 +60,7 @@ <div class="span3"> <ul class="well well-small nav nav-list" id="list4"> <? foreach($this->resultList as $result): ?> - <li><a href="<?=$SEARCH_BASE ?>?<?=$this->paramTitle ?><?=urlencode($result['result']) ?><? if ($this->searchParams): foreach($this->searchParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($result['result'])/*html*/?> (<?=$result['count'] ?>)</a></li> + <li><a href="<?=$SEARCH_BASE ?>?<?=$this->paramTitle ?><?=urlencode($result['result']) ?><? if ($this->searchParams): foreach($this->searchParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($result['result'])/*html*/?> (<?=$this->localizedNumber($result['count']) ?>)</a></li> <? endforeach; ?> </ul> </div> diff --git a/themes/bootstrap/templates/collection/view.phtml b/themes/bootstrap/templates/collection/view.phtml index 18664074a29..03ef0b05f77 100644 --- a/themes/bootstrap/templates/collection/view.phtml +++ b/themes/bootstrap/templates/collection/view.phtml @@ -26,7 +26,7 @@ <? else: ?> <li class="disabled"><a href="#">« <?=$this->transEsc('Prev')?></a></li> <? endif; ?> - #<?=$this->escapeHtml($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . number_format($this->escapeHtml($this->scrollData['resultTotal'])) . ' ' . $this->transEsc('results') ?> + #<?=$this->localizedNumber($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . $this->localizedNumber($this->escapeHtml($this->scrollData['resultTotal'])) . ' ' . $this->transEsc('results') ?> <? if ($this->scrollData['nextRecord']): ?> <li> <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>"><?=$this->transEsc('Next')?> »</a> diff --git a/themes/bootstrap/templates/combined/results-list.phtml b/themes/bootstrap/templates/combined/results-list.phtml index 38d780a394b..92f1449cf42 100644 --- a/themes/bootstrap/templates/combined/results-list.phtml +++ b/themes/bootstrap/templates/combined/results-list.phtml @@ -24,9 +24,9 @@ <div class="pull-left help-block"> <? if ($recordTotal > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=$results->getStartRecord()?></strong> - <strong><?=$results->getEndRecord()?></strong> + <strong><?=$this->localizedNumber($results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($results->getEndRecord())?></strong> <? if (!isset($view->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <? endif; ?> <? if (isset($view->overrideSearchHeading)): ?> <?=$view->overrideSearchHeading?> @@ -34,7 +34,7 @@ <?=$this->transEsc('for search')?>: <strong>'<?=$this->escapeHtml($lookfor)?>'</strong>, <? endif; ?> <? if ($qtime = $results->getQuerySpeed()): ?> - <?=$this->transEsc('query time')?>: <?=$this->escapeHtml(round($qtime, 2))?>s + <?=$this->transEsc('query time')?>: <?=$this->localizedNumber($qtime, 2)?>s <? endif; ?> <?=$this->search()->renderSpellingSuggestions('<strong>' . $this->transEsc('spell_suggest') . '</strong>:', $results, $this); ?> <? else: ?> diff --git a/themes/bootstrap/templates/myresearch/mylist.phtml b/themes/bootstrap/templates/myresearch/mylist.phtml index dec626e795f..ce1031029fc 100644 --- a/themes/bootstrap/templates/myresearch/mylist.phtml +++ b/themes/bootstrap/templates/myresearch/mylist.phtml @@ -46,8 +46,8 @@ <? elseif ($recordTotal > 0): ?> <div class="pull-right"> <?=$this->transEsc("Showing")?> - <strong><?=$this->escapeHtml($this->results->getStartRecord())?></strong> - <strong><?=$this->escapeHtml($this->results->getEndRecord())?></strong> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> </div> <h2><?=$this->transEsc("Your Favorites")?></h2> <? endif; ?> diff --git a/themes/bootstrap/templates/record/view.phtml b/themes/bootstrap/templates/record/view.phtml index d63bb388a4d..fb851a904ca 100644 --- a/themes/bootstrap/templates/record/view.phtml +++ b/themes/bootstrap/templates/record/view.phtml @@ -23,7 +23,7 @@ <? else: ?> <li class="disabled"><a href="#">« <?=$this->transEsc('Prev')?></a></li> <? endif; ?> - #<?=$this->escapeHtml($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . number_format($this->escapeHtml($this->scrollData['resultTotal'])) . ' ' . $this->transEsc('results') ?> + #<?=$this->localizedNumber($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . $this->localizedNumber($this->scrollData['resultTotal']) . ' ' . $this->transEsc('results') ?> <? if ($this->scrollData['nextRecord']): ?> <li> <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>"><?=$this->transEsc('Next')?> »</a> diff --git a/themes/bootstrap/templates/search/history-table.phtml b/themes/bootstrap/templates/search/history-table.phtml index cedb14b2b23..8bb219d167c 100644 --- a/themes/bootstrap/templates/search/history-table.phtml +++ b/themes/bootstrap/templates/search/history-table.phtml @@ -23,7 +23,7 @@ <? endforeach; ?> <? endforeach; ?> </td> - <td><?=$this->escapeHtml(number_format($info->getResultTotal()))?></td> + <td><?=$this->localizedNumber($info->getResultTotal())?></td> <td> <? if ($this->showSaved): ?> <a href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($info->getSearchId())?>&mode=history"><i class="icon-remove"></i> <?=$this->transEsc("history_delete_link")?></a> diff --git a/themes/bootstrap/templates/search/reservessearch.phtml b/themes/bootstrap/templates/search/reservessearch.phtml index 766cabfcca4..33290adcfdd 100644 --- a/themes/bootstrap/templates/search/reservessearch.phtml +++ b/themes/bootstrap/templates/search/reservessearch.phtml @@ -22,12 +22,12 @@ <div class="pull-left"> <? if (($recordTotal = $this->results->getResultTotal()) > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=$this->results->getStartRecord()?></strong> - <strong><?=$this->results->getEndRecord()?></strong> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <?=$this->transEsc('for search')?>: <strong>'<?=$this->escapeHtml($reservesLookfor)?>'</strong>, <? endif; ?> <? if ($qtime = $this->results->getQuerySpeed()): ?> - <?=$this->transEsc('query time')?>: <?=$this->escapeHtml(round($qtime, 2))?>s + <?=$this->transEsc('query time')?>: <?=$this->localizedNumber($qtime, 2)?>s <? endif; ?> </div> @@ -60,7 +60,7 @@ <td class="department"><a href="<?=$url?>"><?=$this->escapeHtml($record->getDepartment())?></a></td> <td class="course"><a href="<?=$url?>"><?=$this->escapeHtml($record->getCourse())?></a></td> <td class="instructor"><a href="<?=$url?>"><?=$this->escapeHtml($record->getInstructor())?></a></td> - <td class="items"><?=$this->escapeHtml($record->getItemCount())?></td> + <td class="items"><?=$this->localizedNumber($record->getItemCount())?></td> </tr> <? endforeach; ?> </table> diff --git a/themes/bootstrap/templates/search/results.phtml b/themes/bootstrap/templates/search/results.phtml index 7a8fbbfd611..1bbf35e0d48 100644 --- a/themes/bootstrap/templates/search/results.phtml +++ b/themes/bootstrap/templates/search/results.phtml @@ -51,9 +51,9 @@ <div class="pull-left help-block"> <? if ($recordTotal > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=number_format($this->results->getStartRecord())?></strong> - <strong><?=number_format($this->results->getEndRecord())?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> <? if (!isset($this->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <? endif; ?> <? if (isset($this->overrideSearchHeading)): ?> <?=$this->overrideSearchHeading?> @@ -61,7 +61,7 @@ <?=$this->transEsc('for search')?>: <strong>'<?=$this->escapeHtml($lookfor)?>'</strong>, <? endif; ?> <? if ($qtime = $this->results->getQuerySpeed()): ?> - <?=$this->transEsc('query time')?>: <?=$this->escapeHtml(round($qtime, 2))?>s + <?=$this->transEsc('query time')?>: <?=$this->localizedNumber($qtime, 2)?>s <? endif; ?> <?=$this->search()->renderSpellingSuggestions('<strong>' . $this->transEsc('spell_suggest') . '</strong>:', $this->results, $this); ?> <? else: ?> diff --git a/themes/bootstrap3/templates/Recommend/SideFacets.phtml b/themes/bootstrap3/templates/Recommend/SideFacets.phtml index e6793ccfb92..3188861a37f 100644 --- a/themes/bootstrap3/templates/Recommend/SideFacets.phtml +++ b/themes/bootstrap3/templates/Recommend/SideFacets.phtml @@ -142,7 +142,7 @@ JS; <a href="<?=$addURL ?>" class="list-group-item facet<?=$thisFacet['operator'] ?><? if ($i>5): ?> <?=$moreClass ?><?endif ?>"> <? endif; ?> <span class="badge"> - <?=number_format($thisFacet['count'])?> + <?=$this->localizedNumber($thisFacet['count'])?> <? if ($allowExclude): ?> <a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT') ?>" title="<?=$this->transEsc('exclude_facet') ?>"><i class="fa fa-times"></i></a> <? endif; ?> diff --git a/themes/bootstrap3/templates/Recommend/TopFacets.phtml b/themes/bootstrap3/templates/Recommend/TopFacets.phtml index 9f1d415aca0..288b8cff4aa 100644 --- a/themes/bootstrap3/templates/Recommend/TopFacets.phtml +++ b/themes/bootstrap3/templates/Recommend/TopFacets.phtml @@ -22,7 +22,7 @@ <? if ($thisFacet['isApplied']): ?> <?=$this->escapeHtml($thisFacet['displayText'])?> <i class="fa fa-check"></i> <? else: ?> - <a href="<?=$this->currentPath().$this->recommend->getResults()->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> <span class="badge"><?=number_format($thisFacet['count']) ?> + <a href="<?=$this->currentPath().$this->recommend->getResults()->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> <span class="badge"><?=$this->localizedNumber($thisFacet['count']) ?> <? if ($allowExclude): ?> <a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>" title="<?=$this->transEsc('exclude_facet')?>"><i class="fa fa-times"></i></a> <? endif; ?> diff --git a/themes/bootstrap3/templates/RecordTab/collectionlist.phtml b/themes/bootstrap3/templates/RecordTab/collectionlist.phtml index 89ec2f7adba..e8b5b101bba 100644 --- a/themes/bootstrap3/templates/RecordTab/collectionlist.phtml +++ b/themes/bootstrap3/templates/RecordTab/collectionlist.phtml @@ -14,9 +14,9 @@ <div class="clearfix hidden-print"> <div class="pull-left"> <?=$this->transEsc("Showing")?> - <strong><?=$results->getStartRecord()?></strong> - <strong><?=$results->getEndRecord()?></strong> + <strong><?=$this->localizedNumber($results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($results->getEndRecord())?></strong> <? if (!isset($this->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> <?=$this->transEsc('Items')?> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <?=$this->transEsc('Items')?> <? endif; ?> </div> <div class="pull-right"> diff --git a/themes/bootstrap3/templates/admin/statistics/home.phtml b/themes/bootstrap3/templates/admin/statistics/home.phtml index ff208f4f867..f7543c1878e 100644 --- a/themes/bootstrap3/templates/admin/statistics/home.phtml +++ b/themes/bootstrap3/templates/admin/statistics/home.phtml @@ -30,14 +30,14 @@ tr td:first-child { <span style="font-size:14px"><?=$source ?></span> <table class="table table-striped"> <? foreach($searches as $search): ?> - <tr><td><?=$search['value'] ?></td><td><?=$search['count'] ?></td></tr> + <tr><td><?=$search['value'] ?></td><td><?=$this->localizedNumber($search['count']) ?></td></tr> <? endforeach; ?> </table> <? endforeach; ?> <? else: ?> <table class="table table-striped"> <? foreach($this->topSearches as $search): ?> - <tr><td><?=$search['value'] ?></td><td><?=$search['count'] ?></td><td><?=$search['source'] ?></td></tr> + <tr><td><?=$search['value'] ?></td><td><?=$this->localizedNumber($search['count']) ?></td><td><?=$search['source'] ?></td></tr> <? endforeach; ?> </table> <? endif; ?> @@ -50,14 +50,14 @@ tr td:first-child { <span style="font-size:14px"><?=$source ?></span> <table class="table table-striped"> <? foreach($records as $record): ?> - <tr><td><?=$record['value'] ?></td><td><?=$record['count'] ?></td></tr> + <tr><td><?=$record['value'] ?></td><td><?=$this->localizedNumber($record['count']) ?></td></tr> <? endforeach; ?> </table> <? endforeach; ?> <? else: ?> <table class="table table-striped"> <? foreach($this->topRecords as $record): ?> - <tr><td><?=$record['value'] ?></td><td><?=$record['count'] ?></td><td><?=$record['source'] ?></td></tr> + <tr><td><?=$record['value'] ?></td><td><?=$this->localizedNumber($record['count']) ?></td><td><?=$record['source'] ?></td></tr> <? endforeach; ?> </table> <? endif; ?> @@ -73,12 +73,12 @@ tr td:first-child { ?> <table class="table table-striped"> <? foreach($this->browserStats as $browser): ?> - <tr><td><?=$browser['browserName'] ?></td><td><?=$browser['count'] ?></td><td><?=round($browser['count']*100/$total, 2) ?>%</td></tr> + <tr><td><?=$browser['browserName'] ?></td><td><?=$this->localizedNumber($browser['count']) ?></td><td><?=$this->localizedNumber($browser['count']*100/$total, 2) ?>%</td></tr> <? endforeach; ?> </table> <h4 style="display:inline">Top Versions</h4>: <? foreach($this->topVersions as $i=>$browser): ?> - <span style="padding:0 3px<? if($this->currentBrowser == $browser['browserName']): ?>;background:#E5ECF9<? endif; ?>"><?=$browser['browserName'] ?> (<?=$browser['count'] ?>)</span><? if(++$i < count($this->topVersions)): ?>,<? endif; ?> + <span style="padding:0 3px<? if($this->currentBrowser == $browser['browserName']): ?>;background:#E5ECF9<? endif; ?>"><?=$browser['browserName'] ?> (<?=$this->localizedNumber($browser['count']) ?>)</span><? if(++$i < count($this->topVersions)): ?>,<? endif; ?> <? endforeach; ?> <? endif; ?> diff --git a/themes/bootstrap3/templates/browse/home.phtml b/themes/bootstrap3/templates/browse/home.phtml index b651227f9a3..a9b5ef5ed74 100644 --- a/themes/bootstrap3/templates/browse/home.phtml +++ b/themes/bootstrap3/templates/browse/home.phtml @@ -28,7 +28,7 @@ <span class="pull-right"><i class="fa fa-angle-right"></i></span> <? else: ?> <?=$this->transEsc($category['text'])?> - <span class="badge"><?=number_format($category['count'])?></span> + <span class="badge"><?=$this->localizedNumber($category['count'])?></span> <? endif; ?> </a> <? endforeach; ?> @@ -56,7 +56,7 @@ <? if ($this->findby == 'alphabetical'): ?> <span class="pull-right"><i class="fa fa-angle-right"></i></span> <? else: ?> - <span class="badge"><?=number_format($secondary['count']) ?></span> + <span class="badge"><?=$this->localizedNumber($secondary['count']) ?></span> <? endif; ?> </a> <? if($viewRecord): ?> @@ -71,7 +71,7 @@ <? foreach($this->resultList as $result): ?> <a class="list-group-item clearfix" href="<?=$SEARCH_BASE ?>?<?=$this->paramTitle ?><?=urlencode($result['result']) ?><? if ($this->searchParams): foreach($this->searchParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"> <?=$this->escapeHtml($result['result'])?> - <span class="badge"><?=number_format($result['count']) ?></span> + <span class="badge"><?=$this->localizedNumber($result['count']) ?></span> </a> <? endforeach; ?> </ul> diff --git a/themes/bootstrap3/templates/collection/view.phtml b/themes/bootstrap3/templates/collection/view.phtml index 44535875d6d..e3d97116caa 100644 --- a/themes/bootstrap3/templates/collection/view.phtml +++ b/themes/bootstrap3/templates/collection/view.phtml @@ -33,7 +33,7 @@ <? else: ?> <li class="disabled"><a href="#">« <?=$this->transEsc('Prev')?></a></li> <? endif; ?> - #<?=$this->escapeHtml($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . number_format($this->escapeHtml($this->scrollData['resultTotal'])) . ' ' . $this->transEsc('results') ?> + #<?=$this->localizedNumber($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . $this->localizedNumber($this->scrollData['resultTotal']) . ' ' . $this->transEsc('results') ?> <? if ($this->scrollData['nextRecord']): ?> <li> <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>"><?=$this->transEsc('Next')?> »</a> diff --git a/themes/bootstrap3/templates/combined/results-list.phtml b/themes/bootstrap3/templates/combined/results-list.phtml index b3674ed7374..2d8c571ac0c 100644 --- a/themes/bootstrap3/templates/combined/results-list.phtml +++ b/themes/bootstrap3/templates/combined/results-list.phtml @@ -24,9 +24,9 @@ <div class="pull-left help-block"> <? if ($recordTotal > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=$results->getStartRecord()?></strong> - <strong><?=$results->getEndRecord()?></strong> + <strong><?=$this->localizedNumber($results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($results->getEndRecord())?></strong> <? if (!isset($view->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <? endif; ?> <? if (isset($view->overrideSearchHeading)): ?> <?=$view->overrideSearchHeading?> @@ -34,7 +34,7 @@ <?=$this->transEsc('for search')?>: <strong>'<?=$this->escapeHtml($lookfor)?>'</strong>, <? endif; ?> <? if ($qtime = $results->getQuerySpeed()): ?> - <?=$this->transEsc('query time')?>: <?=$this->escapeHtml(round($qtime, 2))?>s + <?=$this->transEsc('query time')?>: <?=$this->localizedNumber($qtime, 2)?>s <? endif; ?> <?=$this->search()->renderSpellingSuggestions('<strong>' . $this->transEsc('spell_suggest') . '</strong>:', $results, $this); ?> <? else: ?> diff --git a/themes/bootstrap3/templates/myresearch/mylist.phtml b/themes/bootstrap3/templates/myresearch/mylist.phtml index 23dce7302d7..41543d50e24 100644 --- a/themes/bootstrap3/templates/myresearch/mylist.phtml +++ b/themes/bootstrap3/templates/myresearch/mylist.phtml @@ -40,8 +40,8 @@ <? endif; ?> <? elseif ($recordTotal > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=$this->escapeHtml($this->results->getStartRecord())?></strong> - <strong><?=$this->escapeHtml($this->results->getEndRecord())?></strong> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <? endif; ?> </div> </div> diff --git a/themes/bootstrap3/templates/record/view.phtml b/themes/bootstrap3/templates/record/view.phtml index 0d6d78c0b41..37bad15412e 100644 --- a/themes/bootstrap3/templates/record/view.phtml +++ b/themes/bootstrap3/templates/record/view.phtml @@ -27,7 +27,7 @@ <? else: ?> <li class="disabled"><a href="#">« <?=$this->transEsc('Prev')?></a></li> <? endif; ?> - #<?=$this->escapeHtml($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . number_format($this->escapeHtml($this->scrollData['resultTotal'])) . ' ' . $this->transEsc('results') ?> + #<?=$this->localizedNumber($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . $this->localizedNumber($this->scrollData['resultTotal']) . ' ' . $this->transEsc('results') ?> <? if ($this->scrollData['nextRecord']): ?> <li> <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>"><?=$this->transEsc('Next')?> »</a> diff --git a/themes/bootstrap3/templates/search/history-table.phtml b/themes/bootstrap3/templates/search/history-table.phtml index 407c9c8c191..ba1af13c877 100644 --- a/themes/bootstrap3/templates/search/history-table.phtml +++ b/themes/bootstrap3/templates/search/history-table.phtml @@ -23,7 +23,7 @@ <? endforeach; ?> <? endforeach; ?> </td> - <td><?=$this->escapeHtml(number_format($info->getResultTotal()))?></td> + <td><?=$this->escapeHtml($this->localizedNumber($info->getResultTotal()))?></td> <td> <? if ($this->showSaved): ?> <a href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($info->getSearchId())?>&mode=history"><i class="fa fa-remove"></i> <?=$this->transEsc("history_delete_link")?></a> diff --git a/themes/bootstrap3/templates/search/reservessearch.phtml b/themes/bootstrap3/templates/search/reservessearch.phtml index 572074e8c6b..208d926ed41 100644 --- a/themes/bootstrap3/templates/search/reservessearch.phtml +++ b/themes/bootstrap3/templates/search/reservessearch.phtml @@ -22,12 +22,12 @@ <div class="pull-left"> <? if (($recordTotal = $this->results->getResultTotal()) > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=$this->results->getStartRecord()?></strong> - <strong><?=$this->results->getEndRecord()?></strong> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <?=$this->transEsc('for search')?>: <strong>'<?=$this->escapeHtml($reservesLookfor)?>'</strong>, <? endif; ?> <? if ($qtime = $this->results->getQuerySpeed()): ?> - <?=$this->transEsc('query time')?>: <?=$this->escapeHtml(round($qtime, 2))?>s + <?=$this->transEsc('query time')?>: <?=$this->localizedNumber($qtime, 2)?>s <? endif; ?> </div> @@ -60,7 +60,7 @@ <td class="department"><a href="<?=$url?>"><?=$this->escapeHtml($record->getDepartment())?></a></td> <td class="course"><a href="<?=$url?>"><?=$this->escapeHtml($record->getCourse())?></a></td> <td class="instructor"><a href="<?=$url?>"><?=$this->escapeHtml($record->getInstructor())?></a></td> - <td class="items"><?=$this->escapeHtml($record->getItemCount())?></td> + <td class="items"><?=$this->localizedNumber($record->getItemCount())?></td> </tr> <? endforeach; ?> </table> diff --git a/themes/bootstrap3/templates/search/results.phtml b/themes/bootstrap3/templates/search/results.phtml index 8f47491e37f..3253112ba66 100644 --- a/themes/bootstrap3/templates/search/results.phtml +++ b/themes/bootstrap3/templates/search/results.phtml @@ -52,9 +52,9 @@ <div class="col-sm-6"> <? if ($recordTotal > 0): ?> <?=$this->transEsc("Showing")?> - <strong><?=number_format($this->results->getStartRecord())?></strong> - <strong><?=number_format($this->results->getEndRecord())?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> <? if (!isset($this->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=number_format($recordTotal)?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <? endif; ?> <? if (isset($this->overrideSearchHeading)): ?> <?=$this->overrideSearchHeading?> @@ -62,7 +62,7 @@ <?=$this->transEsc('for search')?>: <strong>'<?=$this->escapeHtml($lookfor)?>'</strong>, <? endif; ?> <? if ($qtime = $this->results->getQuerySpeed()): ?> - <?=$this->transEsc('query time')?>: <?=$this->escapeHtml(round($qtime, 2))?>s + <?=$this->transEsc('query time')?>: <?=$this->localizedNumber($qtime, 2)?>s <? endif; ?> <? else: ?> <p class="lead"><?=$this->transEsc('nohit_heading')?></p> diff --git a/themes/jquerymobile/templates/Recommend/SideFacets-dialog.phtml b/themes/jquerymobile/templates/Recommend/SideFacets-dialog.phtml index 447c9458c26..17d6f8f70c0 100644 --- a/themes/jquerymobile/templates/Recommend/SideFacets-dialog.phtml +++ b/themes/jquerymobile/templates/Recommend/SideFacets-dialog.phtml @@ -16,9 +16,9 @@ <ul class="narrow" data-role="listview" data-inset="true"> <? foreach ($cluster['list'] as $thisFacet): ?> <? if ($thisFacet['isApplied']): ?> - <li data-icon="check" class="checked"><a href="" data-rel="back"><?=$this->escapeHtml($thisFacet['displayText'])?></a> <span class="ui-li-count"><?=$this->escapeHtml($thisFacet['count'])?></span></li> + <li data-icon="check" class="checked"><a href="" data-rel="back"><?=$this->escapeHtml($thisFacet['displayText'])?></a> <span class="ui-li-count"><?=$this->localizedNumber($thisFacet['count'])?></span></li> <? else: ?> - <li><a rel="external" href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> <span class="ui-li-count"><?=$this->escapeHtml($thisFacet['count'])?></span></li> + <li><a rel="external" href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> <span class="ui-li-count"><?=$this->localizedNumber($thisFacet['count'])?></span></li> <? endif; ?> <? endforeach; ?> </ul> diff --git a/themes/jquerymobile/templates/RecordTab/collectionlist.phtml b/themes/jquerymobile/templates/RecordTab/collectionlist.phtml index 11b46f82258..5d541acacba 100644 --- a/themes/jquerymobile/templates/RecordTab/collectionlist.phtml +++ b/themes/jquerymobile/templates/RecordTab/collectionlist.phtml @@ -10,8 +10,8 @@ <? if (($recordTotal = $results->getResultTotal()) > 0): // only display these at very top if we have results ?> <p> <?=$this->transEsc("Showing")?> - <strong><?=$results->getStartRecord()?></strong> - <strong><?=$results->getEndRecord()?></strong> - <?=$this->transEsc('of')?> <strong><?=$recordTotal?></strong> <?=$this->transEsc('Items')?> + <strong><?=$this->localizedNumber($results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($results->getEndRecord())?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <?=$this->transEsc('Items')?> </p> <?=$this->render('search/list-' . $results->getParams()->getView() . '.phtml', $searchDetails)?> <?=$this->paginationControl($results->getPaginator(), 'Sliding', 'search/pagination.phtml', array('results' => $results))?> diff --git a/themes/jquerymobile/templates/browse/home.phtml b/themes/jquerymobile/templates/browse/home.phtml index 6d28598fb21..59d9831b642 100644 --- a/themes/jquerymobile/templates/browse/home.phtml +++ b/themes/jquerymobile/templates/browse/home.phtml @@ -33,7 +33,7 @@ <? if (!empty($this->resultList)): ?> <? foreach($this->resultList as $result): ?> <li> - <a data-ajax="false" href="<?=$SEARCH_BASE ?>?<?=$this->paramTitle ?><?=urlencode($result['result']) ?><? if ($this->searchParams): foreach($this->searchParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($result['result'])/*html*/?> (<?=$result['count'] ?>)</a> + <a data-ajax="false" href="<?=$SEARCH_BASE ?>?<?=$this->paramTitle ?><?=urlencode($result['result']) ?><? if ($this->searchParams): foreach($this->searchParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($result['result'])/*html*/?> (<?=$this->localizedNumber($result['count']) ?>)</a> </li> <? endforeach; ?> <!-- No Results --> @@ -47,7 +47,7 @@ <? elseif (!empty($this->secondaryList)): ?> <? foreach($this->secondaryList as $secondary): ?> <li> - <a data-ajax="false" href="<?=$BROWSE_BASE ?>?findby=<?=urlencode($this->findby) ?>&category=<?=urlencode($this->category) ?>&query=<?=urlencode($secondary['value']) ?><? if ($this->facetPrefix): ?>&facet_prefix=<?=urlencode($secondary['displayText']) ?><? endif; ?><? if ($this->secondaryParams): foreach($this->secondaryParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($secondary['displayText']) ?><? if ($this->findby != 'alphabetical'): ?> (<?=$secondary['count'] ?>)<? endif; ?></a> + <a data-ajax="false" href="<?=$BROWSE_BASE ?>?findby=<?=urlencode($this->findby) ?>&category=<?=urlencode($this->category) ?>&query=<?=urlencode($secondary['value']) ?><? if ($this->facetPrefix): ?>&facet_prefix=<?=urlencode($secondary['displayText']) ?><? endif; ?><? if ($this->secondaryParams): foreach($this->secondaryParams as $var=>$val): ?>&<?=$var ?>=<?=urlencode($val) ?><? endforeach;endif; ?>"><?=$this->escapeHtml($secondary['displayText']) ?><? if ($this->findby != 'alphabetical'): ?> (<?=$this->localizedNumber($secondary['count']) ?>)<? endif; ?></a> </li> <? endforeach; ?> @@ -59,7 +59,7 @@ <? if(is_string($category)): ?> <?=$this->transEsc($category)?> <? else: ?> - <?=$this->transEsc($category['text'])?> (<?=number_format($category['count'])?>) + <?=$this->transEsc($category['text'])?> (<?=$this->localizedNumber($category['count'])?>) <? endif; ?> </a> </li> diff --git a/themes/jquerymobile/templates/combined/results-list.phtml b/themes/jquerymobile/templates/combined/results-list.phtml index 3fc976f7421..3ecad6625b4 100644 --- a/themes/jquerymobile/templates/combined/results-list.phtml +++ b/themes/jquerymobile/templates/combined/results-list.phtml @@ -31,6 +31,6 @@ <? endforeach; ?> <? else: ?> <div data-role="controlgroup"> - <a class="combinedButton" href="<?=$moreUrl?>" data-role="button" rel="external"><?=$this->transEsc("Search Results") . ' (' . $recordTotal . ')' ?></a> + <a class="combinedButton" href="<?=$moreUrl?>" data-role="button" rel="external"><?=$this->transEsc("Search Results") . ' (' . $this->localizedNumber($recordTotal) . ')' ?></a> </div> <? endif; ?> diff --git a/themes/jquerymobile/templates/myresearch/mylist.phtml b/themes/jquerymobile/templates/myresearch/mylist.phtml index d98e6d6478a..2cd1dca0c95 100644 --- a/themes/jquerymobile/templates/myresearch/mylist.phtml +++ b/themes/jquerymobile/templates/myresearch/mylist.phtml @@ -39,8 +39,8 @@ <? if (($recordTotal = $this->results->getResultTotal()) > 0): ?> <p> - <strong><?=$this->escapeHtml($this->results->getStartRecord())?></strong> - <strong><?=$this->escapeHtml($this->results->getEndRecord())?></strong> - <?=$this->transEsc('of')?> <strong><?=$this->escapeHtml($recordTotal)?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> </p> <ul class="results mylist" data-role="listview" data-split-icon="minus" data-split-theme="d" data-inset="false"> diff --git a/themes/jquerymobile/templates/search/history-table.phtml b/themes/jquerymobile/templates/search/history-table.phtml index 1655d534e31..24b1f392560 100644 --- a/themes/jquerymobile/templates/search/history-table.phtml +++ b/themes/jquerymobile/templates/search/history-table.phtml @@ -7,7 +7,7 @@ $desc = $info->getParams()->getDisplayQuery(); echo empty($desc) ? $this->transEsc("history_empty_search") : $this->escapeHtml($desc); ?></h3> - <span class="ui-li-count"><?=$this->escapeHtml(number_format($info->getResultTotal()))?></span> + <span class="ui-li-count"><?=$this->escapeHtml($this->localizedNumber($info->getResultTotal()))?></span> <p><strong><?=$this->transEsc("history_time")?></strong>: <?=$this->escapeHtml($this->dateTime()->convertToDisplayDateAndTime("U", $info->getStartTime()))?></p> <? $info->getParams()->activateAllFacets(); foreach ($info->getParams()->getFilterList() as $field => $filters): ?> <? foreach ($filters as $i => $filter): ?> diff --git a/themes/jquerymobile/templates/search/reservessearch.phtml b/themes/jquerymobile/templates/search/reservessearch.phtml index adfba79ba1d..678c5d8e2bf 100644 --- a/themes/jquerymobile/templates/search/reservessearch.phtml +++ b/themes/jquerymobile/templates/search/reservessearch.phtml @@ -40,7 +40,7 @@ ); ?> <li> - <a rel="external" href="<?=$url?>"><?=$this->escapeHtml($record->getDepartment())?> <?=$this->escapeHtml($record->getCourse())?> <?=$this->escapeHtml($record->getInstructor())?> <span class="ui-li-count"><?=$this->escapeHtml($record->getItemCount())?></span></a> + <a rel="external" href="<?=$url?>"><?=$this->escapeHtml($record->getDepartment())?> <?=$this->escapeHtml($record->getCourse())?> <?=$this->escapeHtml($record->getInstructor())?> <span class="ui-li-count"><?=$this->localizedNumber($record->getItemCount())?></span></a> </li> <? endforeach; ?> </ul> diff --git a/themes/jquerymobile/templates/search/results.phtml b/themes/jquerymobile/templates/search/results.phtml index 2c47149b9c9..e76ffbbdfa5 100644 --- a/themes/jquerymobile/templates/search/results.phtml +++ b/themes/jquerymobile/templates/search/results.phtml @@ -17,9 +17,9 @@ <? if (($recordTotal = $this->results->getResultTotal()) > 0): ?> <p> <?=$this->transEsc("Showing")?> - <strong><?=$this->results->getStartRecord()?></strong> - <strong><?=$this->results->getEndRecord()?></strong> + <strong><?=$this->localizedNumber($this->results->getStartRecord())?></strong> - <strong><?=$this->localizedNumber($this->results->getEndRecord())?></strong> <? if (!isset($this->skipTotalCount)): ?> - <?=$this->transEsc('of')?> <strong><?=$recordTotal?></strong> + <?=$this->transEsc('of')?> <strong><?=$this->localizedNumber($recordTotal)?></strong> <? endif; ?> <? if (isset($this->overrideSearchHeading)): ?> <?=$this->overrideSearchHeading?> diff --git a/themes/root/theme.config.php b/themes/root/theme.config.php index 6df2429411c..f4449138ef3 100644 --- a/themes/root/theme.config.php +++ b/themes/root/theme.config.php @@ -42,6 +42,7 @@ return array( 'currentpath' => 'VuFind\View\Helper\Root\CurrentPath', 'highlight' => 'VuFind\View\Helper\Root\Highlight', 'jqueryvalidation' => 'VuFind\View\Helper\Root\JqueryValidation', + 'localizedNumber' => 'VuFind\View\Helper\Root\LocalizedNumber', 'printms' => 'VuFind\View\Helper\Root\Printms', 'recommend' => 'VuFind\View\Helper\Root\Recommend', 'renderarray' => 'VuFind\View\Helper\Root\RenderArray', -- GitLab