From a9b7f9b1bc88b196a165ebb1bb74d01081d1e6fd Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sat, 21 Sep 2013 12:51:23 +1000 Subject: begin implementation of in-built ban appealing --- templates/banned.html | 56 +++++++++++++++++++--- templates/mod/ban_appeals.html | 106 +++++++++++++++++++++++++++++++++++++++++ templates/mod/dashboard.html | 3 ++ 3 files changed, 159 insertions(+), 6 deletions(-) create mode 100644 templates/mod/ban_appeals.html (limited to 'templates') diff --git a/templates/banned.html b/templates/banned.html index 79648156..666521a4 100644 --- a/templates/banned.html +++ b/templates/banned.html @@ -77,16 +77,60 @@

{% trans %}Your IP address is{% endtrans %} {{ ban.ip }}.

- {% if post %} + {% if config.ban_page_extra %} +

{{ config.ban_page_extra }}

+ {% endif %} + + {% if post and config.ban_show_post %}
-

You were banned for the following post on {{ board.url }}:

+

{% trans %}You were banned for the following post on {% endtrans %}{{ board.url }}:

{{ post }}
{% endif %} - {% if config.ban_page_extra %} -

{{ config.ban_page_extra }}

+ {% if config.ban_appeals %} +
+ {% if pending_appeal %} +

+ {% trans %}You submitted an appeal for this ban on{% endtrans %} + {{ pending_appeal|date(config.ban_date) }}. {% trans %}It is still pending{% endtrans %}. +

+ {% elseif denied_appeals|length >= config.ban_appeals_max %} + {% if denied_appeals|length == 1 %} +

+ {% trans %}You appealed this ban on{% endtrans %} + {{ denied_appeals[0]|date(config.ban_date) }} + {% trans %}and it was denied. You may not appeal this ban again.{% endtrans %} +

+ {% else %} +

{% trans %}You have submitted the maximum number of ban appeals allowed. You may not appeal this ban again.{% endtrans %}

+ {% endif %} + {% else %} + {% if denied_appeals|length %} + {% if denied_appeals|length == 1 %} +

+ {% trans %}You appealed this ban on{% endtrans %} + {{ denied_appeals[0]|date(config.ban_date) }} + {% trans %}and it was denied.{% endtrans %} +

+

{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}

+ {% else %} +

+ {% trans %}You last appealed this ban on{% endtrans %} + {{ denied_appeals[denied_appeals|length - 1]|date(config.ban_date) }} + {% trans %}and it was denied.{% endtrans %} +

+

{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}

+ {% endif %} + {% else %} +

{% trans %}You may appeal this ban. Please enter your reasoning below.{% endtrans %}

+ {% endif %} +
+ + + +
+ {% endif %} {% endif %} -{% endfilter %} - +{% endfilter %} \ No newline at end of file diff --git a/templates/mod/ban_appeals.html b/templates/mod/ban_appeals.html new file mode 100644 index 00000000..f43b7db5 --- /dev/null +++ b/templates/mod/ban_appeals.html @@ -0,0 +1,106 @@ +{% for ban in ban_appeals %} + +
+ + + + + + {% if mod|hasPermission(config.mod.show_ip, board.uri) %} + + + + + {% endif %} + + + + + + + + + + + + + + + + + + + + + + + + +
{% trans 'Status' %} + {% if config.mod.view_banexpired and ban.expires != 0 and ban.expires < time() %} + {% trans 'Expired' %} + {% else %} + {% trans 'Active' %} + {% endif %} +
{% trans 'IP' %}{{ ban.mask }}
{% trans 'Reason' %} + {% if ban.reason %} + {{ ban.reason }} + {% else %} + {% trans 'no reason' %} + {% endif %} +
{% trans 'Board' %} + {% if ban.board %} + {{ config.board_abbreviation|sprintf(ban.board) }} + {% else %} + {% trans 'all boards' %} + {% endif %} +
{% trans 'Set' %}{{ ban.created|date(config.post_date) }}
{% trans 'Expires' %} + {% if ban.expires %} + {{ ban.expires|date(config.post_date) }} + {% else %} + {% trans 'never' %} + {% endif %} +
{% trans 'Seen' %} + {% if ban.seen %} + {% trans 'Yes' %} + {% else %} + {% trans 'No' %} + {% endif %} +
{% trans 'Staff' %} + {% if ban.username %} + {{ ban.username|e }} + {% else %} + {% trans 'deleted?' %} + {% endif %} +
+ + + + + + + + + + + {% if mod|hasPermission(config.mod.ban_appeals, board.uri) %} + + + + + {% endif %} +
{% trans 'Appeal time' %}{{ ban.time|date(config.post_date) }}
{% trans 'Appeal reason' %}{{ ban.message|e }}
{% trans 'Action' %} + + + +
+ + {% if ban.post %} +
+ {{ ban.post.build(true) }} +
+ {% endif %} +
+
+ +{% endfor %} \ No newline at end of file diff --git a/templates/mod/dashboard.html b/templates/mod/dashboard.html index e2f7507d..916f0c03 100644 --- a/templates/mod/dashboard.html +++ b/templates/mod/dashboard.html @@ -86,6 +86,9 @@ {% if mod|hasPermission(config.mod.view_banlist) %}
  • {% trans 'Ban list' %}
  • {% endif %} + {% if config.ban_appeals and mod|hasPermission(config.mod.view_ban_appeals) %} +
  • {% trans 'Ban appeals' %}
  • + {% endif %} {% if mod|hasPermission(config.mod.manageusers) %}
  • {% trans 'Manage users' %}
  • {% elseif mod|hasPermission(config.mod.change_password) %} -- cgit v1.3