various virtual shelves/lists fixes
[koha_fer] / koha-tmpl / opac-tmpl / prog / en / includes / masthead.inc
index 619db46..69a2007 100644 (file)
@@ -1,45 +1,22 @@
-<style type="text/css">
-       .btn { display: block; position: relative; background: #aaa; padding: 5px; float: right; color: #fff; text-decoration: none; cursor: pointer; }
-       .btn * { font-style: normal; background-image: url('../../opac-tmpl/prog/images/button-background.png'); background-repeat: no-repeat; display: block; position: relative; }
-       .btn i { background-position: top left; position: absolute; margin-bottom: -5px;  top: 0; left: 0; width: 5px; height: 5px; }
-       .btn span { background-position: bottom left; left: -5px; padding: 0 0 5px 10px; margin-bottom: -5px; }
-       .btn span i { background-position: bottom right; margin-bottom: 0; position: absolute; left: 100%; width: 10px; height: 100%; top: 0; }
-       .btn span span { background-position: top right; position: absolute; right: -10px; margin-left: 10px; top: -5px; height: 0; }
-
-       * html .btn span,
-       * html .btn i { float: left; width: auto; background-image: none; cursor: pointer; }
-
-       .btn.blue { background: #2ae; }
-       .btn.blue:hover { background-color: #6699FF;}
-       .btn.green { background: #9d4; }
-       .btn.green:hover { background-color: #D5DD4D; }
-       .btn:active { background-color: #444; }
-       .btn[class] {  background-image: url('../../opac-tmpl/prog/images/button-background-gradient.png'); background-position: bottom; }
-
-       * html .btn { border: 3px double #aaa; }
-       * html .btn.blue { border-color: #2ae; }
-       * html .btn.green { border-color: #9d4; }
-       * html .btn:hover { border-color: #a00; }
-       #cartmenulink { margin-right :  1em;    }
-
-</style>
 <div id="members">
        <ul><!-- TMPL_IF NAME="loggedinusername" --><li><span class="members">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername"><!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP --></span></a></span></li><li><a class="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1">Log Out</a></li><!-- TMPL_ELSE --><li><a href="/cgi-bin/koha/opac-user.pl">Log in to Your Account</a></li><!-- /TMPL_IF -->
        </ul>   
 </div>
 
 <div id="opac-main-search" class="yui-g">
-
    <div id="masthead">
-   <h1 id="libraryname" <!-- TMPL_IF NAME="opacsmallimage" -->style="background-image: url('<!-- TMPL_VAR NAME="opacsmallimage" -->');"><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-main.pl"><!-- TMPL_IF NAME="LibraryName" --><!-- TMPL_VAR NAME="LibraryName" --><!-- TMPL_ELSE -->Koha Online Catalog<!-- /TMPL_IF --></a></h1>
+   <!-- TMPL_IF NAME="opacsmallimage" -->
+   <h1 id="libraryname" style="background-image: url('<!-- TMPL_VAR NAME="opacsmallimage" -->');">
+   <!-- TMPL_ELSE -->
+   <h1 id="libraryname">
+   <!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-main.pl"><!-- TMPL_IF NAME="LibraryName" --><!-- TMPL_VAR NAME="LibraryName" --><!-- TMPL_ELSE -->Koha Online Catalog<!-- /TMPL_IF --></a></h1>
    </div>
 
 <div id="fluid">
 <div id="fluid-offset">
-<div id="fluid-content-1">
-    <form name="searchform" style="border: 1px solid #FFC;" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform">
-       <label for="masthead_search"> Search <!-- TMPL_IF name="mylibraryfirst" --> <!-- TMPL_IF name="loggedinusername" -->(in <!-- TMPL_VAR name="LoginBranchcode" --> only)<!-- /TMPL_IF --><!-- /TMPL_IF --></label>
-       <select name="idx" id="masthead_search">
+<!-- TMPL_UNLESS NAME="advsearch" --><form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform">
+       <label for="masthead_search" class="left"> Search <!-- TMPL_IF name="mylibraryfirst" --> <!-- TMPL_IF name="loggedinusername" -->(in <!-- TMPL_VAR name="LoginBranchcode" --> only)<!-- /TMPL_IF --><!-- /TMPL_IF --></label>
+       <select name="idx" id="masthead_search" class="left">
        <!-- TMPL_IF NAME="ms_kw" -->
         <option selected="selected" value="">Library Catalog</option>
                <!-- TMPL_ELSE -->
         <option value="callnum">Call Number</option>
                <!-- /TMPL_IF --></select>
 <!-- TMPL_IF NAME="ms_value" -->
-        <input type="text" name="q" value="<!-- TMPL_VAR NAME="ms_value" -->"  style="width: 40%;" />
+        <input type="text" name="q" value="<!-- TMPL_VAR NAME="ms_value" -->" class="left" style="width: 40%;" />
 <!-- TMPL_ELSE -->
-        <input type="text" name="q" style="width: 40%;" />
+        <input type="text" name="q" class="left" style="width: 35%; font-size: 111%;" />
 <!-- /TMPL_IF -->
         <!-- TMPL_IF name="mylibraryfirst" --><!-- TMPL_IF name="loggedinusername" -->
             <input name="limit" value="<!-- TMPL_VAR name="LoginBranchcode" -->" type="hidden" />
         <!-- /TMPL_IF --><!-- /TMPL_IF -->
-        <input type="submit" value="Search" class="submit" />
-               
+        <input type="submit" value="Go" id="searchsubmit" class="btn blue left" />
+               <!-- TMPL_IF EXPR="opacbookbag || virtualshelves" -->
+<!-- TMPL_IF NAME="opacbookbag" --><span id="cmspan"></span><!-- /TMPL_IF --><!--TMPL_IF NAME="virtualshelves" --><a class="btn blue left" id="listsmenulink" href="/cgi-bin/koha/opac-shelves.pl">Lists</a><!-- /TMPL_IF --><!-- /TMPL_IF -->
     </form>
-       
-       <div id="moresearches"><a href="/cgi-bin/koha/opac-search.pl">Advanced Search</a><!-- TMPL_IF name="OpacBrowser" --> | <a href="/cgi-bin/koha/opac-browser.pl">Browse by Hierarchy</a><!-- /TMPL_IF --><!-- TMPL_IF name="OpacAuthorities" --> | <a href="/cgi-bin/koha/opac-authorities-home.pl">Browse by Subject</a><!-- /TMPL_IF --><!-- TMPL_IF name="OpacCloud" --> | <a href="/cgi-bin/koha/opac-tags_subject.pl">Tag Cloud</a><!-- /TMPL_IF --><!-- TMPL_IF name="OpacTopissue" --> | <a href="/cgi-bin/koha/opac-topissues.pl">Most Popular</a><!-- /TMPL_IF --></div>
-
-</div>
-<div id="fluid-content-2">
 
-<script type="text/javascript">
-$(document).ready(function() {
-         //  <!-- TMPL_IF NAME="opacbookbag" -->var cartButton = new YAHOO.widget.Button("cartmenulink");<!-- /TMPL_IF -->
-               //<!--TMPL_IF NAME="virtualshelves" -->var listsButton = new YAHOO.widget.Button("listsmenulink");<!-- /TMPL_IF -->
- });
-   <!--TMPL_IF NAME="virtualshelves" -->YAHOO.util.Event.onContentReady("listsmenu", function () {
-        var listMenu = new YAHOO.widget.Menu("listsmenu", { lazyload: true });
-               listMenu.render();
-               listMenu.cfg.setProperty("context", ["listsmenulink", "tr", "br"]);
-               listMenu.subscribe("show", listMenu.focus);
-        function positionlistMenu() {
-                    listMenu.align("tr", "br");
-               }
-               YAHOO.util.Event.addListener("listsmenulink", "click", listMenu.show, null, listMenu);
-               YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionlistMenu);
-    });<!-- /TMPL_IF -->
-    
-               <!-- TMPL_IF NAME="opacbookbag" -->function init() {
-                       
-                       var cartOverlay = new YAHOO.widget.Overlay("cartDetails", { context:["cartmenulink","tr","br"],
-                                                                                                                                         visible:false,
-                                                                                                                                         width:"200px" } );
-                       cartOverlay.render();
-                       
-       //              var cartOverlay = new YAHOO.widget.Overlay("cartDetails", { context:["cartmenulink","tr","br"],
-       //                                                                                                                                                                visible:false,
-       //                                                                                                                                                                width:"200px" } );
-       //              cartOverlay.setBody("Your cart has "+basketcount+" items in it");
-       //              cartOverlay.render(document.body);
-
-                       YAHOO.util.Event.addListener("cartmenulink", "mouseover", cartOverlay.show, cartOverlay, true);
-                       YAHOO.util.Event.addListener("cartmenulink", "mouseout", cartOverlay.hide, cartOverlay, true);
-                       YAHOO.util.Event.addListener("cartmenulink", "click", cartOverlay.hide, cartOverlay, true);
-               }
+<div id="moresearches"><a href="/cgi-bin/koha/opac-search.pl">Advanced Search</a><!-- TMPL_IF name="OpacBrowser" --> | <a href="/cgi-bin/koha/opac-browser.pl">Browse by Hierarchy</a><!-- /TMPL_IF --><!-- TMPL_IF name="OpacAuthorities" --> | <a href="/cgi-bin/koha/opac-authorities-home.pl">Browse by Subject</a><!-- /TMPL_IF --><!-- TMPL_IF name="OpacCloud" --> | <a href="/cgi-bin/koha/opac-tags_subject.pl">Tag Cloud</a><!-- /TMPL_IF --><!-- TMPL_IF name="OpacTopissue" --> | <a href="/cgi-bin/koha/opac-topissues.pl">Most Popular</a><!-- /TMPL_IF --></div>
+<!-- TMPL_ELSE -->
+<div id="moresearches"><!-- TMPL_IF name="OpacBrowser" --> | <a href="/cgi-bin/koha/opac-browser.pl">Browse by Hierarchy</a><!-- /TMPL_IF --><!-- TMPL_IF name="OpacAuthorities" --> | <a href="/cgi-bin/koha/opac-authorities-home.pl">Browse by Subject</a><!-- /TMPL_IF --><!-- TMPL_IF name="OpacCloud" --> | <a href="/cgi-bin/koha/opac-tags_subject.pl">Tag Cloud</a><!-- /TMPL_IF --><!-- TMPL_IF name="OpacTopissue" --> | <a href="/cgi-bin/koha/opac-topissues.pl">Most Popular</a><!-- /TMPL_IF --></div><!-- /TMPL_UNLESS -->
 
-               YAHOO.util.Event.addListener(window, "load", init);<!-- /TMPL_IF -->
-       $(document).ready(function(){
-         $('.btn').each(function(){
-         var b = $(this);
-         var tt = b.text() || b.val();
-         if ($(':submit,:button',this)) {
-         b = $('<a>').insertAfter(this). addClass(this.className).attr('id',this.id);
-         $(this).remove();
-         }
-         b.text('').css({cursor:'pointer'}). prepend('<i></i>').append($('<span>').
-         text(tt).append('<i></i><span></span>'));
-         });
-         });
-          
-</script>
+</div>
+</div>
 
-<!--TMPL_IF NAME="virtualshelves" --><a class="btn blue" id="listsmenulink" href="#">Lists</a><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="opacbookbag" --><a id="cartmenulink" class="btn green" href="/cgi-bin/koha/opac-basket.pl">Cart<span id="basket"></span></a><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="opacbookbag" --><div id="cartDetails" style="visibility:hidden">Your cart is empty.</div><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="opacbookbag" --><div id="cartDetails" style="display: none">Your cart is empty.</div><!-- /TMPL_IF -->
 
 <!-- TMPL_IF NAME="virtualshelves" -->
-<div id="listsmenu" class="yuimenu">
+<div id="listsmenu" class="yuimenu" style="display: none">
     <div class="bd">
-<!-- TMPL_IF NAME="loggedinusername" --><h4>Your Lists</h4>
+       <h4>Public Lists</h4>
                <!-- TMPL_IF NAME="barshelves" -->
                        <ul class="first-of-type">
                        <!-- TMPL_LOOP NAME="barshelvesloop" -->
-                       <li class="yuimenuitem"><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelfnumber" -->"><!-- TMPL_VAR NAME="shelfname" --></a></li>
+                       <!-- TMPL_UNLESS NAME="private" --><li class="yuimenuitem"><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelfnumber" -->"><!-- TMPL_VAR NAME="shelfname" --></a></li><!-- /TMPL_UNLESS -->
                        <!-- /TMPL_LOOP -->
                        </ul>   
                <!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="loggedinusername" -->
+<h4>Your Lists</h4>
+               <!-- TMPL_IF NAME="barshelves" -->
+                       <ul class="first-of-type">
+                       <!-- TMPL_LOOP NAME="barshelvesloop" -->
+                       <!-- TMPL_IF NAME="private" --><li class="yuimenuitem"><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelfnumber" -->"><!-- TMPL_VAR NAME="shelfname" --></a></li><!-- /TMPL_IF -->
+                       <!-- /TMPL_LOOP -->
+                       </ul>   
+               <!-- /TMPL_IF -->
+
                        <ul class="second-of-type">
             <li class="yuimenuitem"><a class="yuimenuitemlabel" href="/cgi-bin/koha/opac-shelves.pl">Manage Lists</a></li>
         </ul>
-               </li><!-- TMPL_ELSE --><ul class="first-of-type"><li><a href="/cgi-bin/koha/opac-user.pl">Log in to Create Your Own Lists</a></li></ul><!-- /TMPL_IF -->
+               <!-- TMPL_ELSE --><ul class="first-of-type"><li><a href="/cgi-bin/koha/opac-user.pl">Log in to Create Your Own Lists</a></li></ul><!-- /TMPL_IF -->
          </div>
 </div>
 <!-- /TMPL_IF -->
-
-
-</div>
-</div>
 </div>
-
-</div>
-
        <div id="breadcrumbs" class="yui-g">
 
 <!-- TMPL_IF NAME="searchdesc" --><p><!-- TMPL_IF name="total" --><strong>&ldquo;<!-- TMPL_VAR NAME="query_desc" --><!-- TMPL_VAR NAME="limit_desc" -->&rdquo; </strong>returned <!-- TMPL_VAR NAME="total" --> results. <!-- TMPL_IF NAME="related" --> (related searches: <!-- TMPL_LOOP NAME="related" --><!-- TMPL_VAR NAME="related_search" --><!-- /TMPL_LOOP -->). <!-- /TMPL_IF -->