prepare release 0.6.2
[grauphel.git] / templates / tokens.php
1 <link rel="stylesheet" href="<?php p(OCP\Util::linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
2
3 <?php /** @var $l OC_L10N */ ?>
4 <?php $_['appNavigation']->printPage(); ?>
5
6 <script type="text/javascript" src="<?php p(OCP\Util::linkTo('grauphel','js/grauphel.js')); ?>"></script>
7
8 <div id="app-content" class="list">
9   <div id="searchresults" class="hidden"></div>
10   <h1>Manage access tokens</h1>
11   <p>
12     Here you see which applications have access to the notes.
13     You can permanently revoke access by clicking the "delete" icon on the right
14     side of each token row.
15   </p>
16   <table class="table" id="grauphel-tokens">
17    <thead>
18     <tr>
19      <th>Token</th>
20      <th>Client</th>
21      <th>Last use</th>
22     </tr>
23    </thead>
24    <tbody>
25     <?php foreach ($_['tokens'] as $token) { ?>
26       <tr id="token-<?php p($token->tokenKey); ?>">
27        <td><?php p($token->tokenKey); ?></td>
28        <td title="<?php p($token->client); ?>"><?php p($_['client']->getNiceName($token->client)); ?></td>
29        <td>
30         <?php p(\OCP\Util::formatDate($token->lastuse)); ?>
31         <form method="POST" action="<?php p(OCP\Util::linkToRoute('grauphel.token.delete', array('username' => $_['username'], 'tokenKey' => $token->tokenKey))); ?>">
32            <input type="hidden" name="delete" value="1" />
33            <button type="submit" class="icon-delete delete action"
34                    original-title="Delete"
35                    data-token="token-<?php p($token->tokenKey); ?>"
36            />
37         </form>
38        </td>
39       </tr>
40     <?php } ?>
41    </tbody>
42  </table>
43 </div>