Bug 28859: Correctly handle 'Checked out by' visibility
We must have the column in the table and let DT deal with the visibility. This patch hides the "Checked out by" column by default if RecordStaffUserOnCheckout is off, but the DT column settings is aware of its existence and the end user can still display the column. IMO that's the most optimal situation considering both maintenance and ergonomic. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
a8a7ce3717
commit
16e988301c
|
|
@ -56,6 +56,8 @@
|
|||
<th>Checked out from</th>
|
||||
[% IF Koha.Preference('RecordStaffUserOnCheckout') %]
|
||||
<th>Checked out by</th>
|
||||
[% ELSE %]
|
||||
<th class="NoVisible">Checked out by</th>
|
||||
[% END %]
|
||||
<th>Renewed</th>
|
||||
<th>Checkout on</th>
|
||||
|
|
@ -83,13 +85,11 @@
|
|||
[% ELSE %]
|
||||
|
||||
[% END %]</td>
|
||||
[% IF Koha.Preference('RecordStaffUserOnCheckout') %]
|
||||
<td>[% IF checkout.issuer_id %]
|
||||
<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% checkout.issuer_id | uri %]">
|
||||
[% INCLUDE 'patron-title.inc' patron=checkout.issuer %]
|
||||
</a>
|
||||
[% END %]</td>
|
||||
[% END %]
|
||||
<td>[% IF checkout.renewals %]
|
||||
Yes[% IF checkout.lastreneweddate %], <small>last on: [% checkout.lastreneweddate |$KohaDates with_hours => 1 %]</small>
|
||||
[% END %]
|
||||
|
|
@ -138,11 +138,7 @@
|
|||
[% END %]
|
||||
var table = KohaTable("table_issues", {
|
||||
"sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
|
||||
[% IF Koha.Preference('RecordStaffUserOnCheckout') %]
|
||||
"aaSorting": [[ 5, "desc" ]],
|
||||
[% ELSE %]
|
||||
"aaSorting": [[ 4, "desc" ]],
|
||||
[% END %]
|
||||
"sPaginationType": "full_numbers"
|
||||
}, columns_settings);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue