Bug 7781 : enhancements on main page
authorAdrien Saurat <adrien.saurat@biblibre.com>
Thu, 22 Mar 2012 11:07:16 +0000 (12:07 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 6 Apr 2012 14:52:17 +0000 (16:52 +0200)
- moves the different search boxes on top of page
- displays the Koha logo
- displays the breadcrumb bar
- displays a general title "Welcome to Koha"
- reorganises the links to modules
- centers the main menu even if no news are displayed
- fixes the Submit button when CircAutocompl is on

Signed-off-by: mveron <veron@veron.ch>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt

index fa66dbf..ef01648 100644 (file)
@@ -1848,7 +1848,7 @@ span.permissiondesc {
 }
 
 /* borrower autocomplete */
-#borrowerautocomplete { width: 450px; text-align:left;} /* z-index needed on top instances for ie & sf absolute inside relative issue */
+#borrowerautocomplete { width: 500px; text-align:left;} /* z-index needed on top instances for ie & sf absolute inside relative issue */
 .autocomplete .yui-ac-highlight ,
 .autocomplete .yui-ac-highlight .sample-result,
 .autocomplete .yui-ac-highlight .sample-query { color:#FFF; }
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc
new file mode 100644 (file)
index 0000000..bf04636
--- /dev/null
@@ -0,0 +1,40 @@
+
+<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Main page Resident Search Box -->
+
+<div id="header_search">
+    [% INCLUDE 'patron-search-box.inc' %]
+[% IF ( CAN_user_circulate ) %]
+<div id="checkin_search" class="residentsearch" style="display:none;">
+    <p class="tip">Scan a barcode to check in:</p>
+    <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
+        <input name="barcode" id="ret_barcode" size="40" accesskey="r" />
+        <input value="Submit" class="submit" type="submit" />
+    </form>
+</div>[% END %]
+[% IF ( CAN_user_borrowers ) %]
+<div id="patron_search" class="residentsearch">
+    <p class="tip">Enter patron card number or partial name:</p>
+    <form action="/cgi-bin/koha/members/member.pl" method="post">
+        <input name="member" id="searchmember" size="40" type="text""/>
+        <input value="Submit" class="submit" type="submit" />
+    </form>
+</div>[% END %]
+[% IF ( CAN_user_catalogue ) %]
+<div id="catalog_search" class="residentsearch" style="display:none;">
+    <p class="tip">Enter search keywords:</p>
+    <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" id="cat-search-block">
+        <input type="text" name="q" id="search-form" size="40" accesskey="q" />
+        <input type="submit" class="submit" value="Submit"/>
+    </form>
+</div>[% END %]
+
+<ul>
+    [% IF ( CAN_user_circulate ) %]<li><a href="/cgi-bin/koha/circ/circulation.pl#circ_search">Check out</a></li>[% END %]
+    [% IF ( CAN_user_circulate ) %]<li><a href="/cgi-bin/koha/circ/returns.pl#checkin_search">Check in</a></li>[% END %]
+    [% IF ( CAN_user_borrowers ) %]<li><a href="/cgi-bin/koha/members/members-home.pl#patron_search">Search patrons</a></li>[% END %]
+    [% IF ( CAN_user_catalogue ) %]<li><a href="/cgi-bin/koha/catalogue/search.pl#catalog_search">Search the catalog</a></li>[% END %]
+</ul>
+
+</div>
+
+<!-- End Main page Resident Search Box -->
index 1afa5b0..56618c7 100644 (file)
 </head>
 <body id="main_intranet-main" class="main">
 [% INCLUDE 'header.inc' %]
-[% IF ( koha_news_count ) %]<div id="doc3" class="yui-t3">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
+[% INCLUDE 'home-search.inc' %]
+
+<div id="breadcrumbs">Home</div>
+
+<div id="doc3" class="yui-t3">
 <div id="bd">
-[% IF ( koha_news_count ) %]<div id="yui-main"><div class="yui-b"><div class="yui-g">
-[% ELSE %]     <div class="yui-g">[% END %]
+<div id="yui-main"><div class="yui-b"><div class="yui-g">
 
-       <div class="yui-u first">
-       [% IF ( CAN_user_circulate ) %]
-       <h3><a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></h3>
-       <ul><li style="padding-bottom:.3em;">
-       <form method="post" action="/cgi-bin/koha/circ/circulation.pl">
-        <label for="navfindborrower">Check out to:</label>
-            <input accesskey="u" id="navfindborrower" name="findborrower" type="text" size="10" />
-            <input type="hidden" name="branch" value="[% branch %]" />
-            <input type="hidden" name="printer" value="[% printer %]" />
-            <input type="submit" class="submit" value="OK" />
-       </form>
-       </li>
-       <li style="padding-bottom:.3em;">
-       <form method="post" action="/cgi-bin/koha/circ/returns.pl">
-        <label for="barcode">Check in:</label>
-            <input accesskey="r" id="barcode" name="barcode" type="text" size="10" />
-            <input type="submit" class="submit" value="OK" />
-       </form></li>
+<h1>Welcome to Koha</h1>
 
-        <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a></li></ul>
-       [% END %]
-       [% IF ( CAN_user_borrowers ) %]
-               <h3><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></h3>
-               <ul>
-        <li><form action="/cgi-bin/koha/members/member.pl" method="post">
-           <label for="navmember">Search:&nbsp;</label>
-           <input id="navmember" type="text" size="10" name="member" />
-           <input type="submit" value="OK" class="submit" />
-            </form>
-        </li>
-    </ul>
-       [% END %]
-       [% IF ( CAN_user_catalogue ) %]
-                <h3><a href="/cgi-bin/koha/catalogue/search.pl">Search</a></h3>
-                               <ul>
-                    <li>
-                        <form name="searchform" method="get" action="/cgi-bin/koha/catalogue/search.pl" id="searchform">
-                        <input type="hidden" name="idx" value="" />
-                        <label for="navkeyword">
-                            Search catalog:&nbsp;
-                        </label><input type="text" id="navkeyword" name="q" size="10" accesskey="q" />
-                        <input type="submit" value="OK" class="submit" />
-                        </form>
-                     </li>
-                               </ul>
-   [% END %]
-                <h3><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a></h3>
-       </div>
-       
-       <div class="yui-u">
-    [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
-    <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
-       <ul>
-        <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
-    [% ELSE %]
-    [% IF ( CAN_user_editauthorities ) %]
-    <h3>Cataloging</h3>
+    <div class="yui-u first">
+    <!-- START - CIRCULATION -->
+    [% IF ( CAN_user_circulate ) %]
+    <h3><a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></h3>
     <ul>
+        <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a></li>
+    </ul>
     [% END %]
+    <!-- END - CIRCULATION -->
+
+    <!-- START - PATRONS -->
+    [% IF ( CAN_user_borrowers ) %]
+        <h3><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></h3>
     [% END %]
-    
-    [% IF ( CAN_user_editauthorities ) %]
-        <li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
+    <!-- END - PATRONS -->
+
+    <!-- START - ADVANCED SEARCH -->
+    [% IF ( CAN_user_catalogue ) %]
+        <h3><a href="/cgi-bin/koha/catalogue/search.pl">Advanced search</a></h3>
     [% END %]
-    </ul>
-    
+    <!-- END - ADVANCED SEARCH -->
     
+    <!-- START - LISTS -->
+    <h3><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a></h3>
+    <!-- END - LISTS -->
+
+    <!-- START - CATALOGING -->
+    [% IF ( CAN_user_catalogue || CAN_user_editcatalogue || CAN_user_editauthorities ) %]
+        <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
+        <ul>
+        [% IF ( CAN_user_catalogue || CAN_user_editcatalogue ) %]
+                <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
+        [% END %]
+        [% IF ( CAN_user_editauthorities ) %]
+                <li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
+        [% END %]
+        </ul>
+    [% END %]
+    <!-- END - CATALOGING -->
+    </div>
+
+    <div class="yui-u">
+    <!-- START - SERIALS -->
     [% IF ( CAN_user_serials ) %]
-    <h3><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></h3>
+        <h3><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></h3>
     [% END %]
-       [% IF ( CAN_user_acquisition ) %]
-       <h3><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></h3>
-    [% IF ( pendingsuggestions ) %]<ul><li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/suggestion/suggestion.pl">[% pendingsuggestions %]</a></span></li></ul>[% END %]
-       [% END %]
+    [% IF ( CAN_user_acquisition ) %]
+        <h3><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></h3>
+        [% IF ( pendingsuggestions ) %]
+            <ul>
+                <li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/suggestion/suggestion.pl">[% pendingsuggestions %]</a></span></li>
+            </ul>
+        [% END %]
+    [% END %]
+    <!-- END - SERIALS -->
+
+    <!-- START - REPORTS -->
     [% IF ( CAN_user_reports ) %]
-    <h3><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></h3>
+        <h3><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></h3>
     [% END %]
+    <!-- END - REPORTS -->
+
+    <!-- START - ADMINISTRATION -->
     [% IF ( CAN_user_parameters ) %]
-    <h3><a href="/cgi-bin/koha/admin/admin-home.pl">Koha administration</a></h3>
-       <ul>
-        <li><a href="/cgi-bin/koha/admin/preferences.pl">System preferences</a></li>
-    </ul>
-    [% END %]
+        <h3><a href="/cgi-bin/koha/admin/admin-home.pl">Koha administration</a></h3>
+        <ul>
+            <li><a href="/cgi-bin/koha/admin/preferences.pl">System preferences</a></li>
+        </ul>
+        [% END %]
     [% IF ( CAN_user_tools ) %] 
-    <h3><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></h3>
+        <h3><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></h3>
         [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) %]
             <ul>
-                [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) %]<li><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">[% pendingcomments %]</a></span></li>[% END %]
-                [% IF ( CAN_user_tools_moderate_tags && pendingtags ) %]<li><a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/tags/review.pl">[% pendingtags %]</a></span></li>[% END %]
+                [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) %]
+                    <li><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">[% pendingcomments %]</a></span></li>
+                [% END %]
+                [% IF ( CAN_user_tools_moderate_tags && pendingtags ) %]
+                    <li><a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/tags/review.pl">[% pendingtags %]</a></span></li>
+                [% END %]
             </ul>
         [% END %]
     [% END %]
