From e62b83e79c8ed3b9ddf6e7e4b8bdeedc0d319ff4 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sat, 20 Jul 2013 07:50:33 -0400 Subject: Bring back search (searching posts not implemented yet) --- templates/mod/search_results.html | 129 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 templates/mod/search_results.html (limited to 'templates/mod/search_results.html') diff --git a/templates/mod/search_results.html b/templates/mod/search_results.html new file mode 100644 index 00000000..84de8969 --- /dev/null +++ b/templates/mod/search_results.html @@ -0,0 +1,129 @@ +
+ {% trans 'Search' %} + + +
+ +

Showing {{ result_count }} result{% if result_count != 1 %}s{% endif %}.

+ +{% if search_type == 'IP_notes' %} + + + + + + + + {% for note in results %} + + + + + + + {% endfor %} +
{% trans 'IP address' %}{% trans 'Staff' %}{% trans 'Note' %}{% trans 'Date' %}
+ {{ note.ip }} + + {% if note.username %} + {{ note.username|e }} + {% else %} + {% trans 'deleted?' %} + {% endif %} + + {{ note.body }} + + {{ note.time|date(config.post_date) }} +
+{% endif %} + + +{% if search_type == 'bans' %} + + + + + + + + + + + + {% for ban in results %} + + + + + + + + + + + {% endfor %} +
{% trans 'IP address/mask' %}{% trans 'Reason' %}{% trans 'Board' %}{% trans 'Set' %}{% trans 'Duration' %}{% trans 'Expires' %}{% trans 'Seen' %}{% trans 'Staff' %}
+ {% if ban.real_ip %} + {{ ban.ip }} + {% else %} + {{ ban.ip|e }} + {% endif %} + + {% if ban.reason %} + {{ ban.reason }} + {% else %} + - + {% endif %} + + {% if ban.board %} + {{ config.board_abbreviation|sprintf(ban.board) }} + {% else %} + {% trans 'all boards' %} + {% endif %} + + + {{ ban.set|ago }} ago + + + {% if ban.expires == 0 %} + - + {% else %} + {{ (ban.expires - ban.set + time()) | until }} + {% endif %} + + {% if ban.expires == 0 %} + {% trans 'never' %} + {% else %} + {{ ban.expires|date(config.post_date) }} + {% if ban.expires > time() %} + (in {{ ban.expires|until }}) + {% endif %} + {% endif %} + + {% if ban.seen %} + {% trans 'Yes' %} + {% else %} + {% trans 'No' %} + {% endif %} + + {% if ban.username %} + {% if mod|hasPermission(config.mod.view_banstaff) %} + {{ ban.username|e }} + {% else %} + {% if mod|hasPermission(config.mod.view_banquestionmark) %} + ? + {% else %} + + {% endif %} + {% endif %} + {% elseif ban.mod == -1 %} + system + {% else %} + {% trans 'deleted?' %} + {% endif %} +
+{% endif %} \ No newline at end of file -- cgit v1.3