rDrama/files/templates/sub/mods.html

45 lines
1.7 KiB
HTML
Raw Normal View History

2022-02-10 20:35:16 +00:00
{% extends "default.html" %}
{% block content %}
<pre>
</pre>
<h5>/s/{{sub.name}} Mods</h5>
<pre></pre>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
2022-02-24 12:03:28 +00:00
<th>#</th>
<th>Name</th>
<th>Mod since</th>
<th></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>
<td><a style="color:#{{user.namecolor}}" href="/@{{user.username}}"><img loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
<td>{{mod.created_datetime}}</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-02-11 23:32:14 +00:00
<form action="/s/{{sub.name}}/remove_mod" method="post">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}" >
<input autocomplete="off" type="hidden" name="uid" value="{{user.id}}">
2022-02-12 19:33:34 +00:00
<input class="btn btn-primary" style="margin-top:-5px" 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-02-10 20:35:16 +00:00
<form action="/s/{{sub.name}}/add_mod" method="post">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}" >
<input class="form-control" style="display:inline;width:25%" autocomplete="off" type="text" name="user" class="form-control" placeholder="Enter username..">
<input class="btn btn-primary" style="margin-top:-5px" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add Mod">
</form>
{% endif %}
{% endblock %}