Bugzilla – Attachment 134896 Details for
Bug 29057
Use font awesome icons on request.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29057: [alternate] Use font awesome icons on request.pl
Bug-29057-alternate-Use-font-awesome-icons-on-requ.patch (text/plain), 11.37 KB, created by
Owen Leonard
on 2022-05-11 14:47:52 UTC
(
hide
)
Description:
Bug 29057: [alternate] Use font awesome icons on request.pl
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-05-11 14:47:52 UTC
Size:
11.37 KB
patch
obsolete
>From 82a9cedc6a9f6daa91f5cc921aa33add539104c9 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 20 Sep 2021 15:22:33 +0000 >Subject: [PATCH] Bug 29057: [alternate] Use font awesome icons on request.pl > >This patch offers an alternate take on using Font Awesome icons on the >holds page in place of images as links. > >This revised patch updates the icon implementation so that it is easier >to override the Font Awesome icon selection with CSS. Test by adding the >contents of this file to the IntranetUserCSS preference: > >https://gitlab.com/-/snippets/2319364 > >To test: >1 - Place some holds on a record >2 - View the 'Holds' tab in the staff interface >3 - Note the new icons >4 - Note their hover test >5 - Confirm the buttons still work as expected >--- > .../prog/en/includes/holds_table.inc | 40 ++++++----- > .../prog/en/modules/reserve/request.tt | 66 ++++++++++++++++++- > 2 files changed, 88 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index 2c1fd418dd..be1d4fe101 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -17,7 +17,9 @@ > <th>Pickup library</th> > <th>Details</th> > [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] >- <th><img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Toggle set to lowest priority" /></th> >+ <th> >+ <i class="fa fa-lg fa-rotate-90 fa-fast-forward" title="Toggle set to lowest priority"></i> >+ </th> > [% END %] > <th> </th> > <th> </th> >@@ -86,17 +88,20 @@ > [%- SET prev_priority = loop.prev.priority -%] > [%- SET next_priority = loop.next.priority -%] > <td style="white-space:nowrap;"> >- <a title="Move hold up" href="request.pl?action=move&where=up&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >- <img src="[% interface | html %]/[% theme | html %]/img/go-up.png" alt="Go up" /> >+ <a class="hold-arrow" title="Move hold up" href="request.pl?action=move&where=up&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >+ <i class="fa fa-lg icon-move-hold-up" aria-hidden="true"></i> > </a> >- <a title="Move hold to top" href="request.pl?action=move&where=top&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >- <img src="[% interface | html %]/[% theme | html %]/img/go-top.png" alt="Go top" /> >+ >+ <a class="hold-arrow" title="Move hold to top" href="request.pl?action=move&where=top&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >+ <i class="fa fa-lg icon-move-hold-top" aria-hidden="true"></i> > </a> >- <a title="Move hold to bottom" href="request.pl?action=move&where=bottom&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >- <img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Go bottom" /> >+ >+ <a class="hold-arrow" title="Move hold to bottom" href="request.pl?action=move&where=bottom&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >+ <i class="fa fa-lg icon-move-hold-bottom" aria-hidden="true"></i> > </a> >- <a title="Move hold down" href="request.pl?action=move&where=down&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >- <img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Go down" /> >+ >+ <a class="hold-arrow" title="Move hold down" href="request.pl?action=move&where=down&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >+ <i class="fa fa-lg icon-move-hold-down" aria-hidden="true"></i> > </a> > </td> > [%- ELSE -%] >@@ -185,12 +190,13 @@ > [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%] > [%- UNLESS hold.found -%] > <td> >- <a title="Toggle lowest priority" href="request.pl?action=setLowestPriority&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >- [%- IF ( hold.lowestPriority ) -%] >- <img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Unset lowest priority" /> >- [%- ELSE -%] >- <img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Set to lowest priority" /> >- [%- END -%] >+ [% IF ( hold.lowestPriority ) %] >+ <a class="hold-arrow" title="Remove lowest priority" href="request.pl?action=setLowestPriority&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >+ <i class="fa fa-lg fa-rotate-90 icon-unset-lowest" aria-hidden="true"></i> >+ [% ELSE %] >+ <a class="hold-arrow" title="Set lowest priority" href="request.pl?action=setLowestPriority&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >+ <i class="fa fa-lg fa-rotate-90 icon-set-lowest" aria-hidden="true"></i> >+ [% END %] > </a> > </td> > [%- ELSE -%] >@@ -198,8 +204,8 @@ > [%- END -%] > [%- END -%] > <td> >- <a class="btn btn-default btn-xs cancel-hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?action=cancel&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >- <i class="fa fa-trash" aria-hidden="true"></i> Cancel >+ <a class="cancel-hold" title="Cancel hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?action=cancel&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]"> >+ <i class="fa fa-trash" aria-label="Cancel hold"></i> > </a> > </td> > <td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 59f215ebd2..d2cd2cbbe2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -24,7 +24,71 @@ > <title>Confirm holds › Holds › Circulation › Koha</title> > [% END %] > [% INCLUDE 'doc-head-close.inc' %] >-[% Asset.css("css/holds.css") | $raw %] >+[% FILTER collapse %] >+ <style> >+ a.hold-arrow { >+ display:inline-block; >+ padding:3px; >+ } >+ a.hold-arrow:link, >+ a.hold-arrow:visited { >+ color: #538200; >+ } >+ >+ a.hold-arrow:hover, >+ a.hold-arrow:active{ >+ color: #75b700; >+ } >+ >+ .hold-arrow:hover i, >+ .hold-arrow:active i { >+ border-color: #75b700; >+ } >+ >+ a.cancel-hold { >+ display:inline-block; >+ padding:3px; >+ } >+ >+ a.cancel-hold:link, >+ a.cancel-hold:visited{ >+ color:#c00; >+ font-size:130% >+ } >+ >+ .icon-move-hold-up::before { >+ content: "\f062"; >+ } >+ >+ .icon-move-hold-top { >+ border-top: 3px solid #538200; >+ } >+ >+ .icon-move-hold-top::before { >+ content: "\f062"; >+ } >+ >+ .icon-move-hold-bottom { >+ border-bottom: 3px solid #538200; >+ } >+ >+ .icon-move-hold-bottom::before { >+ content: "\f063"; >+ } >+ >+ .icon-move-hold-down::before { >+ content: "\f063"; >+ } >+ >+ .icon-unset-lowest::before { >+ content: "\f050"; >+ } >+ >+ .icon-set-lowest::before { >+ content: "\f04e"; >+ } >+ </style> >+[% END %] > </head> > > <body id="circ_request" class="catalog"> >-- >2.20.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 29057
:
125049
|
125061
|
129413
|
131650
|
131651
|
131652
|
131877
|
131878
|
134896
|
134942
|
134966