Improving the formatting of the "add to shelf" pop-up. Changing the way the list...
authorOwen Leonard <oleonard@myacpl.org>
Mon, 29 Oct 2007 18:54:08 +0000 (13:54 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 29 Oct 2007 21:21:41 +0000 (16:21 -0500)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>

koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tmpl
virtualshelves/addbybiblionumber.pl

index 646b55b..1914894 100644 (file)
@@ -2,7 +2,7 @@
 <title>Koha &rsaquo; Add to Virtual Shelf</title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <style type="text/css">
-   #custom-doc { width:38.46em;*width:37.53em;min-width:500px; margin: auto; text-align:left; }
+   #custom-doc { width:34.62em;*width:33.78em;min-width:450px; margin:auto; margin-top: .4em;text-align:left; } 
    </style>
 </head>
 <body>
    <div id="bd">
 
 
-<h1>Add 
+<h3>Add 
     <i><!-- TMPL_VAR NAME="title" --></i>
     <!-- TMPL_IF NAME="author" -->
         by <!-- TMPL_VAR NAME="author" -->
     <!-- /TMPL_IF --> to a virtual shelf
-</h1>
+</h3>
 
-<form name="f1" method="post" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl">
+<!-- TMPL_IF NAME="CGIvirtualshelves" --><form name="f1" method="post" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl">
     <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-    
-    <b>Select an existing shelf</b>
-    <p>
-        <label>Add to virtual shelf</label><!-- TMPL_VAR NAME="CGIvirtualshelves" -->
-    </p>
+    <fieldset class="rows">
+    <legend>Select an existing shelf</legend>
+    <ol>
+        <li><label>Choose shelf</label><!-- TMPL_VAR NAME="CGIvirtualshelves" --></li>
+    </ol>
     <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-    <input type="submit" value="Add to virtual shelf" class="submit" />
+    <fieldset class="action"><input type="submit" value="Save" class="submit" /></fieldset>
+       </fieldset>
 </form>
-<p>...or...</p>
+<h4>...or...</h4><!-- /TMPL_IF -->
+
 <form name="f2" method="post" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl">
-    <b>Add to a new shelf:</b>
-        <p>
+    <fieldset class="rows"><legend>Add to a new shelf:</legend>
+        <ol><li>
             <label for="newvirtualshelf">
                 Shelf name:
             </label>
                        <input type="hidden" name="biblionumber" id="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
             <input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" />
-        </p>
-        <p>
+        </li>
+        <li>
             <label for="category">Category:</label>
             <select name="category" id="category">
                 <option value="1">Private</option>
                 <option value="2">Public</option>
                                <option value="3">Free</option>
             </select>
-        </p>
-    <input type="submit" value="Add to virtual shelf" class="submit" /> 
+        </li></ol>
+    <fieldset class="action"><input type="submit" value="Save" class="submit" /></fieldset> </fieldset>
 </form>
 
 </div>
index 00a5f81..456f51e 100755 (executable)
@@ -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;