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