diff options
| author | Marcin Łabanowski <marcin@6irc.net> | 2013-01-26 15:08:48 +0100 |
|---|---|---|
| committer | Marcin Łabanowski <marcin@6irc.net> | 2013-01-26 15:08:48 +0100 |
| commit | e6b9bad788a6d9ae5f203b999925b9368a77536c (patch) | |
| tree | 5d63bffd2418701b8f703050c9f289da74c0be35 /templates | |
| parent | 9b7b1c996f8800efc533dd11a82dffcefdeb726e (diff) | |
| parent | db1b50cfc3a7f3b45891b0ff69db4892b0e6929e (diff) | |
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts:
mod.php
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/mod/debug/antispam.html | 42 | ||||
| -rw-r--r-- | templates/mod/debug/recent_posts.html | 89 | ||||
| -rw-r--r-- | templates/mod/debug/sql.html | 26 | ||||
| -rw-r--r-- | templates/mod/edit_post_form.html | 10 |
4 files changed, 166 insertions, 1 deletions
diff --git a/templates/mod/debug/antispam.html b/templates/mod/debug/antispam.html index a846bc17..95aa61a6 100644 --- a/templates/mod/debug/antispam.html +++ b/templates/mod/debug/antispam.html @@ -1,4 +1,45 @@ <p style="text-align:center"> + Most recent: +</p> +<table class="modlog" style="width:700px;margin:auto"> + <tr> + <th>Board</th> + <th>Thread</th> + <th>Hash (SHA1)</th> + <th>Created</th> + <th>Expires</th> + <th>Passed</th> + </tr> + {% for hash in recent %} + <tr> + <td>{{ config.board_abbreviation|sprintf(hash.board) }}</td> + <td> + {% if hash.thread %} + {{ hash.thread }} + {% else %} + - + {% endif %}</td> + <td> + <small><code>{{ hash.hash }}</code></small> + </td> + <td> + <span title="{{ hash.created|date(config.post_date) }}">{{ hash.created|ago }} ago</span> + </td> + <td> + {% if hash.expires %} + <span title="{{ hash.expires|date(config.post_date) }}"> + {{ hash.expires|until }} + </span> + {% else %} + - + {% endif %} + </td> + <td>{{ hash.passed }}</td> + </tr> + {% endfor %} +</table> + +<p style="text-align:center"> Most used (in active): </p> <table class="modlog" style="width:700px;margin:auto"> @@ -38,6 +79,7 @@ </tr> {% endfor %} </table> + <p style="text-align:center"> Total: <strong>{{ total }}</strong> (<strong>{{ expiring }}</strong> set to expire) </p> diff --git a/templates/mod/debug/recent_posts.html b/templates/mod/debug/recent_posts.html new file mode 100644 index 00000000..740ed21e --- /dev/null +++ b/templates/mod/debug/recent_posts.html @@ -0,0 +1,89 @@ +<table class="modlog"> + <tr> + <th>Time</th> + <th>Board</th> + <th>ID</th> + <th>Thread</th> + <th>IP</th> + <th>Name</th> + <th>Subject</th> + <th>File</th> + <th>Body (snippet)</th> + </tr> + {% for post in posts %} + <tr> + <td class="minimal"> + <small>{{ post.time | ago }} ago</small> + </td> + <td class="minimal"> + <a href="?/{{ config.board_path|sprintf(post.board) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(post.board) }}</a> + </td> + <td class="minimal" > + {% if post.thread %} + {% set thread = post.thread %} + {% else %} + {% set thread = post.id %} + {% endif %} + <a href="{{ config.root ~ post.board ~ '/' ~ config.dir.res}}{{ config.file_page|sprintf(thread) }}#{{ post.id }}"> + {{ post.id }} + </a> + </td> + <td class="minimal"> + <small> + {% if post.thread %} + {{ post.thread }} + {% else %} + (OP) + {% endif %} + </small> + </td> + <td class="minimal"> + {% if mod|hasPermission(config.mod.show_ip, post.board) %} + <a href="?/IP/{{ post.ip }}"> + {{ post.ip }} + </a> + {% else %} + <em>hidden</em> + {% endif %} + </td> + <td class="minimal" > + <small> + {% if post.email|length > 0 %} + {# start email #} + <a class="email" href="mailto:{{ post.email }}"> + {% endif %} + {% set capcode = post.capcode|capcode %} + <span {% if capcode.name %}style="{{ capcode.name }}" {% endif %}class="name">{{ post.name }}</span> + {% if post.trip|length > 0 %} + <span {% if capcode.trip %}style="{{ capcode.trip }}" {% endif %}class="trip">{{ post.trip }}</span> + {% endif %} + {% if post.email|length > 0 %} + {# end email #} + </a> + {% endif %} + {% if capcode %} + {{ capcode.cap }} + {% endif %} + </small> + </td> + <td class="minimal" > + {% if post.subject %} + <small>{{ post.subject }}</small> + {% else %} + – + {% endif %} + </td> + <td class="minimal"> + {% if post.file %} + <small>{{ post.file }} ({{ post.filesize | filesize }})</small> + {% else %} + – + {% endif %} + </td> + <td> + <small><em>{{ post.snippet }}</em></small> + </td> + </tr> + {% endfor %} +</table> + diff --git a/templates/mod/debug/sql.html b/templates/mod/debug/sql.html new file mode 100644 index 00000000..755995f9 --- /dev/null +++ b/templates/mod/debug/sql.html @@ -0,0 +1,26 @@ +<form action="" method="post"> + <input type="hidden" name="token" value="{{ security_token }}"> + <textarea style="display:block;margin:5px auto;width:90%;max-width:600px" rows="3" name="query">{{ query | e }}</textarea> + <input style="display:block;margin:5px auto" type="submit" value="Query"> +</form> + +{% if result == 'empty' %} + <p style="text-align:center">Query successful (no result).</p> +{% elseif result %} + <table class="modlog"> + <tr> + {% for key in keys %} + <th>{{ key | e }}</th> + {% endfor %} + </tr> + {% for row in result %} + <tr> + {% for col in row %} + <td>{{ col | e }}</td> + {% endfor %} + </tr> + {% endfor %} + </table> +{% elseif error %} + <p style="text-align:center;color:#d00">{{ error | e }}</p> +{% endif %} diff --git a/templates/mod/edit_post_form.html b/templates/mod/edit_post_form.html index 22fa40cb..146e725b 100644 --- a/templates/mod/edit_post_form.html +++ b/templates/mod/edit_post_form.html @@ -32,8 +32,16 @@ {% trans %}Comment{% endtrans %} </th> <td> - <textarea name="body" id="body" rows="5" cols="35">{{ post.body_nomarkup }}</textarea> + <textarea name="body" id="body" rows="8" cols="35">{% if raw %}{{ post.body | e }}{% else %}{{ post.body_nomarkup }}{% endif %}</textarea> </td> </tr> </table> + <p style="text-align:center"> + {% if raw %} + {% trans %}Currently editing raw HTML.{% endtrans %} + <a href="?/{{ board }}/edit/{{ post.id }}">{% trans %}Edit markup instead?{% endtrans %}</a> + {% else %} + <a href="?/{{ board }}/edit_raw/{{ post.id }}">{% trans %}Edit raw HTML instead?{% endtrans %}</a> + {% endif %} + </p> </form> |
