2022-02-10 20:35:16 +00:00
|
|
|
{% extends "default.html" %}
|
2022-11-21 08:52:22 +00:00
|
|
|
{% block pagetitle %}/h/{{sub}} Mods{% endblock %}
|
2022-02-10 20:35:16 +00:00
|
|
|
{% block content %}
|
2022-11-07 06:32:30 +00:00
|
|
|
|
2022-12-29 14:20:27 +00:00
|
|
|
<script defer src="{{'js/remove_mod.js' | asset}}"></script>
|
2022-11-07 06:32:30 +00:00
|
|
|
|
2022-10-29 00:38:39 +00:00
|
|
|
<h5 class="mt-2">/h/{{sub}} Mods</h5>
|
|
|
|
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
|
2022-02-10 20:35:16 +00:00
|
|
|
<thead class="bg-primary text-white">
|
|
|
|
<tr>
|
2022-02-24 12:03:28 +00:00
|
|
|
<th>#</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Mod since</th>
|
2023-02-24 21:55:01 +00:00
|
|
|
<th class="disable-sort-click"></th>
|
2022-02-10 20:35:16 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2022-02-11 23:32:14 +00:00
|
|
|
{% for user, mod in users %}
|
2022-02-10 20:35:16 +00:00
|
|
|
<tr>
|
2022-02-24 12:03:28 +00:00
|
|
|
<td>{{loop.index}}</td>
|
2022-09-05 03:01:06 +00:00
|
|
|
<td>{% include "user_in_table.html" %}</td>
|
2022-07-03 07:41:25 +00:00
|
|
|
<td data-time="{{mod.created_utc}}"></td>
|
2022-02-11 23:32:14 +00:00
|
|
|
<td>
|
2022-02-12 19:33:34 +00:00
|
|
|
{% if v.id == user.id or v.mod_date(sub.name) and v.mod_date(sub.name) < mod.created_utc %}
|
2022-12-30 12:52:59 +00:00
|
|
|
<form action="/h/{{sub}}/remove_mod" method="post" data-nonce="{{g.nonce}}" data-onsubmit="removeMod(this)">
|
2023-01-24 05:10:16 +00:00
|
|
|
<input hidden name="formkey" value="{{v|formkey}}">
|
|
|
|
<input hidden name="uid" value="{{user.id}}">
|
2023-03-07 00:21:08 +00:00
|
|
|
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="{% if v.id == user.id %}Resign{% else %}Remove Mod{% endif %}">
|
2022-02-11 23:32:14 +00:00
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2022-02-10 20:35:16 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2022-02-12 19:33:34 +00:00
|
|
|
{% if v.mods(sub.name) %}
|
2022-09-12 05:25:04 +00:00
|
|
|
<form action="/h/{{sub}}/add_mod" method="post">
|
2023-01-24 05:10:16 +00:00
|
|
|
<input hidden name="formkey" value="{{v|formkey}}">
|
2022-03-04 18:19:43 +00:00
|
|
|
<input class="form-control" style="display:inline;width:250px" autocomplete="off" type="text" name="user" class="form-control" placeholder="Enter username..">
|
2023-03-07 00:21:08 +00:00
|
|
|
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add Mod" style="margin-bottom: 5px">
|
2022-02-10 20:35:16 +00:00
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
|
2022-10-29 00:38:39 +00:00
|
|
|
{% endblock %}
|