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

(-)a/C4/Auth.pm (-2 / +2 lines)
Lines 1190-1199 sub checkauth { Link Here
1190
                    my $ip = $ENV{'REMOTE_ADDR'};
1190
                    my $ip = $ENV{'REMOTE_ADDR'};
1191
1191
1192
                    # if they specify at login, use that
1192
                    # if they specify at login, use that
1193
                    if ( $query->param('branch') ) {
1193
                    if ( $query->param('branch') && ( haspermission($userid, { parameters => 'select_loggedin_library' }) || $flags->{superlibrarian}) ) {
1194
                        $branchcode = $query->param('branch');
1194
                        $branchcode = $query->param('branch');
1195
                        my $library = Koha::Libraries->find($branchcode);
1195
                        my $library = Koha::Libraries->find($branchcode);
1196
                        $branchname = $library? $library->branchname: '';
1196
                        $branchname = $library ? $library->branchname: '';
1197
                    }
1197
                    }
1198
                    if ( $query->param('desk_id') ) {
1198
                    if ( $query->param('desk_id') ) {
1199
                        $desk_id = $query->param('desk_id');
1199
                        $desk_id = $query->param('desk_id');
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 39-44 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
39
   ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'),
39
   ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'),
40
   ( 3, 'manage_background_jobs', 'Manage background jobs'),
40
   ( 3, 'manage_background_jobs', 'Manage background jobs'),
41
   ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'),
41
   ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'),
42
   ( 3, 'select_loggedin_library' , 'Allow user to change logged in library'),
42
   ( 4, 'delete_borrowers', 'Delete patrons'),
43
   ( 4, 'delete_borrowers', 'Delete patrons'),
43
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
44
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
44
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
45
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc (-1 / +1 lines)
Lines 15-21 Link Here
15
            [% IF !Koha.Preference('IndependentBranchesTransfers') || CAN_user_superlibrarian %]
15
            [% IF !Koha.Preference('IndependentBranchesTransfers') || CAN_user_superlibrarian %]
16
                <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
16
                <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
17
            [% END %]
17
            [% END %]
18
            [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
18
            [% IF ( CAN_user_parameters_select_loggedin_library ) %]
19
                [% IF Koha.Preference('UseCirculationDesks') %]
19
                [% IF Koha.Preference('UseCirculationDesks') %]
20
                <li><a href="/cgi-bin/koha/circ/set-library.pl">Set library and desk</a></li>
20
                <li><a href="/cgi-bin/koha/circ/set-library.pl">Set library and desk</a></li>
21
                [% ELSE %]
21
                [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (-1 / +1 lines)
Lines 149-155 Link Here
149
                        </li>
149
                        </li>
150
                    [% END %]
150
                    [% END %]
151
151
152
                    [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
152
                    [% IF ( CAN_user_parameters_select_loggedin_library ) %]
153
                    <li role="separator" class="loggedin-menu-label divider"></li>
153
                    <li role="separator" class="loggedin-menu-label divider"></li>
154
                    <li>
154
                    <li>
155
                        [% IF Koha.Preference('UseCirculationDesks') && Koha.Preference('UseCashRegisters') %]
155
                        [% IF Koha.Preference('UseCirculationDesks') && Koha.Preference('UseCashRegisters') %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+5 lines)
Lines 118-123 Link Here
118
            Manage account debit and credit types
118
            Manage account debit and credit types
119
        </span>
119
        </span>
120
        <span class="permissioncode">([% name | html %])</span>
120
        <span class="permissioncode">([% name | html %])</span>
121
    [%- CASE 'select_loggedin_library' -%]
122
        <span class="sub_permission manage_accounts_subpermission">
123
            Allow user to change logged in library
124
        </span>
125
        <span class="permissioncode">([% name | html %])</span>
121
    [%- CASE 'manage_circ_rules' -%]
126
    [%- CASE 'manage_circ_rules' -%]
122
        <span class="sub_permission manage_circ_rules_subpermission">
127
        <span class="sub_permission manage_circ_rules_subpermission">
123
            Manage circulation rules
128
            Manage circulation rules
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt (-1 / +7 lines)
Lines 41-47 Link Here
41
                    <li>
41
                    <li>
42
                        <a class="circ-button" href="/cgi-bin/koha/circ/renew.pl"><i class="fa fa-retweet"></i> Renew</a>
42
                        <a class="circ-button" href="/cgi-bin/koha/circ/renew.pl"><i class="fa fa-retweet"></i> Renew</a>
43
                    </li>
43
                    </li>
44
                    [% UNLESS IndependentBranches %]
44
                    [% IF ( CAN_user_parameters_select_loggedin_library ) %]
45
                        <li>
45
                        <li>
46
                            [% IF Koha.Preference('UseCirculationDesks') %]
46
                            [% IF Koha.Preference('UseCirculationDesks') %]
47
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library and desk</a>
47
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library and desk</a>
Lines 49-54 Link Here
49
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library</a>
49
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library</a>
50
                            [% END %]
50
                            [% END %]
51
                        </li>
51
                        </li>
52
                    [% ELSE %]
53
                        <li>
54
                            [% IF Koha.Preference('UseCirculationDesks') %]
55
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set desk</a>
56
                            [% END %]
57
                        </li>
52
                    [% END %]
58
                    [% END %]
53
                    [% IF ( fast_cataloging ) %]
59
                    [% IF ( fast_cataloging ) %]
54
                        [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
60
                        [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt (-7 / +18 lines)
Lines 20-25 Link Here
20
[% INCLUDE 'header.inc' %]
20
[% INCLUDE 'header.inc' %]
21
[% INCLUDE 'circ-search.inc' %]
21
[% INCLUDE 'circ-search.inc' %]
22
22
23
[% SET page_title = "" %]
24
[% IF ( CAN_user_parameters_select_loggedin_library ) %]
25
    [% IF Koha.Preference('UseCirculationDesks') %]
26
        [% page_title = "Set library and desk" %]
27
    [% ELSE %]
28
        [% page_title = "Set library" %]
29
    [% END %]
30
[% ELSE %]
31
    [% IF Koha.Preference('UseCirculationDesks') %]
32
        [% page_title = "Set desk"%]
33
    [% END %]
34
[% END %]
35
23
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
36
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
24
    <ol>
37
    <ol>
25
        <li>
38
        <li>
Lines 29-35 Link Here
29
            <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
42
            <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
30
        </li>
43
        </li>
31
        <li>
44
        <li>
32
            <a href="#" aria-current="page">Set library</a>
45
            <a href="#" aria-current="page">[% page_title | html %]</a>
33
        </li>
46
        </li>
34
    </ol>
47
    </ol>
35
</nav>
48
</nav>
Lines 39-51 Link Here
39
        <div class="col-sm-12">
52
        <div class="col-sm-12">
40
            <main>
53
            <main>
41
                <div class="row">
54
                <div class="row">
42
43
                [% IF Koha.Preference('CircSidebar') %]
55
                [% IF Koha.Preference('CircSidebar') %]
44
                    <div class="col-sm-10 col-sm-push-2">
56
                    <div class="col-sm-10 col-sm-push-2">
45
                    <h1>Set library</h1>
57
                    <h1>[% page_title | html%]</h1>
46
                [% ELSE %]
58
                [% ELSE %]
47
                    <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
59
                    <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
48
                    <h1>Set library</h1>
60
                    <h1>[% page_title | html %]</h1>
49
                [% END %]
61
                [% END %]
50
62
51
63
Lines 81-93 Updated:<ul> Link Here
81
[% ELSE %]
93
[% ELSE %]
82
94
83
<form method="post" action="set-library.pl">
95
<form method="post" action="set-library.pl">
84
[% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
96
[% IF  ( CAN_user_parameters_select_loggedin_library ) %]
85
<fieldset class="rows">
97
<fieldset class="rows">
86
    <legend>Set library</legend>
98
    <legend>Set library</legend>
87
    <ol>
99
    <ol>
88
        <li><label for="branch">Choose library:</label>
100
        <li><label for="branch">Choose library:</label>
89
        <select name="branch" id="branch">
101
        <select name="branch" id="branch">
90
            [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
102
            [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
91
        </select></li>
103
        </select></li>
92
    </ol>
104
    </ol>
93
</fieldset>
105
</fieldset>
94
- 

Return to bug 30624