2018-08-15 03:12:58 +02:00
|
|
|
{% extends 'forum/master.twig' %}
|
2018-10-21 23:53:32 +02:00
|
|
|
{% from 'macros.twig' import pagination %}
|
2018-05-23 03:41:57 +02:00
|
|
|
{%
|
2018-08-15 03:12:58 +02:00
|
|
|
from 'forum/macros.twig'
|
2018-05-23 03:41:57 +02:00
|
|
|
import
|
|
|
|
forum_post_listing,
|
|
|
|
forum_topic_buttons,
|
|
|
|
forum_topic_locked,
|
2018-10-25 02:15:23 +02:00
|
|
|
forum_header,
|
2023-01-01 05:01:18 +00:00
|
|
|
forum_topic_tools
|
2018-05-23 03:41:57 +02:00
|
|
|
%}
|
2018-05-20 22:12:45 +02:00
|
|
|
|
|
|
|
{% set title = topic_info.topic_title %}
|
2019-02-28 22:52:39 +01:00
|
|
|
{% set canonical_url = url('forum-topic', {
|
|
|
|
'topic': topic_info.topic_id,
|
2019-01-04 01:11:31 +01:00
|
|
|
'page': topic_pagination.page > 1 ? topic_pagination.page : 0,
|
2018-07-07 22:11:16 +02:00
|
|
|
}) %}
|
2018-05-22 01:05:25 +02:00
|
|
|
|
2019-06-10 17:21:53 +02:00
|
|
|
{% set forum_post_csrf = csrf_token() %}
|
2019-01-03 01:33:02 +01:00
|
|
|
{% set topic_tools = forum_topic_tools(topic_info, topic_pagination, can_reply) %}
|
2019-01-03 17:02:43 +01:00
|
|
|
{% set topic_notice = forum_topic_locked(topic_info.topic_locked, topic_info.topic_archived) %}
|
2019-01-12 00:00:53 +01:00
|
|
|
{% set topic_actions = [
|
|
|
|
{
|
|
|
|
'html': '<i class="far fa-trash-alt fa-fw"></i> Delete',
|
2019-02-28 22:52:39 +01:00
|
|
|
'url': url('forum-topic-delete', {'topic': topic_info.topic_id}),
|
2019-01-12 00:00:53 +01:00
|
|
|
'display': topic_can_delete,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'html': '<i class="fas fa-magic fa-fw"></i> Restore',
|
2019-02-28 22:52:39 +01:00
|
|
|
'url': url('forum-topic-restore', {'topic': topic_info.topic_id}),
|
2019-01-12 00:00:53 +01:00
|
|
|
'display': topic_can_nuke_or_restore,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'html': '<i class="fas fa-radiation-alt fa-fw"></i> Permanently Delete',
|
2019-02-28 22:52:39 +01:00
|
|
|
'url': url('forum-topic-nuke', {'topic': topic_info.topic_id}),
|
2019-01-12 00:00:53 +01:00
|
|
|
'display': topic_can_nuke_or_restore,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'html': '<i class="fas fa-plus-circle fa-fw"></i> Bump',
|
2019-02-28 22:52:39 +01:00
|
|
|
'url': url('forum-topic-bump', {'topic': topic_info.topic_id}),
|
2019-01-12 00:00:53 +01:00
|
|
|
'display': topic_can_bump,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'html': '<i class="fas fa-lock fa-fw"></i> Lock',
|
2019-02-28 22:52:39 +01:00
|
|
|
'url': url('forum-topic-lock', {'topic': topic_info.topic_id}),
|
2019-01-12 00:00:53 +01:00
|
|
|
'display': topic_can_lock and topic_info.topic_locked is null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'html': '<i class="fas fa-lock-open fa-fw"></i> Unlock',
|
2019-02-28 22:52:39 +01:00
|
|
|
'url': url('forum-topic-unlock', {'topic': topic_info.topic_id}),
|
2019-01-12 00:00:53 +01:00
|
|
|
'display': topic_can_lock and topic_info.topic_locked is not null,
|
|
|
|
},
|
|
|
|
] %}
|
2018-05-20 22:12:45 +02:00
|
|
|
|
|
|
|
{% block content %}
|
2019-01-12 00:00:53 +01:00
|
|
|
{{ forum_header(topic_info.topic_title, topic_breadcrumbs, false, canonical_url, topic_actions) }}
|
2019-01-03 17:02:43 +01:00
|
|
|
{{ topic_notice }}
|
2018-10-25 02:15:23 +02:00
|
|
|
{{ topic_tools }}
|
2020-06-10 18:20:30 +00:00
|
|
|
{{ forum_post_listing(topic_posts, current_user.id|default(0), topic_perms) }}
|
2018-10-25 02:15:23 +02:00
|
|
|
{{ topic_tools }}
|
2019-01-03 17:02:43 +01:00
|
|
|
{{ topic_notice }}
|
2019-01-02 22:39:57 +01:00
|
|
|
{{ forum_header('', topic_breadcrumbs) }}
|
2018-05-20 22:12:45 +02:00
|
|
|
{% endblock %}
|