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

(-)a/C4/Auth.pm (-5 / +5 lines)
Lines 208-216 sub get_template_and_user { Link Here
208
        # It's possible for $user to be the borrowernumber if they don't have a
208
        # It's possible for $user to be the borrowernumber if they don't have a
209
        # userid defined (and are logging in through some other method, such
209
        # userid defined (and are logging in through some other method, such
210
        # as SSL certs against an email address)
210
        # as SSL certs against an email address)
211
        my $borrower;
211
        $borrowernumber = getborrowernumber($user) if defined($user);
212
        $borrowernumber = getborrowernumber($user) if defined($user);
212
        if ( !defined($borrowernumber) && defined($user) ) {
213
        if ( !defined($borrowernumber) && defined($user) ) {
213
            my $borrower = C4::Members::GetMember( borrowernumber => $user );
214
            $borrower = C4::Members::GetMember( borrowernumber => $user );
214
            if ($borrower) {
215
            if ($borrower) {
215
                $borrowernumber = $user;
216
                $borrowernumber = $user;
216
217
Lines 218-223 sub get_template_and_user { Link Here
218
                # to do it.
219
                # to do it.
219
                $user = $borrower->{firstname} . ' ' . $borrower->{surname};
220
                $user = $borrower->{firstname} . ' ' . $borrower->{surname};
220
            }
221
            }
222
        } else {
223
            $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber );
221
        }
224
        }
222
225
223
        # user info
226
        # user info
Lines 244-253 sub get_template_and_user { Link Here
244
            );
247
            );
245
        }
248
        }
246
249
247
        my ($borr) = C4::Members::GetMemberDetails($borrowernumber);
250
        $template->param( "USER_INFO" => $borrower );
248
        my @bordat;
249
        $bordat[0] = $borr;
250
        $template->param( "USER_INFO" => \@bordat );
251
251
252
        my $all_perms = get_all_subpermissions();
252
        my $all_perms = get_all_subpermissions();
253
253
(-)a/admin/aqbudgets.pl (-1 / +1 lines)
Lines 88-94 if ( $budget_period_id ) { Link Here
88
# ------- get periods stuff ------------------
88
# ------- get periods stuff ------------------
89
89
90
# USED FOR PERMISSION COMPARISON LATER
90
# USED FOR PERMISSION COMPARISON LATER
91
my $borrower_id         = $template->{VARS}->{'USER_INFO'}[0]->{'borrowernumber'};
91
my $borrower_id         = $template->{VARS}->{'USER_INFO'}->{'borrowernumber'};
92
my $user                = GetMemberDetails($borrower_id);
92
my $user                = GetMemberDetails($borrower_id);
93
my $user_branchcode     = $user->{'branchcode'};
93
my $user_branchcode     = $user->{'branchcode'};
94
94
(-)a/admin/aqplan.pl (-3 / +3 lines)
Lines 82-89 $template->param( Link Here
82
82
83
# ------- get periods stuff ------------------
83
# ------- get periods stuff ------------------
84
84
85
my $borrower_id         = $template->{VARS}->{'USER_INFO'}[0]->{'borrowernumber'};
85
my $borrower_id         = $template->{VARS}->{'USER_INFO'}->{'borrowernumber'};
86
my $borrower_branchcode = $template->{VARS}->{'USER_INFO'}[0]->{'branchcode'};
86
my $borrower_branchcode = $template->{VARS}->{'USER_INFO'}->{'branchcode'};
87
87
88
my $periods;
88
my $periods;
89
my $authcat      = $input->param('authcat');
89
my $authcat      = $input->param('authcat');
Lines 109-115 my $op = $input->param("op"); Link Here
109
109
110
my $budget_branchcode;
110
my $budget_branchcode;
111
111
112
my $budgets_ref = GetBudgetHierarchy( $budget_period_id, $show_mine?$template->{VARS}->{'USER_INFO'}[0]->{'branchcode'}:'', $show_mine?$template->{VARS}->{'USER_INFO'}[0]->{'borrowernumber'}:'' );
112
my $budgets_ref = GetBudgetHierarchy( $budget_period_id, $show_mine?$template->{VARS}->{'USER_INFO'}->{'branchcode'}:'', $show_mine?$template->{VARS}->{'USER_INFO'}->{'borrowernumber'}:'' );
113
113
114
# build categories list
114
# build categories list
115
my $sth = $dbh->prepare("select distinct category from authorised_values where category like 'A%' ");
115
my $sth = $dbh->prepare("select distinct category from authorised_values where category like 'A%' ");
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc (-5 / +5 lines)
Lines 601-607 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
601
            $( sel ).on( event, function (e) {
601
            $( sel ).on( event, function (e) {
602
                e.preventDefault();
602
                e.preventDefault();
603
                handler( e, Preferences.user[pref] );
603
                handler( e, Preferences.user[pref] );
604
                Preferences.Save( [% USER_INFO.0.borrowernumber %] );
604
                Preferences.Save( [% USER_INFO.borrowernumber %] );
605
                showPreference(pref);
605
                showPreference(pref);
606
            } );
606
            } );
607
        }
607
        }
