Bugzilla – Attachment 92042 Details for
Bug 23438
Use Font Awesome icons in intranet search results browser
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23438: Use Font Awesome icons in intranet search results browser
Bug-23438-Use-Font-Awesome-icons-in-intranet-searc.patch (text/plain), 5.02 KB, created by
Fridolin Somers
on 2019-08-07 13:43:50 UTC
(
hide
)
Description:
Bug 23438: Use Font Awesome icons in intranet search results browser
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2019-08-07 13:43:50 UTC
Size:
5.02 KB
patch
obsolete
>From fc3cf696dd0f5e1627c1e3cca0f4978d8b852a63 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >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 >--- > koha-tmpl/intranet-tmpl/js/browser.js | 10 +++++----- > koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 1 - > .../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 = '<span id="browse-previous" class="browse-button">« ' + BROWSER_PREVIOUS + '</span>'; >+ prevbutton = '<span id="browse-previous" class="browse-button" title="' + BROWSER_PREVIOUS + '"><i class="fa fa-arrow-left"></i></span>'; > } else { >- prevbutton = '<a href="#" id="browse-previous" class="browse-button">« ' + BROWSER_PREVIOUS + '</a>'; >+ prevbutton = '<a href="#" id="browse-previous" class="browse-button" title="' + BROWSER_PREVIOUS + '"><i class="fa fa-arrow-left"></i></a>'; > } > if (current_search.offset + me.curPos == current_search.total) { >- nextbutton = '<span id="browse-next" class="browse-button">' + BROWSER_NEXT + ' »</span>'; >+ nextbutton = '<span id="browse-next" class="browse-button" title="' + BROWSER_NEXT + '"><i class="fa fa-arrow-right"></i></span>'; > } else { >- nextbutton = '<a href="#" id="browse-next" class="browse-button">' + BROWSER_NEXT + ' »</a>'; >+ nextbutton = '<a href="#" id="browse-next" class="browse-button" title="' + BROWSER_NEXT + '"><i class="fa fa-arrow-right"></i></a>'; > } >- $('#menu').before('<div class="browse-controls"><div class="browse-controls-inner"><div class="browse-label"><a href="' + searchURL + '" id="browse-return-to-results" class="searchwithcontext">' + BROWSER_RETURN_TO_SEARCH + '</a></div><div class="browse-prev-next">' + prevbutton + nextbutton + '</div></div></div>'); >+ $('#menu').before('<div class="browse-controls"><div class="browse-controls-inner"><div class="browse-label"><a href="' + searchURL + '" id="browse-return-to-results" class="searchwithcontext"><i class="fa fa-list"></i> ' + BROWSER_RETURN_TO_SEARCH + '</a></div><div class="browse-prev-next">' + prevbutton + nextbutton + '</div></div></div>'); > $('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 @@ > <script> >- var BROWSER_RETURN_TO_SEARCH = _("Return to results"); >+ var BROWSER_RETURN_TO_SEARCH = _("Results"); > var BROWSER_PREVIOUS = _("Previous"); > var BROWSER_NEXT = _("Next"); > </script> >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23438
:
92042
|
92043
|
92044
|
92048
|
92092