Bugzilla – Attachment 108425 Details for
Bug 24884
Remove 'New list' button in 'Public lists' tab if OpacAllowPublicListCreation is disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24884: Remove 'New list' button in 'Public lists' tab if OpacAllowPublicListCreation is disabled
Bug-24884-Remove-New-list-button-in-Public-lists-t.patch (text/plain), 2.64 KB, created by
Katrin Fischer
on 2020-08-17 22:10:27 UTC
(
hide
)
Description:
Bug 24884: Remove 'New list' button in 'Public lists' tab if OpacAllowPublicListCreation is disabled
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-08-17 22:10:27 UTC
Size:
2.64 KB
patch
obsolete
>From 93c5463e282b0cefdca7a5e6206d6dd44be5cc4f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 17 Aug 2020 16:57:54 +0000 >Subject: [PATCH] Bug 24884: Remove 'New list' button in 'Public lists' tab if > OpacAllowPublicListCreation is disabled > >This patch adds a check on the OpacAllowPublicListCreation system >preference to the OPAC lists template so that if public list creation is >disabled the "New list" button doesn't appear under the "Public lists" >tab. > >To test, apply the patch and confirm that the virtualshelves preference >is enabled. > >- With the OpacAllowPublicListCreation system preference enabled, go to > the OPAC and view the lists page. > - If you are logged in you should see a "New list" link under both the > "Your lists" tab and the "Public lists" tab. > - If you are not logged in you should see "Log in to create a new > list" on both pages. >- View the page with OpacAllowPublicListCreation disabled. > - If you are logged in you should see a "New list" link under only the > "Your lists" tab. > - If you are not logged in you should see the "Log in" link only under > the "Your lists" tab. > >Works perfectly! > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index 46cbf0fedb..53158da342 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -662,6 +662,7 @@ > <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;"> > [% END %] > >+ [% IF category == PRIVATE || Koha.Preference('OpacAllowPublicListCreation') %] > [% IF loggedinusername %] > <div id="toolbar" class="toolbar"><a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-plus" aria-hidden="true"></i> New list</a></div> > [% ELSE %] >@@ -669,6 +670,7 @@ > <div class="alert alert-info"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form">Log in to create a new list</a></div> > [% END %] > [% END %] >+ [% END %] > > [% IF shelves.count %] > <table class="table"> >-- >2.11.0
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 24884
:
108414
|
108416
| 108425