More button tweaks
[koha.git] / koha-tmpl / opac-tmpl / prog / en / includes / masthead.inc
1 <style type="text/css">
2         .btn { display: block; position: relative; background: #aaa; padding: 5px; float: right; color: #fff; text-decoration: none; cursor: pointer; }
3         .btn * { font-style: normal; background-image: url('../../opac-tmpl/prog/images/button-background.png'); background-repeat: no-repeat; display: block; position: relative; }
4         .btn i { background-position: top left; position: absolute; margin-bottom: -5px;  top: 0; left: 0; width: 5px; height: 5px; }
5         .btn span { background-position: bottom left; left: -5px; padding: 0 0 5px 10px; margin-bottom: -5px; }
6         .btn span i { background-position: bottom right; margin-bottom: 0; position: absolute; left: 100%; width: 10px; height: 100%; top: 0; }
7         .btn span span { background-position: top right; position: absolute; right: -10px; margin-left: 10px; top: -5px; height: 0; }
8
9         * html .btn span,
10         * html .btn i { float: left; width: auto; background-image: none; cursor: pointer; }
11
12         .btn.blue { background: #3A7BFD; }
13         .btn.blue:hover { background-color: #6699FF;}
14         .btn.green { background: #9C0; }
15         .btn.green:hover { background-color: #9C0; background-image: none; }
16         .btn:active { background-color: #444; }
17         // .btn[class] {  background-image: url('../../opac-tmpl/prog/images/shade8.png'); background-position: bottom; }
18         .btn[class] {  background-image: url('../../opac-tmpl/prog/images/shade9.png'); background-position: top; }
19
20         * html .btn { border: 3px double #aaa; }
21         * html .btn.blue { border-color: #2ae; }
22         * html .btn.green { border-color: #9d4; }
23         * html .btn:hover { border-color: #a00; }
24         #cartmenulink { margin-right :  1em;    }
25
26 </style>
27 <div id="members">
28         <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 -->
29         </ul>   
30 </div>
31
32 <div id="opac-main-search" class="yui-g">
33
34    <div id="masthead">
35    <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>
36    </div>
37
38 <div id="fluid">
39 <div id="fluid-offset">
40 <div id="fluid-content-1">
41     <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform">
42         <label for="masthead_search"> Search <!-- TMPL_IF name="mylibraryfirst" --> <!-- TMPL_IF name="loggedinusername" -->(in <!-- TMPL_VAR name="LoginBranchcode" --> only)<!-- /TMPL_IF --><!-- /TMPL_IF --></label>
43         <select name="idx" id="masthead_search">
44         <!-- TMPL_IF NAME="ms_kw" -->
45         <option selected="selected" value="">Library Catalog</option>
46                 <!-- TMPL_ELSE -->
47         <option value="">Library Catalog</option>
48                 <!-- /TMPL_IF -->
49                 <!-- TMPL_IF NAME="ms_ti" -->
50         <option selected="selected" value="ti">Title</option>
51                 <!-- TMPL_ELSE -->
52         <option value="ti">Title</option>
53                 <!-- /TMPL_IF -->
54                 <!-- TMPL_IF NAME="ms_au" -->
55         <option selected="selected" value="au">Author</option>
56                 <!-- TMPL_ELSE -->
57         <option value="au">Author</option>
58                 <!-- /TMPL_IF -->
59                 <!-- TMPL_IF NAME="ms_su" -->
60         <option selected="selected" value="su">Subject</option>
61                 <!-- TMPL_ELSE -->
62         <option value="su">Subject</option>
63                 <!-- /TMPL_IF -->
64                 <!-- TMPL_IF NAME="ms_isbn" -->
65                 <option selected="selected" value="isbn">ISBN</option>
66                 <!-- TMPL_ELSE -->
67                 <option value="isbn">ISBN</option>
68                 <!-- /TMPL_IF -->
69                 <!-- TMPL_IF NAME="ms_se" -->
70         <option selected="selected" value="se">Series</option>
71                 <!-- TMPL_ELSE -->
72         <option value="se">Series</option>
73                 <!-- /TMPL_IF -->
74                 <!-- TMPL_IF NAME="ms_callnum" -->
75         <option selected="selected" value="callnum">Call Number</option>
76                 <!-- TMPL_ELSE -->
77         <option value="callnum">Call Number</option>
78                 <!-- /TMPL_IF --></select>
79 <!-- TMPL_IF NAME="ms_value" -->
80         <input type="text" name="q" value="<!-- TMPL_VAR NAME="ms_value" -->"  style="width: 40%;" />
81 <!-- TMPL_ELSE -->
82         <input type="text" name="q" style="width: 40%;" />
83 <!-- /TMPL_IF -->
84         <!-- TMPL_IF name="mylibraryfirst" --><!-- TMPL_IF name="loggedinusername" -->
85             <input name="limit" value="<!-- TMPL_VAR name="LoginBranchcode" -->" type="hidden" />
86         <!-- /TMPL_IF --><!-- /TMPL_IF -->
87         <input type="submit" value="Search" class="submit" />
88                 
89     </form>
90         
91         <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>
92
93 </div>
94 <div id="fluid-content-2">
95
96 <script type="text/javascript">
97 $(document).ready(function() {
98           //  <!-- TMPL_IF NAME="opacbookbag" -->var cartButton = new YAHOO.widget.Button("cartmenulink");<!-- /TMPL_IF -->
99                 //<!--TMPL_IF NAME="virtualshelves" -->var listsButton = new YAHOO.widget.Button("listsmenulink");<!-- /TMPL_IF -->
100  });
101  
102    <!--TMPL_IF NAME="virtualshelves" -->YAHOO.util.Event.onContentReady("listsmenu", function () {
103         var listMenu = new YAHOO.widget.Menu("listsmenu", { lazyload: true });
104                 listMenu.render();
105                 listMenu.cfg.setProperty("context", ["listsmenulink", "tr", "br"]);
106                 listMenu.subscribe("show", listMenu.focus);
107         function positionlistMenu() {
108                     listMenu.align("tr", "br");
109                 }
110                 YAHOO.util.Event.addListener("listsmenulink", "click", listMenu.show, null, listMenu);
111                 YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionlistMenu);
112     });<!-- /TMPL_IF -->
113     
114                 <!-- TMPL_IF NAME="opacbookbag" -->function init() {
115                         
116                         var cartOverlay = new YAHOO.widget.Overlay("cartDetails", { context:["cartmenulink","tr","br"],
117                                                                                                                                           visible:false,
118                                                                                                                                           width:"200px" } );
119                         cartOverlay.render();
120                         
121         //              var cartOverlay = new YAHOO.widget.Overlay("cartDetails", { context:["cartmenulink","tr","br"],
122         //                                                                                                                                                                visible:false,
123         //                                                                                                                                                                width:"200px" } );
124         //              cartOverlay.setBody("Your cart has "+basketcount+" items in it");
125         //              cartOverlay.render(document.body);
126
127                         YAHOO.util.Event.addListener("cartmenulink", "mouseover", cartOverlay.show, cartOverlay, true);
128                         YAHOO.util.Event.addListener("cartmenulink", "mouseout", cartOverlay.hide, cartOverlay, true);
129                         YAHOO.util.Event.addListener("cartmenulink", "click", cartOverlay.hide, cartOverlay, true);
130                 }
131
132                 YAHOO.util.Event.addListener(window, "load", init);<!-- /TMPL_IF -->
133         $(document).ready(function(){
134           $('.btn').each(function(){
135           var b = $(this);
136           var tt = b.text() || b.val();
137           if ($(':submit,:button',this)) {
138           b = $('<a>').insertAfter(this). addClass(this.className).attr('id',this.id);
139           $(this).remove();
140           }
141           b.text('').css({cursor:'pointer'}). prepend('<i></i>').append($('<span>').
142           text(tt).append('<i></i><span></span>'));
143           });
144           });
145            
146 </script>
147
148 <!--TMPL_IF NAME="virtualshelves" --><a class="btn blue" id="listsmenulink" href="#">Lists</a><!-- /TMPL_IF -->
149 <!-- 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 -->
150 <!-- TMPL_IF NAME="opacbookbag" --><div id="cartDetails" style="visibility:hidden">Your cart is empty.</div><!-- /TMPL_IF -->
151
152 <!-- TMPL_IF NAME="virtualshelves" -->
153 <div id="listsmenu" class="yuimenu">
154     <div class="bd">
155 <!-- TMPL_IF NAME="loggedinusername" --><h4>Your Lists</h4>
156                 <!-- TMPL_IF NAME="barshelves" -->
157                         <ul class="first-of-type">
158                         <!-- TMPL_LOOP NAME="barshelvesloop" -->
159                         <li class="yuimenuitem"><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelfnumber" -->"><!-- TMPL_VAR NAME="shelfname" --></a></li>
160                         <!-- /TMPL_LOOP -->
161                         </ul>   
162                 <!-- /TMPL_IF -->
163                         <ul class="second-of-type">
164             <li class="yuimenuitem"><a class="yuimenuitemlabel" href="/cgi-bin/koha/opac-shelves.pl">Manage Lists</a></li>
165         </ul>
166                 </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 -->
167           </div>
168 </div>
169 <!-- /TMPL_IF -->
170
171
172 </div>
173 </div>
174 </div>
175
176 </div>
177
178         <div id="breadcrumbs" class="yui-g">
179
180 <!-- 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 -->
181
182 <!-- TMPL_ELSE -->
183 <!-- TMPL_IF NAME="searchdesc" -->
184 <strong>No Result found !</strong>
185 <p>
186     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.
187 </p>
188 <!-- TMPL_ELSE -->
189 <strong> No result found !</strong>
190 <p>
191     You did not specify any search criteria.
192 </p>
193 </div>
194 <!-- /TMPL_IF -->
195 <!-- /TMPL_IF --></p><!-- /TMPL_IF -->
196 </div>