Skip to content
Snippets Groups Projects
Commit cc877b85 authored by Robert Lange's avatar Robert Lange Committed by Dorian Merz
Browse files

refs #15480 [fid] add link for password change to profile

* add myresearch/menu.phtml for fid
* reorder items in menu and remove duplicate favorites
* add translation for log out
* add comment
* set link as modal / lightbox
* add inline comments for orientation
parent 64eed2b0
No related merge requests found
@parent_ini = ../../languages/de.ini
\ No newline at end of file
@parent_ini = ../../languages/de.ini
Logout = Abmelden
\ No newline at end of file
<?php
/**
*
* copied from /bootstrap3/templates/myresearch/menu.phtml
* changed for fid specific menu
* refs #15480 add password change to fid profile
*
* @author Robert Lange <lange@@ub.uni-leipzig.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org Main Page
*/
?>
<!-- fid: myresearch - menu.phtml -->
<?php
$user = $this->auth()->isLoggedIn();
$patron = $user ? $this->auth()->getILSPatron() : false;
$capabilityParams = $patron ? ['patron' => $patron] : [];
?>
<h4><?=$this->transEsc('Your Account')?></h4>
<div class="myresearch-menu account-menu">
<?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"' : ''?>>
<i class="fa fa-fw fa-user" aria-hidden="true"></i>
<?=$this->transEsc('Profile')?>
</a>
<?php /* refs #15480 add password change to fid profile */ ?>
<?php if ($this->auth()->isLoggedIn()): ?>
<a href="<?=$this->url('fid/user/reset-password')?>" data-lightbox>
<span class="no-padding">
<i class="fa fa-fw fa-lock" aria-hidden="true"></i>
</span>
<?=$this->transEsc('Change Password')?>
</a>
<? endif; ?>
<?php if ($user = $this->auth()->isLoggedIn()): ?>
<span class="logout-button">
<a href="<?=$this->url('myresearch-logout')?>">
<span class="no-padding">
<span class="no-padding">
<i class="fa fa-fw fa-sign-out" aria-hidden="true"></i>
</span>
<?=$this->transEsc("Logout")?>
</a>
</span>
<? endif; ?>
<?php if ($user && $user->libraryCardsEnabled()): ?>
<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')?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
<br />
<?php if ($user && $this->userlist()->getMode() !== 'disabled'): ?>
<h4><?=$this->transEsc('Your Lists')?></h4>
<div class="myresearch-menu">
<?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?>
<a href="<?=$this->url('search-history')?>?require_login"<?=$this->active == 'history' ? ' class="active"' : ''?>>
<i class="fa fa-fw fa-search" aria-hidden="true"></i> <?=$this->transEsc('history_saved_searches')?>
</a>
<?php endif; ?>
<a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>>
<i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Your Favorites')?>
</a>
<?php $lists = $user->getLists() ?>
<?php foreach ($lists as $list): ?>
<a href="<?=$this->url('userList', ['id' => $list['id']])?>"<?=$this->active == 'list' . $list['id'] ? ' class="active"' : ''?>>
<?=$this->escapeHtml($list['title'])?>
<span class="badge"><?=$list->cnt ?></span>
</a>
<?php endforeach; ?>
<a href="<?=$this->url('editList', ['id' => 'NEW'])?>">
<i class="fa fa-fw fa-plus" aria-hidden="true"></i> <?=$this->transEsc('Create a List') ?>
</a>
</div>
<?php endif ?>
<!-- fid: myresearch - menu.phtml END -->
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