diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-04-16 23:18:07 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-04-16 23:18:07 +1000 |
| commit | a340c5b6eec89d0e023fc606081ec857f44a0b3d (patch) | |
| tree | 4427353889ff6b705bc581a856b76651ea01f313 /templates | |
| parent | 93553303b28d21cd2c55aaffc5a5831b6ccaf5c0 (diff) | |
edit users
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/mod/log.html | 2 | ||||
| -rw-r--r-- | templates/mod/user.html | 93 |
2 files changed, 94 insertions, 1 deletions
diff --git a/templates/mod/log.html b/templates/mod/log.html index 61243202..19924b1d 100644 --- a/templates/mod/log.html +++ b/templates/mod/log.html @@ -2,7 +2,7 @@ <tr> <th>Staff</th> <th>IP address</th> - <th>Ago</th> + <th>Time</th> <th>Board</th> <th>Action</th> </tr> diff --git a/templates/mod/user.html b/templates/mod/user.html new file mode 100644 index 00000000..87a57d92 --- /dev/null +++ b/templates/mod/user.html @@ -0,0 +1,93 @@ +<form action="?/users/{{ mod.id }}" method="post"> + <table> + <tr> + <th>Username</th> + <td> + {% if mod|hasPermission(config.mod.editusers) %} + <input size="20" maxlength="30" type="text" name="username" value="{{ user.username|e }}" autocomplete="off"> + {% else %} + {{ user.username|e }} + {% endif %} + </td> + </tr> + <tr> + <th>Password <small style="font-weight:normal">(new; optional)</small></th> + <td> + {% if mod|hasPermission(config.mod.editusers) or (mod|hasPermission(config.mod.change_password) and user.id == mod.id) %} + <input size="20" maxlength="30" type="password" name="password" value="" autocomplete="off"> + {% else %} + - + {% endif %} + </td> + </tr> + <tr> + <th>Boards</th> + <td> + <ul style="padding:0 5px;list-style:none"> + <li> + <input type="checkbox" id="allboards" name="allboards" + {% if '*' in user.boards %} checked{% endif %} + {% if not mod|hasPermission(config.mod.editusers) %} + disabled + {% endif %} + > + <label for="allboards">"*" - All boards</label> + </li> + {% for board in boards %} + <li> + <input type="checkbox" id="board_{{ board.uri }}" name="board_{{ board.uri }}" + {% if board.uri in user.boards %} checked{% endif %} + {% if not mod|hasPermission(config.mod.editusers) %} + disabled + {% endif %} + > + <label for="board_{{ board.uri }}"> + {{ config.board_abbreviation|sprintf(board.uri) }} + - + {{ board.title }} + </label> + </li> + {% endfor %} + </ul> + </td> + </tr> + </table> + + <ul style="padding:0;text-align:center"> + <li><input type="submit" value="Save changes"></li> + {% if mod|hasPermission(config.mod.deleteusers) %} + <li><input type="submit" value="Delete user"></li> + {% endif %} + </ul> +</form> + +{% if logs|count > 0 %} + <table class="modlog" style="width:600px"> + <tr> + <th>IP address</th> + <th>Time</th> + <th>Board</th> + <th>Action</th> + </tr> + {% for log in logs %} + <tr> + <td class="minimal"> + <a href="?/IP/{{ log.ip }}">{{ log.ip }}</a> + </td> + <td class="minimal"> + <span title="{{ log.time|date(config.post_date) }}">{{ log.time|ago }}</span> + </td> + <td class="minimal"> + {% if log.board %} + <a href="?/{{ config.board_path|sprintf(log.board) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(log.board) }}</a> + {% else %} + - + {% endif %} + </td> + <td> + {{ log.text }} + </td> + </tr> + {% endfor %} + </table> +{% endif %} |
