aboutsummaryrefslogtreecommitdiff
path: root/cgi/templates/manage/staff.html
blob: b0d2e9ee27785ee6afb3baf37a9ccf2a2502c71d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?py include('templates/base_top.html') ?>
<?py include('templates/manage/menu.html') ?>
<?py from tenjin.helpers.html import * ?>
<center>
<div class="replymode">Staff</div>
<?py if mode == 0: ?>
  <table class="managertable">
  <tr>
    <th>ID</th>
    <th>Nombre</th>
    <th>Nivel</th>
    <th>Última actividad</th>
    <th>Acciones</th>
  </tr>
  <?py for member in staff: ?>
  <tr>
    <td>${member['id']}</td>
    <td><b>${member['username']}</b></td>
    <td>${member['rights']}</td>
    <td class="date" data-unix="${member['lastactivestamp']}">${member['lastactive']}</td>
    <td>
      [<a href="#{cgi_url}manage/staff/edit/#{member['id']}">Editar</a>]
      [<a href="#{cgi_url}manage/staff/delete/#{member['id']}">Eliminar</a>]
    </td>
  </tr>
  <?py #endfor ?>
  <tr>
    <td colspan="5"><form action="#{cgi_url}manage/staff/add" method="get"><input type="submit" style="width:100%;" value="Agregar miembro" /></form></td>
  </tr>
  </table>
<?py elif mode == 1: ?>
<form action="#{cgi_url}manage/staff/#{action}" method="post">
<table>
  <tr>
    <td class="postblock">Nombre</td>
    <td><input type="text" name="user" value="${member_username}" style="width:100%;" /></td>
  </tr>
  <?py if not member: ?>
  <tr>
    <td class="postblock">Contraseña</td>
    <td><input type="password" name="pass" style="width:100%;"/></td>
  </tr>
  <?py #endif ?>
  <tr>
    <td class="postblock">Nivel</td>
    <td>
    <select name="rights" style="width:100%;">
      <option value="3"#{selected(member_rights == '3')}>Moderador</option>
      <option value="2"#{selected(member_rights == '2')}>Developer</option>
      <option value="1"#{selected(member_rights == '1')}>Administrador</option>
      <option value="0"#{selected(member_rights == '0')}>Super-Administrador</option>
    </select>
    </td>
  </tr>
  <tr>
    <td colspan="2"><input type="submit" name="submit" style="width:100%;" value="${submit}"/></td>
  </tr>
</table>
</form>
<?py #endif ?>
</center>
<hr />
<?py include('templates/base_bottom.html') ?>