Lines 626-632 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
626
                $( document ).on( 'change', 'input.search-toggle-server', function() {
626
                $( document ).on( 'change', 'input.search-toggle-server', function() {
627
                    var server_id = $( this ).closest('li').data('server-id');
627
                    var server_id = $( this ).closest('li').data('server-id');
628
                    Preferences.user.selected_search_targets[server_id] = this.checked;
628
                    Preferences.user.selected_search_targets[server_id] = this.checked;
629
                    Preferences.Save( [% USER_INFO.0.borrowernumber %] );
629
                    Preferences.Save( [% USER_INFO.borrowernumber %] );
630
                } );
630
                } );
631
                break;
631
                break;
632
        }
632
        }
Lines 664-670 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
664
            delete Preferences.user.macros[name];
664
            delete Preferences.user.macros[name];
665
        }
665
        }
666
666
667
        Preferences.Save( [% USER_INFO.0.borrowernumber %] );
667
        Preferences.Save( [% USER_INFO.borrowernumber %] );
668
    }
668
    }
669
669
670
    function showSavedMacros( macros ) {
670
    function showSavedMacros( macros ) {
Lines 966-972 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
966
        $( '#switch-editor' ).click( function() {
966
        $( '#switch-editor' ).click( function() {
967
            if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
967
            if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
968
968
969
            $.cookie( 'catalogue_editor_[% USER_INFO.0.borrowernumber %]', 'basic', { expires: 365, path: '/' } );
969
            $.cookie( 'catalogue_editor_[% USER_INFO.borrowernumber %]', 'basic', { expires: 365, path: '/' } );
970
970
971
            if ( state.backend == 'catalog' ) {
971
            if ( state.backend == 'catalog' ) {
972
                window.location = '/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=' + state.recordID;
972
                window.location = '/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=' + state.recordID;
Lines 1072-1078 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
1072
        } );
1072
        } );
1073
1073
1074
        // Start editor
1074
        // Start editor
1075
        Preferences.Load( [% USER_INFO.0.borrowernumber || 0 %] );
1075
        Preferences.Load( [% USER_INFO.borrowernumber || 0 %] );
1076
        displayPreferences(editor);
1076
        displayPreferences(editor);
1077
        makeAuthorisedValueWidgets( '' );
1077
        makeAuthorisedValueWidgets( '' );
1078
        Search.Init( {
1078
        Search.Init( {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-1 / +1 lines)
Lines 111-117 Link Here
111
111
112
            if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false;
112
            if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false;
113
113
114
            $.cookie( 'catalogue_editor_[% USER_INFO.0.borrowernumber %]', 'advanced', { expires: 365, path: '/' } );
114
            $.cookie( 'catalogue_editor_[% USER_INFO.borrowernumber %]', 'advanced', { expires: 365, path: '/' } );
115
115
116
            var biblionumber = [% biblionumber || "null" %];
116
            var biblionumber = [% biblionumber || "null" %];
117
117
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt (-1 / +1 lines)
Lines 25-31 Link Here
25
        });
25
        });
26
26
27
        $("#useadvanced").click(function(){
27
        $("#useadvanced").click(function(){
28
            $.cookie( 'catalogue_editor_[% USER_INFO.0.borrowernumber %]', 'advanced', { expires: 365, path: '/' } );
28
            $.cookie( 'catalogue_editor_[% USER_INFO.borrowernumber %]', 'advanced', { expires: 365, path: '/' } );
29
            return true;
29
            return true;
30
        });
30
        });
31
     });
31
     });
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-1 / +1 lines)
Lines 95-101 Link Here
95
                                        [% END %]
