2023-09-08 17:07:38 +00:00
{% extends "settings2.html" %}
2022-11-21 08:52:22 +00:00
{% block pagetitle %}Alts{% if u %} for @{{u.username}}{% endif %}{% endblock %}
2022-11-14 17:32:13 +00:00
{% block content %}
{% if u %}
< h5 class = "mt-3" > Alts for < a href = "/@{{u.username}}" > @{{u.username}}< / a > < / h5 >
{% else %}
< h5 class = "mt-3" > Alts< / h5 >
{% endif %}
< section class = "username-input-section mb-3" >
< form action = "/admin/alts" method = "get" >
< label for = "link-input" > Username< / label >
< input autocomplete = "off" id = "link-input" type = "text" class = "form-control mb-2" name = "username" value = "{{u.username if u else ''}}" placeholder = "Username" >
2023-03-07 00:21:08 +00:00
< input type = "submit" value = "Submit" class = "btn btn-primary" >
2022-11-14 17:32:13 +00:00
< / form >
< / section >
{% if u %}
{% set count=alts|length %}
< section class = "userinfo-section" >
2022-11-16 09:25:50 +00:00
< p > < a href = "/@{{u.username}}" > @{{u.username}}< / a > created their account {{u.created_utc|timestamp}} and has {{count}} known alt{{macros.plural(count)}}.< br >
2023-10-05 09:44:42 +00:00
They are {% if not u.is_permabanned %}not {% endif %}permanently banned{% if v.can_see_shadowbanned %} and they are {% if not u.shadowbanned %}not {% endif %}shadowbanned{% endif %}.< / p >
2022-11-14 17:32:13 +00:00
< / section >
< div class = "overflow-x-auto" >
< table class = "table table-striped mb-5" >
< thead class = "bg-primary text-white" >
< tr >
< th > #< / th >
< th > Name< / th >
2023-02-06 02:07:39 +00:00
< th class = "disable-sort-click" > Account Created< / th >
2022-11-14 17:32:13 +00:00
< th > Manual< / th >
2023-02-06 02:07:39 +00:00
< th class = "disable-sort-click" > Actions< / th >
2022-11-14 17:32:13 +00:00
< / tr >
< / thead >
{% for user in alts %}
< tr >
< td > {{loop.index}}< / td >
2022-11-27 17:13:23 +00:00
< td > {% include "user_in_table.html" %}< / td >
2022-11-14 17:32:13 +00:00
< td > {{user.created_utc|timestamp}}< / td >
< td > {{user._is_manual}}< / td >
< td >
2023-02-18 14:55:18 +00:00
< button type = "button" id = "delink-alt-{{u.id}}-{{user.id}}" class = "btn btn-danger" data-nonce = "{{g.nonce}}" data-onclick = "delink(this,'/@{{u.username}}/alts/{{user.id}}/deleted')" > Delink< / button >
2022-11-14 17:32:13 +00:00
< a class = "btn btn-secondary" href = "/@{{user.username}}/alts" > Alts< / a >
{% if v.admin_level >= PERMS['VIEW_ALT_VOTES'] %}
< a class = "btn btn-secondary" href = "/admin/alt_votes/?u1={{u.username}}&u2={{user.username}}" > Alt Votes< / a >
{% endif %}
< / td >
< / tr >
{% endfor %}
< / table >
< / div >
< section id = "add-alt" class = "rounded rounded-section p-3" >
< h5 > Add Alt< / h5 >
2023-02-18 14:55:18 +00:00
< p > This tool allows you to link an alt.< / p >
2022-12-30 12:52:59 +00:00
< label for = "link-input-other" > Other Username< / label >
< input autocomplete = "off" id = "link-input-other" type = "text" class = "form-control mb-2" name = "other_username" placeholder = "Other Username" >
2023-02-18 14:55:18 +00:00
< button id = "add-alt-form-link" class = "btn btn-danger mr-3" data-areyousure = "submitAddAlt(this, '{{u.username}}')" data-nonce = "{{g.nonce}}" data-onclick = "areyousure(this)" > Add Alt< / button >
2022-11-14 17:32:13 +00:00
< / section >
{% endif %}
2022-12-29 14:20:27 +00:00
< script defer src = "{{'js/admin/alts.js' | asset}}" > < / script >
2022-11-14 17:32:13 +00:00
{% endblock %}