1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

Merge pull request #702 from Zankaria/show-ban-id2

Show ban id on ban page.
This commit is contained in:
Lorenzo Yario 2024-03-27 18:10:52 -07:00 committed by GitHub
commit c5ca05185f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,8 +29,8 @@
</p> </p>
{% endif %} {% endif %}
<p> <p>
{% trans %}Your ban was filed on{% endtrans %} {% trans %}Your ban was filed on{% endtrans %}
<strong>{{ ban.created|date(config.ban_date) }}</strong> <strong>{{ ban.created|date(config.ban_date) }}</strong>
{% if config.show_modname %} {% if config.show_modname %}
{% if ban.username %} {% if ban.username %}
{% trans %}by{% endtrans %} <strong> {{ ban.username }} </strong> {% trans %}by{% endtrans %} <strong> {{ ban.username }} </strong>
@ -38,11 +38,11 @@
{% trans %}by{% endtrans %} <em> 'system' </em> {% trans %}by{% endtrans %} <em> 'system' </em>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% trans %}and{% endtrans %} <span id="expires"> {% trans %}and{% endtrans %} <span id="expires">
{% if ban.expires and time() >= ban.expires %} {% if ban.expires and time() >= ban.expires %}
{% trans %} has since expired. Refresh the page to continue.{% endtrans %} {% trans %} has since expired. Refresh the page to continue.{% endtrans %}
{% elseif ban.expires %} {% elseif ban.expires %}
{% trans %}expires{% endtrans %} <span id="countdown">{{ ban.expires|until }}</span> {% trans %}from now, which is on{% endtrans %} {% trans %}expires{% endtrans %} <span id="countdown">{{ ban.expires|until }}</span> {% trans %}from now, which is on{% endtrans %}
<strong> <strong>
{{ ban.expires|date(config.ban_date) }} {{ ban.expires|date(config.ban_date) }}
</strong> </strong>
@ -74,7 +74,7 @@
} }
} }
var countdown = document.getElementById("countdown"); var countdown = document.getElementById("countdown");
updateExpiresTime(); updateExpiresTime();
var int = setInterval(updateExpiresTime, 1000); var int = setInterval(updateExpiresTime, 1000);
</script> </script>
@ -84,30 +84,31 @@
</span> </span>
</p> </p>
<p>{% trans %}Your IP address is{% endtrans %} <strong>{{ ban.ip }}</strong>.</p> <p>{% trans %}Your IP address is{% endtrans %} <strong>{{ ban.ip }}</strong>.</p>
<p>{% trans %}Your ban ID is{% endtrans %} <strong>{{ ban.id }}</strong>.</p>
{% if config.ban_page_extra %} {% if config.ban_page_extra %}
<p>{{ config.ban_page_extra }}</p> <p>{{ config.ban_page_extra }}</p>
{% endif %} {% endif %}
{% if post and config.ban_show_post %} {% if post and config.ban_show_post %}
<hr> <hr>
<p>{% trans %}You were banned for the following post on{% endtrans %} {{ board.url }}:</p> <p>{% trans %}You were banned for the following post on{% endtrans %} {{ board.url }}:</p>
{{ post }} {{ post }}
<br> <br>
{% endif %} {% endif %}
{% if config.ban_appeals and (not ban.expires or ban.expires - ban.created > config.ban_appeals_min_length )%} {% if config.ban_appeals and (not ban.expires or ban.expires - ban.created > config.ban_appeals_min_length )%}
<hr> <hr>
{% if pending_appeal %} {% if pending_appeal %}
<p> <p>
{% trans %}You submitted an appeal for this ban on{% endtrans %} {% trans %}You submitted an appeal for this ban on{% endtrans %}
<strong>{{ pending_appeal|date(config.ban_date) }}</strong>. {% trans %}It is still pending{% endtrans %}. <strong>{{ pending_appeal|date(config.ban_date) }}</strong>. {% trans %}It is still pending{% endtrans %}.
</p> </p>
{% elseif denied_appeals|length >= config.ban_appeals_max %} {% elseif denied_appeals|length >= config.ban_appeals_max %}
{% if denied_appeals|length == 1 %} {% if denied_appeals|length == 1 %}
<p> <p>
{% trans %}You appealed this ban on{% endtrans %} {% trans %}You appealed this ban on{% endtrans %}
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong> <strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
{% trans %}and it was denied. You may not appeal this ban again.{% endtrans %} {% trans %}and it was denied. You may not appeal this ban again.{% endtrans %}
</p> </p>
{% else %} {% else %}
@ -117,15 +118,15 @@
{% if denied_appeals|length %} {% if denied_appeals|length %}
{% if denied_appeals|length == 1 %} {% if denied_appeals|length == 1 %}
<p> <p>
{% trans %}You appealed this ban on{% endtrans %} {% trans %}You appealed this ban on{% endtrans %}
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong> <strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
{% trans %}and it was denied.{% endtrans %} {% trans %}and it was denied.{% endtrans %}
</p> </p>
<p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p> <p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p>
{% else %} {% else %}
<p> <p>
{% trans %}You last appealed this ban on{% endtrans %} {% trans %}You last appealed this ban on{% endtrans %}
<strong>{{ denied_appeals[denied_appeals|length - 1]|date(config.ban_date) }}</strong> <strong>{{ denied_appeals[denied_appeals|length - 1]|date(config.ban_date) }}</strong>
{% trans %}and it was denied.{% endtrans %} {% trans %}and it was denied.{% endtrans %}
</p> </p>
<p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p> <p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p>