Bug 17434: Moremember displaying primary and secondary phone number twice
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / readingrec.tt
index 33823a2..5f2e1d8 100644 (file)
@@ -1,8 +1,11 @@
 [% USE KohaDates %]
+[% USE Koha %]
+[% USE AuthorisedValues %]
+[% USE Branches %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Circulation History for [% INCLUDE 'patron-title.inc' %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
 [% INCLUDE 'datatables.inc' %]
 <script type="text/javascript" id="js">
 //<![CDATA[
         ]
     }));
     var tabs = $("#tabs").tabs({
-        select: function(e, ui) {
-            var id = $(ui.tab).attr("id");
-            if ( id == "tab_checkout" ) {
-                table.fnFilter("checkout", 0);
-            } else if ( id == "tab_onsite_checkout" ) {
+        activate: function(e, ui) {
+            var active = tabs.tabs("option", "active" );
+            if ( active == 1 ) {
+                table.fnFilter("standard_checkout", 0);
+            } else if ( active == 2 ) {
                 table.fnFilter("onsite_checkout", 0);
             } else { // all
                 table.fnFilter('', 0);
 [% INCLUDE 'members-toolbar.inc' %]
 <h1>Circulation history</h1>
 
-[% IF is_anonymous %]
+[% UNLESS Koha.Preference('intranetreadinghistory') %]
+    <div class="dialog alert">Staff members are not allowed to access patron's checkout history</div>
+[% ELSIF is_anonymous %]
     <div class="dialog alert">This is the anonymous patron, so no circulation history is displayed. To get a list of anonymized loans, please run a report.</div>
+[% ELSIF ( privacy == 2)  %]
+    <div class="dialog message">This patron has set the privacy rules to never keeping a circulation history.</div>
 [% ELSIF ( !loop_reading ) %]
     <div class="dialog message">This patron has no circulation history.</div>
 [% ELSE %]
 
 
 <div id="tabs" class="toptabs">
+  [% IF Koha.Preference('OnSiteCheckouts') %]
   <ul>
     <li><a href="#readingrec" id="tab_all">All</a></li>
     <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li>
-    <li><a href="#readingrec" id="tab_onsite_checkout">On-site checkout</a></li>
+    <li><a href="#readingrec" id="tab_onsite_checkout">On-site checkouts</a></li>
   </ul>
+  [% END %]
   <div id="readingrec" style="overflow:hidden">
     <table id="table_readingrec">
       <thead>
       [% FOREACH issue IN loop_reading %]
         [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
           <td style="display:none;">
-            [% IF issue.onsite_checkout %]
-              onsite_checkout
-            [% ELSE %]
-              checkout
+            [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' %]
+            [% ELSE %][% issuetype = 'standard_checkout' %]
             [% END %]
+            [% issuetype %]
           </td>
           <td>
-            <span title="[% issue.issuestimestamp %]">[% issue.issuestimestamp | $KohaDates %]</span>
+            <span title="[% issue.issuestimestamp %]">[% issue.issuestimestamp | $KohaDates with_hours => 1 %]</span>
           </td>
           <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td>
 
           <td>[% issue.barcode %]</td>
           <td>[% issue.renewals %]</td>
           <td>
-            <span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td>
+            <span title="[% issue.issuedate %]">[% issue.issuedate |$KohaDates with_hours => 1 %]</span>
           </td>
-          <td>[% issue.issuedate | $KohaDates %]</td>
-          <td>[% issue.issuingbranch %]</td>
+          <td>[% Branches.GetName( issue.branchcode ) %]</td>
           <td>
             [% IF issue.date_due %]
-                <span title="[% issue.date_due %]">[% issue.date_due | $KohaDates %]</span>
+                <span title="[% issue.date_due %]">[% issue.date_due |$KohaDates with_hours => 1 %]</span>
             [% ELSE %]
                 <span title="0000-00-00"></span>
             [% END %]
           </td>
           <td>
             [% IF  issue.returndate %]
-              <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span>
+              <span title="[% issue.returndate %]">[% issue.returndate |$KohaDates with_hours => 1 %]</span>
             [% ELSE %]
-              <span title="Checked Out"><small>Checked Out</small></span>
+              <span title="Checked out"><small>Checked out</small></span>
             [% END %]
           </td>
         </tr>