thread.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. {% extends "cranefly/layout.html" %}
  2. {% import "_forms.html" as form_theme with context %}
  3. {% import "cranefly/editor.html" as editor with context %}
  4. {% import "cranefly/macros.html" as macros with context %}
  5. {% block title %}{{ macros.page_title(title=thread.name,parent=forum.name,page=pagination['page']) }}{% endblock %}
  6. {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
  7. <li><a href="{% url 'reports' %}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
  8. <li class="active">{{ thread.name }}
  9. {%- endblock %}
  10. {% block container %}
  11. <div class="page-header header-primary">
  12. <div class="container">
  13. {{ messages_list(messages) }}
  14. <ul class="breadcrumb" {{ macros.itemprop_bread() }}>
  15. {{ self.breadcrumb() }}</li>
  16. </ul>
  17. <h1>{{ thread.name }}</h1>
  18. <ul class="unstyled header-stats">
  19. <li><i class="icon-tag"></i> {% if thread.weight == 2 -%}
  20. {% trans %}Open{% endtrans %}
  21. {%- elif thread.weight == 1 -%}
  22. Resolved
  23. {%- else -%}
  24. Bogus
  25. {%- endif %}</li>
  26. <li><i class="icon-time"></i> {{ thread.last|reltimesince }}</li>
  27. <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>
  28. <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
  29. {% trans count=thread.replies, replies=thread.replies|intcomma %}One comment{% pluralize %}{{ replies }} comments{% endtrans %}
  30. {%- else -%}
  31. {% trans %}No comments{% endtrans %}
  32. {%- endif %}</li>
  33. </ul>
  34. </div>
  35. </div>
  36. <div class="container container-primary report-view">
  37. {% if message %}
  38. <div class="messages-list">
  39. {{ macros.draw_message(message) }}
  40. </div>
  41. {% endif %}
  42. <div class="thread-buttons">
  43. {{ pager() }}
  44. <a href="{% url 'report_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Comment{% endtrans %}</a>
  45. {% if watcher %}
  46. <form action="{% url 'report_unwatch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
  47. {% if watcher.email %}
  48. <form action="{% url 'report_unwatch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form>
  49. {% else %}
  50. <form action="{% url 'report_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" 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>
  51. {% endif %}
  52. {% else %}
  53. <form action="{% url 'report_watch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" 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>
  54. <form action="{% url 'report_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" 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>
  55. {% endif %}
  56. </div>
  57. <div class="thread-body">
  58. {% if thread.start_post_id != posts[0].pk %}
  59. {% set posts = (posts|list) %}
  60. {% do posts.insert(0, thread.start_post) %}
  61. {% endif %}
  62. {% for post in posts %}
  63. <div id="post-{{ post.pk }}" class="post-wrapper{% if post.pk == thread.start_post_id %} report-wrapper{% endif %}">
  64. {% if post.message %}
  65. <div class="messages-list">
  66. {{ macros.draw_message(post.message) }}
  67. </div>
  68. {% endif %}
  69. <div class="post-body">
  70. {% if post.user_id %}
  71. <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}"><img src="{{ post.user.get_avatar(100) }}" alt="" class="user-avatar"></a>
  72. {% else %}
  73. <img src="{{ macros.avatar_guest(100) }}" alt="" class="user-avatar">
  74. {% endif %}
  75. <div class="post-arrow"></div>
  76. <div class="post-content">
  77. <div class="post-header">
  78. {% if post.user_id %}
  79. <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
  80. {% else %}
  81. <span class="post-author">{{ post.user_name }}</span> <span class="label post-author-label post-label-guest">{% trans %}Unregistered{% endtrans %}</span>
  82. {% endif %}
  83. <span class="separator">&ndash;</span>
  84. <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
  85. {% if post.edits %}
  86. <span class="separator">&ndash;</span>
  87. {% if acl.threads.can_see_changelog(user, forum, post) %}
  88. <a href="{% url 'report_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
  89. {% else %}
  90. <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
  91. {% endif %}
  92. {% endif %}
  93. {% if posts_form and thread.start_post_id != post.pk %}
  94. <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>
  95. {% endif %}
  96. {% if posts_form and thread.start_post_id == post.pk %}
  97. <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}"><i class="icon-">#1</i></a>
  98. {% else %}
  99. <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index0 }}</a>
  100. {% endif %}
  101. <div class="post-extra">
  102. {% if post.protected and acl.threads.can_protect(forum) %}
  103. <span class="label label-info">
  104. {% trans %}Protected{% endtrans %}
  105. </span>
  106. {% endif %}
  107. {% if post.deleted %}
  108. <span class="label label-inverse">
  109. {% trans %}Deleted{% endtrans %}
  110. </span>
  111. {% endif %}
  112. {% if not post.is_read %}
  113. <span class="label label-warning">
  114. {% trans %}New{% endtrans %}
  115. </span>
  116. {% endif %}
  117. </div>
  118. </div>
  119. <div class="post-message">
  120. <div class="markdown js-extra">
  121. <article>
  122. {{ post.post_preparsed|markdown_final|safe }}
  123. </article>
  124. </div>
  125. </div>
  126. <div class="post-footer">{% filter trim %}
  127. <div class="post-actions">
  128. {% if acl.users.can_see_users_trails() -%}
  129. <a href="{% url 'post_info' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-trail">{% trans %}Info{% endtrans %}</a>
  130. {% endif %}
  131. {% if acl.threads.can_edit_thread(user, forum, thread, post) and thread.start_post_id == post.pk %}
  132. <a href="{% url 'report_edit' thread=thread.pk, slug=thread.slug %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
  133. {% elif acl.threads.can_edit_reply(user, forum, thread, post) %}
  134. <a href="{% url 'post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
  135. {%- endif %}
  136. <a href="{% url 'report_reply' thread=thread.pk, slug=thread.slug, quote=post.pk %}" class="post-reply">{% trans %}Reply{% endtrans %}</a>
  137. </div>
  138. {% if post.pk == thread.start_post_id %}
  139. <div class="post-actions">
  140. {% if acl.threads.can_delete_thread(user, forum, thread, post) %}
  141. {% if post.deleted %}
  142. <form action="{% url 'report_show' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
  143. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  144. <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Make this thread visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
  145. </form>
  146. {% else %}
  147. <form action="{% url 'report_hide' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
  148. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  149. <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Hide this thread from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
  150. </form>
  151. {% endif %}
  152. {% endif %}
  153. {% if acl.threads.can_delete_thread(user, forum, thread, post) == 2 %}
  154. <form action="{% url 'report_delete' thread=thread.pk, slug=thread.slug %}" class="form-inline prompt-delete-thread" method="post">
  155. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  156. <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this thread for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
  157. </form>
  158. {% endif %}
  159. </div>
  160. {% elif post.pk != thread.start_post_id and acl.threads.can_delete_post(user, forum, thread, post) %}
  161. <div class="post-actions">
  162. {% if acl.threads.can_delete_post(user, forum, thread, post) %}
  163. {% if post.deleted %}
  164. <form action="{% url 'post_show' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
  165. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  166. <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Make this reply visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
  167. </form>
  168. {% else %}
  169. <form action="{% url 'post_hide' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
  170. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  171. <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Hide this reply from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
  172. </form>
  173. {% endif %}
  174. {% endif %}
  175. {% if acl.threads.can_delete_post(user, forum, thread, post) == 2 -%}
  176. <form action="{% url 'post_delete' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline prompt-delete-post" method="post">
  177. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  178. <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this reply for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
  179. </form>
  180. {% endif %}
  181. </div>
  182. {% endif %}
  183. {% endfilter %}</div>
  184. </div>
  185. </div>
  186. </div>
  187. {% if post.checkpoints_visible %}
  188. <div class="post-checkpoints">
  189. {% for checkpoint in post.checkpoints_visible %}
  190. <div class="post-checkpoint{% if checkpoint.deleted %} checkpoint-deleted{% endif %}">
  191. <hr>
  192. <span>
  193. {%- if checkpoint.action == 'limit' -%}
  194. <i class="icon-lock"></i> {% trans %}This thread has reached its post limit and has been closed.{% endtrans %}
  195. {%- elif checkpoint.action == 'deleted' -%}
  196. <i class="icon-trash"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} deleted this thread {{ date }}{% endtrans %}
  197. {%- elif checkpoint.action == 'undeleted' -%}
  198. <i class="icon-trash"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} restored this thread {{ date }}{% endtrans %}
  199. {%- elif checkpoint.action == 'reported' -%}
  200. <i class="icon-fire"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} has also reported this post {{ date }}{% endtrans %}
  201. {%- endif -%}
  202. {% if acl.threads.can_delete_checkpoint(forum) %}
  203. {% if checkpoint.deleted %}
  204. <form action="{% url 'post_checkpoint_show' slug=thread.slug, thread=thread.pk, post=post.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
  205. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  206. <button type="submit" class="btn btn-link btn-show">{% trans %}Restore{% endtrans %}</button>
  207. </form>
  208. {% else %}
  209. <form action="{% url 'post_checkpoint_hide' slug=thread.slug, thread=thread.pk, post=post.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
  210. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  211. <button type="submit" class="btn btn-link btn-hide">{% trans %}Hide{% endtrans %}</button>
  212. </form>
  213. {% endif %}
  214. {% endif %}
  215. {% if acl.threads.can_delete_checkpoint(forum) == 2 %}
  216. <form action="{% url 'post_checkpoint_delete' slug=thread.slug, thread=thread.pk, post=post.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline prompt-delete-checkpoint">
  217. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  218. <button type="submit" class="btn btn-link btn-delete">{% trans %}Delete{% endtrans %}</button>
  219. </form>
  220. {% endif %}
  221. </span>
  222. </div>
  223. {% endfor %}
  224. </div>
  225. {% endif %}
  226. {% endfor %}
  227. </div>
  228. {% if thread_form or posts_form %}
  229. <div class="thread-moderation">
  230. {% if thread_form%}
  231. <form id="thread_form" class="form-inline pull-left" action="{{ request_path }}" method="POST">
  232. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  233. <input type="hidden" name="origin" value="thread_form">
  234. {{ form_theme.input_select(thread_form['thread_action'],width=3) }}
  235. <button type="submit" class="btn btn-danger">{% trans %}Go{% endtrans %}</button>
  236. </form>
  237. {% endif %}
  238. {% if posts_form%}
  239. <form id="posts_form" class="form-inline pull-right" action="{{ request_path }}" method="POST">
  240. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  241. <input type="hidden" name="origin" value="posts_form">
  242. {{ form_theme.input_select(posts_form['list_action'],width=3) }}
  243. <button type="submit" class="btn btn-danger">{% trans %}Go{% endtrans %}</button>
  244. </form>
  245. {% endif %}
  246. </div>
  247. {% endif %}
  248. <div class="thread-buttons">
  249. {{ pager(false) }}
  250. <a href="{% url 'report_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Comment{% endtrans %}</a>
  251. </div>
  252. <div class="thread-quick-reply">
  253. <form action="{% url 'report_reply' thread=thread.pk, slug=thread.slug %}" method="post">
  254. <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
  255. <input type="hidden" name="quick_reply" value="1">
  256. <img src="{{ user.get_avatar(100) }}" alt="{% trans %}Your Avatar{% endtrans %}" class="user-avatar">
  257. {{ editor.editor(quick_reply.post, _('Post Comment'), extra=editor_extra()) }}
  258. </form>
  259. </div>
  260. </div>
  261. {% endblock %}
  262. {% block stylesheets %}{{ super() }}
  263. <link href="{{ STATIC_URL }}cranefly/highlight/styles/monokai.css" rel="stylesheet">
  264. {% endblock %}
  265. {% block javascripts -%}{{ super() }}
  266. <script src="{{ STATIC_URL }}cranefly/highlight/highlight.pack.js"></script>
  267. <script type="text/javascript">
  268. hljs.tabReplace = ' ';
  269. hljs.initHighlightingOnLoad();
  270. EnhancePostsMD();
  271. $(function () {
  272. $('#thread_form').submit(function() {
  273. if ($('#id_thread_action').val() == 'hard') {
  274. var decision = confirm("{% trans %}Are you sure you want to delete this report? This action is not reversible!{% endtrans %}");
  275. return decision;
  276. }
  277. return true;
  278. });
  279. $('#posts_form').submit(function() {
  280. if ($('.post-checkbox[]:checked').length == 0) {
  281. alert("{% trans %}You have to select at least one comment.{% endtrans %}");
  282. return false;
  283. }
  284. if ($('#id_list_action').val() == 'hard') {
  285. var decision = confirm("{% trans %}Are you sure you want to delete selected comments? This action is not reversible!{% endtrans %}");
  286. return decision;
  287. }
  288. return true;
  289. });
  290. $('.prompt-delete-thread').submit(function() {
  291. var decision = confirm("{% trans %}Are you sure you want to delete this report?{% endtrans %}");
  292. return decision;
  293. });
  294. $('.prompt-delete-post').submit(function() {
  295. var decision = confirm("{% trans %}Are you sure you want to delete this comment?{% endtrans %}");
  296. return decision;
  297. });
  298. $('.prompt-delete-checkpoint').submit(function() {
  299. var decision = confirm("{% trans %}Are you sure you want to delete this checkpoint?{% endtrans %}");
  300. return decision;
  301. });
  302. });
  303. </script>
  304. {{ editor.js() }}
  305. {%- endblock %}
  306. {% macro user_label(user) -%}
  307. <{% if user.rank and user.rank.as_tab %}a href="{% url 'users' slug=user.rank.slug %}"{% else %}span{% endif %} class="label post-author-label{% if user.rank and user.rank.style %} post-label-{{ user.rank.style }}{% endif %}">{{ user.get_title() }}</{% if user.rank and user.rank.as_tab%}a{% else %}span{% endif %}>
  308. {%- endmacro %}
  309. {% macro pager(extra=true) %}
  310. <div class="pagination pull-left">
  311. <ul>
  312. {% if pagination['total'] > 0 %}
  313. <li class="count">{{ macros.pager_label(pagination) }}</li>
  314. {%- if pagination['prev'] > 1 %}<li><a href="{% url 'report' 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 -%}
  315. {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'report' slug=thread.slug, thread=thread.id, page=pagination['prev'] %}{% else %}{% url 'report' slug=thread.slug, thread=thread.id %}{% endif %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
  316. {%- if pagination['next'] > 0 %}<li><a href="{% url 'report' 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 -%}
  317. {%- if pagination['next'] > 0 and pagination['next'] < pagination['total'] %}<li><a href="{% url 'report' 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 -%}
  318. {% endif %}
  319. {% if extra %}
  320. {% if not is_read %}<li><a href="{% url 'report_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 %}
  321. {% endif %}
  322. </ul>
  323. </div>
  324. {% endmacro %}
  325. {% macro checkpoint_user(checkpoint) -%}
  326. {%- if checkpoint.user_id -%}
  327. <a href="{{ 'user'|url(user=checkpoint.user_id, username=checkpoint.user_slug) }}">{{ checkpoint.user_name }}</a>
  328. {%- else -%}
  329. <strong>{{ checkpoint.user_name }}</strong>
  330. {%- endif -%}
  331. {%- endmacro %}
  332. {% macro checkpoint_forum(checkpoint) -%}
  333. {%- if checkpoint.old_forum_id -%}
  334. <a href="{% url 'forum' forum=checkpoint.old_forum_id, slug=checkpoint.old_forum_slug %}">{{ checkpoint.old_forum_name }}</a>
  335. {%- else -%}
  336. <strong>{{ checkpoint.old_forum_name }}</strong>
  337. {%- endif -%}
  338. {%- endmacro %}
  339. {% macro edit_user(post) -%}
  340. {%- if post.edit_user_id -%}
  341. <a href="{{ 'user'|url(user=post.edit_user_id, username=post.edit_user_slug) }}">{{ post.edit_user_name }}</a>
  342. {%- else -%}
  343. <strong>{{ post.edit_user_name }}</strong>
  344. {%- endif -%}
  345. {%- endmacro %}
  346. {% macro editor_extra() %}
  347. <button id="editor-preview" name="preview" type="submit" class="btn pull-right">{% trans %}Full Editor{% endtrans %}</button>
  348. {% endmacro %}