Bug 7979: New design for staff interface + fixes + css call moved
[koha_gimpoz] / koha-tmpl / intranet-tmpl / prog / en / includes / header.inc
index ea556c4..4783523 100644 (file)
@@ -1,42 +1,42 @@
-    <!-- TMPL_IF NAME="intranetbookbag" --><div id="cartDetails">Your cart is empty.</div><!-- /TMPL_IF -->
+    [% IF ( intranetbookbag ) %]<div id="cartDetails">Your cart is empty.</div>[% END %]
 
     <div id="header" class="clearfix">
         <div id="toplevelnav">
             <ul id="toplevelmenu">
-                <!-- TMPL_IF NAME="CAN_user_circulate" --><li><a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></li><!-- /TMPL_IF -->
-                <!-- TMPL_IF NAME="CAN_user_borrowers" --><li><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></li><!-- /TMPL_IF -->
-                <!-- TMPL_IF NAME="CAN_user_catalogue" --><li><a href="/cgi-bin/koha/catalogue/search.pl">Search</a></li><!-- /TMPL_IF -->
-                <!-- TMPL_IF NAME="intranetbookbag" -->
-                    <li><a href="#" id="cartmenulink">Cart<span id="basketcount"></span></a></li>
-                <!-- /TMPL_IF -->
-                <!-- TMPL_VAR name="IntranetNav" -->
+                [% IF ( CAN_user_circulate ) %]<li><a class="toplinks" href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></li>[% END %]
+                [% IF ( CAN_user_borrowers ) %]<li><a class="toplinks" href="/cgi-bin/koha/members/members-home.pl">Patrons</a></li>[% END %]
+                [% IF ( CAN_user_catalogue ) %]<li><a class="toplinks" href="/cgi-bin/koha/catalogue/search.pl">Search</a></li>[% END %]
+                [% IF ( intranetbookbag ) %]
+                    <li><a class="toplinks" href="#" id="cartmenulink">Cart<span id="basketcount"></span></a></li>
+                [% END %]
+                [% IntranetNav %]
                 <li class="more">
-                    <a id="showmore" href="/cgi-bin/koha/mainpage.pl">More</a>
+                    <a class="toplinks" id="showmore" href="/cgi-bin/koha/mainpage.pl">More</a>
                     <div id="moremenu">
                         <div class="bd">
                             <ul>
                             <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a></li>
-                            <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
+                            [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
                             <li><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></li>
-                            <!-- /TMPL_IF -->
-                            <!-- TMPL_IF NAME="CAN_user_acquisition" -->
+                            [% END %]
+                            [% IF ( CAN_user_acquisition ) %]
                             <li><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></li>
-                            <!-- /TMPL_IF -->
-                            <!-- TMPL_IF NAME="CAN_user_editauthorities" -->
+                            [% END %]
+                            [% IF ( CAN_user_editauthorities ) %]
                             <li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
-                            <!-- /TMPL_IF -->
-                            <!-- TMPL_IF NAME="CAN_user_serials" -->
+                            [% END %]
+                            [% IF ( CAN_user_serials ) %]
                             <li><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></li>
-                            <!-- /TMPL_IF -->
-                            <!-- TMPL_IF NAME="CAN_user_reports" -->
+                            [% END %]
+                            [% IF ( CAN_user_reports ) %]
                             <li><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></li>
-                            <!-- /TMPL_IF -->
-                            <!-- TMPL_IF NAME="CAN_user_tools" -->
+                            [% END %]
+                            [% IF ( CAN_user_tools ) %]
                             <li><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></li>
-                            <!-- /TMPL_IF -->
-                            <!-- TMPL_IF NAME="CAN_user_parameters" -->
+                            [% END %]
+                            [% IF ( CAN_user_parameters ) %]
                             <li><a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a></li>
-                            <!-- /TMPL_IF -->
+                            [% END %]
                             <li><a href="/cgi-bin/koha/about.pl">About Koha</a></li>
                             </ul>
                         </div>
             </ul>
         </div>
     <div id="login">
-        <!-- TMPL_IF NAME="AutoLocation" -->
+        [% IF ( AutoLocation ) %]
             <strong>
-            <!-- TMPL_VAR NAME="LoginBranchname" -->
+            [% LoginBranchname %]
             </strong>
-        <!-- TMPL_ELSE -->
-            <strong><!-- TMPL_VAR NAME="LoginBranchname" --></strong>
-            <!-- TMPL_IF NAME="IndependantBranches" -->
-                <!-- TMPL_IF NAME="CAN_user_management" -->
-                    (<a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set</a>)
-                <!-- /TMPL_IF -->
-            <!-- TMPL_ELSE -->
-                (<a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set</a>)
-            <!-- /TMPL_IF -->
+        [% ELSE %]
+            <strong>
+            [% IF ( LoginBranchname == 'NO_LIBRARY_SET' ) %]
+                NO LIBRARY SET
+            [% ELSE %]
+                [% LoginBranchname %]
+            [% END %]
+            </strong>
+            [% IF ( IndependantBranches ) %]
+                [% IF ( CAN_user_management || CAN_user_editcatalogue_edit_catalogue ) %]
+                    ( <a class="toplinks" href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a> )
+                [% END %]
+            [% ELSE %]
+                ( <a class="toplinks" href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a> )
+            [% END %]
         |
-        <!-- /TMPL_IF -->
-        <!-- TMPL_IF NAME="loggedinusername" -->
+        [% END %]
+        [% IF ( loggedinusername ) %]
             <span class="loggedinusername">
-                <!-- TMPL_VAR NAME="loggedinusername" -->
+                [% loggedinusername %]
             </span>
-            (<a href="/cgi-bin/koha/mainpage.pl?logout.x=1"<!-- TMPL_IF NAME="intranetbookbag" --> onclick="delBasket(true);"<!-- /TMPL_IF -->>Log Out</a>) |
-        <!-- TMPL_ELSE -->
+            [% IF ( intranetbookbag ) %]
+            ( <a class="toplinks" href="/cgi-bin/koha/mainpage.pl?logout.x=1" onclick="clearHoldFor(); delBasket('main', true);">Log out</a> ) |
+            [% ELSE %]
+            ( <a class="toplinks" href="/cgi-bin/koha/mainpage.pl?logout.x=1" onclick="clearHoldFor();">Log out</a> ) |
+            [% END %]
+        [% ELSE %]
             You are not logged in |
-        <!-- /TMPL_IF -->
-        <a href="/cgi-bin/koha/help.pl" id="helper" onclick="window.open('/cgi-bin/koha/help.pl?url='+escape(document.URL),'Koha_Help','width=600,height=600,toolbar=false,scrollbars=yes'); return false;">[ ? ]</a>
+        [% END %]
+        <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper" onclick="var link=window.open('','Koha_Help','width=600,height=600,toolbar=false,scrollbars=yes'); link.location='/cgi-bin/koha/help.pl'; return false;">[ ? ]</a>
     </div>
 </div>