Skip to content
Snippets Groups Projects
  • Dorian Merz's avatar
    refs #16223 [fid] book orders in user profile · 9240d092
    Dorian Merz authored
    * adds book orders menu entry
    * displays open orders in table
    * adds several templates
    * adds script to close modal on click to Order list links
    
    co-authored by: ckaz <kazzer@ub.uni-leipzig.de>
    9240d092
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
menu.phtml 3.94 KiB
<?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();
?>
<?php /* Offcanvas closing button missing in BS3! CK*/ ?>
<button class="close-offcanvas btn btn-link" data-toggle="offcanvas"><?=$this->transEsc('navigate_back') ?></button>

<?php if (!empty($user)): ?>
  <h4><?=$this->transEsc('Your Account')?></h4>
  <div class="myresearch-menu account-menu">
    <?php if ('ils-none' !== $this->ils()->getOfflineMode()): ?>
      <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 */ ?>
        <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>

        <a href="<?=$this->url('fid/user/change-username')?>" data-lightbox>
          <span class="no-padding">
            <i class="fa fa-fw fa-envelope" aria-hidden="true"></i>
          </span>
          <?=$this->transEsc('fid::username_change_link')?>
        </a>

        <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>

      <?php if ($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 ($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>
      <?=$this->context($this)->renderInContext('myresearch/menu-additional-entries.phtml', array())?>
    </div>
  <?php endif ?>
  <?php if ($this->permission()->allowDisplay('fid.ReadList')): ?>
  <br/>
  <h4><?=$this->transEsc('fid::admin_section')?></h4>
  <div class="myresearch-menu">
      <a href="<?=$this->url('fid/admin/list')?>"><?=$this->transEsc('fid::permission_read_user_list')?></a>
  <?php endif; ?>
  </div>
  <!-- fid: myresearch - menu.phtml END -->
<?php endif; ?>