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

(-)a/C4/Auth.pm (-3 lines)
Lines 462-468 sub get_template_and_user { Link Here
462
        GoogleJackets                                                      => C4::Context->preference("GoogleJackets"),
462
        GoogleJackets                                                      => C4::Context->preference("GoogleJackets"),
463
        OpenLibraryCovers                                                  => C4::Context->preference("OpenLibraryCovers"),
463
        OpenLibraryCovers                                                  => C4::Context->preference("OpenLibraryCovers"),
464
        KohaAdminEmailAddress                                              => "" . C4::Context->preference("KohaAdminEmailAddress"),
464
        KohaAdminEmailAddress                                              => "" . C4::Context->preference("KohaAdminEmailAddress"),
465
        LoginBranchcode => ( C4::Context->userenv ? C4::Context->userenv->{"branch"}    : undef ),
466
        LoginFirstname  => ( C4::Context->userenv ? C4::Context->userenv->{"firstname"} : "Bel" ),
465
        LoginFirstname  => ( C4::Context->userenv ? C4::Context->userenv->{"firstname"} : "Bel" ),
467
        LoginSurname    => C4::Context->userenv ? C4::Context->userenv->{"surname"}      : "Inconnu",
466
        LoginSurname    => C4::Context->userenv ? C4::Context->userenv->{"surname"}      : "Inconnu",
468
        emailaddress    => C4::Context->userenv ? C4::Context->userenv->{"emailaddress"} : undef,
467
        emailaddress    => C4::Context->userenv ? C4::Context->userenv->{"emailaddress"} : undef,
Lines 490-496 sub get_template_and_user { Link Here
490
            IntranetNav                                                                => C4::Context->preference("IntranetNav"),
489
            IntranetNav                                                                => C4::Context->preference("IntranetNav"),
491
            IntranetmainUserblock                                                      => C4::Context->preference("IntranetmainUserblock"),
490
            IntranetmainUserblock                                                      => C4::Context->preference("IntranetmainUserblock"),
492
            LibraryName                                                                => C4::Context->preference("LibraryName"),
491
            LibraryName                                                                => C4::Context->preference("LibraryName"),
493
            LoginBranchname                                                            => ( C4::Context->userenv ? C4::Context->userenv->{"branchname"} : undef ),
494
            advancedMARCEditor                                                         => C4::Context->preference("advancedMARCEditor"),
492
            advancedMARCEditor                                                         => C4::Context->preference("advancedMARCEditor"),
495
            canreservefromotherbranches                                                => C4::Context->preference('canreservefromotherbranches'),
493
            canreservefromotherbranches                                                => C4::Context->preference('canreservefromotherbranches'),
496
            intranetcolorstylesheet                                                    => C4::Context->preference("intranetcolorstylesheet"),
494
            intranetcolorstylesheet                                                    => C4::Context->preference("intranetcolorstylesheet"),
Lines 558-564 sub get_template_and_user { Link Here
558
            opac_name                             => $opac_name,
556
            opac_name                             => $opac_name,
559
            LibraryName                           => "" . C4::Context->preference("LibraryName"),
557
            LibraryName                           => "" . C4::Context->preference("LibraryName"),
560
            LibraryNameTitle                      => "" . $LibraryNameTitle,
558
            LibraryNameTitle                      => "" . $LibraryNameTitle,
561
            LoginBranchname                       => C4::Context->userenv ? C4::Context->userenv->{"branchname"} : "",
562
            OPACAmazonCoverImages                 => C4::Context->preference("OPACAmazonCoverImages"),
559
            OPACAmazonCoverImages                 => C4::Context->preference("OPACAmazonCoverImages"),
563
            OPACFRBRizeEditions                   => C4::Context->preference("OPACFRBRizeEditions"),
560
            OPACFRBRizeEditions                   => C4::Context->preference("OPACFRBRizeEditions"),
564
            OpacHighlightedWords                  => C4::Context->preference("OpacHighlightedWords"),
561
            OpacHighlightedWords                  => C4::Context->preference("OpacHighlightedWords"),
(-)a/circ/set-library.pl (-2 / +1 lines)
Lines 49-62 my @updated; Link Here
49
if ( $branch and my $library = Koha::Libraries->find($branch) ) {
49
if ( $branch and my $library = Koha::Libraries->find($branch) ) {
50
    if (! $userenv_branch or $userenv_branch ne $branch ) {
50
    if (! $userenv_branch or $userenv_branch ne $branch ) {
51
        my $branchname = $library->branchname;
51
        my $branchname = $library->branchname;
52
        $template->param(LoginBranchname => $branchname);   # update template for new branch
53
        $template->param(LoginBranchcode => $branch);       # update template for new branch
54
        $session->param('branchname', $branchname);         # update sesssion in DB
52
        $session->param('branchname', $branchname);         # update sesssion in DB
55
        $session->param('branch', $branch);                 # update sesssion in DB
53
        $session->param('branch', $branch);                 # update sesssion in DB
56
        $session->flush();
54
        $session->flush();
57
        push @updated, {
55
        push @updated, {
58
            updated_branch => 1,
56
            updated_branch => 1,
59
                old_branch => $userenv_branch,
57
                old_branch => $userenv_branch,
58
                new_branch => $branch,
60
        };
59
        };
61
    } # else branch the same, no update
60
    } # else branch the same, no update
62
} else {
61
} else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (-4 / +4 lines)
Lines 77-87 Link Here
77
                        <span class="separator">|</span>
77
                        <span class="separator">|</span>
78
                        [% IF ( AutoLocation ) %]
78
                        [% IF ( AutoLocation ) %]
79
                            <brand>
79
                            <brand>
80
                                [% LoginBranchname | html %]
80
                                [% Branches.GetLoggedInBranchname | html %]
81
                            </brand>
81
                            </brand>
82
                        [% ELSE %]
82
                        [% ELSE %]
83
                            <strong>
83
                            <strong>
84
                                <span class="logged-in-branch-name">[% LoginBranchname | html %]</span>
84
                                <span class="logged-in-branch-name">[% Branches.GetLoggedInBranchname | html %]</span>
85
                                <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
85
                                <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
86
                            </strong>
86
                            </strong>
87
                        [% END %]
87
                        [% END %]
Lines 97-107 Link Here
97
                    <li class="loggedin-menu-label">
97
                    <li class="loggedin-menu-label">
98
                        [% IF ( AutoLocation ) %]
98
                        [% IF ( AutoLocation ) %]
99
                            <brand>
99
                            <brand>
100
                                [% LoginBranchname | html %]
100
                                [% Branches.GetLoggedInBranchname | html %]
101
                            </brand>
101
                            </brand>
102
                        [% ELSE %]
102
                        [% ELSE %]
103
                            Location: <br />
103
                            Location: <br />
104
                            <span class="logged-in-branch-name">[% LoginBranchname | html %]</span>
104
                            <span class="logged-in-branch-name">[% Branches.GetLoggedInBranchname | html %]</span>
105
                            <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
105
                            <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
106
                        [% END %]
106
                        [% END %]
107
                    </li>
107
                    </li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-1 / +1 lines)
Lines 120-126 Link Here
120
                    </div>
120
                    </div>
121
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
121
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
122
                    <input type="hidden" name="batch" value="[% batch | html %]" />
122
                    <input type="hidden" name="batch" value="[% batch | html %]" />
123
                    <input type="hidden" name="branchcode" value="[% LoginBranchcode | html %]" />
123
                    <input type="hidden" name="branchcode" value="[% Branches.GetLoggedInBranchcode | html %]" />
124
                </div>
124
                </div>
125
                <div class="modal-footer">
125
                <div class="modal-footer">
126
                    <button class="btn btn-default approve" type="submit"><i class="fa fa-check"></i> Save</button>
126
                    <button class="btn btn-default approve" type="submit"><i class="fa fa-check"></i> Save</button>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-1 / +1 lines)
Lines 64-70 Link Here
64
64
65
[% IF ( loop_budget ) %]
65
[% IF ( loop_budget ) %]
66
66
67
    <h3>All available funds[% IF LoginBranchname %] for [% LoginBranchname | html %][% END %]</h3>
67
    <h3>All available funds</h3>
68
68
69
    <div id="BudgetsAndFunds">
69
    <div id="BudgetsAndFunds">
70
    <table id="accounts">
70
    <table id="accounts">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +1 lines)
Lines 174-180 Link Here
174
<ul>
174
<ul>
175
    [% IF (SeparateHoldings) %]
175
    [% IF (SeparateHoldings) %]
176
        <li>
176
        <li>
177
            <a href="#holdings">[% LoginBranchname | html %] holdings ([% itemloop.size() || 0 | html %])</a>
177
            <a href="#holdings">[% Branches.GetLoggedInBranchname | html %] holdings ([% itemloop.size() || 0 | html %])</a>
178
        </li>
178
        </li>
179
        <li>
179
        <li>
180
            <a href="#otherholdings">Other holdings ([% otheritemloop.size() || 0 | html %])</a>
180
            <a href="#otherholdings">Other holdings ([% otheritemloop.size() || 0 | html %])</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt (-3 / +3 lines)
Lines 1-14 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% USE Koha %]
2
[% USE Koha %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Circulation &rsaquo; Overdues at [% LoginBranchname | html %]</title>
4
<title>Koha &rsaquo; Circulation &rsaquo; Overdues at [% Branches.GetLoggedInBranchname | html %]</title>
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
6
</head>
6
</head>
7
<body id="circ_branchoverdues" class="circ">
7
<body id="circ_branchoverdues" class="circ">
8
[% INCLUDE 'header.inc' %]
8
[% INCLUDE 'header.inc' %]
9
[% INCLUDE 'circ-search.inc' %]
9
[% INCLUDE 'circ-search.inc' %]
10
10
11
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Overdues at [% LoginBranchname | html %]</div>
11
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Overdues at [% Branches.GetLoggedInBranchname | html %]</div>
12
12
13
<div class="main container-fluid">
13
<div class="main container-fluid">
14
    <div class="row">
14
    <div class="row">
Lines 19-25 Link Here
19
        [% END %]
19
        [% END %]
20
            <main>
20
            <main>
21
21
22
<h1>Circulation: Overdues at [% LoginBranchname | html %]</h1>
22
<h1>Circulation: Overdues at [% Branches.GetLoggedInBranchname | html %]</h1>
23
23
24
<form name="selectlocation" action="branchoverdues.pl" method="post">
24
<form name="selectlocation" action="branchoverdues.pl" method="post">
25
    <label for="location">Shelving location selected: </label><select id="location" name="location">
25
    <label for="location">Shelving location selected: </label><select id="location" name="location">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt (-1 / +2 lines)
Lines 1-5 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Branches %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
4
<!DOCTYPE html>
5
<!DOCTYPE html>
5
[% IF (AllowOfflineCirculation) %]
6
[% IF (AllowOfflineCirculation) %]
Lines 314-320 Link Here
314
315
315
        function synchronize() {
316
        function synchronize() {
316
            kohadb.saveSetting("userid", "[% logged_in_user.userid | html %]");
317
            kohadb.saveSetting("userid", "[% logged_in_user.userid | html %]");
317
            kohadb.saveSetting("branchcode", "[% LoginBranchcode | html %]");
318
            kohadb.saveSetting("branchcode", "[% Branches.GetLoggedInBranchcode | html %]");
318
            showSyncInfo();
319
            showSyncInfo();
319
            [% UNLESS (AllowOfflineCirculation) %]
320
            [% UNLESS (AllowOfflineCirculation) %]
320
                reloadRecords();
321
                reloadRecords();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt (-1 / +1 lines)
Lines 36-42 Link Here
36
Updated:<ul>
36
Updated:<ul>
37
    [% FOREACH update IN updated %]
37
    [% FOREACH update IN updated %]
38
    [% IF ( update.updated_branch ) %]
38
    [% IF ( update.updated_branch ) %]
39
        <li>Library: [% update.old_branch or "?" | html %] &rArr; [% update.LoginBranchcode or "?" | html %]</li>
39
        <li>Library: [% update.old_branch or "?" | html %] &rArr; [% update.new_branch or "?" | html %]</li>
40
    [% ELSE %]
40
    [% ELSE %]
41
        <li>ERROR - unknown</li>
41
        <li>ERROR - unknown</li>
42
    [% END %]
42
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-1 lines)
Lines 57-63 Link Here
57
                        [% END %]
57
                        [% END %]
58
58
59
                        <div id="manage-label-batches">
59
                        <div id="manage-label-batches">
60
                            <div class="hint">Current library: [% LoginBranchname | html %]</div>
61
                            <form name="add_by_number" action="/cgi-bin/koha/labels/label-edit-batch.pl" method="post">
60
                            <form name="add_by_number" action="/cgi-bin/koha/labels/label-edit-batch.pl" method="post">
62
                                <div>
61
                                <div>
63
                                    <fieldset class="rows" style="border-bottom: 0px; border: 0px;">
62
                                    <fieldset class="rows" style="border-bottom: 0px; border: 0px;">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt (-1 lines)
Lines 42-48 Link Here
42
                        [% END %]
42
                        [% END %]
43
43
44
                        <div id="manage-label-layouts">
44
                        <div id="manage-label-layouts">
45
                            <div class="hint">Current library: [% LoginBranchname | html %]</div>
46
                            [% IF ( table_loop ) %]
45
                            [% IF ( table_loop ) %]
47
                            <form name="layouts" action="/cgi-bin/koha/label-manage.pl?label_element=[% label_element | html %]">
46
                            <form name="layouts" action="/cgi-bin/koha/label-manage.pl?label_element=[% label_element | html %]">
48
                            [% IF    ( label_element == 'layout' ) %]
47
                            [% IF    ( label_element == 'layout' ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt (-1 lines)
Lines 38-44 Link Here
38
38
39
                    [% INCLUDE 'patroncards-errors.inc' %]
39
                    [% INCLUDE 'patroncards-errors.inc' %]
40
                    <div id="manage-patroncard-batches">
40
                    <div id="manage-patroncard-batches">
41
                        <div class="hint">Current library: [% LoginBranchname | html %]</div>
42
                            <form name="add_by_bor_num" action="/cgi-bin/koha/patroncards/edit-batch.pl" method="post">
41
                            <form name="add_by_bor_num" action="/cgi-bin/koha/patroncards/edit-batch.pl" method="post">
43
                                <div>
42
                                <div>
44
                                    <fieldset class="rows" style="border-bottom: 0px; border: 0px;">
43
                                    <fieldset class="rows" style="border-bottom: 0px; border: 0px;">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt (-1 lines)
Lines 45-51 Link Here
45
                    [% INCLUDE 'patroncards-toolbar.inc' %]
45
                    [% INCLUDE 'patroncards-toolbar.inc' %]
46
                    [% INCLUDE 'patroncards-errors.inc' %]
46
                    [% INCLUDE 'patroncards-errors.inc' %]
47
                        <div id="manage-patroncards-layouts">
47
                        <div id="manage-patroncards-layouts">
48
                            <div class="hint">Current library: [% LoginBranchname | html %]</div>
49
                            [% IF ( table_loop ) %]
48
                            [% IF ( table_loop ) %]
50
                            <form name="layouts" action="/cgi-bin/koha/manage.pl?card_element=[% card_element | html %]">
49
                            <form name="layouts" action="/cgi-bin/koha/manage.pl?card_element=[% card_element | html %]">
51
                            <h2>Currently available [% PROCESS translate_card_element element=card_element_title FILTER lower %]</h2>
50
                            <h2>Currently available [% PROCESS translate_card_element element=card_element_title FILTER lower %]</h2>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/bodytag.inc (-2 / +3 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Branches %]
2
[% SET classprop  = 'class="' %]
3
[% SET classprop  = 'class="' %]
3
[% IF LoginBranchcode.defined %]
4
[% IF Branches.GetLoggedInBranchcode %]
4
    [% classprop = classprop _ 'branch-' _ LoginBranchcode %]
5
    [% classprop = classprop _ 'branch-' _ Branches.GetLoggedInBranchcode %]
5
[% ELSE %]
6
[% ELSE %]
6
    [% classprop = classprop _ 'branch-default' %]
7
    [% classprop = classprop _ 'branch-default' %]
7
[% END %]
8
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-2 / +1 lines)
Lines 479-485 Link Here
479
                        [% ELSE %]
479
                        [% ELSE %]
480
                            <li id="tab_holdings">
480
                            <li id="tab_holdings">
481
                        [% END %]
481
                        [% END %]
482
                        [% BLOCK holding_tab_title %][% IF SeparateHoldings %]<span>[% LoginBranchname | html %] holdings</span>[% ELSE %]<span>Holdings</span>[% END %][% END %]
482
                        [% BLOCK holding_tab_title %][% IF SeparateHoldings %]<span>[% Branches.GetLoggedInBranchname | html %] holdings</span>[% ELSE %]<span>Holdings</span>[% END %][% END %]
483
                            <a href="#holdings">[% PROCESS holding_tab_title %] [% UNLESS too_many_items %][% ' ( ' _ (itemloop.size || 0) _ ' )' | html %][% END %]</a>
483
                            <a href="#holdings">[% PROCESS holding_tab_title %] [% UNLESS too_many_items %][% ' ( ' _ (itemloop.size || 0) _ ' )' | html %][% END %]</a>
484
                        </li>
484
                        </li>
485
                        [% IF (SeparateHoldings) %]
485
                        [% IF (SeparateHoldings) %]
486
- 

Return to bug 25765