Bug 22553: Unchecking a subpermission does not uncheck the top level permission
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / readingrec.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Koha %]
5 [% USE AuthorisedValues %]
6 [% USE Branches %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Circulation History for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 </head>
12
13 <body id="pat_readingrec" class="pat">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'patron-search.inc' %]
16
17 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Circulation history for [% INCLUDE 'patron-title.inc' %]</div>
18
19 <div class="main container-fluid">
20     <div class="row">
21         <div class="col-sm-10 col-sm-push-2">
22             <main>
23
24 [% INCLUDE 'members-toolbar.inc' %]
25 <h1>Circulation history</h1>
26
27 [% UNLESS Koha.Preference('intranetreadinghistory') %]
28     <div class="dialog alert">Staff members are not allowed to access patron's checkout history</div>
29 [% ELSIF is_anonymous %]
30     <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>
31 [% ELSIF ( patron.privacy == 2)  %]
32     <div class="dialog message">This patron has set the privacy rules to never keeping a circulation history.</div>
33 [% ELSIF ( !loop_reading ) %]
34     <div class="dialog message">This patron has no circulation history.</div>
35 [% ELSE %]
36 <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /></form>
37
38
39 <div id="tabs" class="toptabs">
40   [% IF Koha.Preference('OnSiteCheckouts') %]
41   <ul>
42     <li><a href="#readingrec" id="tab_all">All</a></li>
43     <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li>
44     <li><a href="#readingrec" id="tab_onsite_checkout">On-site checkouts</a></li>
45   </ul>
46   [% END %]
47   <div id="readingrec" style="overflow:hidden">
48     <table id="table_readingrec">
49       <thead>
50         <tr>
51         <th style="display:none;">Type</th>
52         <th class="title-string">Date</th>
53         <th class="anti-the">Title</th>
54         <th>Author</th>
55         <th>Call no.</th>
56         <th>Barcode</th>
57         <th>Number of renewals</th>
58         <th class="title-string">Checked out on</th>
59         <th>Checked out from</th>
60         <th class="title-string">Date due</th>
61         <th class="title-string">Return date</th>
62         </tr>
63       </thead>
64       <tbody>
65       [% FOREACH issue IN loop_reading %]
66         [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
67           <td style="display:none;">
68             [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
69             [% ELSE %][% issuetype = 'standard_checkout' | html %]
70             [% END %]
71             [% issuetype | html %]
72           </td>
73           <td>
74             <span title="[% issue.issuestimestamp | html %]">[% issue.issuestimestamp | $KohaDates  with_hours => 1 %]</span>
75           </td>
76           <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber | uri %]">[% issue.title | html %]</a></td>
77
78           <td>[% issue.author | html %]</td>
79
80           <td>
81             [% IF issue.classification %]
82                 [% issue.classification | html %]
83             [% ELSE %]
84                 [% issue.itemcallnumber | html %]
85             [% END %]
86           </td>
87
88           <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% issue.itemnumber | uri %]&amp;biblionumber=[% issue.biblionumber | uri %]&amp;bi=[% issue.biblioitemnumber | uri %]#item[% issue.itemnumber | uri %]">[% issue.barcode | html %]</a></td>
89           <td>[% issue.renewals | html %]</td>
90           <td>
91             <span title="[% issue.issuedate | html %]">[% issue.issuedate |$KohaDates  with_hours => 1 %]</span>
92           </td>
93           <td>[% Branches.GetName( issue.branchcode ) | html %]</td>
94           <td>
95             [% IF issue.date_due %]
96                 <span title="[% issue.date_due | html %]">[% issue.date_due |$KohaDates  with_hours => 1 %]</span>
97             [% ELSE %]
98                 <span title="0000-00-00"></span>
99             [% END %]
100           </td>
101           <td>
102             [% IF  issue.returndate %]
103               <span title="[% issue.returndate | html %]">[% issue.returndate |$KohaDates  with_hours => 1 %]</span>
104             [% ELSE %]
105               <span title="Checked out"><small>Checked out</small></span>
106             [% END %]
107           </td>
108         </tr>
109       [% END %]
110       </tbody>
111     </table>
112   </div>
113 </div>
114 [% END %]
115
116             </main>
117         </div> <!-- /.col-sm-10.col-sm-push-2 -->
118
119         <div class="col-sm-2 col-sm-pull-10">
120             <aside>
121                 [% INCLUDE 'circ-menu.inc' %]
122             </aside>
123         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
124      </div> <!-- /.row -->
125
126 [% MACRO jsinclude BLOCK %]
127     [% INCLUDE 'str/members-menu.inc' %]
128     [% Asset.js("js/members-menu.js") | $raw %]
129     [% INCLUDE 'datatables.inc' %]
130     <script id="js">
131         $(document).ready(function() {
132             var table = $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
133                 "sPaginationType": "four_button",
134                 "aaSorting": [],
135                 "aoColumnDefs": [
136                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
137                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
138                 ]
139             }));
140             var tabs = $("#tabs").tabs({
141                 activate: function(e, ui) {
142                     var active = tabs.tabs("option", "active" );
143                     if ( active == 1 ) {
144                         table.fnFilter("standard_checkout", 0);
145                     } else if ( active == 2 ) {
146                         table.fnFilter("onsite_checkout", 0);
147                     } else { // all
148                         table.fnFilter('', 0);
149                     }
150                 }
151             });
152         });
153     </script>
154 [% END %]
155
156 [% INCLUDE 'intranet-bottom.inc' %]