From 7dd0e9a41fd639e86ed32d98d863d605a6ba63e8 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 21 Feb 2014 20:44:24 +0000 Subject: [PATCH] bug 10865: (follow-up) allow patrons to make their public lists private when OpacAllowPublicListCreation is off This patch ensures that patrons continue to have the ability to make their public lists private for any public lists they control that were created before the library turned the OpacAllowPublicListCreation system preference off. To test: [1] Ensure OpacAllowPublicListCreation is on. [2] As a patron, create a public list in the OPAC. Also, create a private list. [3] Turn OpacAllowPublicListCreation off. [4] Back in the OPAC, verify that the public list can be edited and that there are drop-downs for category and permissions. Also verify that there is a warning that the patron cannot change it back if they convert a public list to private. [5] Edit the private list created in step 2. Verify that the category and permissions drop-downs are not displayed. Signed-off-by: Galen Charlton Signed-off-by: Jonathan Druart Signed-off-by: Marcel de Rooy Signed-off-by: Broust Signed-off-by: Katrin Fischer Signed-off-by: Galen Charlton --- .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 13 ++++++------- koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) 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 de5cee5fb7..39159ccb75 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -543,7 +543,7 @@ [% END %] - [% IF (OpacAllowPublicListCreation) %] + [% IF ( OpacAllowPublicListCreation || category2 ) %]
  • + [% IF ( category2 && !OpacAllowPublicListCreation ) %] + The library has disabled the ability for patrons to create new public lists. If you make your list private, you will not be able to make it public again. + [% END %]
  • [% INCLUDE list_permissions %] [% END %] - [% UNLESS ( OpacAllowPublicListCreation ) %] - [% IF ( category2 ) %] - - [% ELSE %] - - [% END %] + [% UNLESS ( OpacAllowPublicListCreation || category2 ) %] + [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt index a961d5d633..b157994047 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt @@ -564,23 +564,22 @@ $(document).ready(function() { [% IF ( sortfield == "itemcallnumber" ) %][% ELSE %][% END %] - [% IF (OpacAllowPublicListCreation) %] + [% IF ( OpacAllowPublicListCreation || category2 ) %]
  • + [% IF ( category2 && !OpacAllowPublicListCreation ) %] + The library has disabled the ability for patrons to create new public lists. If you make your list private, you will not be able to make it public again. + [% END %]
  • [% INCLUDE list_permissions %] [% END %] - [% UNLESS ( OpacAllowPublicListCreation ) %] - [% IF ( category2 ) %] - - [% ELSE %] - - [% END %] + [% UNLESS ( OpacAllowPublicListCreation || category2 ) %] + [% END %]
    [% IF ( showprivateshelves ) %]Cancel[% ELSE %]Cancel[% END %]
    -- 2.39.5