KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
5.4KB

  1. {% extends "layout.twig" %}
  2. {% block title %}${ "Manage Spam" | translate("comments") }{% endblock %}
  3. {% block content %}
  4. <h2>${ "Need more detail?" | translate }</h2>
  5. <form class="detail" action="index.php" method="get" accept-charset="utf-8">
  6. <fieldset>
  7. <a class="button boo right" href="{% admin "purge_spam" %}"><img src="$theme_url/images/icons/deny.png" alt="deny" />${ "Delete All (%d)" | translate("comments") | format(comments.total) }</a>
  8. <input type="hidden" name="action" value="manage_comments" />
  9. <div class="left pad">
  10. <h3>
  11. ${ "Search&hellip;" | translate }
  12. <a href="{% admin "help&id=filtering_results" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
  13. </h3>
  14. <input class="text" type="text" name="query" value="${ GET.query | escape }" id="query" />
  15. <button type="submit" class="inline">${ "Search &rarr;" | translate }</button>
  16. </div>
  17. <div class="clear"></div>
  18. </fieldset>
  19. </form>
  20. <br />
  21. <form action="{% admin "bulk_comments&from=spam" %}" method="post">
  22. <h2>{% if GET.query %}${ "Search Results" | translate }{% else %}${ "Last 25 Spam" | translate("comments") }{% endif %}</h2>
  23. <table border="0" cellspacing="0" cellpadding="0" class="wide">
  24. <thead>
  25. <tr class="head">
  26. <th class="toggler center"></th>
  27. <th>${ "Post" | translate("comments") }</th>
  28. <th>${ "Author" | translate("comments") }</th>
  29. <th>${ "Added" | translate("comments") }</th>
  30. ${ trigger.call("manage_comments_column_header") }
  31. <th colspan="2">${ "Controls" | translate }</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. {% for comment in comments.paginated %}
  36. <tr id="comment_$comment.id" class="comment $comment.status{% if loop.last %} last{% endif %}">
  37. <td rowspan="2" class="checkbox center">
  38. <input type="checkbox" name="comment[$comment.id]" value="" id="comment_checkbox_$comment.id" />
  39. </td>
  40. <td class="main"><a href="$comment.post.url#comment_$comment.id">${ comment.post.title | truncate }</a></td>
  41. <td>${ comment.user.full_name | fallback(comment.user.login) | fallback(comment.author) }</td>
  42. <td>${ comment.created_at | strftime }</td>
  43. ${ trigger.call("manage_comments_column", comment) }
  44. {% if comment.editable and comment.deletable %}
  45. <td class="controls">${ comment.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate)) }</td>
  46. <td class="controls">${ comment.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate)) }</td>
  47. {% elseif comment.editable or comment.deletable %}
  48. ${ comment.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate), '<td class="controls" colspan="2">', '</td>') }
  49. ${ comment.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate), '<td class="controls" colspan="2">', '</td>') }
  50. {% endif %}
  51. </tr>
  52. <tr class="excerpt">
  53. <td colspan="5">${ comment.body | truncate(100) }</td>
  54. </tr>
  55. {% else %}
  56. <tr class="last">
  57. <td colspan="5" class="center"><span class="sub">${ "(none)" | translate }</span></td>
  58. </tr>
  59. {% endfor %}
  60. </tbody>
  61. </table>
  62. <br />
  63. <div class="controls">
  64. <h4>${ "With selected:" | translate("comments") }</h4>
  65. <button class="lite" name="deny">
  66. <img src="$theme_url/images/icons/deny.png" alt="deny" /> ${ "deny" | translate("comments") }
  67. </button>
  68. <button class="lite yay" name="approve">
  69. <img src="$theme_url/images/icons/success.png" alt="approve" /> ${ "approve" | translate("comments") }
  70. </button>
  71. <button class="lite boo" name="delete">
  72. <img src="$theme_url/images/icons/delete.png" alt="delete" /> ${ "delete" | translate("comments") }
  73. </button>
  74. </div>
  75. </form>
  76. {% if comments.paginated and comments.pages > 1 %}
  77. <br />
  78. <div class="pagination">
  79. $comments.next_link
  80. $comments.prev_link
  81. <span class="pages">${ "Page %d of %d" | translate | format(comments.page, comments.pages) }</span>
  82. </div>
  83. {% endif %}
  84. {% endblock %}