Bugzilla – Attachment 45726 Details for
Bug 15386
Checkout / patron pages: Hide menu items leading to 404 page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15386: Checkout / patron pages: Hide menu items leading to 404 pages
Bug-15386-Checkout--patron-pages-Hide-menu-items-l.patch (text/plain), 6.39 KB, created by
Marc Véron
on 2015-12-16 15:16:23 UTC
(
hide
)
Description:
Bug 15386: Checkout / patron pages: Hide menu items leading to 404 pages
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-12-16 15:16:23 UTC
Size:
6.39 KB
patch
obsolete
>From 5fc13921649c5d029a84f0990c61203b054732a1 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Wed, 16 Dec 2015 16:00:15 +0100 >Subject: [PATCH] Bug 15386: Checkout / patron pages: Hide menu items leading > to 404 pages > >Some of the menu items on patron / Checkout related pages lead to a 404 page >depending on the permissions. This patch hides them as appropriate. > >To test: > >- For a staff member A, set permission 'borrowers' only (+ 'catalogue') >- Log in as A >- Search a patron and display details >- Verify that none of the menu items at the left lead to the 404 page > >- For a staff member B, set permission 'circulate_remaining_permission' > only (+ catalogue) >- Log in as B >- Go to Circulation > Checkout, search a patron >- Click menu items at the left, some of them lead to the 404 page >- Verify that none of the menu items at the left lead to the 404 page > >- Do the same for a staff member C with both permissions set >- Verify that menu items appear as expected >--- > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 39 +++++++++++++------- > 1 file changed, 25 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index 6393a04..ec9ee78 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -63,10 +63,14 @@ > </ul></div> > <div id="menu"> > <ul> >- [% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]">Check out</a></li> >- [% IF Koha.Preference('BatchCheckouts') && >- Koha.Preference('BatchCheckoutsValidCategories').split('\|').grep('^' _ categorycode _ '$').size > 0 %] >- [% IF ( batch_checkout_view ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]&batch=1">Batch check out</a></li> >+ [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >+ [% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]">Check out</a></li> >+ [% END %] >+ [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >+ [% IF Koha.Preference('BatchCheckouts') && >+ Koha.Preference('BatchCheckoutsValidCategories').split('\|').grep('^' _ categorycode _ '$').size > 0 %] >+ [% IF ( batch_checkout_view ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]&batch=1">Batch check out</a></li> >+ [% END %] > [% END %] > [% IF ( CAN_user_borrowers ) %] > [% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Details</a></li> >@@ -74,28 +78,35 @@ > [% IF ( CAN_user_updatecharges ) %] > [% IF ( finesview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Fines</a></li> > [% END %] >- [% IF ( RoutingSerials ) %][% IF ( routinglistview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/routing-lists.pl?borrowernumber=[% borrowernumber %]">Routing lists</a></li>[% END %] >- <!-- Added check for borrowers permission as this is needed to access Cirulation History --> >- [% IF ( intranetreadinghistory && CAN_user_borrowers ) %] >- [% IF ( readingrecordview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]">Circulation history</a></li> >+ [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >+ [% IF ( RoutingSerials ) %][% IF ( routinglistview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/routing-lists.pl?borrowernumber=[% borrowernumber %]">Routing lists</a></li>[% END %] >+ [% END %] >+ [% IF ( CAN_user_borrowers ) %] >+ [% IF ( intranetreadinghistory ) %] >+ [% IF ( readingrecordview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]">Circulation history</a></li> >+ [% END %] > [% END %] > [% IF ( CAN_user_parameters ) %] > [% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&modules=MEMBERS&modules=circulation&object=[% borrowernumber %]&src=circ">Modification log</a></li> > [% END %] >+ [% IF ( CAN_user_borrowers ) %] > [% IF ( sentnotices ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber %]">Notices</a></li> >- <!-- Added IF statement to check if user has borrowers permission. The menu item will not be shown unless user has borrowers permission --> >+ [% END %] > [% IF ( CAN_user_borrowers ) %] > [% IF ( statisticsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/statistics.pl?borrowernumber=[% borrowernumber %]">Statistics</a></li> > [% END %] >- [% IF EnableBorrowerFiles %] >- [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li> >+ [% IF ( CAN_user_borrowers ) %] >+ [% IF ( EnableBorrowerFiles ) %] >+ [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li> >+ [% END %] > [% END %] >- > [% IF ( CAN_user_borrowers ) %] > [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase suggestions</a></li> > [% END %] >- [% IF CAN_user_borrowers && useDischarge %] >- [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li> >+ [% IF ( CAN_user_borrowers ) %] >+ [% IF ( useDischarge ) %] >+ [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li> >+ [% END %] > [% END %] > </ul></div> > [% END %] >-- >1.7.10.4
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 15386
:
45726
|
45987