Bug 20568: API keys management in interface
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-apikeys.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your library home
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% BLOCK cssinclude %][% END %]
5 </head>
6 [% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %]
7 [% INCLUDE 'masthead.inc' %]
8
9 <div class="main">
10     <ul class="breadcrumb">
11         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
12         <li>
13           <a href="/cgi-bin/koha/opac-user.pl">
14             [% INCLUDE 'patron-title.inc' category_type = borrower.category_type firstname = borrower.firstname surname = borrower.surname othernames = borrower.othernames %]
15           </a>
16           <span class="divider">&rsaquo;</span>
17         </li>
18         <li><a href="/cgi-bin/koha/opac-apikeys.pl">Your API keys</a></li>
19     </ul>
20
21     <div class="container-fluid">
22         <div class="row-fluid">
23             <div class="span2">
24                 <div id="navigation">
25                     [% INCLUDE 'navigation.inc' IsPatronPage = 1 %]
26                 </div>
27             </div>
28             <div class="span10">
29                 <div id="apikeys" class="maincontent">
30                   <h1>Your API keys</h1>
31                   <div>
32                     <form action="/cgi-bin/koha/opac-apikeys.pl" method="post">
33                       <input type="hidden" name="op" value="generate">
34                       <input type="submit" value="Generate new key">
35                     </form>
36                   </div>
37                   [% IF api_keys.size > 0 %]
38                     <table class="table table-bordered table-striped">
39                       <thead>
40                         <tr>
41                           <th>Key</th>
42                           <th>Active</th>
43                           <th>Actions</th>
44                         </tr>
45                       </thead>
46                       <tbody>
47                         [% FOREACH key IN api_keys %]
48                           <tr>
49                             <td>[% key.api_key %]</td>
50                             <td>[% IF key.active %]Yes[% ELSE %]No[% END %]</td>
51                             <td>
52                               <form action="/cgi-bin/koha/opac-apikeys.pl" method="post" class="form-inline">
53                                 <input type="hidden" name="key" value="[% key.api_key %]">
54                                 <input type="hidden" name="op" value="delete">
55                                 <input type="submit" value="Delete">
56                               </form>
57                               <form action="/cgi-bin/koha/opac-apikeys.pl" method="post" class="form-inline">
58                                 <input type="hidden" name="key" value="[% key.api_key %]">
59                                 [% IF key.active %]
60                                   <input type="hidden" name="op" value="revoke">
61                                   <input type="submit" value="Revoke">
62                                 [% ELSE %]
63                                   <input type="hidden" name="op" value="activate">
64                                   <input type="submit" value="Activate">
65                                 [% END %]
66                               </form>
67                             </td>
68                           </tr>
69                         [% END %]
70                       </tbody>
71                     </table>
72                   [% END %]
73                 </div> <!-- /#apikeys -->
74             </div> <!-- /.span10 -->
75         </div> <!-- /.row-fluid -->
76     </div> <!-- /.container-fluid -->
77 </div> <!-- /#main -->
78
79 [% BLOCK jsinclude %][% END %]
80 [% INCLUDE 'opac-bottom.inc' %]