View | Details | Raw Unified | Return to bug 33294
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-104 / +107 lines)
Lines 51-157 Link Here
51
[% ELSIF ( !loop_reading ) %]
51
[% ELSIF ( !loop_reading ) %]
52
    <div class="dialog message">This patron has no circulation history.</div>
52
    <div class="dialog message">This patron has no circulation history.</div>
53
[% ELSE %]
53
[% ELSE %]
54
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /></form>
54
    <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /></form>
55
55
56
56
        [% BLOCK table_readingrec %]
57
<div id="tabs" class="toptabs">
57
            <table id="table_readingrec">
58
  [% IF Koha.Preference('OnSiteCheckouts') %]
58
                <thead>
59
  <ul class="nav nav-tabs" role="tablist">
59
                    <tr>
60
    <li role="presentation" class="active"><a href="#readingrec" aria-controls="readingrec" role="tab" data-toggle="tab" data-tabname="all" id="tab_all">All</a></li>
60
                        <th style="display:none;">Type</th>
61
    <li role="presentation"><a href="#readingrec" aria-controls="readingrec" role="tab" data-toggle="tab" data-tabname="checkouts" id="tab_checkout">Checkouts</a></li>
61
                        <th>Date</th>
62
    <li role="presentation"><a href="#readingrec" aria-controls="readingrec" role="tab" data-toggle="tab" id="tab_onsite_checkout" data-tabname="onsite">On-site checkouts</a></li>
62
                        <th class="anti-the">Title</th>
63
  </ul>
63
                        <th>Author</th>
64
  <div class="tab-content">
64
                        <th>Call number</th>
65
      <div id="readingrec" role="tabpanel" class="tab-pane active">
65
                        <th>Vol info</th>
66
  [% ELSE %]
66
                        <th>Barcode</th>
67
    <div id="readingrec" class="page-section">
67
                        <th>Number of renewals</th>
68
  [% END %]
68
                        <th>Checked out on</th>
69
    <table id="table_readingrec">
69
                        <th>Checked out from</th>
70
      <thead>
