diff options
author | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-19 22:12:12 -0400 |
---|---|---|
committer | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-19 22:12:12 -0400 |
commit | a04ecbde778decfdea7200806a6b1144861ae05f (patch) | |
tree | e4670e3013734d9c7bd201f5d6ef1fbaae13d3b5 /templates/config_index.php | |
parent | 5aacb6a76351889a6ec5ed01c8e80f139c2b2027 (diff) |
Add RememberMe feature and authentications history
Diffstat (limited to 'templates/config_index.php')
-rw-r--r-- | templates/config_index.php | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/templates/config_index.php b/templates/config_index.php index ba971b61..899a4b0c 100644 --- a/templates/config_index.php +++ b/templates/config_index.php @@ -2,7 +2,7 @@ <?php if ($user['is_admin']): ?> <div class="page-header"> - <h2><?= t('Application Settings') ?></h2> + <h2><?= t('Application settings') ?></h2> </div> <section> <form method="post" action="?controller=config&action=save" autocomplete="off"> @@ -55,7 +55,7 @@ <?php endif ?> <div class="page-header"> - <h2><?= t('User Settings') ?></h2> + <h2><?= t('User settings') ?></h2> </div> <section class="settings"> <ul> @@ -66,4 +66,52 @@ </li> </ul> </section> + + <div class="page-header" id="last-logins"> + <h2><?= t('Last logins') ?></h2> + </div> + <?php if (! empty($last_logins)): ?> + <table class="table-small table-hover"> + <tr> + <th><?= t('Login date') ?></th> + <th><?= t('Authentication method') ?></th> + <th><?= t('IP address') ?></th> + <th><?= t('User agent') ?></th> + </tr> + <?php foreach($last_logins as $login): ?> + <tr> + <td><?= dt('%B %e, %G at %k:%M %p', $login['date_creation']) ?></td> + <td><?= Helper\escape($login['auth_type']) ?></td> + <td><?= Helper\escape($login['ip']) ?></td> + <td><?= Helper\escape($login['user_agent']) ?></td> + </tr> + <?php endforeach ?> + </table> + <?php endif ?> + + <div class="page-header" id="remember-me"> + <h2><?= t('Persistent connections') ?></h2> + </div> + <?php if (empty($remember_me_sessions)): ?> + <p class="alert alert-info"><?= t('No session') ?></p> + <?php else: ?> + <table class="table-small table-hover"> + <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($remember_me_sessions as $session): ?> + <tr> + <td><?= dt('%B %e, %G at %k:%M %p', $session['date_creation']) ?></td> + <td><?= dt('%B %e, %G at %k:%M %p', $session['expiration']) ?></td> + <td><?= Helper\escape($session['ip']) ?></td> + <td><?= Helper\escape($session['user_agent']) ?></td> + <td><a href="?controller=config&action=removeRememberMeToken&id=<?= $session['id'] ?>"><?= t('Remove') ?></a></td> + </tr> + <?php endforeach ?> + </table> + <?php endif ?> </section> |