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

(-)a/admin/columns_settings.yml (+69 lines)
Lines 2116-2121 modules: Link Here
2116
            -
2116
            -
2117
              columnname: link
2117
              columnname: link
2118
2118
2119
    patron_details:
2120
      checkoutst:
2121
        columns:
2122
            -
2123
              columnname: title
2124
            -
2125
              columnname: author
2126
            -
2127
              columnname: datedue
2128
            -
2129
              columnname: itemtype
2130
            -
2131
              columnname: barcode
2132
            -
2133
              columnname: callnumber
2134
            -
2135
              columnname: renew
2136
            -
2137
              columnname: fines
2138
            -
2139
              columnname: links
2140
      holdst:
2141
        columns:
2142
            -
2143
              columnname: title
2144
            -
2145
              columnname: placed_on
2146
            -
2147
              columnname: expires_on
2148
            -
2149
              columnname: pickup_location
2150
            -
2151
              columnname: priority
2152
            -
2153
              columnname: notes
2154
            -
2155
              columnname: suspend
2156
            -
2157
              columnname: modify
2158
      overduest:
2159
        columns:
2160
            -
2161
              columnname: title
2162
            -
2163
              columnname: itemtype
2164
            -
2165
              columnname: barcode
2166
            -
2167
              columnname: callnumber
2168
            -
2169
              columnname: duedate
2170
            -
2171
              columnname: renew
2172
            -
2173
              columnname: fines
2174
2175
      opac_user_relative_issues_table:
2176
        columns:
2177
            -
2178
              columnname: title
2179
            -
2180
              columnname: duedate
2181
            -
2182
              columnname: barcode
2183
            -
2184
              columnname: callnumber
2185
            -
2186
              columnname: relative
2187
2119
  serials:
2188
  serials:
2120
    subscription-detail:
2189
    subscription-detail:
2121
      orders:
2190
      orders:
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc (-1 / +1 lines)
Lines 87-93 function KohaTable(selector, dt_parameters, columns_settings) { Link Here
87
                columns: included_ids,
87
                columns: included_ids,
88
                className: "columns_controls",
88
                className: "columns_controls",
89
                titleAttr: _("Columns settings"),
89
                titleAttr: _("Columns settings"),
90
                text: '<i class="fa fa-lg fa-gear" aria-hidden="true"></i> <span class="dt-button-text">' + _("Columns") + '</span>',
90
                text: '<span class="dt-button-text">' + _("Columns") + '</span>',
91
                exportOptions: {
91
                exportOptions: {
92
                    columns: exportColumns
92
                    columns: exportColumns
93
                }
93
                }
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc (-9 / +9 lines)
Lines 8-35 Link Here
8
    <!-- HOLDS TABLE ROWS -->
8
    <!-- HOLDS TABLE ROWS -->
9
    <thead>
9
    <thead>
10
        <tr>
10
        <tr>
11
            <th class="all anti-the">Title</th>
11
            <th data-colname="title" class="all anti-the">Title</th>
12
            [% IF ( showpriority ) %]
12
            [% IF ( showpriority ) %]
13
                <th>Placed on</th>
13
                <th data-colname="placed_on">Placed on</th>
14
            [% ELSE %]
14
            [% ELSE %]
15
                <th class="psort">Placed on</th>
15
                <th data-colname="placed_on" class="psort">Placed on</th>
16
            [% END %]
16
            [% END %]
17
            <th>Expires on</th>
17
            <th data-colname="expires_on">Expires on</th>
18
            [% UNLESS( singleBranchMode) %]
18
            [% UNLESS( singleBranchMode) %]
19
                <th>Pickup location</th>
19
                <th data-colname="pickup_location">Pickup location</th>
20
            [% END %]
20
            [% END %]
21
            [% IF ( showpriority ) %]
21
            [% IF ( showpriority ) %]
22
                <th class="psort">Priority</th>
22
                <th data-colname="priority" class="psort">Priority</th>
23
            [% END %]
23
            [% END %]
24
            [% IF Koha.Preference('OpacHoldNotes') %]
24
            [% IF Koha.Preference('OpacHoldNotes') %]
25
                <th>Notes</th>
25
                <th data-colname="notes">Notes</th>
26
            [% END %]
26
            [% END %]
27
            <th>Status</th>
27
            <th>Status</th>
28
            [% IF SuspendHoldsOpac and ! onlyinfo %]
28
            [% IF SuspendHoldsOpac and ! onlyinfo %]
29
                    <th class="nosort" >Suspend</th>
29
                    <th data-colname="suspend" class="nosort" >Suspend</th>
30
            [% END %]
30
            [% END %]
31
            [% IF ! onlyinfo %]
31
            [% IF ! onlyinfo %]
32
                <th class="nosort">Modify</th>
32
                <th data-colname="modify" class="nosort">Modify</th>
33
            [% END %]
33
            [% END %]
34
            <th></th>
34
            <th></th>
35
        </tr>
35
        </tr>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-66 / +41 lines)
