summaryrefslogtreecommitdiff
path: root/app/Templates/user_sessions.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-02 23:41:12 -0800
committerFrédéric Guillot <fred@kanboard.net>2014-09-02 23:41:12 -0800
commitd68ff648b1995c14506d4c61c9d97dc7f599496f (patch)
tree82a2879ee26a4edd30adf8b9fd7b777e17068c23 /app/Templates/user_sessions.php
parent7bb09c3f9b3440cf297104f32e80050601d61533 (diff)
Refactoring of user management (ui)
Diffstat (limited to 'app/Templates/user_sessions.php')
-rw-r--r--app/Templates/user_sessions.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/Templates/user_sessions.php b/app/Templates/user_sessions.php
new file mode 100644
index 00000000..b647d726
--- /dev/null
+++ b/app/Templates/user_sessions.php
@@ -0,0 +1,26 @@
+<div class="page-header">
+ <h2><?= t('Persistent connections') ?></h2>
+</div>
+
+<?php if (empty($sessions)): ?>
+ <p class="alert"><?= t('No session.') ?></p>
+<?php else: ?>
+ <table class="table-small">
+ <tr>
+ <th><?= t('Creation date') ?></th>
+ <th><?= t('Expiration date') ?></th>
+ <th><?= t('IP address') ?></th>
+ <th><?= t('User agent') ?></th>
+ <th><?= t('Action') ?></th>
+ </tr>
+ <?php foreach($sessions as $session): ?>
+ <tr>
+ <td><?= dt('%B %e, %Y at %k:%M %p', $session['date_creation']) ?></td>
+ <td><?= dt('%B %e, %Y at %k:%M %p', $session['expiration']) ?></td>
+ <td><?= Helper\escape($session['ip']) ?></td>
+ <td><?= Helper\escape(Helper\summary($session['user_agent'])) ?></td>
+ <td><a href="?controller=user&amp;action=removeSession&amp;user_id=<?= $user['id'] ?>&amp;id=<?= $session['id'].Helper\param_csrf() ?>"><?= t('Remove') ?></a></td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+<?php endif ?>