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

(-)a/C4/Auth.pm (-2 / +2 lines)
Lines 1147-1156 sub checkauth { Link Here
1147
                    my $ip = $ENV{'REMOTE_ADDR'};
1147
                    my $ip = $ENV{'REMOTE_ADDR'};
1148
1148
1149
                    # if they specify at login, use that
1149
                    # if they specify at login, use that
1150
                    if ( $query->param('branch') ) {
1150
                    if ( $query->param('branch') && ( haspermission($userid, { parameters => 'select_loggedin_library' }) || $flags->{superlibrarian}) ) {
1151
                        $branchcode = $query->param('branch');
1151
                        $branchcode = $query->param('branch');
1152
                        my $library = Koha::Libraries->find($branchcode);
1152
                        my $library = Koha::Libraries->find($branchcode);
1153
                        $branchname = $library? $library->branchname: '';
1153
                        $branchname = $library ? $library->branchname: '';
1154
                    }
1154
                    }
1155
                    if ( $query->param('desk_id') ) {
1155
                    if ( $query->param('desk_id') ) {
1156
                        $desk_id = $query->param('desk_id');
1156
                        $desk_id = $query->param('desk_id');
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 40-45 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
40
   ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'),
40
   ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'),
41
   ( 3, 'manage_background_jobs', 'Manage background jobs'),
41
   ( 3, 'manage_background_jobs', 'Manage background jobs'),
42
   ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'),
42
   ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'),
43
   ( 3, 'select_loggedin_library' , 'Allow user to change logged in library'),
43
   ( 4, 'delete_borrowers', 'Delete patrons'),
44
   ( 4, 'delete_borrowers', 'Delete patrons'),
44
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
45
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
45
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
46
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc (-11 / +7 lines)
Lines 5-21 Link Here
5
5
6
        <h5>Circulation</h5>
6
        <h5>Circulation</h5>
7
        <ul>
7
        <ul>
8
            <li>
8
            <li><a href="/cgi-bin/koha/circ/circulation.pl">Check out</a></li>
9
                <a href="/cgi-bin/koha/circ/circulation.pl">Check out</a>
9
            <li><a href="/cgi-bin/koha/circ/returns.pl">Check in</a></li>
10
            </li>
10
            <li><a href="/cgi-bin/koha/circ/renew.pl">Renew</a></li>
11
            <li>
11
            [% IF !Koha.Preference('IndependentBranchesTransfers') || CAN_user_superlibrarian %]
12
                <a href="/cgi-bin/koha/circ/returns.pl">Check in</a>
12
                <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
13
            </li>
13
            [% END %]
14
            <li>
14
            [% IF ( CAN_user_parameters_select_loggedin_library ) %]
15
                <a href="/cgi-bin/koha/circ/renew.pl">Renew</a>
16
            </li>
17
            [% UNLESS IndependentBranches %]
18
            <li>
19
                [% IF Koha.Preference('UseCirculationDesks') %]
15
                [% IF Koha.Preference('UseCirculationDesks') %]
20
                <a href="/cgi-bin/koha/circ/set-library.pl">Set library and desk</a>
16
                <a href="/cgi-bin/koha/circ/set-library.pl">Set library and desk</a>
21
                [% ELSE %]
17
                [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (-1 / +1 lines)
Lines 154-160 Link Here
154
                        </li>
154
                        </li>
155
                    [% END %]
155
                    [% END %]
156
156
157
                    [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
157
                    [% IF ( CAN_user_parameters_select_loggedin_library ) %]
158
                    <li role="separator" class="loggedin-menu-label divider"></li>
158
                    <li role="separator" class="loggedin-menu-label divider"></li>
159
                    <li>
159
                    <li>
160
                        [% IF Koha.Preference('UseCirculationDesks') && Koha.Preference('UseCashRegisters') %]
160
                        [% 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 44-50 Link Here
44
                    <li>
44
                    <li>
45
                        <a class="circ-button" href="/cgi-bin/koha/circ/renew.pl"><i class="fa fa-retweet"></i> Renew</a>
45
                        <a class="circ-button" href="/cgi-bin/koha/circ/renew.pl"><i class="fa fa-retweet"></i> Renew</a>
46
                    </li>
46
                    </li>
47
                    [% UNLESS IndependentBranches %]
47
                    [% IF ( CAN_user_parameters_select_loggedin_library ) %]
48
                        <li>
48
                        <li>
49
                            [% IF Koha.Preference('UseCirculationDesks') %]
49
                            [% IF Koha.Preference('UseCirculationDesks') %]
50
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library and desk</a>
50
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library and desk</a>
Lines 52-57 Link Here
52
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library</a>
52
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library</a>
53
                            [% END %]
53
                            [% END %]
54
                        </li>
54
                        </li>
55
                    [% ELSE %]
56
                        <li>
57
                            [% IF Koha.Preference('UseCirculationDesks') %]
58
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set desk</a>
59
                            [% END %]
60
                        </li>
55
                    [% END %]
61
                    [% END %]
56
                    [% IF ( fast_cataloging ) %]
62
                    [% IF ( fast_cataloging ) %]
57
                        [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
63
                        [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt (-7 / +18 lines)
Lines 22-27 Link Here
22
[% END %]
22
[% END %]
23
23
24
[% WRAPPER 'sub-header.inc' %]
24
[% WRAPPER 'sub-header.inc' %]
25
[% SET page_title = "" %]
26
[% IF ( CAN_user_parameters_select_loggedin_library ) %]
27
    [% IF Koha.Preference('UseCirculationDesks') %]
28
        [% page_title = "Set library and desk" %]
29
    [% ELSE %]
30
        [% page_title = "Set library" %]
31
    [% END %]
32
[% ELSE %]
33
    [% IF Koha.Preference('UseCirculationDesks') %]
34
        [% page_title = "Set desk"%]
35
    [% END %]
36
[% END %]
37
25
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
38
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
26
    <ol>
39
    <ol>
27
        <li>
40
        <li>
Lines 31-37 Link Here
31
            <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
44
            <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
32
        </li>
45
        </li>
33
        <li>
46
        <li>
34
            <a href="#" aria-current="page">Set library</a>
47
            <a href="#" aria-current="page">[% page_title | html %]</a>
35
        </li>
48
        </li>
36
    </ol>
49
    </ol>
37
</nav>
50
</nav>
Lines 42-54 Link Here
42
        <div class="col-sm-12">
55
        <div class="col-sm-12">
43
            <main>
56
            <main>
44
                <div class="row">
57
                <div class="row">
45
46
                [% IF Koha.Preference('CircSidebar') %]
58
                [% IF Koha.Preference('CircSidebar') %]
47
                    <div class="col-sm-10 col-sm-push-2">
59
                    <div class="col-sm-10 col-sm-push-2">
48
                    <h1>Set library</h1>
60
                    <h1>[% page_title | html%]</h1>
49
                [% ELSE %]
61
                [% ELSE %]
50
                    <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
62
                    <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
51
                    <h1>Set library</h1>
63
                    <h1>[% page_title | html %]</h1>
52
                [% END %]
64
                [% END %]
53
65
54
66
Lines 84-96 Updated:<ul> Link Here
84
[% ELSE %]
96
[% ELSE %]
85
97
86
<form method="post" action="set-library.pl">
98
<form method="post" action="set-library.pl">
87
[% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
99
[% IF  ( CAN_user_parameters_select_loggedin_library ) %]
88
<fieldset class="rows">
100
<fieldset class="rows">
89
    <legend>Set library</legend>
101
    <legend>Set library</legend>
90
    <ol>
102
    <ol>
91
        <li><label for="branch">Choose library:</label>
103
        <li><label for="branch">Choose library:</label>
92
        <select name="branch" id="branch">
104
        <select name="branch" id="branch">
93
            [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
105
            [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
94
        </select></li>
106
        </select></li>
95
    </ol>
107
    </ol>
96
</fieldset>
108
</fieldset>
97
- 

Return to bug 30624