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

refs #10317:

* added bootstrap3 profile.phtml to finc theme and extended it with email and expires information
parent 6e947452
No related merge requests found
<?
// Set up page title:
$this->headTitle($this->translate('My Profile'));
// Set up breadcrumbs:
$this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Profile') . '</li>';
// Only display home library form if we have multiple pickup locations:
$showHomeLibForm = (isset($this->pickup) && count($this->pickup) > 1);
// Template for use by the renderArray helper:
$arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>';
?>
<div class="row">
<div class="<?=$this->layoutClass('mainbody')?>">
<h2><?=$this->transEsc('Your Profile')?></h2>
<?=$this->flashmessages();?>
<?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', array('user' => $this->auth()->isLoggedIn())); ?>
<table class="table table-striped">
<?
echo $this->renderArray(
$arrTemplate, $this->profile,
array(
$this->transEsc('First Name') => 'firstname',
$this->transEsc('Last Name') => 'lastname'
)
);
?>
<? if ($showHomeLibForm): ?>
<tr><th><?=$this->transEsc('Preferred Library')?>:</th>
<?
$selected = (isset($this->profile['home_library']) && $this->profile['home_library'] != "")
? $this->profile['home_library'] : $this->defaultPickupLocation
?>
<td>
<form id="profile_form" class="form-inline" method="post">
<select id="home_library" name="home_library" class="form-control">
<? foreach ($this->pickup as $lib): ?>
<option value="<?=$this->escapeHtmlAttr($lib['locationID'])?>"<?=($selected == $lib['locationID'])?' selected="selected"':''?>><?=$this->escapeHtml($lib['locationDisplay'])?></option>
<? endforeach; ?>
</select>
<input class="btn btn-default" type="submit" value="<?=$this->transEsc('Save')?>" />
</form>
</td>
<? endif; ?>
<?
echo $this->renderArray(
$arrTemplate, $this->profile,
array(
$this->transEsc('Address') . ' 1' => 'address1',
$this->transEsc('Address') . ' 2' => 'address2',
$this->transEsc('Zip') => 'zip',
$this->transEsc('City') => 'city',
$this->transEsc('Country') => 'country',
$this->transEsc('Email') => 'email',
$this->transEsc('Phone Number') => 'phone',
$this->transEsc('Group') => 'group',
$this->transEsc('Expires') => 'expires'
)
);
?>
</table>
</div>
<div class="<?=$this->layoutClass('sidebar')?>">
<?=$this->context($this)->renderInContext("myresearch/menu.phtml", array('active' => 'profile'))?>
</div>
</div>
\ No newline at end of file
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