diff --git a/languages/de.ini b/languages/de.ini index 65d02d0d6d84efd7e277dae2a63ab60aa5ab0e50..a30494c0fd4b9324d0ad17d70a94c045b10c1c1b 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 0f7ade2dcc03ae34cc406d51a5a76b1f86c88e2a..bb7fc04957c579b8df7307305f069b9324040094 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 0000000000000000000000000000000000000000..65cb509dc786073784cafafad97597104d6aaf5d --- /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 e0eec75f4875a3e2b21b20c3e26dd7cc5e628574..f932a1a28920865359420fcd8b34938b57205043 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 72d571f612cdb4f3818ac71348d7acf73da3dd54..ce8ca7d5d23b5cc207b96aaffa03cf367c9b40bc 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 e7ca52d1ba66aa8897ac64f99da38492f4625ffc..90fe820d68a202cb51f1a5c3584660f0b84ae562 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 96ed8ef92a28e65589329d48d3e35eb7539afff6..a6a7710fc4bdbcf03b2a91ac320e0233dc6c595d 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 178a3cf1248c1c57859700abcdbd3725ec9a441a..73f7bca099b5a40f629df01e2b352d52bbcba02d 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 0d1de2dfbf30a4db7c825fd1a762bdcfa2778055..7ec1cc2db6d16250ac36d3caf15838dba3f53b11 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 9d4f6ebc88b32f5303bad422fced34c25668a7bb..ca50b75a6f571fc4d5edbadde938d5dbc5d33565 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 31cf0cf50b22b2366415f24dac0dd2726882e771..342ab2b047041e76a52542bece95567a857480d9 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 2635c53f858aea6ff91931c9fad773bc67cffdec..91aa7d79b9e3edd0228451df8771d5d0276a3895 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 74892f5d9f4a07b324fd0559c01ced40a7517607..1181a65f79419dd2b0b06cc8d9af44d4f934afbf 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 9f93b9d06ff7ba5155dfdda0d2756759a48f03e0..b9e11593819aa9972ba1af898f629e83b5e2baa6 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 2cc26f3f1e97dcacf90042b008300a668031926a..d94feeccb4f64ccbed3a7eedc5981bbadabbfcda 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 2c730dee4e906d6bb3024f6320451d7b7fe492fb..8a42bdd07516e67779dfb8beb4b9a67b16cbc0e7 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 1079917fe9b04d31f36d96c41485d1aa3f5a17c1..342473e7b15596078290842d7b032564b1f9dfbe 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 014c7e7fdaa0472fd721ca2872b444ffb85b7515..f227b709edd78545587fa4c7a2bc7d8c23d585f1 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 ff208f4f867b873c7ebb5bda8813c3bc3a31abe6..f7543c1878ecb97fdfde972deb4cb5781ac5bd05 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 5bc13cf3840bdad2fc11f39ec2f5da55ff991917..519a8bc60d2a827d9d27f1eb308bcac3d9715f47 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 18664074a29f669f6079b6dc56fbbabc9570fd85..03ef0b05f77786a17311ebe17e537a989ca3e7b8 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 38d780a394b8f42cec339831cae213e76aa008de..92f1449cf42907dbca165727720f355f9dcbd1f7 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 dec626e795f9c6b8eb2a88442f244cfdcfd2a9ba..ce1031029fce00b20f1fe548203094aa269c2f29 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 d63bb388a4d9f4d71ec55f499cc01c94d47c41e7..fb851a904ca74d462ba0fd02f246b8aa76c4dfd4 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 cedb14b2b233f162a729e4eb4118e3ae638fce8a..8bb219d167cc954a6742a495b827502e77a2169c 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 766cabfcca471affa5d2491682805a83e2977dbc..33290adcfdda2d4cdf789942e1b0426a3bf69ea6 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 7a8fbbfd6111e84023e2e43d1eef0584f87b34ee..1bbf35e0d48b4756e07fc117d017e670b8e81d22 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 e6793ccfb92bf9aab7a4068c46704e5d74f4f209..3188861a37fe0ea9aa54052641d93ff4e32ae033 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 9f1d415aca033bbcf2a7263254ee6a2d26b7f842..288b8cff4aa75f4801f477bbdf9d645bf973726a 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 89ec2f7adbab3b689bf1344fd0b3efbe73c09a51..e8b5b101bbaf807e30a07bf572dca37e66018e0f 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 ff208f4f867b873c7ebb5bda8813c3bc3a31abe6..f7543c1878ecb97fdfde972deb4cb5781ac5bd05 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 b651227f9a30a9b7684b0729bf6ef5e00b636c47..a9b5ef5ed746e181e4c75b47eca2030eafdabaa6 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 44535875d6d7e5693fc8b124842df14c3ccff400..e3d97116caae6ec45ae674a7b22ae495f667c1cf 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 b3674ed737429bed028cce5f262c9342f5f61af8..2d8c571ac0c18969bf747eeb17b6fd26f35927e6 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 23dce7302d7f316227cc43d0aab31f9163c3373b..41543d50e24155d488ee194877fe877239969128 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 0d6d78c0b41a55f8a1b3363a3c091d277c367e11..37bad15412ef4653d896c2faca734c1cc8830c93 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 407c9c8c191ae983f71a4cac22eb4c3b00bb043e..ba1af13c8775b92ca4f5455163d761ea3c269b52 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 572074e8c6b79e64470203fd3289fd51d4a02a2d..208d926ed415399f3cfde85a407a4fff34a1333d 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 8f47491e37f5019baf187671b3bac2dded7badf4..3253112ba6697bb6e1f5b8efe437a651af67282b 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 447c9458c26ece4618378efcdf9240624eb5acf5..17d6f8f70c0775c9b89ccdf2f107a4c0843c6f94 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 11b46f822587af5db43cfbf28be8920a71dc1302..5d541acacba4d2d2ad7eb6662362b68e0ea9b494 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 6d28598fb21b7c413cdd4a11a47ae76be819cfd1..59d9831b642ebf57e0aa0ceb49bd1b2da79d84c0 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 3fc976f742154f69e4d0faf2fca65c6d38666385..3ecad6625b4a4b6c3a5130d646111445b9619157 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 d98e6d6478a59dbad8b10c36c18ea807fce9ce23..2cd1dca0c958d1fbba6614d5647fc26c162d577a 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 1655d534e317f05e1022c60bc8de44046baadb68..24b1f3925602d17d99fa16f95addae8960355f52 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 adfba79ba1d5a04688f902c1dd304435734c36d9..678c5d8e2bfdd369e628fdae9e3650647bc09ba6 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 2c47149b9c985694290f091211cbc2d1f760143c..e76ffbbdfa53147b1937085bf749c1e90d6c791a 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 6df2429411c2e555b8590108a337da19f3f6ddb4..f4449138ef3e14e0808db088032d8eda9ba1c0d6 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',