Bugzilla – Attachment 25056 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 - Don't show list permissions when adding public lists/sharing lists is not allowed
Bug-10865---Dont-show-list-permissions-when-adding.patch (text/plain), 9.88 KB, created by
Owen Leonard
on 2014-02-05 15:22:58 UTC
(
hide
)
Description:
Bug 10865 - Don't show list permissions when adding public lists/sharing lists is not allowed
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-02-05 15:22:58 UTC
Size:
9.88 KB
patch
obsolete
>From be6edaa7e48087c34f6a0cf5b1a27861691a8b04 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 - 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. >--- > .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 38 +++++++++++--------- > .../opac-tmpl/prog/en/modules/opac-shelves.tt | 16 ++++++--- > 2 files changed, 33 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..2a172b5 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,17 @@ > <option value="2">Public</option> > [% END %] > </select> >- [% END %] >- </li> >- [% INCLUDE list_permissions %] >+ </li> >+ [% INCLUDE list_permissions %] >+ [% END %] > </ol> >+ [% UNLESS ( OpacAllowPublicListCreation ) %] >+ <input type="hidden" name="category" value="1" /> >+ [% 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 +729,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..b8f201f 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,20 @@ $(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 ) %] >+ <input type="hidden" name="category" value="1" /> >+ [% 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 +757,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.9.5
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