]> git.lizzy.rs Git - cheatdb.git/blob - app/templates/threads/view.html
Improve thread styling
[cheatdb.git] / app / templates / threads / view.html
1 {% extends "base.html" %}
2
3 {% block title %}
4 Threads
5 {% endblock %}
6
7 {% block content %}
8         {% if current_user.is_authenticated %}
9                 {% if current_user in thread.watchers %}
10                         <form method="post" action="{{ thread.getUnsubscribeURL() }}" class="float-right">
11                                 <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
12                                 <input type="submit" class="btn btn-primary" value="Unsubscribe" />
13                         </form>
14                 {% else %}
15                         <form method="post" action="{{ thread.getSubscribeURL() }}" class="float-right">
16                                 <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
17                                 <input type="submit" class="btn btn-primary" value="Subscribe" />
18                         </form>
19                 {% endif %}
20         {% endif %}
21
22         <h1>{% if thread.private %}&#x1f512; {% endif %}{{ thread.title }}</h1>
23
24         {% if thread.package or current_user.is_authenticated %}
25                 {% if thread.package %}
26                         <p>Package: <a href="{{ thread.package.getDetailsURL() }}">{{ thread.package.title }}</a></p>
27                 {% endif %}
28         {% endif %}
29
30         {% if thread.private %}
31                 <i>
32                         This thread is only visible to its creator, the package owner, and users of
33                         Editor rank or above.
34                 </i>
35         {% endif %}
36
37         {% from "macros/threads.html" import render_thread %}
38         {{ render_thread(thread, current_user) }}
39 {% endblock %}