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

(-)a/admin/columns_settings.yml (+4 lines)
Lines 384-389 modules: Link Here
384
              columnname: holdings_holdingbranch
384
              columnname: holdings_holdingbranch
385
            -
385
            -
386
              columnname: holdings_homebranch
386
              columnname: holdings_homebranch
387
            -
388
              columnname: holdings_shelvinglocation
387
            -
389
            -
388
              columnname: holdings_ccode
390
              columnname: holdings_ccode
389
            -
391
            -
Lines 450-455 modules: Link Here
450
              columnname: otherholdings_holdingbranch
452
              columnname: otherholdings_holdingbranch
451
            -
453
            -
452
              columnname: otherholdings_homebranch
454
              columnname: otherholdings_homebranch
455
            -
456
              columnname: otherholdings_shelvinglocation
453
            -
457
            -
454
              columnname: otherholdings_ccode
458
              columnname: otherholdings_ccode
455
            -
459
            -
(-)a/installer/data/mysql/atomicupdate/bug_15461.pl (+18 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "15461",
5
    description => "Add system preference StaffLocationOnDetail",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        # Do you stuffs here
11
        $dbh->do(q{
12
            INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`)
13
            VALUES ('StaffLocationOnDetail','home','holding|home|both|column','In the staff interface, display the shelving location on its own column or under a library columns.','Choice')
14
        });
15
16
        say $out "Added new system preference 'StaffLocationOnDetail'";
17
    },
18
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 739-744 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
739
('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'),
739
('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'),
740
('StaffHighlightedWords','1','','Highlight search terms on staff interface','YesNo'),
740
('StaffHighlightedWords','1','','Highlight search terms on staff interface','YesNo'),
741
('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff interface','Choice'),
741
('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff interface','Choice'),
742
('StaffLocationOnDetail','home','holding|home|both|column','In the staff interface detail, display the shelving location on its own column or under a library columns.',  'Choice'),
742
('StaffLoginInstructions', '', NULL, 'HTML to go into the login box for the staff interface','Free'),
743
('StaffLoginInstructions', '', NULL, 'HTML to go into the login box for the staff interface','Free'),
743
('StaffLoginLibraryBasedOnIP', '1','', 'Set the logged in library for the user based on their current IP','YesNo'),
744
('StaffLoginLibraryBasedOnIP', '1','', 'Set the logged in library for the user based on their current IP','YesNo'),
744
('StaffLoginRestrictLibraryByIP','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses based on branch','YesNo'),
745
('StaffLoginRestrictLibraryByIP','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses based on branch','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-12 / +39 lines)
Lines 16-21 Link Here
16
            [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
16
            [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
17
            <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
17
            <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
18
            <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
18
            <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
19
            [% IF Koha.Preference('StaffLocationOnDetail') == 'column' %]
20
                 <th id="[% tab | html %]_shelvingloction" data-colname="[% tab | html %]_shelvinglocation">Shelving location</th>
21
            [% END %]
19
            <th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>
22
            <th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>
20
            [% IF Koha.Preference('EnableItemGroups') %]
23
            [% IF Koha.Preference('EnableItemGroups') %]
21
                <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
24
                <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
Lines 363-369 Link Here
363
                searchable: true,
366
                searchable: true,
364
                orderable: true,
367
                orderable: true,
365
                render: function (data, type, row, meta) {
368
                render: function (data, type, row, meta) {
366
                    return escape_str(row._strings.holding_library_id.str);
369
                    let nodes = '<span class="holdingbranchdesc">%s</span>'.format(escape_str(row._strings.holding_library_id.str));
370
                    [% IF ( Koha.Preference('StaffLocationOnDetail') == 'home' || Koha.Preference('StaffLocationOnDetail') == 'both' ) %]
371
                        nodes += '<span class="shelvingloc">'
372
                        [%# If permanent location is defined, show description or code and             %]
373
                        [%# display current location in parentheses. If not, display current location. %]
374
                        [%# Note that permanent location is a code, and location may be an authval.    %]
375
                        let loc_str = row._strings.location.str;
376
                        if ( row.permanent_location && row.permanent_location != row.location ) {
377
                            let permanent_loc_str = av_loc.get(row.permanent_location);
378
                            nodes += '%s (%s)'.format(escape_str(permanent_loc_str), escape_str(loc_str));
379
                        } else {
380
                            nodes += escape_str(loc_str);
381
                        }
382
                    [% END %]
383
                    nodes += '</span>';
384
                    return nodes;
367
                }
385
                }
368
            },
386
            },
369
            {
387
            {
Lines 373-393 Link Here
373
                orderable: true,
391
                orderable: true,
374
                render: function (data, type, row, meta) {
392
                render: function (data, type, row, meta) {
375
                    let nodes = '<span class="homebranchdesc">%s</span>'.format(escape_str(row._strings.home_library_id.str));
393
                    let nodes = '<span class="homebranchdesc">%s</span>'.format(escape_str(row._strings.home_library_id.str));
376
                    nodes += '<span class="shelvingloc">'
394
                    [% IF ( Koha.Preference('StaffLocationOnDetail') == 'home' || Koha.Preference('StaffLocationOnDetail') == 'both' ) %]
377
                    [%# If permanent location is defined, show description or code and             %]
395
                        nodes += '<span class="shelvingloc">'
378
                    [%# display current location in parentheses. If not, display current location. %]
396
                        let loc_str = row._strings.location.str;
379
                    [%# Note that permanent location is a code, and location may be an authval.    %]
397
                        if ( row.permanent_location && row.permanent_location != row.location ) {
380
                    let loc_str = row._strings.location.str;
398
                            let permanent_loc_str = av_loc.get(row.permanent_location);
381
                    if ( row.permanent_location && row.permanent_location != row.location ) {
399
                            nodes += '%s (%s)'.format(escape_str(permanent_loc_str), escape_str(loc_str));
382
                        let permanent_loc_str = av_loc.get(row.permanent_location);
400
                        } else {
383
                        nodes += '%s (%s)'.format(escape_str(permanent_loc_str), escape_str(loc_str));
401
                            nodes += escape_str(loc_str);
384
                    } else {
402
                        }
385
                        nodes += escape_str(loc_str);
403
                        [% END %]
386
                    }
387
                    nodes += '</span>';
404
                    nodes += '</span>';
388
                    return nodes;
405
                    return nodes;
389
                }
406
                }
390
            },
407
            },
408
            [% IF Koha.Preference('StaffLocationOnDetail') == 'column' %]
409
            {
410
                data: "me.location",
411
                searchable: true,
412
                orderable: true,
413
                render: function (data, type, row, meta) {
414
                    return escape_str(row._strings.collection_code.str);
415
                }
416
            },
417
            [% END %]
391
            {
418
            {
392
                data: "me.collection_code",
419
                data: "me.collection_code",
393
                searchable: true,
420
                searchable: true,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref (-1 / +9 lines)
Lines 119-124 Staff interface: Link Here
119
              type: textarea
119
              type: textarea
120
              syntax: text/html
120
              syntax: text/html
121
              class: code
121
              class: code
122
        -
123
            - 'Display the shelving location '
124
            - pref: StaffLocationOnDetail
125
              choices:
126
                  home: "below the home library"
127
                  holding: "below the holding library"
128
                  both: "below both home and holding libraries"
129
                  column: "on a separate column"
130
            - 'for items on the staff interface record details page. <br/> Note: If on a separate column is selected, you still need to enable holdings_shelving location on the <a href="/cgi-bin/koha/admin/columns_settings.pl">Table settings</a> adminstration page.'
122
        -
131
        -
123
            - pref: StaffHighlightedWords
132
            - pref: StaffHighlightedWords
124
              type: boolean
133
              type: boolean
125
- 

Return to bug 15461