From c089df3f3b45782516b63d22c34bc265c667dd35 Mon Sep 17 00:00:00 2001 From: Caitlin Goodger 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 Followed the test plan and the patch works. Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- .../virtualshelves/addbybiblionumber.tt | 86 ++++++++++--------- .../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 2c124019f3..ae403c597d 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 ) %] -

Add [% total %] items to [% IF ( singleshelf ) %][% shelfname | html%]: [% ELSE %]a list:[% END %]

+

Add [% total %] items to [% IF ( singleshelf ) %][% shelfname | html%]: [% ELSE %]a list:[% END %]

[% ELSE %]

Add to [% IF ( singleshelf ) %][% shelfname | html %][% ELSE %]a list:[% END %]

[% END %] -
    - [% FOREACH biblio IN biblios %] -
  • [% biblio.title |html %] - [% IF ( biblio.author ) %] [% biblio.author %] [% END %] -
  • - [% END %] +
      + [% FOREACH biblio IN biblios %] +
    • [% biblio.title |html %] + [% IF ( biblio.author ) %] [% biblio.author %] [% END %] +
    • + [% END %]
    -
    + [% FOREACH biblio IN biblios %] [% END %] - - [% IF ( shelfnumber ) %][% END %] + + [% IF ( shelfnumber ) %][% END %] [% UNLESS ( shelfnumber ) %] [% UNLESS ( newshelf ) %] + [% IF ( private_shelves.count ) %]
    Select an existing list
      @@ -65,38 +66,39 @@
    - [% FOREACH biblio IN biblios %][% END %] - [% UNLESS ( biblionumbers ) %] - - [% ELSE %] - - [% END %] -
    + [% FOREACH biblio IN biblios %][% END %] + [% UNLESS ( biblionumbers ) %] + + [% ELSE %] + + [% END %] + -

    ... or...

    +

    ... or...

    +[% END %] [% END %]
    Add to a new list: -
    1. - - [% FOREACH biblio IN biblios %][% END %] - [% UNLESS ( biblionumbers ) %] - - [% ELSE %] - - [% END %] - - -
    2. -
    3. - - -
    +
    1. + + [% FOREACH biblio IN biblios %][% END %] + [% UNLESS ( biblionumbers ) %] + + [% ELSE %] + + [% END %] + + +
    2. +
    3. + + +
    @@ -104,11 +106,11 @@ -
    +
    - Cancel -
    - + Cancel +
    + [% 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 164c750fd0..aaa34e1b81 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 @@ [% END %]
- [% 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 %]
Select a list -- 2.39.2