{% extends 'master.twig' %} {% set forumBackLink %}{{ route('forums.forum', forum.id) }}{% endset %} {% set title %}{% if topic is defined %}{{ topic.title }}{% else %}Creating topic in {{ forum.name }}{% endif %}{% endset %} {% if topic is defined %} {% if forum.permission(constant('Sakura\\Perms\\Forum::REPLY'), user.id) and ( topic.status != 1 or forum.permission(constant('Sakura\\Perms\\Forum::LOCK'), user.id) ) %} {% set forumReplyLink %}#reply{% endset %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::STICKY'), user.id) or forum.permission(constant('Sakura\\Perms\\Forum::ANNOUNCEMENT'), user.id) or forum.permission(constant('Sakura\\Perms\\Forum::LOCK'), user.id) or forum.permission(constant('Sakura\\Perms\\Forum::MOVE'), user.id) or forum.permission(constant('Sakura\\Perms\\Forum::DELETE_ANY'), user.id) %} {% set showMod = true %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::STICKY'), user.id) %} {% set forumSticky = topic.type == 1 ? true : false %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::ANNOUNCEMENT'), user.id) %} {% set forumAnnounce = topic.type == 2 ? true : false %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::LOCK'), user.id) %} {% set forumLock = topic.status == 1 ? true : false %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::MOVE'), user.id) %} {% if topic.oldForum %} {% set forumRestore = true %} {% endif %} {% if topic.forum != config('forum.trash') %} {% set forumTrash = true %} {% endif %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::DELETE_ANY'), user.id) %} {% if topic.forum == config('forum.trash') %} {% set forumPrune = true %} {% endif %} {% endif %} {% set posts = topic.posts|batch(10) %} {% set paginationPages = posts %} {% set paginationUrl %}{{ route('forums.topic', topic.id) }}{% endset %} {% endif %} {% block css %} {% endblock %} {% block js %} {% endblock %} {% block content %}
{{ forum.name }} / {{ topic.title }}
{% include 'forum/elements/forumBtns.twig' %} {% if topic is defined %} {% set textCache = session.replyText['t' ~ topic.id] %} {% set postingAction = route('forums.topic.reply', topic.id) %} {% for post in posts[get.page|default(1) - 1] %} {% endfor %} {% else %} {% set titleCache = session.replyText['f' ~ forum.id].title %} {% set textCache = session.replyText['f' ~ forum.id].text %} {% set postingAction = route('forums.new', forum.id) %} {% endif %} {% if forumReplyLink is defined or topic is not defined %} {% endif %}
{% if not post.poster.permission(constant('Sakura\\Perms\\Site::DEACTIVATED')) or post.poster.permission(constant('Sakura\\Perms\\Site::RESTRICTED')) %}{{ post.poster.username }} {{ post.poster.username }} {% else %} [deleted user] {% endif %}
{{ post.poster.title }}
Tenshi {{ post.poster.country(true) }}{% if post.poster.id == (topic.posts|first).poster.id %} OP{% endif %} {% if user.isActive %}
{% if (user.id == post.poster.id and forum.permission(constant('Sakura\\Perms\\Forum::EDIT_OWN'), user.id)) or forum.permission(constant('Sakura\\Perms\\Forum::EDIT_ANY'), user.id) %} {% endif %} {% if (user.id == post.poster.id and forum.permission(constant('Sakura\\Perms\\Forum::DELETE_OWN'), user.id)) or forum.permission(constant('Sakura\\Perms\\Forum::DELETE_ANY'), user.id) %} {% endif %} {% if not (post.poster.permission(constant('Sakura\\Perms\\Site::DEACTIVATED')) or post.poster.permission(constant('Sakura\\Perms\\Site::RESTRICTED')) or user.id == post.poster.id) %} {% endif %}
{% endif %}
{{ post.parsed|raw }}
{% if post.poster.signature and post.poster.permission(constant('Sakura\\Perms\\Site::CHANGE_SIGNATURE')) %}
{{ post.poster.signature()|raw|nl2br }}
{% endif %}
{% if forumReplyLink is defined or topic is not defined %} {% include 'forum/elements/replyForm.twig' %} {% endif %} {% include 'forum/elements/forumBtns.twig' %}
{% endblock %}