From be09e128602eb9cd3377e15ed834ed7fe170d8a4 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 29 Oct 2007 13:54:08 -0500 Subject: [PATCH] Improving the formatting of the "add to shelf" pop-up. Changing the way the list of existing shelves is passed to the template so that the "existing shelves" option can be hidden if there are no existing shelves. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- .../virtualshelves/addbybiblionumber.tmpl | 36 ++++++++++--------- virtualshelves/addbybiblionumber.pl | 7 ++-- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tmpl index 646b55b12a..19148946c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tmpl @@ -2,7 +2,7 @@ Koha › Add to Virtual Shelf @@ -11,42 +11,44 @@
-

Add +

Add by to a virtual shelf -

+ -
+ " /> - - Select an existing shelf -

- -

+
+ Select an existing shelf +
    +
  1. +
" /> - +
+
-

...or...

+

...or...

+
- Add to a new shelf: -

+

Add to a new shelf: +
  1. " /> -

    -

    +

  2. +
  3. -

    - +
+
diff --git a/virtualshelves/addbybiblionumber.pl b/virtualshelves/addbybiblionumber.pl index 00a5f81032..456f51edcd 100755 --- a/virtualshelves/addbybiblionumber.pl +++ b/virtualshelves/addbybiblionumber.pl @@ -100,7 +100,7 @@ else { # this shelf doesn't already exist. push( @shelvesloop, $element ); $shelvesloop{$element} = $shelflist->{$element}->{'shelfname'}; } - + if(@shelvesloop gt 0){ my $CGIvirtualshelves = CGI::scrolling_list( -name => 'shelfnumber', -values => \@shelvesloop, @@ -109,12 +109,15 @@ else { # this shelf doesn't already exist. -tabindex => '', -multiple => 0 ); + $template->param( + CGIvirtualshelves => $CGIvirtualshelves, + ); + } $template->param( biblionumber => $biblionumber, title => $biblios[0]->{'title'}, author => $biblios[0]->{'author'}, - CGIvirtualshelves => $CGIvirtualshelves, ); output_html_with_http_headers $query, $cookie, $template->output; -- 2.39.5