From 8f94cf6f5c102f71967bb318e98899ff81544b2c Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 7 Aug 2019 15:33:52 +0200 Subject: [PATCH] Bug 23438: Use Font Awesome icons in intranet search results browser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In intranet after a search you see a results browser top left of biblio record details. Actually this uses text for links next and previous with a character for the arrows. I propose to use Font Awesome icons arrows. In fact the translated text is often too large for those buttons. For example "Previous" is "Préédant" in french and it causes the next and previous buttons to display on two lines. Using icons is more compact and easy to use. This patch also adds the list icon to back to results link and changes for a minimal text "Results". 1) Go to intranet 2) Perform a search with a few results 3) Click on first record 4) Check browser displays well 5) Click on next icon, check you go to next search result 6) Click on revious icon, check you go to previous search result 7) Click on "Results", you come back to search results 8) Clik on "Last" and click on last record 9) Check browser displays well Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/js/browser.js | 10 +++++----- koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 1 - koha-tmpl/intranet-tmpl/prog/en/includes/browser-strings.inc | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/js/browser.js b/koha-tmpl/intranet-tmpl/js/browser.js index e706833ccc..3b9ca87cbb 100644 --- a/koha-tmpl/intranet-tmpl/js/browser.js +++ b/koha-tmpl/intranet-tmpl/js/browser.js @@ -95,16 +95,16 @@ KOHA.browser = function (searchid, biblionumber) { var prevbutton; var nextbutton; if (me.curPos === 0 && current_search.offset === 1) { - prevbutton = '« ' + BROWSER_PREVIOUS + ''; + prevbutton = ''; } else { - prevbutton = '« ' + BROWSER_PREVIOUS + ''; + prevbutton = ''; } if (current_search.offset + me.curPos == current_search.total) { - nextbutton = '' + BROWSER_NEXT + ' »'; + nextbutton = ''; } else { - nextbutton = '' + BROWSER_NEXT + ' »'; + nextbutton = ''; } - $('#menu').before('
' + prevbutton + nextbutton + '
'); + $('#menu').before('
' + prevbutton + nextbutton + '
'); $('a#browse-previous').click(function (ev) { ev.preventDefault(); browseRecords(-1); diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index a4d07403a0..99953fc52a 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4528,6 +4528,5 @@ div#makechart ol li { #browse-next { border-bottom-left-radius: 0; border-bottom-right-radius: 5px; - text-align: right; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/browser-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/browser-strings.inc index 68c544c31a..d7a1879e47 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/browser-strings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/browser-strings.inc @@ -1,5 +1,5 @@ -- 2.11.0