2018-06-11 23:49:25 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2020-07-10 20:46:23 +02:00
|
|
|
{{ thread.title }} - {{ _("Threads") }}
|
2018-06-11 23:49:25 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2018-12-22 21:13:43 +01:00
|
|
|
{% if current_user.is_authenticated %}
|
|
|
|
{% if current_user in thread.watchers %}
|
|
|
|
<form method="post" action="{{ thread.getUnsubscribeURL() }}" class="float-right">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
<input type="submit" class="btn btn-primary" value="Unsubscribe" />
|
|
|
|
</form>
|
|
|
|
{% else %}
|
|
|
|
<form method="post" action="{{ thread.getSubscribeURL() }}" class="float-right">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
<input type="submit" class="btn btn-primary" value="Subscribe" />
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2020-07-11 02:34:51 +02:00
|
|
|
{% if thread and thread.checkPerm(current_user, "LOCK_THREAD") %}
|
|
|
|
{% if thread.locked %}
|
|
|
|
<form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=0) }}" class="float-right mr-2">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
<input type="submit" class="btn btn-secondary" value="{{ _('Unlock Thread') }}" />
|
|
|
|
</form>
|
|
|
|
{% else %}
|
|
|
|
<form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=1) }}" class="float-right mr-2">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
<input type="submit" class="btn btn-secondary" value="{{ _('Lock Thread') }}" />
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2018-12-22 21:13:43 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2020-07-10 20:01:58 +02:00
|
|
|
{% if current_user == thread.author and thread.review %}
|
|
|
|
<a class="btn btn-primary ml-1 float-right mr-2"
|
|
|
|
href="{{ thread.review.package.getReviewURL() }}">
|
|
|
|
<i class="fas fa-edit"></i>
|
|
|
|
{{ _("Edit Review") }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-07-09 05:10:09 +02:00
|
|
|
<h1>
|
|
|
|
{% if thread.review %}
|
|
|
|
{% if thread.review.recommends %}
|
|
|
|
<i class="fas fa-thumbs-up mr-2" style="color:#6f6;"></i>
|
|
|
|
{% else %}
|
|
|
|
<i class="fas fa-thumbs-down mr-2" style="color:#f66;"></i>
|
|
|
|
{% endif %}
|
2018-07-28 16:30:59 +02:00
|
|
|
{% endif %}
|
2020-07-09 05:10:09 +02:00
|
|
|
{% if thread.private %}🔒 {% endif %}{{ thread.title }}
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
{% if thread.package %}
|
|
|
|
<p>
|
|
|
|
Package: <a href="{{ thread.package.getDetailsURL() }}">{{ thread.package.title }}</a>
|
|
|
|
</p>
|
2018-06-11 23:49:25 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if thread.private %}
|
|
|
|
<i>
|
|
|
|
This thread is only visible to its creator, the package owner, and users of
|
|
|
|
Editor rank or above.
|
|
|
|
</i>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% from "macros/threads.html" import render_thread %}
|
|
|
|
{{ render_thread(thread, current_user) }}
|
|
|
|
{% endblock %}
|