Bug 24201: (QA follow-up) Make logic consistent
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 7 Aug 2020 14:20:55 +0000 (15:20 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 7 Aug 2020 14:54:40 +0000 (16:54 +0200)
The display logic for the desk details in the header bar was
inconsistent between the narrow display view and the full width display
view.  This patch updates the former to match the latter.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/includes/header.inc

index 494c70f..a74d513 100644 (file)
                         [% END %]
                     </li>
 
-                    [% IF Koha.Preference('UseCirculationDesks') %]
+                    [% IF Koha.Preference('UseCirculationDesks') && Desks.ListForLibrary.count %]
                     <li class="loggedin-menu-label">
                         Desk: <br />
-                        [% IF ( Desks.GetLoggedInDeskName == '' AND Desks.ListForLibrary.count ) %]
+                        [% IF ( Desks.GetLoggedInDeskName == '' ) %]
                            <span class="logged-in-desk-name">NO DESK SET</span>
-                        [% ELSIF ( Desks.GetLoggedInDeskName != '' ) %]
+                        [% ELSE %]
                             <span class="logged-in-desk-name">[% Desks.GetLoggedInDeskName | html %]</span>
                             <span class="logged-in-desk-id content_hidden">[% Desks.GetLoggedInDeskId | html %]</span>
                         [% END %]