Lines 2-7 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% USE TablesSettings %]
5
[% USE Branches %]
6
[% USE Branches %]
6
[% USE ItemTypes %]
7
[% USE ItemTypes %]
7
[% USE Price %]
8
[% USE Price %]
Lines 332-359 Link Here
332
                                            <thead>
333
                                            <thead>
333
                                                <tr>
334
                                                <tr>
334
                                                    [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
335
                                                    [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
335
                                                    <th class="all anti-the">Title</th>
336
                                                    <th id="title" data-colname="title" class="all anti-the">Title</th>
336
                                                    <th>Author</th>
337
                                                    <th id="author" data-colname="author">Author</th>
337
                                                    <th class="psort">Due</th>
338
                                                    <th id="duedate" data-colname="datedue" class="psort">Due</th>
338
                                                    [% IF ( Koha.Preference('BiblioItemtypeInfo') || !item_level_itypes ) %]
339
                                                    [% IF ( Koha.Preference('BiblioItemtypeInfo') || !item_level_itypes ) %]
339
                                                        <th>Item type</th>
340
                                                        <th data-colname="itemtype">Item type</th>
340
                                                    [% END %]
341
                                                    [% END %]
341
                                                    [% IF ( show_barcode ) %]
342
                                                    [% IF ( show_barcode ) %]
342
                                                        <th>Barcode</th>
343
                                                        <th data-colname="barcode">Barcode</th>
343
                                                    [% END %]
344
                                                    [% END %]
344
                                                        <th>Call number</th>
345
                                                        <th data-colname="callnumber">Call number</th>
345
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
346
                                                    [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %]
346
                                                        <th>Renew</th>
347
                                                        <th data-colname="renew">Renew</th>
347
                                                    [% END %]
348
                                                    [% END %]
348
                                                    [% IF ( OPACFinesTab ) %]
349
                                                    [% IF ( OPACFinesTab ) %]
349
                                                        <th>Fines</th>
350
                                                        <th data-colname="fines">Fines</th>
350
                                                    [% END %]
351
                                                    [% END %]
351
                                                    [% IF Koha.Preference('OPACMySummaryHTML') %]
352
                                                    [% IF Koha.Preference('OPACMySummaryHTML') %]
352
                                                        <th class="nosort">Links</th>
353
                                                        <th class="nosort" data-colname="links">Links</th>
353
                                                    [% END %]
354
                                                    [% END %]
354
                                                    [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
355
                                                    [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
355
                                                        <th class="hidden">Checkout note</th>
356
                                                        <th class="hidden">Checkout note</th>
356
                                                        <th id="checkout-notes" class="nosort noExport" title="Use this to report any problems with your currently checked out items">Report a problem</th>
357
                                                        <th id="checkout-notes" class="nosort noExport" title="Use this to report any problems with your currently checked out items" data-colname="note">Report a problem</th>
357
                                                    [% END %]
358
                                                    [% END %]
358
                                                    <th></th>
359
                                                    <th></th>
359
                                                </tr>
360
                                                </tr>
Lines 665-679 Link Here
665
666
666
                            [% IF relatives %]
667
                            [% IF relatives %]
667
                                [% WRAPPER tab_panel tabname="opac-user-relative-issues" %]
668
                                [% WRAPPER tab_panel tabname="opac-user-relative-issues" %]
668
                                    <table id="opac-user-relative-issues-table" class="table table-bordered table-striped">
669
                                    <table id="opac_user_relative_issues_table" class="table table-bordered table-striped">
669
                                        <caption class="sr-only">Relatives' checkouts</caption>
670
                                        <caption class="sr-only">Relatives' checkouts</caption>
670
                                        <thead>
671
                                        <thead>
671
                                            <tr>
672
                                            <tr>
672
                                                <th class="all anti-the">Title</th>
673
                                                <th data-colname="title" class="all anti-the">Title</th>
673
                                                <th>Due</th>
674
                                                <th data-colname="duedate">Due</th>
674
                                                <th>Barcode</th>
675
                                                <th data-colname="barcode">Barcode</th>
675
                                                <th>Call number</th>
676
                                                <th data-colname="callnumber">Call number</th>
676
                                                <th class="psort">Relative</th>
677
                                                <th data-colname="relative" class="psort">Relative</th>
677
                                                <th></th>
678
                                                <th></th>
678
                                            </tr>
679
                                            </tr>
679
                                        </thead>
680
                                        </thead>
Lines 720-735 Link Here
720
                                        <thead>
721
                                        <thead>
721
                                            <tr>
722
                                            <tr>
722
                                                [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
723
                                                [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
723
                                                <th class="all anti-the">Title</th>
724
                                                <th data-colname="title" class="all anti-the">Title</th>
724
                                                [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
725
                                                [% UNLESS ( item_level_itypes ) %]<th data-colname="itemtype">Item type</th> [% END %]
725
                                                [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
726
                                                [% IF ( show_barcode ) %]<th data-colname="barcode">Barcode</th>[% END %]
726
                                                <th>Call number</th>
727
                                                <th data-colname="callnumber">Call number</th>
727
                                                <th class="psort">Due</th>
728
                                                <th data-colname="duedate" class="psort">Due</th>
728
                                                [% IF ( OpacRenewalAllowed ) %]
729
                                                [% IF ( OpacRenewalAllowed ) %]
729
                                                    <th class="nosort">Renew</th>
730
                                                    <th data-colname="renew" class="nosort">Renew</th>
730
                                                [% END %]
731
                                                [% END %]
731
                                                [% IF ( OPACFinesTab ) %]
732
                                                [% IF ( OPACFinesTab ) %]
732
                                                    <th>Fines</th>
733
                                                    <th data-colname="fines">Fines</th>
733
                                                [% END %]
734
                                                [% END %]
734
                                                <th></th>
735
                                                <th></th>
735
                                            </tr>
736
                                            </tr>
Lines 1090-1095 Link Here
1090
    [% Asset.js("js/form-submit.js") | $raw %]
1091
    [% Asset.js("js/form-submit.js") | $raw %]
1091
    [% INCLUDE 'calendar.inc' %]
1092
    [% INCLUDE 'calendar.inc' %]
1092
    [% INCLUDE 'datatables.inc' %]
1093
    [% INCLUDE 'datatables.inc' %]
1094
    [% INCLUDE 'columns_settings.inc' %]
1093
    <script>
1095
    <script>
1094
        var AR_CAPTION_COUNT = _("(%s total)");
1096
        var AR_CAPTION_COUNT = _("(%s total)");
1095
1097
Lines 1217-1268 Link Here
1217
                );
1219
                );
1218
            });
1220
            });
1219
1221
1220
            var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
1222
            function initKTable(id, columns_settings){
1221
            dTables.each(function(){
1223
                KohaTable(id, {
1222
                var thIndex = $(this).find("th.psort").index();
1224
                    "dom" : '<"top"<"table_entries"><"table_controls"fB>>t',
1223
                $(this).on("init.dt", function() {
1225
                    "bKohaColumnsUseNames": true,
1224
                        tableInit( $(this).attr("id") );
1226
                    "autoWidth": false,
1225
                    })
1227
                    "responsive": {
1226
                    .dataTable($.extend(true, {}, dataTablesDefaults, {
1228
                        "details": { "type": 'column', "target": -1 }
1227
                    "sorting" : [[ thIndex, 'asc' ]],
1229
                    },
1228
                    "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1229
                    "columnDefs": [
1230
                        { "targets": [ "nosort" ],"sortable": false,"searchable": false },
1231
                        { "type": "anti-the", "targets" : [ "anti-the" ] },
1232
                        { "visible": false, "targets" : [ "hidden" ] },
1233
                        { "className": 'dtr-control', "orderable": false, "targets": -1 }
1234
                    ],
1235
                    "language": {
1230
                    "language": {
1236
                        "search": "_INPUT_",
1231
                        "search": "_INPUT_",
1237
                        "searchPlaceholder": _("Search")
1232
                        "searchPlaceholder": _("Search")
1238
                    },
1233
                    },
1239
                    "autoWidth": false,
1234
                }, columns_settings);
1240
                    "responsive": {
1235
            }
1241
                        details: {
1236
1242
                            type: 'column',
1237
            [% tables = ['checkoutst', 'holdst', 'overduest','opac_user_relative_issues_table'] %]
1243
                            target: -1
1238
            [% FOREACH table IN tables %]
1244
                        }
1239
               var [% table | $raw %]_columns = [% TablesSettings.GetColumns( 'opac', 'patron_details', table, 'json') | $raw %];
1245
                    },
1240
               initKTable('#[% table | $raw %]', [% table | $raw %]_columns);
1246
                    buttons: [
1241
            [% END %]
1247
                        /* Override default button set so that we can extend the options of print and csv */
1248
                        'clearFilter', 'copy',
1249
                        {
1250
                            extend: "print",
1251
                            exportOptions: {
1252
                                /* Print view should show all columns (even invisible ones) unless they are .noExport */
1253
                                columns: ":not(.noExport)"
1254
                            }
1255
                        },
1256
                        {
1257
                            extend: "csv",
1258
                            exportOptions: {
1259
                                /* CSV export should include all columns (even invisible ones) unless they are .noExport */
1260
                                columns: ":not(.noExport)"
1261
                            }
1262
                        }
1263
                    ]
1264
                }));
1265
            });
1266
1242
1267
            var dataTables = $("#recalls-table,#article-requests-table");
1243
            var dataTables = $("#recalls-table,#article-requests-table");
1268
            dataTables.each(function(){
1244
            dataTables.each(function(){
1269
- 

Return to bug 30221