Bugzilla – Attachment 25168 Details for
Bug 10865
Don't show list permissions when adding public lists/sharing lists is not allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10865 [Revised] Don't show list permissions when adding public lists/sharing lists is not allowed
Bug-10865-Revised-Dont-show-list-permissions-when-.patch (text/plain), 10.57 KB, created by
Marcel de Rooy
on 2014-02-10 09:20:24 UTC
(
hide
)
Description:
Bug 10865 [Revised] Don't show list permissions when adding public lists/sharing lists is not allowed
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-02-10 09:20:24 UTC
Size:
10.57 KB
patch
obsolete
>From c5983e15044fc8b6c224c1c06c2246967fc1a549 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 >Content-Type: text/plain; charset=utf-8 > >If patron creation of public lists is disallowed by the >OpacAllowPublicListCreation system preference the "category" option >should be hidden altogether instead of showing a <select> with "private" >as the only option. This patch hides category and permissions controls >when OpacAllowPublicListCreation is set to "don't allow." > >To test you must have the virtualshelves system preference enabled. >Apply the patch and log into the OPAC. Test: > >- With OpacAllowPublicListCreation enabled, create a new list. You > should see options for setting category and permissions. Saving the > new list should complete correctly and save the right settings. >- With OpacAllowPublicListCreation enabled, edit an existing list. You > should see the same options and saving your changes should work > correctly. >- With OpacAllowPublicListCreation disabled, create a new list. You > should only see fields for title and sort. Saving this list should > complete correctly and save the right settings. >- With OpacAllowPublicListCreation disabled, edit an existing list. You > should be able to edit only title and sort settings. Saving your > changes should work correctly. > >Repeat your tests for both prog and bootstrap themes. > >Revision: Existing public lists can be edited and retain their public >status even if OpacAllowPublicListCreation has since been disabled. This >preserves the behavior previous to this patch. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 42 ++++++++++++------- > .../opac-tmpl/prog/en/modules/opac-shelves.tt | 20 +++++++-- > 2 files changed, 41 insertions(+), 21 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 cfce27b..b5c8086 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -9,7 +9,7 @@ > > [% BLOCK list_permissions %] > <li> >- <label for="permissions">Permissions: </label> >+ <label for="allow_add">Permissions: </label> > <select name="allow_add" id="allow_add"> > [% IF allow_add %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] > [% IF allow_add %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] >@@ -519,8 +519,8 @@ > [% END %] > </select> > </li> >- <li> >- [% IF (OpacAllowPublicListCreation) %] >+ [% IF (OpacAllowPublicListCreation) %] >+ <li> > <label for="category">Category:</label> > <select name="category" id="category"> > [% IF ( category1 ) %] >@@ -534,14 +534,21 @@ > <option value="2">Public</option> > [% END %] > </select> >- [% END %] >- </li> >- [% INCLUDE list_permissions %] >+ </li> >+ [% INCLUDE list_permissions %] >+ [% END %] > </ol> >+ [% UNLESS ( OpacAllowPublicListCreation ) %] >+ [% IF ( category2 ) %] >+ <input type="hidden" name="category" value="2" /> >+ [% ELSE %] >+ <input type="hidden" name="category" value="1" /> >+ [% END %] >+ [% END %] > </fieldset> > > <fieldset class="action"> >- <input type="submit" value="Save" class="submit" /> >+ <input type="submit" value="Save" class="btn" /> > [% IF ( showprivateshelves ) %] > <a class="cancel" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=[% shelfnumber %]&display=privateshelves">Cancel</a> > [% ELSE %] >@@ -726,16 +733,19 @@ > </select> > </li> > <li> >- <label for="category">Category:</label> >- <select name="category" id="category"> >- <option value="1">Private</option> >- [% IF (OpacAllowPublicListCreation) %] >- <option value="2">Public</option> >- [% END %] >- </select> >- </li> >- [% INCLUDE list_permissions %] >+ [% IF (OpacAllowPublicListCreation) %] >+ <label for="category">Category:</label> >+ <select name="category" id="category"> >+ <option value="1">Private</option> >+ <option value="2">Public</option> >+ </select> >+ </li> >+ [% INCLUDE list_permissions %] >+ [% END %] > </ol> >+ [% UNLESS (OpacAllowPublicListCreation) %] >+ <input type="hidden" name="category" value="1" /> >+ [% END %] > </fieldset> > <fieldset class="action"> > <input type="submit" onclick="Check(this.form); return false;" value="Save" class="btn" /> >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 %] > <li> >- <label for="permissions">Permissions: </label> >+ <label for="allow_add">Permissions: </label> > <select name="allow_add" id="allow_add"> > [% IF allow_add %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] > [% IF allow_add %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] >@@ -564,17 +564,24 @@ $(document).ready(function() { > [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] > </select> > </li> >+ [% IF (OpacAllowPublicListCreation) %] > <li> >- [% IF (OpacAllowPublicListCreation) %] > <label for="category">Category:</label> > <select name="category" id="category"> > [% IF ( category1 ) %]<option value="1" selected="selected">Private</option>[% ELSE %]<option value="1">Private</option>[% END %] > [% IF ( category2 ) %]<option value="2" selected="selected">Public</option>[% ELSE %]<option value="2">Public</option>[% END %] > </select> >- [% END %] > </li> > [% INCLUDE list_permissions %] >+ [% END %] > </ol> >+ [% UNLESS ( OpacAllowPublicListCreation ) %] >+ [% IF ( category2 ) %] >+ <input type="hidden" name="category" value="2" /> >+ [% ELSE %] >+ <input type="hidden" name="category" value="1" /> >+ [% END %] >+ [% END %] > </fieldset> > <fieldset class="action"><input type="submit" value="Save" class="submit" /> [% IF ( showprivateshelves ) %]<a class="cancel" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=[% shelfnumber %]&display=privateshelves">Cancel</a>[% ELSE %]<a class="cancel" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=[% shelfnumber %]">Cancel</a>[% END %]</fieldset> > </form> >@@ -754,17 +761,20 @@ $(document).ready(function() { > <option value="itemcallnumber">Call number</option> > </select> > </li> >+ [% IF (OpacAllowPublicListCreation) %] > <li> > <label for="category">Category:</label> > <select name="category" id="category"> > <option value="1">Private</option> >- [% IF (OpacAllowPublicListCreation) %] > <option value="2">Public</option> >- [% END %] > </select> > </li> > [% INCLUDE list_permissions %] >+ [% END %] > </ol> >+ [% UNLESS (OpacAllowPublicListCreation) %] >+ <input type="hidden" name="category" value="1" /> >+ [% END %] > </fieldset> > <fieldset class="action"> > <input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" /> >-- >1.7.7.6
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 10865
:
20955
|
25056
|
25058
|
25137
|
25168
|
25202
|
25203
|
25552
|
25621
|
25623
|
25655
|
25656
|
26074
|
26075
|
26076
|
26077
|
26923
|
26934
|
26935
|
26936
|
26937