1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-18 18:36:00 +01:00
vichan/templates/mod/user.html

126 lines
3.7 KiB
HTML
Raw Normal View History

2012-05-05 17:33:10 +02:00
{% if new %}
{% set action = '?/users/new' %}
{% else %}
{% set action = '?/users/' ~ user.id %}
{% endif %}
<form action="{{ action }}" method="post">
2013-09-23 08:48:56 +02:00
<input type="hidden" name="token" value="{{ token }}">
2012-04-16 15:18:07 +02:00
<table>
<tr>
2012-05-05 17:33:10 +02:00
<th>{% trans 'Username' %}</th>
2012-04-16 15:18:07 +02:00
<td>
2012-05-05 17:33:10 +02:00
{% if new or mod|hasPermission(config.mod.editusers) %}
2012-04-16 15:18:07 +02:00
<input size="20" maxlength="30" type="text" name="username" value="{{ user.username|e }}" autocomplete="off">
{% else %}
{{ user.username|e }}
{% endif %}
</td>
</tr>
<tr>
2012-05-05 17:33:10 +02:00
<th>{% trans 'Password' %}{% if not new %} <small style="font-weight:normal">({% trans 'new; optional' %})</small>{% endif %}</th>
2012-04-16 15:18:07 +02:00
<td>
2012-05-05 17:33:10 +02:00
{% if new or (mod|hasPermission(config.mod.editusers) or (mod|hasPermission(config.mod.change_password) and user.id == mod.id)) %}
2012-04-16 15:18:07 +02:00
<input size="20" maxlength="30" type="password" name="password" value="" autocomplete="off">
{% else %}
-
{% endif %}
</td>
</tr>
2012-05-05 17:33:10 +02:00
{% if new %}
<tr>
<th>{% trans 'Group' %}</th>
2012-05-05 17:33:10 +02:00
<td>
<ul style="padding:5px 8px;list-style:none">
2023-03-29 23:59:28 +02:00
{% for group_value, group_name in config.mod.groups %}
{% if group_name != 'Disabled' %}
<li>
<input type="radio" name="type" id="group_{{ group_name }}" value="{{ group_value }}">
<label for="group_{{ group_name }}">{{ group_name|trans }}</label>
2023-03-29 23:59:28 +02:00
</li>
{% endif %}
{% endfor %}
2012-05-05 17:33:10 +02:00
</ul>
</td>
</tr>
{% endif %}
2012-04-16 15:18:07 +02:00
<tr>
2012-05-05 17:33:10 +02:00
<th>{% trans 'Boards' %}</th>
2012-04-16 15:18:07 +02:00
<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 %}
>
2012-05-05 17:33:10 +02:00
<label for="allboards">"*" - {% trans 'All boards' %}</label>
2012-04-16 15:18:07 +02:00
</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) }}
-
2012-05-05 17:33:10 +02:00
{{ board.title|e }}
2012-04-16 15:18:07 +02:00
</label>
</li>
{% endfor %}
</ul>
</td>
</tr>
</table>
2012-05-05 17:33:10 +02:00
<ul style="padding:0;text-align:center;list-style:none">
{% if new %}
<li><input type="submit" value="{% trans 'Create user' %}"></li>
{% else %}
<li><input type="submit" value="{% trans 'Save changes' %}"></li>
{% if mod|hasPermission(config.mod.deleteusers) %}
<li><input name="delete" onclick="return confirm('Are you sure you want to permanently delete this user?');" type="submit" value="{% trans 'Delete user' %}"></li>
{% endif %}
2012-04-16 15:18:07 +02:00
{% endif %}
</ul>
</form>
2023-03-29 23:59:28 +02:00
{% if logs and logs|length > 0 %}
2012-04-16 15:18:07 +02:00
<table class="modlog" style="width:600px">
<tr>
2012-05-05 17:33:10 +02:00
<th>{% trans 'IP address' %}</th>
<th>{% trans 'Time' %}</th>
<th>{% trans 'Board' %}</th>
<th>{% trans 'Action' %}</th>
2012-04-16 15:18:07 +02:00
</tr>
{% for log in logs %}
<tr>
<td class="minimal">
2021-02-13 14:11:41 +01:00
<a href="?/IP/{{ log.ip|cloak_ip }}">{{ log.ip|cloak_ip }}</a>
2012-04-16 15:18:07 +02:00
</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>
2012-08-27 14:13:47 +02:00
<p style="text-align:center" class="unimportant">
<a href="?/log:{{ user.username|e }}">{% trans 'View more logs for this user.' %}</a>
</p>
2012-04-16 15:18:07 +02:00
{% endif %}
2012-05-05 17:33:10 +02:00