Bug 8217:[SIGNED-OFF] Focus on search box in staff detail page
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / detail.tt
index 6238f05..cd203c6 100644 (file)
@@ -45,7 +45,7 @@ function verify_images() {
 </script>
 </head>
 
-<body>
+<body id="catalog_detail" class="catalog" onload="document.getElementById('search-form').focus();">
 
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
@@ -102,6 +102,18 @@ function verify_images() {
             [% END %]
             </span>
         [% END %]
+        [% IF ( TagsEnabled &&  TagsShowOnDetail &&  TagLoop ) %]
+                <span class="results_summary"><span class="label">Tags:</span>
+                    [% FOREACH TagLoo IN TagLoop %]
+                        [% IF ( CAN_user_tools_moderate_tags ) %]
+                        <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a>
+                        [% ELSE %]
+                        [% TagLoo.term |html %]
+                        [% END %]
+                        <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
+                    [% END %]
+                    </span>
+        [% END %]
         [% IF ( holdcount ) %]<span class="results_summary"><span class="label">Holds:</span> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></span>[% ELSE %][% END %]
 
         [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]</div><div class="yui-u" id="bookcoverimg">
@@ -117,7 +129,7 @@ function verify_images() {
             [% IF ( author ) %]<p>By <a href="/cgi-bin/koha/catalogue/search.pl?q=au:[% author |url %]">[% author %]</a></p>[% END %]
         <ul>
         [% IF ( MARCAUTHORS ) %]
-            <li><strong>Additional Authors:</strong><ul>
+            <li><strong>Additional authors:</strong><ul>
             [% FOREACH MARCAUTHOR IN MARCAUTHORS %]
                 <li>[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value |url %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %]</li>
                 [% END %]
@@ -145,7 +157,7 @@ function verify_images() {
         </li>
 [% IF ( MARCURLS ) %]<li>
     
-       <strong>Online Resources:</strong>
+    <strong>Online resources:</strong>
     <ul>    [% FOREACH MARCurl IN MARCURLS %]
                <li>[% IF ( MARCurl.part ) %][% MARCurl.part %]
                        <br />[% END %] 
@@ -157,7 +169,7 @@ function verify_images() {
     [% END %]
     
     [% IF ( OpacUrl ) %]
-       <li><strong>OPAC View:</strong>
+        <li><strong>OPAC view:</strong>
        <a href="http://[% OpacUrl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]" target="_blank">Open in new window</a>
                </li>
        [% END %]
@@ -219,10 +231,25 @@ function verify_images() {
                [% END %]
                </ul>
                </li>
+        [% END %]
+        [% IF ( TagsEnabled &&  TagsShowOnDetail &&  TagLoop ) %]
+                <li><strong>Tags:</strong>
+                    <ul id="tagslist">
+                    [% FOREACH TagLoo IN TagLoop %]
+                        <li>
+                        [% IF ( CAN_user_tools_moderate_tags ) %]
+                        <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a>
+                        [% ELSE %]
+                        [% TagLoo.term |html %]
+                        [% END %]
+                        <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]</li>
+                    [% END %]
+                    </ul></li>
         [% END %]
             [% IF ( holdcount ) %]<li><strong>Holds:</strong> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></li>[% ELSE %][% END %]
         </ul>
                [% END %]
+
 </div>
 </div>
 <div id="bibliodetails" class="toptabs">
@@ -232,7 +259,8 @@ function verify_images() {
 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#description">Descriptions</a></li>
 [% IF ( subscriptionsnumber ) %]<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#subscriptions">Subscriptions</a></li>[% END %]
 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#editions">Editions</a></li>[% END %][% END %]
-[% IF ( AmazonSimilarItems ) %]<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#related">Related Titles</a></li>[% END %]
+[% IF ( AmazonSimilarItems ) %]<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#related">Related titles</a></li>[% END %]
+[% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]#images">Images</a></li>[% END %][% END %]
  </ul>
 
 <div id="holdings">
@@ -241,35 +269,31 @@ function verify_images() {
         <table>
             <tr>
                 [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
-                <th>Current Location</th>
+                <th>Current location</th>
                 <th>Home Library</th>
                 [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
-                <th>Call Number</th>
+                <th>Call number</th>
                 <th>Status</th>
                 <th>Last seen</th>
                 <th>Barcode</th>
-                [% IF ( volinfo ) %]<th>Publication Details</th>[% END %]
+                [% IF ( volinfo ) %]<th>Publication details</th>[% END %]
                 [% IF ( itemdata_uri ) %]<th>url</th>[% END %]
-                [% IF ( itemdata_copynumber ) %]<th>Copy No.</th>[% END %]
-                [% IF materials %]<th>Materials Specified</th>[% END %]
+                [% IF ( itemdata_copynumber ) %]<th>Copy no.</th>[% END %]
+                [% IF materials %]<th>Materials specified</th>[% END %]
                 [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
-               [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine Label</th>[% END %]
-               [% IF ( hostrecords ) %]<th>Host Records</th>[% END %]
+        [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %]
+        [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
                [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
             </tr>
             [% FOREACH itemloo IN itemloop %]
                 <tr>
                     [% IF ( item_level_itypes ) %]
-                      <td class="itype">
-                        [% IF ( noItemTypeImages ) %]
-                          [% itemloo.description %]
-                        [% ELSE %]
-                          [% IF ( itemloo.imageurl ) %]
+                    <td class="itype">
+                        [% IF !noItemTypeImages && itemloo.imageurl %]
                             <img src="[% itemloo.imageurl %]" alt="[% itemloo.description %]" title="[% itemloo.description %]" />
-                          [% ELSE %]
-                            [% itemloo.description %]
-                          [% END %]
-                        [% END %]</td>
+                        [% END %]
+                        [% itemloo.description %]
+                    </td>
                     [% END %]
                     <td class="location">[% UNLESS ( singlebranchmode ) %][% itemloo.branchname %] [% END %]</td>
                     <td class="homebranch">[% itemloo.homebranch %]<span class="shelvingloc">[% itemloo.location %]</span> </td>
@@ -339,7 +363,7 @@ function verify_images() {
                         Item-level hold
                     [% END %]
                     [% IF ( canreservefromotherbranches ) %]for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedForBorrowernumber %]">
-                       [% IF ( hidepatronname ) %]
+                       [% IF ( itemloo.hidepatronname ) %]
                            [% itemloo.Reservedcardnumber %]
                        [% ELSE %]
                            [% itemloo.ReservedForFirstname %] [% itemloo.ReservedForSurname %]
@@ -382,18 +406,18 @@ function verify_images() {
                [% END %]
                 [% IF ( itemdata_itemnotes ) %]<td><div class="itemnotes">[% itemloo.itemnotes %]</div></td>[% END %]
                [% IF ( SpineLabelShowPrintOnBibDetails ) %]
-                       <td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% itemloo.barcode %]" >Print Label</a></td>
+            <td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% itemloo.barcode %]" >Print label</a></td>
                [% END %]
                 [% IF ( hostrecords ) %]
                       <td>[% IF ( itemloo.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemloo.hostbiblionumber %]" >[% itemloo.hosttitle %]</a>[% END %]</td>
                 [% END %]
                 [% IF ( analyze ) %]<td>
                        [% IF ( itemloo.countanalytics ) %]
-                               <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% itemloo.itemnumber %]">[% itemloo.countanalytics %] analytics</a>
+                               <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=[% itemloo.itemnumber %]">[% itemloo.countanalytics %] analytics</a>
                        [% END %]</td>
                [% END %]
                 [% IF ( analyze ) %]
-                        <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% itemloo.biblionumber %]&hostitemnumber=[% itemloo.itemnumber %]">Create Analytics</a></td>
+                        <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% itemloo.biblionumber %]&amp;hostitemnumber=[% itemloo.itemnumber %]">Create analytics</a></td>
                 [% END %]
 
                 </tr>
@@ -401,7 +425,7 @@ function verify_images() {
         </table>
         [% END %]
                 [% IF ( hiddencount ) %]
-                   <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&showallitems=1">Show all items ([% hiddencount %] hidden)</a>
+                   <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&amp;showallitems=1">Show all items ([% hiddencount %] hidden)</a>
                 [% END %]              
                [% IF ( debug_display ) %]
                <br /><br />
@@ -435,7 +459,7 @@ function verify_images() {
 
 [% IF ( MARCNOTES ) %]
     [% FOREACH MARCNOTE IN MARCNOTES %]
-    <p>[% MARCNOTE.marcnote %]</p>
+    <p>[% MARCNOTE.marcnote FILTER html_line_break %]</p>
     [% END %]
     [% ELSE %]
     [% IF ( notes ) %]
@@ -453,7 +477,7 @@ function verify_images() {
     <p> (There are [% subscriptionsnumber %] subscriptions associated with this title).</p> 
     [% FOREACH subscription IN subscriptions %]
            [% IF ( subscription.branchname ) %]<h3>At library: [% subscription.branchname %]</h3>[% ELSE %]
-           [% IF ( subscription.branchcode ) %]<h3>At branch: [% subscription.branchcode %]</h3>[% END %][% END %]
+           [% IF ( subscription.branchcode ) %]<h3>At library: [% subscription.branchcode %]</h3>[% END %][% END %]
             [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes %] </p>[% END %]
             [% IF ( subscription.latestserials ) %]
             <p> The [% subscription.staffdisplaycount %] latest issues related to this subscription:</p>
@@ -476,7 +500,7 @@ function verify_images() {
                                 [% ELSE %]
                                     [% IF ( latestserial.status4 ) %]Missing
                                     [% ELSE %]
-                                        [% IF ( latestserial.status5 ) %]Not Issued
+                                        [% IF ( latestserial.status5 ) %]Not issued
                                         [% END %]
                                     [% END %]
                                 [% END %]
@@ -487,7 +511,7 @@ function verify_images() {
             [% END %]
             </table>
             [% END %]
-                       <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]">Subscription Details</a>
+            <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]">Subscription details</a>
     [% END %]
 </div>
 </div>
@@ -517,20 +541,37 @@ function verify_images() {
 <ul>
 [% FOREACH AMAZON_SIMILAR_PRODUCT IN AMAZON_SIMILAR_PRODUCTS %]
 [% FOREACH similar_biblionumber IN AMAZON_SIMILAR_PRODUCT.similar_biblionumbers %]
-<li><img alt="img" src="http://images.amazon.com/images/P/[% similar_biblionumber.ASIN %].01._SS50_.jpg" /> <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% similar_biblionumber.biblionumber %]">[% similar_biblionumber.title |html %]</a> </li>
+<li><img alt="" src="http://images.amazon.com/images/P/[% similar_biblionumber.ASIN %].01._SS50_.jpg" /> <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% similar_biblionumber.biblionumber %]">[% similar_biblionumber.title |html %]</a> </li>
 [% END %]
 [% END %]
 </ul>
 </div>
 [% END %][% END %]
 
+[% IF ( LocalCoverImages ) %]
+<div id="images">
+[% IF ( localimages.0 ) %]
+<p>Click on an image to view it in the image viewer</p>
+[% FOREACH image IN localimages %]
+[% IF image %]
+<a class="localimage" href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&amp;imagenumber=[% image %]"><img alt="" src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image %]" /></a>
+[% END %]
+[% END %]
+[% ELSE %]
+[% IF ( CAN_user_tools_upload_local_cover_images ) %]
+<p>No images have been uploaded for this bibliographic record yet. Please <a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&amp;filetype=image'>upload</a> one.</p>
+[% END %]
+[% END %]
+</div>
+[% END %]
+
 </div><!-- /bibliodetails -->
 
 <div class="yui-g" id="export" style="margin-top: 1em;">
 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
 <table>  <tr>
       <th>Save Record</th>   </tr>
-  <tr>     <td> Select Download Format:    <select name="format">
+    <tr><td> Select download format:    <select name="format">
         <option value="mods">MODS (XML)</option>
         <option value="dc">Dublin Core (XML)</option>
         <option value="marcxml">MARCXML</option>