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

(-)a/C4/Auth.pm (-3 lines)
Lines 462-468 sub get_template_and_user { Link Here
462
        OpenLibraryCovers                                                  => C4::Context->preference("OpenLibraryCovers"),
462
        OpenLibraryCovers                                                  => C4::Context->preference("OpenLibraryCovers"),
463
        KohaAdminEmailAddress                                              => "" . C4::Context->preference("KohaAdminEmailAddress"),
463
        KohaAdminEmailAddress                                              => "" . C4::Context->preference("KohaAdminEmailAddress"),
464
        LoginBranchcode => ( C4::Context->userenv ? C4::Context->userenv->{"branch"}    : undef ),
464
        LoginBranchcode => ( C4::Context->userenv ? C4::Context->userenv->{"branch"}    : undef ),
465
        LoginDeskname                                                      => ( C4::Context->userenv ? C4::Context->userenv->{"desk_name"} : 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 491-497 sub get_template_and_user { Link Here
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 ),
492
            LoginBranchname                                                            => ( C4::Context->userenv ? C4::Context->userenv->{"branchname"} : undef ),
494
            LoginDeskname                                                              => ( C4::Context->userenv ? C4::Context->userenv->{"desk_name"} : undef ),
495
            advancedMARCEditor                                                         => C4::Context->preference("advancedMARCEditor"),
493
            advancedMARCEditor                                                         => C4::Context->preference("advancedMARCEditor"),
496
            canreservefromotherbranches                                                => C4::Context->preference('canreservefromotherbranches'),
494
            canreservefromotherbranches                                                => C4::Context->preference('canreservefromotherbranches'),
497
            intranetcolorstylesheet                                                    => C4::Context->preference("intranetcolorstylesheet"),
495
            intranetcolorstylesheet                                                    => C4::Context->preference("intranetcolorstylesheet"),
Lines 560-566 sub get_template_and_user { Link Here
560
            LibraryName                           => "" . C4::Context->preference("LibraryName"),
558
            LibraryName                           => "" . C4::Context->preference("LibraryName"),
561
            LibraryNameTitle                      => "" . $LibraryNameTitle,
559
            LibraryNameTitle                      => "" . $LibraryNameTitle,
562
            LoginBranchname                       => C4::Context->userenv ? C4::Context->userenv->{"branchname"} : "",
560
            LoginBranchname                       => C4::Context->userenv ? C4::Context->userenv->{"branchname"} : "",
563
            LoginDeskname                         => C4::Context->userenv ? C4::Context->userenv->{"desk_name"} : "",
564
            OPACAmazonCoverImages                 => C4::Context->preference("OPACAmazonCoverImages"),
561
            OPACAmazonCoverImages                 => C4::Context->preference("OPACAmazonCoverImages"),
565
            OPACFRBRizeEditions                   => C4::Context->preference("OPACFRBRizeEditions"),
562
            OPACFRBRizeEditions                   => C4::Context->preference("OPACFRBRizeEditions"),
566
            OpacHighlightedWords                  => C4::Context->preference("OpacHighlightedWords"),
563
            OpacHighlightedWords                  => C4::Context->preference("OpacHighlightedWords"),
(-)a/Koha/Template/Plugin/Desks.pm (+16 lines)
Lines 67-72 sub GetLoggedInDeskId { Link Here
67
        '';
67
        '';
68
}
68
}
69
69
70
=head3 GetLoggedInDeskName
71
72
[% Desks.GetLoggedInDeskName %]
73
74
Return the desk name that is attached to the session or empty string
75
76
=cut
77
78
sub GetLoggedInDeskName {
79
    my ($self) = @_;
80
81
    return C4::Context->userenv ?
82
        C4::Context->userenv->{'desk_name'} :
83
        '';
84
}
85
70
=head3 all
86
=head3 all
71
87
72
[% Desks.all %]
88
[% Desks.all %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (-6 / +5 lines)
Lines 89-98 Link Here
89
                        [% IF (Desks.defined) %]
89
                        [% IF (Desks.defined) %]
90
                            <span class="separator">|</span>
90
                            <span class="separator">|</span>
91
                            <strong>
91
                            <strong>
92
                                [% IF ( LoginDeskname == '') %]
92
                                [% IF ( Desks.GetLoggedInDeskName == '' ) %]
93
                                   <span class="logged-in-desk-name">NO DESK SET</span>
93
                                   <span class="logged-in-desk-name">NO DESK SET</span>
94
                                [% ELSE %]
94
                                [% ELSE %]
95
                                    <span class="logged-in-desk-name">[% LoginDeskname | html %]</span>
95
                                    <span class="logged-in-desk-name">[% Desks.GetLoggedInDeskName | html %]</span>
96
                                    <span class="logged-in-desk-id content_hidden">[% Desks.GetLoggedInDeskId | html %]</span>
96
                                    <span class="logged-in-desk-id content_hidden">[% Desks.GetLoggedInDeskId | html %]</span>
97
                                [% END %]
97
                                [% END %]
98
                            </strong>
98
                            </strong>
Lines 119-128 Link Here
119
                    </li>
119
                    </li>
120
                    <li class="loggedin-menu-label">
120
                    <li class="loggedin-menu-label">
121
                        Desk: <br />
121
                        Desk: <br />
122
                        [% IF ( LoginDeskname == '' AND Desks.defined ) %]
122
                        [% IF ( Desks.GetLoggedInDeskName == '' AND Desks.defined ) %]
123
                           <span class="logged-in-desk-name">NO DESK SET</span>
123
                           <span class="logged-in-desk-name">NO DESK SET</span>
124
                        [% ELSIF ( LoginDeskname != '' ) %]
124
                        [% ELSIF ( Desks.GetLoggedInDeskName != '' ) %]
125
                            <span class="logged-in-desk-name">[% LoginDeskname | html %]</span>
125
                            <span class="logged-in-desk-name">[% Desks.GetLoggedInDeskName | html %]</span>
126
                            <span class="logged-in-desk-id content_hidden">[% Desks.GetLoggedInDeskId | html %]</span>
126
                            <span class="logged-in-desk-id content_hidden">[% Desks.GetLoggedInDeskId | html %]</span>
127
                        [% END %]
127
                        [% END %]
128
                    </li>
128
                    </li>
129
- 

Return to bug 24201