Bugzilla – Attachment 76428 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.41 KB, created by
Katrin Fischer
on 2018-06-26 06:12:02 UTC
(
hide
)
Description:
Bug 17886: Don't show option to add to existing list if there are no lists
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-06-26 06:12:02 UTC
Size:
7.41 KB
patch
obsolete
>From 4167e1af4047a52c4f627eda7f8069424c4e7215 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. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../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.1.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