thread.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. {% extends "sora/layout.html" %}
  2. {% load i18n %}
  3. {% load url from future %}
  4. {% import "_forms.html" as form_theme with context %}
  5. {% import "sora/editor.html" as editor with context %}
  6. {% import "sora/macros.html" as macros with context %}
  7. {% block title %}{{ macros.page_title(title=thread.name,parent=forum.name,page=pagination['page']) }}{% endblock %}
  8. {% block breadcrumb %}{{ super() }} <span class="divider">/</span></li>
  9. {% for parent in parents %}
  10. <li><a href="{{ parent.type|url(forum=parent.pk, slug=parent.slug) }}">{{ parent.name }}</a> <span class="divider">/</span></li>
  11. {% endfor %}
  12. <li class="active">{{ thread.name }}
  13. {%- endblock %}
  14. {% block content %}
  15. <div class="page-header">
  16. <ul class="breadcrumb">
  17. {{ self.breadcrumb() }}</li>
  18. </ul>
  19. <h1>{{ thread.name }}</h1>
  20. <ul class="unstyled thread-info">
  21. {% if thread.moderated %}<li><i class="icon-eye-close"></i> {% trans %}Not Reviewed{% endtrans %}</li>{% endif %}
  22. <li><i class="icon-time"></i> {{ thread.last|reltimesince }}</li>
  23. <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
  24. <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
  25. {% trans count=thread.replies, replies=thread.replies|intcomma %}One reply{% pluralize %}{{ replies }} replies{% endtrans %}
  26. {%- else -%}
  27. {% trans %}No replies{% endtrans %}
  28. {%- endif %}</li>
  29. </ul>
  30. </div>
  31. {% if message %}{{ macros.draw_message(message) }}{% endif %}
  32. <div class="list-nav">
  33. {{ pager() }}
  34. {% if user.is_authenticated() %}
  35. <ul class="nav nav-pills pull-right">
  36. {% if ignored_posts %}
  37. <li class="discourage"><form action="{% url 'thread_show_hidden' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn"><i class="icon-eye-open"></i> {% trans %}Show Hidden Replies{% endtrans %}</button></form></li>
  38. {% endif %}
  39. {% if watcher %}
  40. {% if watcher.email %}
  41. <li class="success"><form action="{% url 'thread_unwatch_email' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form></li>
  42. {% else %}
  43. <li class="info"><form action="{% url 'thread_watch_email' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}E-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form></li>
  44. {% endif %}
  45. <li class="success"><form action="{% url 'thread_unwatch' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form></li>
  46. {% else %}
  47. <li class="info"><form action="{% url 'thread_watch_email' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list and e-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form></li>
  48. <li class="info"><form action="{% url 'thread_watch' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form></li>
  49. {% endif %}
  50. {% if acl.threads.can_reply(forum, thread) %}
  51. <li class="primary"><a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a></li>
  52. {% endif %}
  53. </ul>
  54. {% endif %}
  55. </div>
  56. <div class="posts-list">
  57. {% for post in posts %}
  58. {% if post.message %}{{ macros.draw_message(post.message) }}{% endif %}
  59. {% if post.deleted and not acl.threads.can_see_deleted_posts(forum) %}
  60. <div id="post-{{ post.pk }}" class="well well-post well-post-deleted{% if post.user and post.user.rank and post.user.rank.style %} {{ post.user.rank.style }}{% endif %}">
  61. <div class="post-author">
  62. <div class="post-bit">
  63. {% if post.user_id %}
  64. <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="lead">{{ post.user.username }}</a>
  65. {% else %}
  66. <span class="lead">{{ post.user_name }}</span>
  67. {% endif %}
  68. </div>
  69. </div>
  70. <div class="post-extra">
  71. <a href="{% if pagination['page'] > 1 -%}
  72. {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
  73. {%- else -%}
  74. {% url 'thread' thread=thread.pk, slug=thread.slug %}
  75. {%- endif %}#post-{{ post.pk }}" class="post-perma pull-right tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
  76. </div>
  77. <div class="post-content">
  78. {% trans user=edit_user(post), date=post.edit_date|reltimesince|low %}{{ user }} has deleted this reply {{ date }}{% endtrans %}
  79. </div>
  80. </div>
  81. {% elif post.ignored %}
  82. <div id="post-{{ post.pk }}" class="well well-post well-post-deleted{% if post.user and post.user.rank and post.user.rank.style %} {{ post.user.rank.style }}{% endif %}">
  83. <div class="post-author">
  84. <div class="post-bit">
  85. <span class="lead">{% trans %}Hidden Reply{% endtrans %}</span>
  86. </div>
  87. </div>
  88. <div class="post-extra">
  89. <a href="{% if pagination['page'] > 1 -%}
  90. {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
  91. {%- else -%}
  92. {% url 'thread' thread=thread.pk, slug=thread.slug %}
  93. {%- endif %}#post-{{ post.pk }}" class="post-perma pull-right tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
  94. </div>
  95. <div class="post-content">
  96. {% trans %}This reply was posted by user that is on your ignored list.{% endtrans %}
  97. </div>
  98. </div>
  99. {% else %}
  100. <div id="post-{{ post.pk }}" class="well well-post{% if post.user and post.user.rank and post.user.rank.style %} {{ post.user.rank.style }}{% endif %}">
  101. <div class="post-author">
  102. <img src="{% if post.user_id %}{{ post.user.get_avatar(80) }}{% else %}{{ macros.avatar_guest(80) }}{% endif %}" alt="" class="avatar-normal">
  103. <div class="post-bit">
  104. {% if post.user_id %}
  105. <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="lead">{{ post.user.username }}</a>
  106. {% if post.user.get_title() %}<p class="user-title">{{ _(post.user.get_title()) }}</p>{% endif %}
  107. {% else %}
  108. <span class="lead">{{ post.user_name }}</span>
  109. <p class="user-title">{% trans %}Unregistered{% endtrans %}</p>
  110. {% endif %}
  111. <p class="post-date">{{ post.date|reltimesince|low }}</p>
  112. </div>
  113. </div>
  114. <div class="post-extra">
  115. {% if user.is_authenticated() and posts_form %}
  116. <label class="checkbox post-checkbox"><input form="posts_form" name="{{ posts_form['list_items']['html_name'] }}" type="checkbox" class="checkbox-member" value="{{ post.pk }}"{% if posts_form['list_items']['has_value'] and ('' ~ post.pk) in posts_form['list_items']['value'] %} checked="checked"{% endif %}></label>
  117. {% endif %}
  118. <a href="{% if pagination['page'] > 1 -%}
  119. {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
  120. {%- else -%}
  121. {% url 'thread' thread=thread.pk, slug=thread.slug %}
  122. {%- endif %}#post-{{ post.pk }}" class="post-perma pull-right tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
  123. {% if not post.is_read %}
  124. <span class="label label-warning pull-right">
  125. {% trans %}New{% endtrans %}
  126. </span>
  127. {% endif %}
  128. {% if post.moderated %}
  129. <span class="label label-purple pull-right">
  130. {% trans %}Unreviewed{% endtrans %}
  131. </span>
  132. {% endif %}
  133. {% if post.reported %}
  134. <span class="label label-important pull-right">
  135. {% trans %}Reported{% endtrans %}
  136. </span>
  137. {% endif %}
  138. {% if post.deleted %}
  139. <span class="label label-inverse pull-right">
  140. {% trans %}Deleted{% endtrans %}
  141. </span>
  142. {% endif %}
  143. {% if post.protected and acl.threads.can_protect(forum) %}
  144. <span class="label label-info pull-right">
  145. {% trans %}Protected{% endtrans %}
  146. </span>
  147. {% endif %}
  148. </div>
  149. <div class="post-content">
  150. <div class="markdown">
  151. {{ post.post_preparsed|markdown_final|safe }}
  152. </div>
  153. {% if post.user.signature %}
  154. <div class="post-foot">
  155. {# <p class='lead'><a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="lead">{{ post.user.username }}</a>, {{ post.date|reltimesince|low }}</p> #}
  156. {% if post.user.signature %}
  157. <div class="signature">
  158. <div class="markdown">
  159. {{ post.user.signature_preparsed|markdown_final|safe }}
  160. </div>
  161. </div>
  162. {% endif %}
  163. </div>
  164. {% endif %}
  165. </div>
  166. <div class="post-nav">
  167. {% if post.edits %}
  168. {% if acl.threads.can_see_changelog(user, forum, post) %}
  169. <a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</a>
  170. {% else %}
  171. <span class="changelog">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</span>
  172. {% endif %}
  173. {% endif %}
  174. {% if user.is_authenticated() %}
  175. <ul class="nav nav-pills pull-right">
  176. {% if 1 == 2 %}
  177. <li><a href="#"><i class="icon-info-sign"></i> {% trans %}Info{% endtrans %}</a></li>
  178. {% endif %}
  179. {% if post.pk == thread.start_post_id %}
  180. {% if acl.threads.can_delete_thread(user, forum, thread, post) == 2 -%}
  181. <li class="tooltip-top" title="{% trans %}Delete this thread for good{% endtrans %}"><form action="{% url 'thread_delete' thread=thread.pk, slug=thread.slug %}" class="prompt-delete-thread" method="post"><button type="submit" class="btn danger"><i class="icon-remove"></i></button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
  182. {% if not post.deleted and acl.threads.can_delete_thread(user, forum, thread, post) -%}
  183. <li><form action="{% url 'thread_hide' thread=thread.pk, slug=thread.slug %}" class="prompt-delete-thread" method="post"><button type="submit" class="btn danger"><i class="icon-trash"></i> {% trans %}Delete{% endtrans %}</button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
  184. {% elif post.pk != thread.start_post_id and acl.threads.can_delete_post(user, forum, thread, post) %}
  185. {% if acl.threads.can_delete_post(user, forum, thread, post) == 2 -%}
  186. <li class="tooltip-top" title="{% trans %}Delete this reply for good{% endtrans %}"><form action="{% url 'post_delete' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="prompt-delete-post" method="post"><button type="submit" class="btn danger"><i class="icon-remove"></i></button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
  187. {% if not post.deleted and acl.threads.can_delete_post(user, forum, thread, post) -%}
  188. <li><form action="{% url 'post_hide' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="prompt-delete-post" method="post"><button type="submit" class="btn danger"><i class="icon-trash"></i> {% trans %}Delete{% endtrans %}</button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
  189. {% endif %}
  190. {% if acl.users.can_see_users_trails() -%}
  191. <li><a href="{% url 'post_info' thread=thread.pk, slug=thread.slug, post=post.pk %}"><i class="icon-qrcode"></i> {% trans %}Info{% endtrans %}</a></li>
  192. {% endif %}
  193. {% if acl.threads.can_edit_thread(user, forum, thread, post) and thread.start_post_id == post.pk -%}
  194. <li><a href="{% url 'thread_edit' thread=thread.pk, slug=thread.slug %}"><i class="icon-edit"></i> {% trans %}Edit{% endtrans %}</a></li>
  195. {% elif acl.threads.can_edit_reply(user, forum, thread, post) %}
  196. <li><a href="{% url 'post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}"><i class="icon-edit"></i> {% trans %}Edit{% endtrans %}</a></li>
  197. {%- endif %}
  198. {% if acl.threads.can_reply(forum, thread) %}<li><a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug, quote=post.pk %}"><i class="icon-comment"></i> {% trans %}Reply{% endtrans %}</a></li>{% endif %}
  199. </ul>
  200. {% endif %}
  201. </div>
  202. </div>
  203. {% endif %}
  204. {% if post.checkpoint_set.all() %}
  205. <div class="post-checkpoints">
  206. {% for checkpoint in post.checkpoint_set.all() %}
  207. <div class="checkpoint">
  208. <hr>
  209. <span>
  210. {%- if checkpoint.action == 'limit' -%}
  211. <i class="icon-lock"></i> {% trans %}This thread has reached its post limit and has been closed.{% endtrans %}
  212. {%- elif checkpoint.action == 'accepted' -%}
  213. <i class="icon-ok"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} accepted this thread {{ date }}{% endtrans %}
  214. {%- elif checkpoint.action == 'closed' -%}
  215. <i class="icon-lock"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} closed this thread {{ date }}{% endtrans %}
  216. {%- elif checkpoint.action == 'opened' -%}
  217. <i class="icon-lock"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} opened this thread {{ date }}{% endtrans %}
  218. {%- elif checkpoint.action == 'deleted' -%}
  219. <i class="icon-trash"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} deleted this thread {{ date }}{% endtrans %}
  220. {%- elif checkpoint.action == 'undeleted' -%}
  221. <i class="icon-trash"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} restored this thread {{ date }}{% endtrans %}
  222. {%- endif -%}
  223. </span>
  224. </div>
  225. {% endfor %}
  226. </div>
  227. {% endif %}
  228. {% endfor %}
  229. </div>
  230. {% if user.is_authenticated() and (thread_form or posts_form) %}
  231. <div class="form-actions table-footer mod-actions">
  232. {% if thread_form%}
  233. <form id="thread_form" class="form-inline pull-left" action="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['page'] %}" method="POST">
  234. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  235. <input type="hidden" name="origin" value="thread_form">
  236. {{ form_theme.input_select(thread_form['thread_action'],width=3) }}
  237. <button type="submit" class="btn btn-primary">{% trans %}Go{% endtrans %}</button>
  238. </form>
  239. {% endif %}
  240. {% if posts_form%}
  241. <form id="posts_form" class="form-inline pull-right" action="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['page'] %}" method="POST">
  242. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  243. <input type="hidden" name="origin" value="posts_form">
  244. {{ form_theme.input_select(posts_form['list_action'],width=3) }}
  245. <button type="submit" class="btn btn-primary">{% trans %}Go{% endtrans %}</button>
  246. </form>
  247. {% endif %}
  248. </div>
  249. {% endif %}
  250. <div class="list-nav last">
  251. {{ pager(false) }}
  252. {% if user.is_authenticated() and acl.threads.can_reply(forum, thread) %}
  253. <ul class="nav nav-pills pull-right">
  254. <li class="primary"><a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a></li>
  255. </ul>
  256. {% endif %}
  257. </div>
  258. {% if user.is_authenticated() and acl.threads.can_reply(forum, thread) %}
  259. <div class="quick-reply">
  260. <form action="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}" method="post">
  261. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  262. <input type="hidden" name="quick_reply" value="1">
  263. <img src="{{ user.get_avatar() }}" alt="{% trans %}Your Avatar{% endtrans %}" class="avatar-big">
  264. <div class="arrow"></div>
  265. {{ editor.editor(quick_reply.post, _('Post Reply'), extra=editor_extra()) }}
  266. </form>
  267. </div>
  268. {% endif %}
  269. {% endblock %}
  270. {% block javascripts -%}
  271. {{ super() }}
  272. {%- if user.is_authenticated() %}
  273. <script type="text/javascript">
  274. $(function () {
  275. $('#thread_form').submit(function() {
  276. if ($('#id_thread_action').val() == 'hard') {
  277. var decision = confirm("{% trans %}Are you sure you want to delete this thread? This action is not reversible!{% endtrans %}");
  278. return decision;
  279. }
  280. return true;
  281. });
  282. $('#posts_form').submit(function() {
  283. if ($('.post-checkbox[]:checked').length == 0) {
  284. alert("{% trans %}You have to select at least one post.{% endtrans %}");
  285. return false;
  286. }
  287. if ($('#id_list_action').val() == 'merge') {
  288. if ($('.post-checkbox[]:checked').length < 2) {
  289. alert("{% trans %}You have to select at least two posts you want to merge.{% endtrans %}");
  290. return false;
  291. }
  292. var decision = confirm("{% trans %}Are you sure you want to merge selected posts? This action is not reversible!{% endtrans %}");
  293. return decision;
  294. }
  295. if ($('#id_list_action').val() == 'hard') {
  296. var decision = confirm("{% trans %}Are you sure you want to delete selected posts? This action is not reversible!{% endtrans %}");
  297. return decision;
  298. }
  299. return true;
  300. });
  301. $('.prompt-delete-thread').submit(function() {
  302. var decision = confirm("{% trans %}Are you sure you want to delete this thread?{% endtrans %}");
  303. return decision;
  304. });
  305. $('.prompt-delete-post').submit(function() {
  306. var decision = confirm("{% trans %}Are you sure you want to delete this post?{% endtrans %}");
  307. return decision;
  308. });
  309. });
  310. </script>{% endif %}
  311. {% if user.is_authenticated() and acl.threads.can_reply(forum, thread) %}
  312. {{ editor.js() }}
  313. {% endif %}
  314. {%- endblock %}
  315. {% macro pager(extra=true) %}
  316. <ul class="pager pull-left">
  317. {%- if pagination['prev'] > 1 %}<li><a href="{% url 'thread' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
  318. {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['prev'] %}{% else %}{% url 'thread' slug=thread.slug, thread=thread.id %}{% endif %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
  319. {%- if pagination['next'] > 0 %}<li><a href="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Newest Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
  320. {%- if pagination['next'] > 0 and pagination['next'] < pagination['total'] %}<li><a href="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['total'] %}" class="tooltip-top" title="{% trans %}Go to last page{% endtrans %}">{% trans %}Last{% endtrans %} <i class="icon-chevron-right"></i></a></li>{% endif -%}
  321. <li class="count">
  322. {%- trans current_page=pagination['page'], pages=pagination['total'] -%}
  323. Page {{ current_page }} of {{ pages }}
  324. {%- endtrans -%}
  325. </li>
  326. {% if extra and user.is_authenticated() %}
  327. {% if not is_read %}<li class="unread"><a href="{% url 'thread_new' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
  328. {% if thread.replies_moderated > 0 and acl.threads.can_approve(forum) %}<li class="moderated"><a href="{% url 'thread_moderated' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first post awaiting review{% endtrans %}"><i class="icon-eye-close"></i> {% trans %}First Unreviewed{% endtrans %}</a></li>{% endif %}
  329. {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li class="reported"><a href="{% url 'thread_reported' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
  330. {% endif %}
  331. </ul>
  332. {% endmacro %}
  333. {% macro checkpoint_user(checkpoint) -%}
  334. {%- if checkpoint.user_id -%}
  335. {{ ('<a href="' ~ 'user'|url(user=checkpoint.user_id, username=checkpoint.user_slug) ~ '">')|safe ~ (checkpoint.user_name) ~ ("</a>")|safe }}
  336. {%- else -%}
  337. <strong>{{ checkpoint.user_name }}</strong>
  338. {%- endif -%}
  339. {%- endmacro %}
  340. {% macro edit_user(post) -%}
  341. {%- if post.edit_user_id -%}
  342. {{ ('<a href="' ~ 'user'|url(user=post.edit_user_id, username=post.edit_user_slug) ~ '">')|safe ~ (post.edit_user_name) ~ ("</a>")|safe }}
  343. {%- else -%}
  344. <strong>{{ post.edit_user_name }}</strong>
  345. {%- endif -%}
  346. {%- endmacro %}
  347. {% macro editor_extra() %}
  348. <button id="editor-preview" name="preview" type="submit" class="btn btn-success pull-right">{% trans %}Full Editor{% endtrans %}</button>
  349. {% endmacro %}