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