70
                        [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
71
        <tr>
71
                            <th>Checked out by</th>
72
        <th style="display:none;">Type</th>
72
                        [% END %]
73
        <th>Date</th>
73
                        <th>Date due</th>
74
        <th class="anti-the">Title</th>
74
                        <th>Return date</th>
75
        <th>Author</th>
75
                    </tr>
76
        <th>Call number</th>
76
                </thead>
77
        <th>Vol info</th>
77
                <tbody>
78
        <th>Barcode</th>
78
                    [% FOREACH issue IN loop_reading %]
79
        <th>Number of renewals</th>
79
                        [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
80
        <th>Checked out on</th>
80
                            <td style="display:none;">
81
        <th>Checked out from</th>
81
                                [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
82
        [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
82
                                [% ELSE %][% issuetype = 'standard_checkout' | html %]
83
        <th>Checked out by</th>
83
                                [% END %]
84
                                [% issuetype | html %]
85
                            </td>
86
                            <td data-order="[% issue.issuestimestamp | html %]">
87
                                [% issue.issuestimestamp | $KohaDates  with_hours => 1 %]
88
                            </td>
89
                            <td>
90
                                [% INCLUDE 'biblio-title.inc' biblio=issue link = 1 %]
91
                            </td>
92
93
                            <td>[% issue.author | html %]</td>
94
95
                            <td>
96
                                [% IF issue.classification %]
97
                                    [% issue.classification | html %]
98
                                [% ELSE %]
99
                                    [% issue.itemcallnumber | html %]
100
                                [% END %]
101
                            </td>
102
103
                            <td>
104
                                [% IF issue.enumchron %]
105
                                    [% issue.enumchron | html %]
106
                                [% END %]
107
                            </td>
108
109
                            <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>
110
                            <td>
111
                                [% issue.renewals_count | html %]
112
                                [% IF issue.renewals_count > 0 %]
113
                                    [ <a class="checkout_renewals_view" data-renewals="[% issue.renewals_count | html %]" data-issueid="[% issue.issue_id | html %]" href="#">View</a> ]
114
                                [% END %]
115
                            </td>
116
                            <td data-order="[% issue.issuedate | html %]">
117
                                [% issue.issuedate |$KohaDates  with_hours => 1 %]
118
                            </td>
119
                            <td>[% Branches.GetName( issue.branchcode ) | html %]</td>
120
                            [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
121
                                <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issue.issuer_id | uri %]">[% issue.firstname | html %] [% issue.surname | html %]</a></td>
122
                            [% END %]
123
                            <td data-order="[% issue.date_due | html %]">
124
                                [% issue.date_due |$KohaDates  with_hours => 1 %]
125
                            </td>
126
                            [% IF  issue.returndate %]
127
                                <td data-order="[% issue.returndate | html %]">
128
                                [% issue.returndate |$KohaDates  with_hours => 1 %]
129
                            [% ELSE %]
130
                                <td data-order="checked out">
131
                                <small>Checked out</small>
132
                            [% END %]
133
                            </td>
134
                        </tr>
135
                    [% END %]
136
                </tbody>
137
            </table>
84
        [% END %]
138
        [% END %]
85
        <th>Date due</th>
139
86
        <th>Return date</th>
140
        [% IF Koha.Preference('OnSiteCheckouts') %]
87
        </tr>
141
            [% WRAPPER tabs id= "tabs" %]
88
      </thead>
142
                [% WRAPPER tabs_nav %]
89
      <tbody>
143
                    [% WRAPPER tab_item tabname= "tab_all" bt_active= 1 %] <span>All</span> [% END %]
90
      [% FOREACH issue IN loop_reading %]
144
                    [% WRAPPER tab_item tabname= "tab_checkout" %] <span>Checkouts</span> [% END %]
91
        [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
145
                    [% WRAPPER tab_item tabname= "tab_onsite_checkout" %] <span>On-site checkouts</span> [% END %]
92
          <td style="display:none;">
146
                [% END # /WRAPPER tabs_nav %]
93
            [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
147
                [% WRAPPER tab_panels %]
94
            [% ELSE %][% issuetype = 'standard_checkout' | html %]
148
                    [% WRAPPER tab_panel tabname="readingrec" bt_active= 1 %]
95
            [% END %]
149
                        [% INCLUDE table_readingrec %]
96
            [% issuetype | html %]
150
                    [% END # /tab_panel# %]
97
          </td>
151
                [% END # /WRAPPER tab_panels %]
98
          <td data-order="[% issue.issuestimestamp | html %]">
152
            [% END # /WRAPPER tabs %]
99
              [% issue.issuestimestamp | $KohaDates  with_hours => 1 %]
153
        [% ELSE %]
100
          </td>
154
            <div class="page-section">
101
          <td>
155
                [% INCLUDE table_readingrec %]
102
            [% INCLUDE 'biblio-title.inc' biblio=issue link = 1 %]
156
            </div> <!-- /.page-section -->
103
            </td>
157
        [% END # /IF Koha.Preference('OnSiteCheckouts') %]
104
158
105
          <td>[% issue.author | html %]</td>
106
107
          <td>
108
            [% IF issue.classification %]
109
                [% issue.classification | html %]
110
            [% ELSE %]
111
                [% issue.itemcallnumber | html %]
112
            [% END %]
113
          </td>
114
115
          <td>
116
            [% IF issue.enumchron %]
117
                [% issue.enumchron | html %]
118
            [% END %]
119
          </td>
120
121
          <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>
122
          <td>
123
              [% issue.renewals_count | html %]
124
              [% IF issue.renewals_count > 0 %]
125
                  [ <a class="checkout_renewals_view" data-renewals="[% issue.renewals_count | html %]" data-issueid="[% issue.issue_id | html %]" href="#">View</a> ]
126
              [% END %]
127
          </td>
128
          <td data-order="[% issue.issuedate | html %]">
129
              [% issue.issuedate |$KohaDates  with_hours => 1 %]
130
          </td>
131
          <td>[% Branches.GetName( issue.branchcode ) | html %]</td>
132
          [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
133
          <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issue.issuer_id | uri %]">[% issue.firstname | html %] [% issue.surname | html %]</a></td>
134
          [% END %]
135
          <td data-order="[% issue.date_due | html %]">
136
              [% issue.date_due |$KohaDates  with_hours => 1 %]
137
          </td>
138
            [% IF  issue.returndate %]
139
                <td data-order="[% issue.returndate | html %]">
140
                [% issue.returndate |$KohaDates  with_hours => 1 %]
141
            [% ELSE %]
142
                <td data-order="checked out">
143
                <small>Checked out</small>
144
            [% END %]
145
          </td>
146
        </tr>
147
      [% END %]
148
      </tbody>
149
    </table>
150
  </div>
151
  [% IF Koha.Preference('OnSiteCheckouts') %]
152
    </div> <!-- /.tab-content -->
153
  [% END %]
154
</div>
155
[% END %]
159
[% END %]
156
160
157
            </main>
161
            </main>
Lines 182-191 Link Here
182
            }, table_settings);
186
            }, table_settings);
183
187
184
            $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
188
            $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
185
                active_tab = $(this).data("tabname");
189
                active_tab = $(this).attr("href");
186
                if( active_tab == "checkouts" ){
190
                if( active_tab == "#tab_checkout_panel" ){
187
                    table.fnFilter("standard_checkout", 0);
191
                    table.fnFilter("standard_checkout", 0);
188
                } else if( active_tab == "onsite" ){
192
                } else if( active_tab == "#tab_onsite_checkout_panel" ){
189
                    table.fnFilter("onsite_checkout", 0);
193
                    table.fnFilter("onsite_checkout", 0);
190
                } else {
194
                } else {
191
                    table.fnFilter('', 0);
195
                    table.fnFilter('', 0);
192
- 

Return to bug 33294