Bugzilla – Attachment 76306 Details for
Bug 17886
Don't show option to add to existing list if there are no lists in staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17886: Don't show option to add to existing list if there are no lists
Bug-17886-Dont-show-option-to-add-to-existing-list.patch (text/plain), 7.35 KB, created by
Maryse Simard
on 2018-06-22 19:49:12 UTC
(
hide
)
Description:
Bug 17886: Don't show option to add to existing list if there are no lists
Filename:
MIME Type:
Creator:
Maryse Simard
Created:
2018-06-22 19:49:12 UTC
Size:
7.35 KB
patch
obsolete
>From 5e14ba3706c43923007528c6027ffdf5176211d7 Mon Sep 17 00:00:00 2001 >From: Caitlin Goodger <caitlingoodger.student@wegc.school.nz> >Date: Tue, 29 May 2018 17:32:12 +0000 >Subject: [PATCH] Bug 17886: Don't show option to add to existing list if there > are no lists > >This patch modifies the page for adding a title to a list so that the >"Add to existing list" option doesn't appear if there are no lists >defined. > >TEST PLAN >--------- >1) Make sure no lists exist at all. >2) Make there is at least one findable biblio record entered >3) Find that biblio record in the OPAC >4) Click 'Save to your lists' > -- Notice that the whole save to list section is there. >5) Apply this patch >6) Click 'Cancel' >7) Click 'Save to your lists' > -- Notice you can only add now, which makes sense. >8) Run koha qa test tools. > >Perform the same tests in the staff client. > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> >Followed the test plan and the patch works. >--- > .../en/modules/virtualshelves/addbybiblionumber.tt | 86 +++++++++++----------- > .../bootstrap/en/modules/opac-addbybiblionumber.tt | 2 +- > 2 files changed, 45 insertions(+), 43 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt >index 2c12401..ae403c5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt >@@ -15,26 +15,27 @@ > [% ELSE %] > > [% IF ( multiple ) %] >- <h1>Add [% total %] items to [% IF ( singleshelf ) %]<em>[% shelfname | html%]</em>: [% ELSE %]a list:[% END %]</h1> >+ <h1>Add [% total %] items to [% IF ( singleshelf ) %]<em>[% shelfname | html%]</em>: [% ELSE %]a list:[% END %]</h1> > [% ELSE %] > <h1>Add to [% IF ( singleshelf ) %]<em>[% shelfname | html %]</em>[% ELSE %]a list:[% END %]</h1> > [% END %] >- <ul> >- [% FOREACH biblio IN biblios %] >- <li> <span class="title">[% biblio.title |html %]</span> >- [% IF ( biblio.author ) %]<span class="author"> [% biblio.author %] </span>[% END %] >- </li> >- [% END %] >+ <ul> >+ [% FOREACH biblio IN biblios %] >+ <li> <span class="title">[% biblio.title |html %]</span> >+ [% IF ( biblio.author ) %]<span class="author"> [% biblio.author %] </span>[% END %] >+ </li> >+ [% END %] > </ul> > >- <form name="f1" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl" method="post"> >+ <form name="f1" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl" method="post"> > [% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %] >- <input type="hidden" name="confirmed" value="1" /> >- [% IF ( shelfnumber ) %]<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />[% END %] >+ <input type="hidden" name="confirmed" value="1" /> >+ [% IF ( shelfnumber ) %]<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />[% END %] > > [% UNLESS ( shelfnumber ) %] > > [% UNLESS ( newshelf ) %] >+ [% IF ( private_shelves.count ) %] > <fieldset class="rows"> > <legend>Select an existing list</legend> > <ol> >@@ -65,38 +66,39 @@ > </select> > </li> > </ol> >- [% FOREACH biblio IN biblios %]<input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %] >- [% UNLESS ( biblionumbers ) %] >- <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> >- [% ELSE %] >- <input type="hidden" name="biblionumbers" value="[% biblionumbers %]" /> >- [% END %] >- </fieldset> >+ [% FOREACH biblio IN biblios %]<input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %] >+ [% UNLESS ( biblionumbers ) %] >+ <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> >+ [% ELSE %] >+ <input type="hidden" name="biblionumbers" value="[% biblionumbers %]" /> >+ [% END %] >+ </fieldset> > >- <p>... or...</p> >+ <p>... or...</p> >+[% END %] > [% END %] > > <fieldset class="rows"><legend>Add to a new list:</legend> >- <ol><li> >- <label for="newvirtualshelf"> >- List name: >- </label> >- [% FOREACH biblio IN biblios %]<input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %] >- [% UNLESS ( biblionumbers ) %] >- <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber %]" /> >- [% ELSE %] >- <input type="hidden" name="biblionumbers" id="biblionumbers" value="[% biblionumbers %]" /> >- [% END %] >- <input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" /> >- <input type="hidden" name="confirmed" value="1" /> >- </li> >- <li> >- <label for="category">Category:</label> >- <select name="category" id="category"> >- <option value="1">Private</option> >- <option value="2">Public</option> >- </select> >- </li></ol> >+ <ol><li> >+ <label for="newvirtualshelf"> >+ List name: >+ </label> >+ [% FOREACH biblio IN biblios %]<input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %] >+ [% UNLESS ( biblionumbers ) %] >+ <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber %]" /> >+ [% ELSE %] >+ <input type="hidden" name="biblionumbers" id="biblionumbers" value="[% biblionumbers %]" /> >+ [% END %] >+ <input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" /> >+ <input type="hidden" name="confirmed" value="1" /> >+ </li> >+ <li> >+ <label for="category">Category:</label> >+ <select name="category" id="category"> >+ <option value="1">Private</option> >+ <option value="2">Public</option> >+ </select> >+ </li></ol> > </fieldset> > > >@@ -104,11 +106,11 @@ > > > <!-- SAVE --> >- <fieldset class="action"> >+ <fieldset class="action"> > <input type="hidden" name="sortfield" value="title" /> >- <input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a> >- </fieldset> >- </form> >+ <input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a> >+ </fieldset> >+ </form> > <!-- /SAVE --> > > [% SET popup_window = 1 %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >index 164c750..aaa34e1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >@@ -23,7 +23,7 @@ > </li> > [% END %] > </ul> >- [% IF private_shelves.count or public_shelves.count or private_shelves_shared_with_me %] >+ [% IF private_shelves.count or public_shelves.count or private_shelves_shared_with_me.count %] > <form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post"> > <fieldset> > <legend>Select a list</legend> >-- >2.7.4
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 17886
:
59138
|
59142
|
59282
|
59381
|
61117
|
75640
|
76306
|
76428