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

(-)a/admin/columns_settings.yml (-1 / +22 lines)
Lines 441-447 modules: Link Here
441
            -
441
            -
442
              columnname: subscription_callnumber
442
              columnname: subscription_callnumber
443
443
444
      checkoutshistory-table:
444
      current_checkouts-table:
445
        columns:
446
            -
447
              columnname: patron
448
              cannot_be_toggled: 1
449
              cannot_be_modified: 1
450
            -
451
              columnname: barcode
452
              cannot_be_toggled: 1
453
              cannot_be_modified: 1
454
            -
455
              columnname: checked_out_from
456
            -
457
              columnname: checked_out_by
458
            -
459
              columnname: renewed
460
            -
461
              columnname: checkout_on
462
            -
463
              columnname: due_date
464
465
      old_checkouts-table:
445
        columns:
466
        columns:
446
            -
467
            -
447
              columnname: patron
468
              columnname: patron
(-)a/installer/data/mysql/atomicupdate/bug_29275.pl (+28 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "29275",
5
    description => "Use the API to render checkout history for a biblio",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        # Migrate checkoutshistory-table => current_checkouts-table ('checkin_on' excluded)
11
        $dbh->do(q{
12
            INSERT INTO columns_settings
13
                SELECT 'catalogue', 'detail', 'current_checkouts-table', columnname, cannot_be_toggled, is_hidden
14
                FROM columns_settings WHERE tablename='checkoutshistory-table' AND columnname<>'checkin_on';
15
        });
16
        # Migrate checkoutshistory-table => old_checkouts-table ('checkin_on' included)
17
        $dbh->do(q{
18
            INSERT INTO columns_settings
19
                SELECT 'catalogue', 'detail', 'old_checkouts-table', columnname, cannot_be_toggled, is_hidden
20
                FROM columns_settings WHERE tablename='checkoutshistory-table';
21
        });
22
        # Clean the old table settings
23
        $dbh->do(q{
24
            DELETE FROM columns_settings
25
            WHERE tablename='checkoutshistory-table';
26
        });
27
    },
28
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt (-5 / +7 lines)
Lines 220-236 Link Here
220
                }, columns_settings);
220
                }, columns_settings);
221
            }
221
            }
222
222
223
            var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'checkoutshistory-table', 'json') %];
223
            var old_checkouts_columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'old_checkouts-table', 'json') %];
224
            var current_checkouts_columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'current_checkouts-table', 'json') %];
225
224
            [% UNLESS show_patron_column %]
226
            [% UNLESS show_patron_column %]
225
            // Remove the patron column definition
227
            // Remove the patron column definition
226
            columns_settings.splice(0,1);
228
            old_checkouts_columns_settings.splice(0,1);
229
            current_checkouts_columns_settings.splice(0,1);
227
            [% END %]
230
            [% END %]
228
231
229
            var show_patron_column  = [% IF show_patron_column %]1[% ELSE %]0[% END %];
232
            var show_patron_column  = [% IF show_patron_column %]1[% ELSE %]0[% END %];
230
            var default_sort_column = 3 + show_patron_column;
233
            var default_sort_column = 3 + show_patron_column;
231
234
232
            var old_checkouts = initialize_checkouts_table( '#old_checkouts', default_sort_column, true, columns_settings );
235
            var old_checkouts = initialize_checkouts_table( '#old_checkouts', default_sort_column, true, old_checkouts_columns_settings );
233
            var current_checkouts = initialize_checkouts_table( '#current_checkouts', default_sort_column, false, columns_settings.slice(0,-1) );
236
            var current_checkouts = initialize_checkouts_table( '#current_checkouts', default_sort_column, false, current_checkouts_columns_settings );
234
        });
237
        });
235
    </script>
238
    </script>
236
[% END %]
239
[% END %]
237
- 

Return to bug 29275