@@ -4,124 +4,119 @@ $account = $this->auth()->getManager();
44?>
55<div class="banner container navbar">
66 <div class="navbar-header">
7- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-collapse"
8- aria-label="<?= $ this ->transEscAttr ('mobile_toggle_navigation_text ' ) ?> ">
9- <?= $ this ->icon ('ui-menu ' ) ?>
7+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-collapse" aria-label="<?= $ this ->transEscAttr ('mobile_toggle_navigation_text ' )?> ">
8+ <?= $ this ->icon ('ui-menu ' ) ?>
109 </button>
11- <a class="navbar-brand lang-<?= $ this ->layout ()->userLang ?> " href="<?= $ this ->url ('home ' ) ?> ">VuFind</a>
10+ <a class="navbar-brand lang-<?= $ this ->layout ()->userLang ?> " href="<?= $ this ->url ('home ' )?> ">VuFind</a>
1211 </div>
13- <?php if (!isset ($ this ->layout ()->renderingError )): ?>
14- <div class="collapse navbar-collapse" id="header-collapse">
15- <nav>
16- <ul class="nav navbar-nav navbar-right flip">
17- <?php if ($ this ->feedback ()->tabEnabled ()): ?>
18- <li>
19- <a class="icon-link" id="feedbackLink" data-lightbox href="<?= $ this ->url ('feedback-home ' ) ?> ">
20- <?= $ this ->icon ('feedback ' , 'icon-link__icon ' ) ?>
21- <span class="icon-link__label"><?= $ this ->transEsc ('Feedback ' ) ?> </span>
22- </a>
23- </li>
24- <?php endif ; ?>
25- <?php $ cart = $ this ->cart (); ?>
26- <?php if ($ cart ->isActive ()): ?>
27- <li id="cartSummary" aria-live="polite" aria-atomic="true">
28- <a id="cartItems" class="icon-link" data-lightbox title="<?= $ this ->transEscAttr ('View Book Bag ' ) ?> "
29- href="<?= $ this ->url ('cart-home ' ) ?> ">
30- <?= $ this ->icon ('cart ' , 'icon-link__icon ' ) ?>
31- <span class="icon-link__label">
32- <span class="sr-only"><?= $ this ->transEsc ('Book Bag ' ) ?> :</span>
33- <span
34- role="status"><strong><?= count ($ cart ->getItems ()) ?> </strong> <?= $ this ->transEsc ('items ' ) ?> </span>
35- <span
36- class="full<?= !$ cart ->isFull () ? ' hidden ' : '' ?> ">(<?= $ this ->transEsc ('bookbag_full ' ) ?> )</span>
12+ <?php if (!isset ($ this ->layout ()->renderingError )): ?>
13+ <div class="collapse navbar-collapse" id="header-collapse">
14+ <nav>
15+ <ul class="nav navbar-nav navbar-right flip">
16+ <?php if ($ this ->feedback ()->tabEnabled ()): ?>
17+ <li>
18+ <a class="icon-link" id="feedbackLink" data-lightbox href="<?= $ this ->url ('feedback-home ' ) ?> ">
19+ <?= $ this ->icon ('feedback ' , 'icon-link__icon ' ) ?>
20+ <span class="icon-link__label"><?= $ this ->transEsc ('Feedback ' )?> </span>
21+ </a>
22+ </li>
23+ <?php endif ; ?>
24+ <?php $ cart = $ this ->cart (); ?>
25+ <?php if ($ cart ->isActive ()): ?>
26+ <li id="cartSummary" aria-live="polite" aria-atomic="true">
27+ <a id="cartItems" class="icon-link" data-lightbox title="<?= $ this ->transEscAttr ('View Book Bag ' )?> " href="<?= $ this ->url ('cart-home ' )?> ">
28+ <?= $ this ->icon ('cart ' , 'icon-link__icon ' ) ?>
29+ <span class="icon-link__label">
30+ <span class="sr-only"><?= $ this ->transEsc ('Book Bag ' )?> :</span>
31+ <span role="status"><strong><?= count ($ cart ->getItems ())?> </strong> <?= $ this ->transEsc ('items ' )?> </span>
32+ <span class="full<?= !$ cart ->isFull () ? ' hidden ' : '' ?> ">(<?= $ this ->transEsc ('bookbag_full ' ) ?> )</span>
3733 </span>
38- </a>
34+ </a>
35+ </li>
36+ <?php endif ; ?>
37+ <?php if (is_object ($ account ) && $ account ->loginEnabled ()): // hide login/logout if unavailable ?>
38+ <?php if ($ account ->getIdentity ()): ?>
39+ <li class="logoutOptions<?php if ($ account ->dropdownEnabled ()): ?> with-dropdown<?php endif ?> ">
40+ <a href="<?= $ this ->url ('myresearch-home ' , [], ['query ' => ['redirect ' => 0 ]])?> " class="icon-link">
41+ <span id="account-icon" class="icon-link__icon"><?= $ this ->icon ('my-account ' ) ?> </span>
42+ <span class="icon-link__label"><?= $ this ->transEsc ('Your Account ' )?> </span>
43+ </a>
44+ </li>
45+ <?php if ($ account ->dropdownEnabled ()): ?>
46+ <li id="login-dropdown" class="dropdown hidden-xs">
47+ <a href="#" data-toggle="dropdown"><?= $ this ->icon ('dropdown-caret ' ) ?> </a>
48+ <div class="dropdown-menu">
49+ <?= $ this ->accountMenu ()->render ('' , 'header_ ' )?>
50+ </div>
3951 </li>
4052 <?php endif ; ?>
41- <?php if (is_object ($ account ) && $ account ->loginEnabled ()): // hide login/logout if unavailable ?>
42- <?php if ($ account ->getIdentity ()): ?>
43- <li class="logoutOptions<?php if ($ account ->dropdownEnabled ()): ?> with-dropdown<?php endif ?> ">
44- <a href="<?= $ this ->url ('myresearch-home ' , [], ['query ' => ['redirect ' => 0 ]]) ?> "
45- class="icon-link">
46- <span id="account-icon" class="icon-link__icon"><?= $ this ->icon ('my-account ' ) ?> </span>
47- <span class="icon-link__label"><?= $ this ->transEsc ('Your Account ' ) ?> </span>
48- </a>
49- </li>
50- <?php if ($ account ->dropdownEnabled ()): ?>
51- <li id="login-dropdown" class="dropdown hidden-xs">
52- <a href="#" data-toggle="dropdown"><?= $ this ->icon ('dropdown-caret ' ) ?> </a>
53- <div class="dropdown-menu">
54- <?= $ this ->accountMenu ()->render ('' , 'header_ ' ) ?>
55- </div>
56- </li>
57- <?php endif ; ?>
58- <li class="logoutOptions">
59- <a href="<?= $ this ->url ('myresearch-logout ' ) ?> " class="logout icon-link">
60- <?= $ this ->icon ('sign-out ' , 'icon-link__icon ' ) ?>
61- <span class="icon-link__label"><?= $ this ->transEsc ('Log Out ' ) ?> </span>
62- </a>
63- </li>
64- <?php else : ?>
65- <li id="loginOptions">
66- <?php if ($ account ->getSessionInitiator ($ this ->serverUrl ($ this ->url ('myresearch-home ' )))): ?>
67- <a href="<?= $ this ->url ('myresearch-userlogin ' ) ?> " class="icon-link">
68- <?= $ this ->icon ('sign-in ' , 'icon-link__icon ' ) ?>
69- <span class="icon-link__label"><?= $ this ->transEsc ('Institutional Login ' ) ?> </span>
70- </a>
71- <?php else : ?>
72- <a href="<?= $ this ->url ('myresearch-userlogin ' ) ?> " class="icon-link" data-lightbox>
73- <?= $ this ->icon ('sign-in ' , 'icon-link__icon ' ) ?>
74- <span class="icon-link__label"><?= $ this ->transEsc ('Login ' ) ?> </span>
75- </a>
76- <?php endif ; ?>
77- </li>
78- <?php endif ; ?>
79- <?php endif ; ?>
53+ <li class="logoutOptions">
54+ <a href="<?= $ this ->url ('myresearch-logout ' )?> " class="logout icon-link">
55+ <?= $ this ->icon ('sign-out ' , 'icon-link__icon ' ) ?>
56+ <span class="icon-link__label"><?= $ this ->transEsc ('Log Out ' )?> </span>
57+ </a>
58+ </li>
59+ <?php else : ?>
60+ <li id="loginOptions">
61+ <?php if ($ account ->getSessionInitiator ($ this ->serverUrl ($ this ->url ('myresearch-home ' )))): ?>
62+ <a href="<?= $ this ->url ('myresearch-userlogin ' )?> " class="icon-link">
63+ <?= $ this ->icon ('sign-in ' , 'icon-link__icon ' ) ?>
64+ <span class="icon-link__label"><?= $ this ->transEsc ('Institutional Login ' )?> </span>
65+ </a>
66+ <?php else : ?>
67+ <a href="<?= $ this ->url ('myresearch-userlogin ' )?> " class="icon-link" data-lightbox>
68+ <?= $ this ->icon ('sign-in ' , 'icon-link__icon ' ) ?>
69+ <span class="icon-link__label"><?= $ this ->transEsc ('Login ' )?> </span>
70+ </a>
71+ <?php endif ; ?>
72+ </li>
73+ <?php endif ; ?>
74+ <?php endif ; ?>
8075
81- <?php if (isset ($ this ->layout ()->themeOptions ) && count ($ this ->layout ()->themeOptions ) > 1 ): ?>
82- <?= $ this ->component ('menu-button ' , [
83- 'toggleLabel ' => 'Theme ' ,
84- 'wrapperClass ' => 'theme-selector ' ,
85- 'wrapperTag ' => 'li ' ,
86- 'menuItems ' => array_map (
87- function ($ item ) {
88- $ item ['label ' ] = $ item ['desc ' ];
89- $ item ['url ' ] = $ this ->url ()->addQueryParameters (['ui ' => $ item ['name ' ]]);
76+ <?php if (isset ($ this ->layout ()->themeOptions ) && count ($ this ->layout ()->themeOptions ) > 1 ): ?>
77+ <?= $ this ->component ('menu-button ' , [
78+ 'toggleLabel ' => 'Theme ' ,
79+ 'wrapperClass ' => 'theme-selector ' ,
80+ 'wrapperTag ' => 'li ' ,
81+ 'menuItems ' => array_map (
82+ function ($ item ) {
83+ $ item ['label ' ] = $ item ['desc ' ];
84+ $ item ['url ' ] = $ this ->url ()->addQueryParameters (['ui ' => $ item ['name ' ]]);
9085
91- return $ item ;
92- },
93- $ this ->layout ()->themeOptions
94- ),
95- ]) ?>
96- <?php endif ; ?>
86+ return $ item ;
87+ },
88+ $ this ->layout ()->themeOptions
89+ ),
90+ ]) ?>
91+ <?php endif ; ?>
9792
98- <?php if (isset ($ this ->layout ()->allLangs ) && count ($ this ->layout ()->allLangs ) > 1 ): ?>
99- <?= $ this ->component ('menu-button ' , [
100- 'toggleLabel ' => 'Language ' ,
101- 'wrapperClass ' => 'language ' ,
102- 'wrapperTag ' => 'li ' ,
103- 'menuItems ' => array_map (
104- function ($ langCode , $ langName ) {
105- return [
106- 'label ' => $ this ->displayLanguageOption ($ langName ),
107- 'url ' => $ this ->url ()->addQueryParameters (['lng ' => $ langCode ]),
108- 'selected ' => $ this ->layout ()->userLang == $ langCode ,
109- ];
110- },
111- array_keys ($ this ->layout ()->allLangs ),
112- array_values ($ this ->layout ()->allLangs ),
113- ),
114- ]) ?>
115- <?php endif ; ?>
116- </ul>
117- </nav>
118- </div>
119- <?php endif ; ?>
93+ <?php if (isset ($ this ->layout ()->allLangs ) && count ($ this ->layout ()->allLangs ) > 1 ): ?>
94+ <?= $ this ->component ('menu-button ' , [
95+ 'toggleLabel ' => 'Language ' ,
96+ 'wrapperClass ' => 'language ' ,
97+ 'wrapperTag ' => 'li ' ,
98+ 'menuItems ' => array_map (
99+ function ($ langCode , $ langName ) {
100+ return [
101+ 'label ' => $ this ->displayLanguageOption ($ langName ),
102+ 'url ' => $ this ->url ()->addQueryParameters (['lng ' => $ langCode ]),
103+ 'selected ' => $ this ->layout ()->userLang == $ langCode ,
104+ ];
105+ },
106+ array_keys ($ this ->layout ()->allLangs ),
107+ array_values ($ this ->layout ()->allLangs ),
108+ ),
109+ ]) ?>
110+ <?php endif ; ?>
111+ </ul>
112+ </nav>
113+ </div>
114+ <?php endif ; ?>
120115</div>
121116<?php if ($ this ->layout ()->searchbox !== false ): ?>
122117 <div class="search container navbar">
123118 <div class="nav searchbox hidden-print" role="search">
124- <?= $ this ->layout ()->searchbox ?>
119+ <?= $ this ->layout ()->searchbox ?>
125120 </div>
126121 </div>
127122<?php endif ; ?>
0 commit comments