Bugzilla – Attachment 159677 Details for
Bug 35517
Choose correct default header search tab according to permissions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35517: Choose correct default header search tab according to permissions
Bug-35517-Choose-correct-default-header-search-tab.patch (text/plain), 3.96 KB, created by
David Nind
on 2023-12-08 19:09:12 UTC
(
hide
)
Description:
Bug 35517: Choose correct default header search tab according to permissions
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-12-08 19:09:12 UTC
Size:
3.96 KB
patch
obsolete
>From 6eaad00b8fe4fbec9f55548fe58cdf702b47134b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 7 Dec 2023 18:17:55 +0000 >Subject: [PATCH] Bug 35517: Choose correct default header search tab according > to permissions > >This patch adds some additional template logic to the header search form >for the staff interface home page so that users with different >permissions will see the correct tab in the header search form. > >To test, apply the patch and view the staff interface home page using a >user with different permissions: > >- 'catalogue' and 'circulate' > - Header should show circulation search >- 'catalogue' and 'borrowers' > - Header should show patron search >- 'catalogue' only > - Header should show catalog search > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/en/includes/home-search.inc | 22 ++++++++++++++----- > 1 file changed, 16 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc >index 91bf55812a..f1041101b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc >@@ -2,20 +2,30 @@ > <div id="header_search" role="tablist"> > <div class="tab-content"> > [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >- [% INCLUDE 'patron-search-box.inc' bs_tab_active= 1 %] >+ [% circ_active_tab = 1 %] >+ [% circ_active = "active" %] >+ [% ELSIF ( CAN_user_borrowers_edit_borrowers ) %] >+ [% patrons_active_tab = 1 %] >+ [% patrons_active = "active" %] >+ [% ELSIF ( CAN_user_catalogue ) %] >+ [% search_active_tab = 1 %] >+ [% search_active = "active" %] >+ [% END %] >+ [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >+ [% INCLUDE 'patron-search-box.inc' bs_tab_active= circ_active_tab %] > [% INCLUDE 'checkin-search-box.inc' %] > [% INCLUDE 'renew-search-box.inc' %] > [% END %] > [% IF ( CAN_user_borrowers_edit_borrowers ) %] >- [% INCLUDE 'member-search-box.inc' %] >+ [% INCLUDE 'member-search-box.inc' bs_tab_active= patrons_active_tab %] > [% END %] > [% IF ( CAN_user_catalogue ) %] >- [% INCLUDE 'catalogue-search-box.inc' %] >+ [% INCLUDE 'catalogue-search-box.inc' bs_tab_active= search_active_tab %] > [% END %] > </div><!-- /.tab-content --> > <ul class="nav nav-tabs" role="tablist"> > [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >- <li role="presentation" class="active"> >+ <li role="presentation" class="[% circ_active | html %]"> > <a title="Check out" href="#circ_search" aria-controls="circ_search" role="tab" aria-expanded="true" data-toggle="tab" class="keep_text"><i class="fa fa-fw fa-upload" aria-hidden="true"></i> <span class="tab-title">Check out</span></a> > </li> > <li role="presentation"> >@@ -26,12 +36,12 @@ > </li> > [% END %] > [% IF ( CAN_user_borrowers_edit_borrowers ) %] >- <li role="presentation"> >+ <li role="presentation" class="[% patrons_active | html %]"> > <a title="Search patrons" href="#patron_search" aria-controls="patron_search" role="tab" data-toggle="tab" class="keep_text"><i class="fa fa-fw fa-id-card" aria-hidden="true"></i> <span class="tab-title">Search patrons</span></a> > </li> > [% END %] > [% IF ( CAN_user_catalogue ) %] >- <li role="presentation"> >+ <li role="presentation" class="[% search_active | html %]"> > <a title="Search catalog" href="#catalog_search" aria-controls="catalog_search" role="tab" data-toggle="tab" class="keep_text"><i class="fa fa-fw fa-search" aria-hidden="true"></i> <span class="tab-title">Search catalog</span></a> > </li> > [% END %] >-- >2.30.2
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 35517
:
159661
|
159677
|
160671