Unstable changes to cart/list button interface in the OPAC
[koha.git] / koha-tmpl / opac-tmpl / prog / en / includes / masthead.inc
1 <div class="yui-g"><div id="corner"><!-- TMPL_IF NAME="opaclanguagesdisplay" --><div id="languages">
2         <ul>
3                 <!-- TMPL_LOOP NAME="languages" --><li><a href="/cgi-bin/koha/changelanguage.pl?language=<!-- TMPL_VAR NAME="language" -->"><!-- TMPL_VAR NAME="label" --></a> </li><!-- /TMPL_LOOP -->
4         </ul></div><!-- /TMPL_IF --></div></div>
5
6 <div id="members">
7         <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 -->
8         </ul>   
9 </div>
10
11 <div id="opac-main-search" class="yui-g">
12
13    <div id="masthead">
14    <h1 id="libraryname"><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>
15    </div>
16
17 <div id="fluid">
18 <div id="fluid-offset">
19 <div id="fluid-content-1">
20     <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform">
21         <label for="masthead_search"> Search <!-- TMPL_IF name="mylibraryfirst" --> <!-- TMPL_IF name="loggedinusername" -->(in <!-- TMPL_VAR name="LoginBranchcode" --> only)<!-- /TMPL_IF --><!-- /TMPL_IF --></label>
22         <select name="idx" id="masthead_search">
23         <option <!-- TMPL_IF NAME="ms_kw" -->selected="selected"<!-- /TMPL_IF --> value="">Library Catalog</option>
24         <option <!-- TMPL_IF NAME="ms_ti" -->selected="selected"<!-- /TMPL_IF --> value="ti">Title</option>
25         <option <!-- TMPL_IF NAME="ms_au" -->selected="selected"<!-- /TMPL_IF --> value="au">Author</option>
26         <option <!-- TMPL_IF NAME="ms_su" -->selected="selected"<!-- /TMPL_IF --> value="su">Subject</option>
27                 <option <!-- TMPL_IF NAME="ms_isbn" -->selected="selected"<!-- /TMPL_IF --> value="isbn">ISBN</option>
28         <option <!-- TMPL_IF NAME="ms_se" -->selected="selected"<!-- /TMPL_IF --> value="se">Series</option>
29         <option <!-- TMPL_IF NAME="ms_callnum" -->selected="selected"<!-- /TMPL_IF --> value="callnum">Call Number</option>
30 </select>
31         <input type="text" name="q" <!-- TMPL_IF NAME="ms_value" -->value="<!-- TMPL_VAR NAME="ms_value" -->" <!-- /TMPL_IF --> style="width: 40%;" />
32         <!-- TMPL_IF name="mylibraryfirst" --><!-- TMPL_IF name="loggedinusername" -->
33             <input name="limit" value="<!-- TMPL_VAR name="LoginBranchcode" -->" type="hidden" />
34         <!-- /TMPL_IF --><!-- /TMPL_IF -->
35         <input type="submit" value="Search" class="submit" />
36     </form>
37
38         <!-- TMPL_IF NAME="opacbookbag" --><a class="cart" href="/cgi-bin/koha/opac-basket.pl" onclick="openBasket(); return false;" title="A &quot;shopping cart&quot; for your selections">Book Bag<span id="basket"><script language="javascript" type="text/javascript">if(basketcount){ document.write(basketcount) };</script></span></a><!-- /TMPL_IF -->
39
40         <!--TMPL_IF NAME="virtualshelves" --><a class="lists" href="/cgi-bin/koha/opac-shelves.pl">Lists</a><!-- /TMPL_IF -->
41
42                 <!-- TMPL_IF NAME="virtualshelves" -->
43                 <li><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
44                 <!-- TMPL_IF NAME="barshelves" --><-- ! FIXME: Owen, you can take it from here!  Make it "barshelves" for proof/demo. -->
45                         <ul>
46                         <!-- TMPL_LOOP NAME="barshelvesloop" -->
47                         <li><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelfnumber" -->">
48                                 <!-- TMPL_VAR NAME="shelfname" -->
49                         </a></li>
50                         <!-- /TMPL_LOOP -->
51                         </ul>
52                 <!-- /TMPL_IF -->
53                 </li>
54         <!-- /TMPL_IF -->
55         
56         <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>
57
58 </div>
59 <div id="fluid-content-2">
60
61 <script type="text/javascript">
62 $(document).ready(function() {
63         $("#listmenubutton").hover(function(){
64                   $(this).attr("src","/opac-tmpl/prog/images/lists-button-on.gif");
65         },function(){
66                   $(this).attr("src","/opac-tmpl/prog/images/lists-button.gif");
67         });
68         
69         $("#cartmenubutton").hover(function(){
70                   $(this).attr("src","/opac-tmpl/prog/images/cart-button-on.gif");
71         },function(){
72                   $(this).attr("src","/opac-tmpl/prog/images/cart-button.gif");
73         });
74         
75  });
76  
77     YAHOO.util.Event.onContentReady("cartmenu", function () {
78         var cartMenu = new YAHOO.widget.Menu("cartmenu", { lazyload: true });
79                 cartMenu.render();
80                 cartMenu.cfg.setProperty("context", ["cartmenubutton", "tr", "br"]);
81                 cartMenu.subscribe("show", cartMenu.focus);
82         function positioncartMenu() {
83                     cartMenu.align("tr", "br");
84                 }
85                 YAHOO.util.Event.addListener("cartmenubutton", "click", cartMenu.show, null, cartMenu);
86                 YAHOO.widget.Overlay.windowResizeEvent.subscribe(positioncartMenu);
87     });
88
89     YAHOO.util.Event.onContentReady("listsmenu", function () {
90         var listMenu = new YAHOO.widget.Menu("listsmenu", { lazyload: true });
91                 listMenu.render();
92                 listMenu.cfg.setProperty("context", ["listmenubutton", "tr", "br"]);
93                 listMenu.subscribe("show", listMenu.focus);
94         function positionlistMenu() {
95                     listMenu.align("tr", "br");
96                 }
97                 YAHOO.util.Event.addListener("listmenubutton", "click", listMenu.show, null, listMenu);
98                 YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionlistMenu);
99     });
100     
101 </script>
102 <script>
103
104                 function init() {
105
106                         // Build overlay3 dynamically, initially hidden, aligned to context element "context", and 200px wide
107                         var cartOverlay = new YAHOO.widget.Overlay("overlay3", { context:["cartmenubutton","tr","br"],
108                                                                                                                                                                           visible:false,
109                                                                                                                                                                           width:"200px" } );
110                         cartOverlay.setHeader("Overlay #3 from Script");
111                         cartOverlay.setBody("This is a dynamically generated Overlay.");
112                         cartOverlay.setFooter("End of Overlay #3");
113                         cartOverlay.render(document.body);
114
115                         YAHOO.util.Event.addListener("cartmenubutton", "mouseover", cartOverlay.show, cartOverlay, true);
116                         YAHOO.util.Event.addListener("cartmenubutton", "mouseout", cartOverlay.hide, cartOverlay, true);
117                 }
118
119                 YAHOO.util.Event.addListener(window, "load", init);
120 </script>
121 <style>
122         #overlay3 {
123                 background-color : #FFF;
124                 border: 1px solid black;
125                 padding : .5em;
126         }
127 </style>
128
129 <div id="listsmenu" class="yuimenu">
130     <div class="bd">
131         <h4>Your Lists</h4>
132         <ul class="first-of-type">
133             <li class="yuimenuitem"><a class="yuimenuitemlabel" href="#">Want to Read</a></li>
134             <li class="yuimenuitem"><a class="yuimenuitemlabel" href="#">Class List</a></li>
135             <li class="yuimenuitem"><a class="yuimenuitemlabel" href="#">Caldecott Winners</a></li>
136         </ul>
137         
138                         <ul class="second-of-type">
139             <li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://mail.yahoo.com">Manage Lists</a></li>
140             <li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://addressbook.yahoo.com">Create New List</a></li>
141         </ul>           
142     </div>
143 </div>
144
145
146 <div id="cartmenubutton"><a href="#basket">Your Cart</a></div>
147 <div id="listmenubutton"><a href="#listmenu">Your Lists</a></div>
148
149 <!-- <!-- TMPL_IF NAME="opacbookbag" --><div><a class="button cart" href="/cgi-bin/koha/opac-basket.pl" onclick="openBasket(); return false;" title="A &quot;shopping cart&quot; for your selections"><span><span><span><span>Book Bag</span></span></span></span></a></div><!-- /TMPL_IF -->
150         <!--TMPL_IF NAME="virtualshelves" --><div><a class="button lists" href="/cgi-bin/koha/opac-shelves.pl"><span><span><span><span>Lists</span></span></span></span></a></div><!-- /TMPL_IF --> -->
151 </div>
152 </div>
153 </div>
154
155 </div>
156
157         <div id="breadcrumbs" class="yui-g">
158
159 <!-- 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="available" -->Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi_not_availablity" -->">Show all items</a><!-- TMPL_ELSE -->Limit to <a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi" -->&amp;limit=available">currently available items.</a><!-- /TMPL_IF --><!-- TMPL_IF NAME="related" --> (related searches: <!-- TMPL_LOOP NAME="related" --><!-- TMPL_VAR NAME="related_search" --><!-- /TMPL_LOOP -->). <!-- /TMPL_IF -->
160
161 <!-- TMPL_ELSE -->
162 <!-- TMPL_IF NAME="searchdesc" -->
163 <strong>No Result found !</strong>
164 <p>
165     No results match your search for <span style="font-weight: bold;">&ldquo;<!-- TMPL_VAR NAME="query_desc" --><!-- TMPL_VAR NAME="limit_desc" -->&rdquo;</span> in <!-- TMPL_VAR NAME="LibraryName" --> Catalog.
166 </p>
167 <!-- TMPL_ELSE -->
168 <strong> No result found !</strong>
169 <p>
170     You did not specify any search criteria.
171 </p>
172 </div>
173 <!-- /TMPL_IF -->
174 <!-- /TMPL_IF --></p><!-- /TMPL_IF -->
175 </div>