Skip to content
Snippets Groups Projects
Commit 82937dc5 authored by Dorian Merz's avatar Dorian Merz
Browse files

refs #16223 [fid_adlr] book orders in user menu

* adds book orders entry in profile side menu
* some code cleanup due to unused functionality
parent 6845cc46
No related merge requests found
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
<!-- fid-adlr myresearch - menu --> <!-- fid-adlr myresearch - menu -->
<?php <?php
$user = $this->auth()->isLoggedIn(); $user = $this->auth()->isLoggedIn();
$patron = $user ? $this->auth()->getILSPatron() : false;
$capabilityParams = $patron ? ['patron' => $patron] : [];
?> ?>
<?php /* Offcanvas closing button missing in BS3! CK*/ ?> <?php /* Offcanvas closing button missing in BS3! CK*/ ?>
<button class="close-offcanvas btn btn-link" data-toggle="offcanvas"><?=$this->transEsc('navigate_back') ?></button> <button class="close-offcanvas btn btn-link" data-toggle="offcanvas"><?=$this->transEsc('navigate_back') ?></button>
...@@ -23,76 +21,35 @@ ...@@ -23,76 +21,35 @@
<h4><?=$this->transEsc('Your Account')?></h4> <h4><?=$this->transEsc('Your Account')?></h4>
<div class="myresearch-menu account-menu"> <div class="myresearch-menu account-menu">
<?php if ('ils-none' !== $this->ils()->getOfflineMode()): ?> <?php if ('ils-none' !== $this->ils()->getOfflineMode()): ?>
<?php if ($this->ils()->checkCapability('getMyTransactions', $capabilityParams)): ?>
<a href="<?=$this->url('myresearch-checkedout')?>" class="flex checkedout<?=$this->active == 'checkedout' ? ' active' : ''?>">
<span class="flex-col"><i class="fa fa-fw fa-book" aria-hidden="true"></i>&nbsp;<?=$this->transEsc('Checked Out Items')?></span>
<span class="checkedout-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span>
</a>
<?php endif; ?>
<?php if ($this->ils()->checkFunction('getMyTransactionHistory', $capabilityParams)): ?>
<a href="<?=$this->url('myresearch-historicloans')?>"<?=$this->active == 'historicloans' ? ' class="active"' : ''?>>
<i class="fa fa-fw fa-history" aria-hidden="true"></i> <?=$this->transEsc('Loan History')?>
</a>
<?php endif; ?>
<?php if ($this->ils()->checkCapability('getMyHolds', $capabilityParams)): ?>
<a href="<?=$this->url('myresearch-holds')?>" class="flex<?=$this->active == 'holds' ? ' active' : ''?>">
<span class="flex-col"><i class="fa fa-fw fa-flag" aria-hidden="true"></i>&nbsp;<?=$this->transEsc('Holds and Recalls')?></span>
<span class="holds-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span>
</a>
<?php endif; ?>
<?php if ($this->ils()->checkFunction('StorageRetrievalRequests', $capabilityParams)): ?>
<a href="<?=$this->url('myresearch-storageretrievalrequests')?>" class="flex<?=$this->active == 'storageRetrievalRequests' ? ' active' : ''?>">
<span class="flex-col"><i class="fa fa-fw fa-archive" aria-hidden="true"></i> <?=$this->transEsc('Storage Retrieval Requests')?></span>
<span class="storageretrievalrequests-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span>
</a>
<?php endif; ?>
<?php if ($this->ils()->checkFunction('ILLRequests', $capabilityParams)): ?>
<a href="<?=$this->url('myresearch-illrequests')?>" class="flex<?=$this->active == 'ILLRequests' ? ' active' : ''?>">
<span class="flex-col"><i class="fa fa-fw fa-exchange" aria-hidden="true"></i> <?=$this->transEsc('Interlibrary Loan Requests')?></span>
<span class="illrequests-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span>
</a>
<?php endif; ?>
<?php if ($this->ils()->checkCapability('getMyFines', $capabilityParams)): ?>
<a href="<?=$this->url('myresearch-fines')?>" class="flex<?=$this->active == 'fines' ? ' active' : ''?>">
<span class="flex-col"><i class="fa fa-fw fa-usd" aria-hidden="true"></i>&nbsp;<?=$this->transEsc('Fines')?></span>
<span class="fines-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span>
</a>
<?php endif; ?>
<a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active"' : ''?>> <a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active"' : ''?>>
<i class="icon icon-user" aria-hidden="true"></i> <i class="icon icon-user" aria-hidden="true"></i>
<?=$this->transEsc('Profile')?> <?=$this->transEsc('Profile')?>
</a> </a>
<?php /* refs #15480 add password change to fid profile */ ?> <?php /* refs #15480 add password change to fid profile */ ?>
<?php if ($this->auth()->isLoggedIn()): ?>
<a href="<?=$this->url('fid/user/reset-password')?>" data-lightbox> <a href="<?=$this->url('fid/user/reset-password')?>" data-lightbox>
<span class="no-padding"> <span class="no-padding">
<i class="icon icon-lock" aria-hidden="true"></i> <i class="icon icon-lock" aria-hidden="true"></i>
</span> </span>
<?=$this->transEsc('Change Password')?> <?=$this->transEsc('Change Password')?>
</a> </a>
<? endif; ?>
<?php if ($this->auth()->isLoggedIn()): ?>
<a href="<?=$this->url('fid/user/change-username')?>" data-lightbox> <a href="<?=$this->url('fid/user/change-username')?>" data-lightbox>
<span class="no-padding"> <span class="no-padding">
<i class="icon icon-edit-3" aria-hidden="true"></i> <i class="icon icon-edit-3" aria-hidden="true"></i>
</span> </span>
<?=$this->transEsc('fid::username_change_link')?> <?=$this->transEsc('fid::username_change_link')?>
</a> </a>
<? endif; ?>
<?php /* refs #16033 contact link */ ?> <?php /* refs #16033 contact link */ ?>
<?php if ($this->auth()->isLoggedIn()): ?>
<a data-lightbox> <a data-lightbox>
<span class="no-padding"> <span class="no-padding">
<i class="icon icon-mail" aria-hidden="true"></i> <i class="icon icon-mail" aria-hidden="true"></i>
</span> </span>
<?=$this->transEsc('contact_adlr')?> <?=$this->transEsc('contact_adlr')?>
</a> </a>
<? endif; ?>
<?php if ($user = $this->auth()->isLoggedIn()): ?>
<span class="logout-button"> <span class="logout-button">
<a href="<?=$this->url('myresearch-logout')?>"> <a href="<?=$this->url('myresearch-logout')?>">
<span class="no-padding"> <span class="no-padding">
...@@ -101,9 +58,8 @@ ...@@ -101,9 +58,8 @@
<?=$this->transEsc("Logout")?> <?=$this->transEsc("Logout")?>
</a> </a>
</span> </span>
<? endif; ?>
<?php if ($user && $user->libraryCardsEnabled()): ?> <?php if ($user->libraryCardsEnabled()): ?>
<a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active"' : ''?>> <a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active"' : ''?>>
<i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?=$this->transEsc('Library Cards')?> <i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?=$this->transEsc('Library Cards')?>
</a> </a>
...@@ -112,7 +68,7 @@ ...@@ -112,7 +68,7 @@
</div> </div>
<br /> <br />
<?php if ($user && $this->userlist()->getMode() !== 'disabled'): ?> <?php if ($this->userlist()->getMode() !== 'disabled'): ?>
<h4><?=$this->transEsc('Your Lists')?></h4> <h4><?=$this->transEsc('Your Lists')?></h4>
<div class="myresearch-menu"> <div class="myresearch-menu">
...@@ -139,14 +95,12 @@ ...@@ -139,14 +95,12 @@
<?php endif; ?> <?php endif; ?>
<?php /* refs #16033 order list page link */ ?> <?php /* refs #16033 order list page link */ ?>
<?php if ($this->auth()->isLoggedIn()): ?> <a data-lightbox href="<?=$this->url('fid/user/orders')?>">
<a data-lightbox>
<span class="no-padding"> <span class="no-padding">
<i class="icon icon-package" aria-hidden="true"></i> <i class="icon icon-package" aria-hidden="true"></i>
</span> </span>
<?=$this->transEsc('Your Orders')?> <?=$this->transEsc('Your Orders')?>
</a> </a>
<? endif; ?>
<?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> <?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?>
<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"' : ''?>>
...@@ -155,14 +109,12 @@ ...@@ -155,14 +109,12 @@
<?php endif; ?> <?php endif; ?>
<?php /* refs #16033 new print publications page link */ ?> <?php /* refs #16033 new print publications page link */ ?>
<?php if ($this->auth()->isLoggedIn()): ?>
<a data-lightbox> <a data-lightbox>
<span class="no-padding"> <span class="no-padding">
<i class="icon icon-book" aria-hidden="true"></i> <i class="icon icon-book" aria-hidden="true"></i>
</span> </span>
<?=$this->transEsc('new_print_publications')?> <?=$this->transEsc('new_print_publications')?>
</a> </a>
<? endif; ?>
</div> </div>
<?php endif ?> <?php endif ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment