<?php if(is_array($this->view->sessions) && !empty($this->view->sessions)): ?>
	<div class="clearfix">
		<a href="<?php echo $this->helper->setHash('users-sessions/1'); ?>" class="float-right"><?php echo _('Show more...'); ?></a>
	</div>
	<table  class="table table-hover">
		<thead class="thead-light">
			<tr>
				<th width="1%"></th>
				<th><?php echo _('Surname'); ?></th>
				<th><?php echo _('Name'); ?></th>
				<th class="text-right"><?php echo _('Last action'); ?></th>
			</tr>
		</thead>
		
		<tbody>
			<?php foreach($this->view->sessions as $session): ?>
				<tr>
					<td><?php echo $this->helper->setAvatarView($this->user->getAvatar($session['user_id']), ['timestamp'=>md5($session['updated_at'])]); ?></td>
					<td><?php echo $session['surname']; ?></td>
					<td><?php echo $session['name']; ?></td>
					<td class="text-right"><?php echo $this->helper->dateIntervalString($session['session_updated_at']); ?></td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
<?php else: ?>
	<div class="alert alert-light" role="alert"><?php echo _('The sessions content is currently empty, please try again in a few minutes.'); ?></div>
<?php endif; ?>