From c40ba60755405ba40f107d945f988bd7168a3cc7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 13 Sep 2013 10:50:27 -0400 Subject: [PATCH] Bug 10865 [Revised] Don't show list permissions when adding public lists/sharing lists is not allowed If patron creation of public lists is disallowed by the OpacAllowPublicListCreation system preference the "category" option should be hidden altogether instead of showing a [% IF allow_add %][% ELSE %][% END %] [% IF allow_add %][% ELSE %][% END %] @@ -543,8 +543,8 @@ [% END %] -
  • - [% IF (OpacAllowPublicListCreation) %] + [% IF (OpacAllowPublicListCreation) %] +
  • - [% END %] -
  • - [% INCLUDE list_permissions %] + + [% INCLUDE list_permissions %] + [% END %] + [% UNLESS ( OpacAllowPublicListCreation ) %] + [% IF ( category2 ) %] + + [% ELSE %] + + [% END %] + [% END %]
    - + [% IF ( showprivateshelves ) %] Cancel [% ELSE %] @@ -750,16 +757,19 @@
  • - - -
  • - [% INCLUDE list_permissions %] + [% IF (OpacAllowPublicListCreation) %] + + + + [% INCLUDE list_permissions %] + [% END %] + [% UNLESS (OpacAllowPublicListCreation) %] + + [% 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 0ccd7b6..a961d5d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt @@ -214,7 +214,7 @@ $(document).ready(function() { [% BLOCK list_permissions %]
  • - +
  • + [% IF (OpacAllowPublicListCreation) %]
  • - [% IF (OpacAllowPublicListCreation) %] - [% END %]
  • [% INCLUDE list_permissions %] + [% END %] + [% UNLESS ( OpacAllowPublicListCreation ) %] + [% IF ( category2 ) %] + + [% ELSE %] + + [% END %] + [% END %]
    [% IF ( showprivateshelves ) %]Cancel[% ELSE %]Cancel[% END %]
    @@ -754,17 +761,20 @@ $(document).ready(function() { + [% IF (OpacAllowPublicListCreation) %]
  • [% INCLUDE list_permissions %] + [% END %] + [% UNLESS (OpacAllowPublicListCreation) %] + + [% END %]
    -- 1.7.2.5