95
                                        [% END %]
96
                                    [% END %]
96
                                    [% END %]
97
                                    [% IF ( loggedinusername ) %]
97
                                    [% IF ( loggedinusername ) %]
98
                                        <li><p class="members navbar-text">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</span></a></p></li>
98
                                        <li><p class="members navbar-text">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</span></a></p></li>
99
                                        <li class="divider-vertical"></li>
99
                                        <li class="divider-vertical"></li>
100
                                    [% END %]
100
                                    [% END %]
101
                                [% END %]
101
                                [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt (-1 / +1 lines)
Lines 10-16 Link Here
10
            <ul class="breadcrumb">
10
            <ul class="breadcrumb">
11
                <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
11
                <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
12
                [% IF ( loggedinusername ) %]
12
                [% IF ( loggedinusername ) %]
13
                    <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">&rsaquo;</span></li>
13
                    <li><a href="/cgi-bin/koha/opac-user.pl">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</a> <span class="divider">&rsaquo;</span></li>
14
                [% END %]
14
                [% END %]
15
                <li>
15
                <li>
16
                    [% IF shelf.category == 1 %]
16
                    [% IF shelf.category == 1 %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt (-5 / +1 lines)
Lines 92-102 Link Here
92
92
93
                    [% UNLESS ( message ) %]
93
                    [% UNLESS ( message ) %]
94
                        [% UNLESS ( none_available ) %]
94
                        [% UNLESS ( none_available ) %]
95
                            <h3>Confirm holds for:
95
                            <h3>Confirm holds for:[% USER_INFO.firstname %] [% USER_INFO.surname %] ([% USER_INFO.cardnumber %])</h3>
96
                                [% FOREACH USER_INF IN USER_INFO %]
97
                                    [% USER_INF.firstname %] [% USER_INF.surname %] ([% USER_INF.cardnumber %])
98
                                [% END %]
99
                            </h3>
100
                        [% END # / UNLESS none_available %]
96
                        [% END # / UNLESS none_available %]
101
97
102
                        [% IF (RESERVE_CHARGE) %]
98
                        [% IF (RESERVE_CHARGE) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt (-1 / +1 lines)
Lines 11-17 Link Here
11
    <ul class="breadcrumb">
11
    <ul class="breadcrumb">
12
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
12
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
13
        [% IF ( loggedinusername ) %]
13
        [% IF ( loggedinusername ) %]
14
            <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">&rsaquo;</span></li>
14
            <li><a href="/cgi-bin/koha/opac-user.pl">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</a> <span class="divider">&rsaquo;</span></li>
15
        [% END %]
15
        [% END %]
16
        <li>Share a list</li>
16
        <li>Share a list</li>
17
    </ul> <!-- / .breadcrumb -->
17
    </ul> <!-- / .breadcrumb -->
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-1 / +1 lines)
Lines 42-48 Link Here
42
    <ul class="breadcrumb noprint">
42
    <ul class="breadcrumb noprint">
43
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
43
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
44
        [% IF ( loggedinusername ) %]
44
        [% IF ( loggedinusername ) %]
45
            <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">&rsaquo;</span></li>
45
            <li><a href="/cgi-bin/koha/opac-user.pl">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</a> <span class="divider">&rsaquo;</span></li>
46
        [% END %]
46
        [% END %]
47
47
48
        [% IF op != 'list' %]
48
        [% IF op != 'list' %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-2 / +1 lines)
Lines 13-19 Link Here
13
    <div class="main">
13
    <div class="main">
14
        <ul class="breadcrumb">
14
        <ul class="breadcrumb">
15
            <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
15
            <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
16
            <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">&rsaquo;</span></li>
16
            <li><a href="/cgi-bin/koha/opac-user.pl">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</a> <span class="divider">&rsaquo;</span></li>
17
            <li><a href="#">Your purchase suggestions</a></li>
17
            <li><a href="#">Your purchase suggestions</a></li>
18
        </ul>
18
        </ul>
19
19
20
- 

Return to bug 15344