Skip to content
Snippets Groups Projects
Commit 86553ea0 authored by André Lahmann's avatar André Lahmann
Browse files

refs #22533 [finc]

* reduced profile.phtml template to show only user data from ILS
parent de8a63f7
Branches
Tags
No related merge requests found
......@@ -18,69 +18,22 @@
<h1><?=$this->transEsc('Your Profile')?></h1>
<?=$this->flashmessages();?>
<?php /* This table works well without inserting responsive data titles - CK */ ?>
<table class="table table-striped">
<?=$this->renderArray(
$arrTemplate, $this->user,
[
$this->transEsc('First Name') => 'firstname',
$this->transEsc('Last Name') => 'lastname',
// finc: uses show e-mail in table below
// $this->transEsc('Email') => 'email',
]
)?>
<?php /* this section renders under two distinct circumstances; see if/else below: */ ?>
<?php if (count($this->pickup ?? []) > 1 || !empty($this->preferredLibraryDisplay)): ?>
<tr>
<th><?=$this->transEsc('Preferred Library')?>:</th>
<td>
<?php if (count($this->pickup ?? []) > 1): // case 1: set home library allowed ?>
<?php
$selected = (strlen($this->profile['home_library'] ?? '') > 0)
? $this->profile['home_library'] : $this->defaultPickupLocation
?>
<form id="profile_form" class="form-inline" method="post">
<select id="home_library" name="home_library" class="form-control">
<?php foreach ($this->pickup as $lib): ?>
<option value="<?=$this->escapeHtmlAttr($lib['locationID'])?>"<?=($selected == $lib['locationID'])?' selected="selected"':''?>><?=$this->transEscWithPrefix('location_', $lib['locationDisplay'])?></option>
<?php endforeach; ?>
</select>
<input class="btn btn-default" type="submit" value="<?=$this->transEsc('Save')?>" />
</form>
<?php else: // case 2: set home library disallowed, but default provided by ILS ?>
<?=$this->transEscWithPrefix('location_', $this->preferredLibraryDisplay)?>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
</table>
<div id="account-actions">
<?php if ($this->auth()->getManager()->supportsEmailChange()): ?>
<a class="btn btn-default" href="<?=$this->url('myresearch-changeemail') ?>">
<i class="fa fa-fw fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Change Email Address') ?>
</a>
<?php endif; ?>
<?php if ($this->auth()->getManager()->supportsPasswordChange()): ?>
<a class="btn btn-default" href="<?=$this->url('myresearch-changepassword') ?>">
<i class="fa fa-fw fa-lock" aria-hidden="true"></i> <?=$this->transEsc('Change Password') ?>
</a>
<?php endif; ?>
<?php if ($this->accountDeletion): ?>
<a class="btn btn-default" href="<?=$this->url('myresearch-deleteaccount') ?>" data-lightbox>
<i class="fa fa-times"></i> <?=$this->transEsc('delete_account_title') ?>
</a>
<?php endif; ?>
</div>
<?php
/* finc-specific:
* Removed part of template responsible for rendering user data from VuFind
* database as in finc we only store name/surname/email in database which is
* identical to profile data from the ILS shown below. Also gone are action
* buttons for password/emal change and account deletion as this is all handled
* by the ILS as well. */
?>
<?php if (is_array($this->profile)): ?>
<?php /* finc: change h3 to h2 */ ?>
<h2><?=$this->transEsc('Library Catalog Profile')?></h2>
<p>
<?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->user]); ?>
</p>
<?php
/* finc-specific:
* Removed sub-heading and library card selector (should never be used in finc).
*/
?>
<?php /* Table works without further responsiveness code inserted - CK */ ?>
<table class="table table-striped">
<?=$this->renderArray(
......
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