+    <!-- END - ADMINISTRATION -->
+
+    <!-- START - ABOUT -->
     <h3><a href="/cgi-bin/koha/about.pl">About Koha</a></h3>
-       </div>
-       </div>
-               [% IF ( IntranetmainUserblock ) %]<div id="mainuserblock" class="yui-g">
-                       [% IntranetmainUserblock %]
-                       </div>[% ELSE %]&nbsp;
-               [% END %]
-[% IF ( koha_news_count ) %]
-       </div><!-- /yui-bd -->
-       </div><!-- /yui-main -->
-       <div class="yui-b">
-               <div id="koha-news">
-            <h3>News</h3>
-            [% FOREACH koha_new IN koha_news %]
+    <!-- END - ABOUT -->
+    </div>
+    </div>
+        [% IF ( IntranetmainUserblock ) %]
+            <div id="mainuserblock" class="yui-g">
+            [% IntranetmainUserblock %]
+            </div>[% ELSE %]&nbsp;
+        [% END %]
+    </div><!-- /yui-bd -->
+    </div><!-- /yui-main -->
+    [% IF ( koha_news_count ) %]
+        <div class="yui-b">
+            <div id="koha-news">
+                <h3>News</h3>
+                [% FOREACH koha_new IN koha_news %]
                     <div class="newsitem" id="news[% koha_new.idnew %]"><h4>[% koha_new.title %]</h4>
-                                        <p>[% koha_new.new %]</p>
-                                       <p class="newsfooter"> Posted on [% koha_new.newdate %] [% IF ( CAN_user_tools ) %]
-    <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew %]">Edit</a> | <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;ids=[% koha_new.idnew %]">Delete</a> | <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a>[% END %]</p></div>
-            [% END %]
-               </div><!-- /koha-news -->
-       </div>
-[% END %]
+                        <p>[% koha_new.new %]</p>
+                        <p class="newsfooter"> Posted on [% koha_new.newdate %]
+                            [% IF ( CAN_user_tools ) %]
+                                <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew %]">Edit</a> | <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;ids=[% koha_new.idnew %]">Delete</a> | <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a>
+                            [% END %]
+                        </p>
+                    </div>
+                [% END %]
+            </div><!-- /koha-news -->
+        </div>
+    [% END %]
+
 
 </div>