Bugzilla – Attachment 26934 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]
[PASSED QA] Bug 10865 [Revised] Don't show list permissions when adding public lists/sharing lists is not allowed
PASSED-QA-Bug-10865-Revised-Dont-show-list-permiss.patch (text/plain), 10.93 KB, created by
Katrin Fischer
on 2014-04-09 20:47:25 UTC
(
hide
)
Description:
[PASSED QA] Bug 10865 [Revised] Don't show list permissions when adding public lists/sharing lists is not allowed
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-04-09 20:47:25 UTC
Size:
10.93 KB
patch
obsolete
>From abecea0574d35b67f81c5c1d2f15a5aa3a62e3b8 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 13 Sep 2013 10:50:27 -0400 >Subject: [PATCH] [PASSED QA] 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 <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> >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >This patch fixes a big ergonomic issue. >Note: to me, the "New list" action should be outside the tabs. >It is confusing to have a "new list" into the public lists tab when it >is not possible to create new public lists. > >Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > .../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 eb9f65b..2f0fe36 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 %] >@@ -543,8 +543,8 @@ > [% END %] > </select> > </li> >- <li> >- [% IF (OpacAllowPublicListCreation) %] >+ [% IF (OpacAllowPublicListCreation) %] >+ <li> > <label for="category">Category:</label> > <select name="category" id="category"> > [% IF ( category1 ) %] >@@ -558,14 +558,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 %] >@@ -750,16 +757,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.8.3.2
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