From 86553ea052b98a024aa0ee718bf161763f3cee7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lahmann?= <lahmann@ub.uni-leipzig.de> Date: Wed, 19 Oct 2022 11:00:21 +0200 Subject: [PATCH] refs #22533 [finc] * reduced profile.phtml template to show only user data from ILS --- .../finc/templates/myresearch/profile.phtml | 75 ++++--------------- 1 file changed, 14 insertions(+), 61 deletions(-) diff --git a/themes/finc/templates/myresearch/profile.phtml b/themes/finc/templates/myresearch/profile.phtml index a8787ed1ecc..1ed8eeb96ae 100644 --- a/themes/finc/templates/myresearch/profile.phtml +++ b/themes/finc/templates/myresearch/profile.phtml @@ -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( -- GitLab