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

(-)a/admin/columns_settings.yml (+33 lines)
Lines 157-162 modules: Link Here
157
          cannot_be_toggled: 1
157
          cannot_be_toggled: 1
158
          cannot_be_modified: 1
158
          cannot_be_modified: 1
159
159
160
    itemtypes:
161
      table_item_type:
162
        -
163
          columnname: image
164
        -
165
          columnname: code
166
        -
167
          columnname: description
168
        -
169
          columnname: search_category
170
        -
171
          columnname: not_for_loan
172
        -
173
          columnname: hide_in_opac
174
        -
175
          columnname: rental_charge
176
        -
177
          columnname: daily_rental_charge
178
        -
179
          columnname: hourly_rental_charge
180
        -
181
          columnname: default_replacement_cost
182
        -
183
          columnname: lost_processing_fee
184
        -
185
          columnname: checkin_message
186
        -
187
          columnname: library_limitations
188
        -
189
          columnname: actions
190
          cannot_be_toggled: 1
191
          cannot_be_modified: 1
192
160
    libraries:
193
    libraries:
161
      libraries:
194
      libraries:
162
        -
195
        -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (-8 / +17 lines)
Lines 3-8 Link Here
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% USE Price %]
5
[% USE Price %]
6
[% USE ColumnsSettings %]
6
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
<title>Koha &rsaquo; Administration &rsaquo; Item types [% IF op == 'add_form' %]&rsaquo;
9
<title>Koha &rsaquo; Administration &rsaquo; Item types [% IF op == 'add_form' %]&rsaquo;
Lines 347-353 Item types administration Link Here
347
    [% IF itemtypes %]
348
    [% IF itemtypes %]
348
        <table id="table_item_type">
349
        <table id="table_item_type">
349
          <thead>
350
          <thead>
350
            [% UNLESS Koha.Preference('noItemTypeImages') %]<th>Image</th>[% END %]
351
            [% UNLESS Koha.Preference('noItemTypeImages') %]<th class="noExport">Image</th>[% END %]
351
            <th>Code</th>
352
            <th>Code</th>
352
            <th>Description</th>
353
            <th>Description</th>
353
            <th>Search category</th>
354
            <th>Search category</th>
Lines 360-366 Item types administration Link Here
360
            <th>Processing fee (when lost)</th>
361
            <th>Processing fee (when lost)</th>
361
            <th>Checkin message</th>
362
            <th>Checkin message</th>
362
            <th>Library limitations</th>
363
            <th>Library limitations</th>
363
            <th>Actions</th>
364
            <th class="noExport">Actions</th>
364
          </thead>
365
          </thead>
365
          [% FOREACH itemtype IN itemtypes %]
366
          [% FOREACH itemtype IN itemtypes %]
366
            <tr>
367
            <tr>
Lines 458-474 Item types administration Link Here
458
    [% Asset.js("js/admin-menu.js") | $raw %]
459
    [% Asset.js("js/admin-menu.js") | $raw %]
459
    [% INCLUDE 'greybox.inc' %]
460
    [% INCLUDE 'greybox.inc' %]
460
    [% INCLUDE 'datatables.inc' %]
461
    [% INCLUDE 'datatables.inc' %]
462
    [% INCLUDE 'columns_settings.inc' %]
461
    <script>
463
    <script>
462
         $(document).ready(function() {
464
         $(document).ready(function() {
463
            $('#icons').tabs();
465
            $('#icons').tabs();
464
            $("#table_item_type").dataTable($.extend(true, {}, dataTablesDefaults, {
466
            var columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %];
465
                "aoColumnDefs": [
467
            [% IF Koha.Preference('noItemTypeImages') %]
466
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
468
                columns_settings.shift(); // Remove item type image column from configuration
467
                ],
469
            [% END %]
470
471
            $(document).ready(function() {
472
                KohaTable("table_item_type", {
473
                    "aoColumnDefs": [
474
                        { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
475
                    ],
468
                "aaSorting": [[ 2, "asc" ]],
476
                "aaSorting": [[ 2, "asc" ]],
469
                "iDisplayLength": 10,
477
                "iDisplayLength": 10,
470
                "sPaginationType": "full"
478
                "sPaginationType": "full"
471
            }));
479
                }, columns_settings);
480
            });
481
472
            $( "#itemtypeentry" ).validate({
482
            $( "#itemtypeentry" ).validate({
473
                rules: {
483
                rules: {
474
                    itemtype: { required: true },
484
                    itemtype: { required: true },
475
- 

Return to bug 23606