From ec431a3b8bfe2502e91a515aa0f9daeffad31ed6 Mon Sep 17 00:00:00 2001 From: Gregor Gawol <gawol@ub.uni-leipzig.de> Date: Wed, 24 Nov 2021 10:08:51 +0100 Subject: [PATCH] refs #20661 [de_105] BARF specify current page menu entry --- themes/de_105/templates/myresearch/menu.phtml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/themes/de_105/templates/myresearch/menu.phtml b/themes/de_105/templates/myresearch/menu.phtml index dba7b8902df..6b11642262e 100644 --- a/themes/de_105/templates/myresearch/menu.phtml +++ b/themes/de_105/templates/myresearch/menu.phtml @@ -22,7 +22,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php if ($this->ils()->checkCapability('getMyTransactions')): ?> <li> - <a href="<?=$this->url('myresearch-checkedout')?>"<?=$this->active == 'checkedout' ? ' class="active"' : ''?>> + <a href="<?=$this->url('myresearch-checkedout')?>"<?=$this->active == 'checkedout' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-book" aria-hidden="true"></i> <?=$this->transEsc('Checked Out Items')?> <?php /* nxt line finc specific - CK */ ?> <span id="getMyTransactions" class="itemCount pull-right no-padding"></span> @@ -32,7 +32,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php if ($this->ils()->checkCapability('getMyHolds')): ?> <li> - <a href="<?=$this->url('myresearch-holds')?>"<?=$this->active == 'holds' ? ' class="active"' : ''?>> + <a href="<?=$this->url('myresearch-holds')?>"<?=$this->active == 'holds' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-flag" aria-hidden="true"></i> <?=$this->transEsc('Holds and Recalls')?> <?php /* nxt line finc specific - CK */ ?> <span id="getMyHolds" class="itemCount pull-right no-padding"></span> @@ -43,7 +43,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php /* refs #13122 Custom de_105: entry MediaReadyToPickup */ ?> <?php if ($this->ils()->checkCapability('getMyMediaReadyToPickup')): ?> <li> - <a href="<?=$this->url('myresearch-mediareadytopickup')?>"<?=$this->active == 'mediareadytopickup' ? ' class="active"' : ''?>> + <a href="<?=$this->url('myresearch-mediareadytopickup')?>"<?=$this->active == 'mediareadytopickup' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-suitcase" aria-hidden="true"></i> <?=$this->transEsc('finclibero_mediareadytopickup')?> <span id="getMyMediaReadyToPickup" class="itemCount pull-right no-padding"></span> </a> @@ -54,7 +54,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php /* removed in #20835, RL <?php if ($this->ils()->checkFunction('StorageRetrievalRequests')): ?> <li> - <a href="<?=$this->url('myresearch-storageretrievalrequests')?>"<?=$this->active == 'storageRetrievalRequests' ? ' class="active"' : ''?>> + <a href="<?=$this->url('myresearch-storageretrievalrequests')?>"<?=$this->active == 'storageRetrievalRequests' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-archive" aria-hidden="true"></i> <?=$this->transEsc('Storage Retrieval Requests')?> <?php // nxt line finc specific - CK ?> <span id="getMyStorageRetrievalRequests" class="itemCount pull-right no-padding"></span> @@ -65,7 +65,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php if ($this->ils()->checkCapability('getMyILLRequests')): ?> <li> - <a href="<?=$this->url('myresearch-illrequests')?>"<?=$this->active == 'ILLRequests' ? ' class="active"' : ''?>> + <a href="<?=$this->url('myresearch-illrequests')?>"<?=$this->active == 'ILLRequests' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-exchange" aria-hidden="true"></i> <?=$this->transEsc('Interlibrary Loan Requests')?> <?php /* nxt line finc specific - CK */ ?> <span id="getMyILLRequests" class="itemCount pull-right no-padding"></span> @@ -77,7 +77,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php /* removed du to privacy concerns #18439 <?php if ($this->ils()->checkCapability('getMyLoanHistory')): ?> <li> - <a href="<?= $this->url('myresearch-loanhistory') ?>"<?= $this->active == 'loanhistory' ? ' class="active"' : '' ?>> + <a href="<?= $this->url('myresearch-loanhistory') ?>"<?= $this->active == 'loanhistory' ? ' class="active" aria-current="page"' : '' ?>> <i class="fa fa-fw fa-hourglass-end"></i> <?= $this->transEsc('Loan History') ?> <span id="getMyLoanHistoryItems" class="itemCount pull-right no-padding"></span> </a> @@ -88,7 +88,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php /* refs #11535 END : add my loan history */ ?> <?php if ($this->ils()->checkCapability('getMyFines')): ?> <li> - <a href="<?=$this->url('myresearch-fines')?>"<?=$this->active == 'fines' ? ' class="active"' : ''?>> + <a href="<?=$this->url('myresearch-fines')?>"<?=$this->active == 'fines' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-euro" aria-hidden="true"></i> <?=$this->transEsc('Fines')?> </a> </li> @@ -96,7 +96,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php if ($this->ils()->checkCapability('getMyProfile')): ?> <li> - <a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active"' : ''?>> + <a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-user" aria-hidden="true"></i> <?=$this->transEsc('Profile')?> </a> </li> @@ -105,7 +105,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php $user = $this->auth()->isLoggedIn(); if ($user && $user->libraryCardsEnabled()): ?> <li> - <a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active"' : ''?>> + <a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?=$this->transEsc('Library Cards')?> </a> </li> @@ -128,7 +128,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php /* de_105: #16309 - reactivate password change - HR */ ?> <?php if ($this->auth()->isLoggedIn() && $this->auth()->getManager()->supportsPasswordChange()): ?> <li> - <a href="<?=$this->url('myresearch-changepassword')?>"<?=$this->active == 'newpassword' ? ' class="active"' : ''?>> + <a href="<?=$this->url('myresearch-changepassword')?>"<?=$this->active == 'newpassword' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-lock" aria-hidden="true"></i> <?=$this->transEsc('Change Password')?> </a> </li> @@ -137,7 +137,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php /* de_105: #13121 insert set user pin - FM */ ?> <?php if ($this->auth()->isLoggedIn() && $this->ils()->checkCapability('changeUserPin')): ?> <li> - <a href="<?=$this->url('myresearch-setpin')?>" class="<?= $this->active == 'setpin' ? ' active' : '' ?>"> + <a href="<?=$this->url('myresearch-setpin')?>" <?= $this->active == 'setpin' ? ' class="active" aria-current="page"' : '' ?>> <i class="fa fa-fw fa-hand-pointer-o" aria-hidden="true"></i><?=$this->transEsc('LiberoAccount::change_user_pin')?> </a> </li> @@ -145,9 +145,9 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php /* de_105: #13121 insert set user pin - FM END */ ?> <?php /* de_105: #13126 insert lock-account - FM */ ?> - <?php if ($this->auth()->isLoggedIn() && $this->ils()->checkCapability('setLockMyAccount')): ?> + <?php if ($this->auth()->isLoggedIn() && $this->ils()->checkCapability('setLockMyAccount')): ?> <li> - <a href="<?= $this->url('myresearch-lockaccount') ?>" class="<?= $this->active == 'lockaccount' ? ' active' : '' ?>"> + <a href="<?= $this->url('myresearch-lockaccount') ?>" <?= $this->active == 'lockaccount' ? ' class="active" aria-current="page"' : '' ?>> <i class="fa fa-fw fa-lock" aria-hidden="true"></i><?= $this->transEsc('Lock Account') ?> </a> </li> @@ -161,7 +161,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <ul class="myresearch-menu facet-group"> <li> - <a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>> + <a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Your Favorites')?> </a> </li> @@ -169,7 +169,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php /* de_105: #13420 'search-history' was placed here inside 'Your Lists'-area - VE */ ?> <?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> <li> - <a href="<?=$this->url('search-history')?>?require_login"<?=$this->active == 'history' ? ' class="active"' : ''?>> + <a href="<?=$this->url('search-history')?>?require_login"<?=$this->active == 'history' ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-search" aria-hidden="true"></i> <?=$this->transEsc('history_saved_searches')?> </a> </li> @@ -179,7 +179,7 @@ $capabilityParams = $patron ? ['patron' => $patron] : []; <?php foreach ($lists as $list): ?> <?php /* finc: keep icon inside + keep braces in badge!; CK*/ ?> <li> - <a href="<?=$this->url('userList', ['id' => $list['id']])?>"<?=$this->active == 'list' . $list['id'] ? ' class="active"' : ''?>> + <a href="<?=$this->url('userList', ['id' => $list['id']])?>"<?=$this->active == 'list' . $list['id'] ? ' class="active" aria-current="page"' : ''?>> <i class="fa fa-fw fa-star-o" aria-hidden="true"></i> <?=$this->escapeHtml($list['title'])?> <span class="badge"><?=$list->cnt?></span> </a> -- GitLab