punkweb-bb 0.5.0__py3-none-any.whl → 0.5.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- punkweb_bb/__pycache__/__init__.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/admin.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/admin_forms.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/apps.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/bbcode.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/decorators.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/forms.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/guests.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/middleware.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/mixins.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/models.cpython-311.pyc +0 -0
- punkweb_bb/__pycache__/models.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/pagination.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/response.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/searching.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/settings.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/signals.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/tests.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/urls.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/utils.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/views.cpython-311.pyc +0 -0
- punkweb_bb/__pycache__/views.cpython-313.pyc +0 -0
- punkweb_bb/__pycache__/widgets.cpython-313.pyc +0 -0
- punkweb_bb/bbcode.py +16 -4
- punkweb_bb/migrations/0008_alter_groupstyle_username_style.py +18 -0
- punkweb_bb/migrations/__pycache__/0001_initial.cpython-313.pyc +0 -0
- punkweb_bb/migrations/__pycache__/0002_thread_view_count.cpython-313.pyc +0 -0
- punkweb_bb/migrations/__pycache__/0003_alter_thread_options.cpython-313.pyc +0 -0
- punkweb_bb/migrations/__pycache__/0004_groupstyle.cpython-313.pyc +0 -0
- punkweb_bb/migrations/__pycache__/0005_alter_thread_options.cpython-313.pyc +0 -0
- punkweb_bb/migrations/__pycache__/0006_remove_boardprofile__signature_rendered_and_more.cpython-313.pyc +0 -0
- punkweb_bb/migrations/__pycache__/0007_boardprofile_bio.cpython-313.pyc +0 -0
- punkweb_bb/migrations/__pycache__/0008_alter_groupstyle_username_style.cpython-311.pyc +0 -0
- punkweb_bb/migrations/__pycache__/0008_alter_groupstyle_username_style.cpython-313.pyc +0 -0
- punkweb_bb/migrations/__pycache__/0009_report.cpython-313.pyc +0 -0
- punkweb_bb/migrations/__pycache__/__init__.cpython-313.pyc +0 -0
- punkweb_bb/models.py +6 -3
- punkweb_bb/settings.py +2 -0
- punkweb_bb/static/punkweb_bb/css/bbcode-editor-content.css +4 -0
- punkweb_bb/static/punkweb_bb/css/members.css +6 -0
- punkweb_bb/static/punkweb_bb/css/punkweb.css +4 -0
- punkweb_bb/static/punkweb_bb/vendor/prism-duotone-sea.css +170 -0
- punkweb_bb/static/punkweb_bb/vendor/punkweb-ui.min.css +1 -1
- punkweb_bb/templates/punkweb_bb/base.html +84 -96
- punkweb_bb/templates/punkweb_bb/base_delete_dialog.html +13 -10
- punkweb_bb/templates/punkweb_bb/base_dialog.html +6 -6
- punkweb_bb/templates/punkweb_bb/bbcode.html +12 -14
- punkweb_bb/templates/punkweb_bb/category_create.html +26 -27
- punkweb_bb/templates/punkweb_bb/category_update.html +27 -30
- punkweb_bb/templates/punkweb_bb/components/pagination_controls.html +36 -44
- punkweb_bb/templates/punkweb_bb/components/profile_image.html +8 -8
- punkweb_bb/templates/punkweb_bb/forms/inline_form.html +5 -5
- punkweb_bb/templates/punkweb_bb/forms/stacked_form.html +35 -32
- punkweb_bb/templates/punkweb_bb/index.html +205 -211
- punkweb_bb/templates/punkweb_bb/login.html +24 -30
- punkweb_bb/templates/punkweb_bb/members.html +57 -61
- punkweb_bb/templates/punkweb_bb/partials/category_delete.html +3 -3
- punkweb_bb/templates/punkweb_bb/partials/post_delete.html +3 -3
- punkweb_bb/templates/punkweb_bb/partials/post_update.html +12 -11
- punkweb_bb/templates/punkweb_bb/partials/shout_delete.html +3 -3
- punkweb_bb/templates/punkweb_bb/partials/subcategory_delete.html +3 -3
- punkweb_bb/templates/punkweb_bb/partials/thread_delete.html +3 -3
- punkweb_bb/templates/punkweb_bb/partials/thread_move.html +13 -12
- punkweb_bb/templates/punkweb_bb/profile.html +73 -84
- punkweb_bb/templates/punkweb_bb/search.html +12 -16
- punkweb_bb/templates/punkweb_bb/settings.html +29 -36
- punkweb_bb/templates/punkweb_bb/shoutbox/shout_list.html +17 -19
- punkweb_bb/templates/punkweb_bb/shoutbox/shoutbox.html +18 -29
- punkweb_bb/templates/punkweb_bb/signup.html +24 -30
- punkweb_bb/templates/punkweb_bb/subcategory.html +114 -132
- punkweb_bb/templates/punkweb_bb/subcategory_create.html +32 -39
- punkweb_bb/templates/punkweb_bb/subcategory_update.html +33 -42
- punkweb_bb/templates/punkweb_bb/thread.html +207 -238
- punkweb_bb/templates/punkweb_bb/thread_create.html +36 -43
- punkweb_bb/templates/punkweb_bb/thread_update.html +36 -45
- punkweb_bb/templates/punkweb_bb/widgets/markdown-editor.html +3 -1
- punkweb_bb/templatetags/__pycache__/__init__.cpython-313.pyc +0 -0
- punkweb_bb/templatetags/__pycache__/can_delete.cpython-313.pyc +0 -0
- punkweb_bb/templatetags/__pycache__/can_edit.cpython-313.pyc +0 -0
- punkweb_bb/templatetags/__pycache__/can_post.cpython-313.pyc +0 -0
- punkweb_bb/templatetags/__pycache__/humanize_int.cpython-313.pyc +0 -0
- punkweb_bb/templatetags/__pycache__/punkweb_bb.cpython-313.pyc +0 -0
- punkweb_bb/templatetags/__pycache__/render.cpython-313.pyc +0 -0
- punkweb_bb/templatetags/__pycache__/styled_group_name.cpython-313.pyc +0 -0
- punkweb_bb/templatetags/__pycache__/styled_username.cpython-313.pyc +0 -0
- punkweb_bb/tests.py +21 -0
- punkweb_bb/views.py +27 -27
- {punkweb_bb-0.5.0.dist-info → punkweb_bb-0.5.2.dist-info}/METADATA +93 -37
- {punkweb_bb-0.5.0.dist-info → punkweb_bb-0.5.2.dist-info}/RECORD +92 -49
- {punkweb_bb-0.5.0.dist-info → punkweb_bb-0.5.2.dist-info}/WHEEL +1 -1
- {punkweb_bb-0.5.0.dist-info → punkweb_bb-0.5.2.dist-info/licenses}/LICENSE +0 -0
- {punkweb_bb-0.5.0.dist-info → punkweb_bb-0.5.2.dist-info}/top_level.txt +0 -0
|
@@ -1,263 +1,232 @@
|
|
|
1
1
|
{% extends 'punkweb_bb/base.html' %}
|
|
2
|
-
{% load static render styled_username can_delete can_edit can_post %}
|
|
3
2
|
|
|
4
|
-
{%
|
|
5
|
-
{% block og_title_prefix %}{{thread.title}} | {% endblock %}
|
|
3
|
+
{% load static render styled_username can_delete can_edit can_post %}
|
|
6
4
|
|
|
5
|
+
{% block title_prefix %}{{ thread.title }} |{% endblock %}
|
|
6
|
+
{% block og_title_prefix %}{{ thread.title }} |{% endblock %}
|
|
7
7
|
{% block extra_head %}
|
|
8
|
-
<meta name="description"
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
{{
|
|
12
|
-
{%
|
|
13
|
-
|
|
14
|
-
{% block extra_script %}
|
|
15
|
-
{{post_form.media.js}}
|
|
8
|
+
<meta name="description"
|
|
9
|
+
content="{{ thread.content|render|striptags|truncatechars:120 }}" />
|
|
10
|
+
<meta property="og:description"
|
|
11
|
+
content="{{ thread.content|render|striptags|truncatechars:120 }}" />
|
|
12
|
+
<link rel="stylesheet" href="{% static 'punkweb_bb/css/thread.css' %}" />
|
|
13
|
+
{{ post_form.media.css }}
|
|
16
14
|
{% endblock %}
|
|
17
|
-
|
|
15
|
+
{% block extra_script %}{{ post_form.media.js }}{% endblock %}
|
|
18
16
|
{% block content %}
|
|
17
|
+
<nav>
|
|
18
|
+
<ul class="pw-breadcrumb">
|
|
19
|
+
<li class="pw-breadcrumb-item">
|
|
20
|
+
<a href="{% url 'punkweb_bb:index' %}">Home</a>
|
|
21
|
+
</li>
|
|
22
|
+
<li class="pw-breadcrumb-item">
|
|
23
|
+
<a href="{{ thread.subcategory.category.get_absolute_url }}">{{ thread.subcategory.category.name }}</a>
|
|
24
|
+
</li>
|
|
25
|
+
<li class="pw-breadcrumb-item">
|
|
26
|
+
<a href="{{ thread.subcategory.get_absolute_url }}">{{ thread.subcategory.name }}</a>
|
|
27
|
+
</li>
|
|
28
|
+
<li class="pw-breadcrumb-item active">{{ thread.title }}</li>
|
|
29
|
+
</ul>
|
|
30
|
+
</nav>
|
|
31
|
+
{% if posts.number == 1 %}
|
|
32
|
+
<h1>{{ thread.title }}</h1>
|
|
33
|
+
<div class="pw-card fluid mb-4">
|
|
34
|
+
<div class="pw-card-header">
|
|
35
|
+
<div class="thread__date">
|
|
36
|
+
<time datetime="{{ thread.created_at|date:'c' }}">{{ thread.created_at | date:'M j, Y' }}</time>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="thread">
|
|
40
|
+
<div class="thread__user">
|
|
41
|
+
<div class="thread__user__info">
|
|
42
|
+
<div class="thread__user__image">
|
|
19
43
|
|
|
20
|
-
|
|
21
|
-
<ul class="pw-breadcrumb">
|
|
22
|
-
<li class="pw-breadcrumb-item">
|
|
23
|
-
<a href="{% url 'punkweb_bb:index' %}">Home</a>
|
|
24
|
-
</li>
|
|
25
|
-
<li class="pw-breadcrumb-item">
|
|
26
|
-
<a href="{{thread.subcategory.category.get_absolute_url}}">{{thread.subcategory.category.name}}</a>
|
|
27
|
-
</li>
|
|
28
|
-
<li class="pw-breadcrumb-item">
|
|
29
|
-
<a href="{{thread.subcategory.get_absolute_url}}">{{thread.subcategory.name}}</a>
|
|
30
|
-
</li>
|
|
31
|
-
<li class="pw-breadcrumb-item active">
|
|
32
|
-
{{thread.title}}
|
|
33
|
-
</li>
|
|
34
|
-
</ul>
|
|
35
|
-
</nav>
|
|
36
|
-
|
|
37
|
-
{% if posts.number == 1 %}
|
|
38
|
-
<h1>{{thread.title}}</h1>
|
|
44
|
+
{% include 'punkweb_bb/components/profile_image.html' with user=thread.user size="md" %}
|
|
39
45
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
</div>
|
|
47
|
+
<div class="thread__user__username">
|
|
48
|
+
<a href="{% url 'punkweb_bb:profile' thread.user.id %}">{{ thread.user|styled_username }}</a>
|
|
49
|
+
{% if thread.user.profile.is_online %}<div class="onlineIndicator"></div>{% endif %}
|
|
50
|
+
</div>
|
|
51
|
+
<div class="thread__user__group">
|
|
52
|
+
{% if thread.user.profile.priority_group %}
|
|
53
|
+
{{ thread.user.profile.priority_group.name }}
|
|
54
|
+
{% else %}
|
|
55
|
+
Member
|
|
56
|
+
{% endif %}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="thread__user__details">
|
|
60
|
+
<div class="thread__user__details__row">
|
|
61
|
+
<div class="thread__user__details__label">Joined:</div>
|
|
62
|
+
<div class="thread__user__details__value">
|
|
63
|
+
<time datetime="{{ thread.user.date_joined|date:'c' }}">{{ thread.user.date_joined | date:'M j, Y' }}</time>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="thread__user__details__row">
|
|
67
|
+
<div class="thread__user__details__label">Posts:</div>
|
|
68
|
+
<div class="thread__user__details__value">{{ thread.user.profile.post_count }}</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
51
71
|
</div>
|
|
52
|
-
<div class="
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
72
|
+
<div class="thread__main">
|
|
73
|
+
<div class="thread__content">{{ thread.content|render }}</div>
|
|
74
|
+
{% if thread|can_delete:request.user or thread|can_edit:request.user or perms.punkweb_bb.pin_thread or perms.punkweb_bb.close_thread or perms.punkweb_bb.move_thread %}
|
|
75
|
+
<div class="thread__actions">
|
|
76
|
+
{% if perms.punkweb_bb.move_thread %}
|
|
77
|
+
<a class="pw-icon-button default rounded"
|
|
78
|
+
title="Move"
|
|
79
|
+
hx-get="{% url 'punkweb_bb:thread_move' thread.id %}"
|
|
80
|
+
hx-target="#dialog-portal">
|
|
81
|
+
<span class="material-symbols-outlined">move_item</span>
|
|
82
|
+
</a>
|
|
83
|
+
{% endif %}
|
|
84
|
+
{% if perms.punkweb_bb.pin_thread %}
|
|
85
|
+
<a class="pw-icon-button default rounded"
|
|
86
|
+
title="{% if thread.is_pinned %}Unpin{% else %}Pin{% endif %}"
|
|
87
|
+
hx-get="{% url 'punkweb_bb:thread_pin' thread.id %}"
|
|
88
|
+
hx-swap="none">
|
|
89
|
+
{% if thread.is_pinned %}
|
|
90
|
+
<span class="material-symbols-outlined">keep_off</span>
|
|
91
|
+
{% else %}
|
|
92
|
+
<span class="material-symbols-outlined">keep</span>
|
|
93
|
+
{% endif %}
|
|
94
|
+
</a>
|
|
95
|
+
{% endif %}
|
|
96
|
+
{% if perms.punkweb_bb.close_thread %}
|
|
97
|
+
<a class="pw-icon-button default rounded"
|
|
98
|
+
title="{% if thread.is_closed %}Reopen{% else %}Close{% endif %}"
|
|
99
|
+
hx-get="{% url 'punkweb_bb:thread_close' thread.id %}"
|
|
100
|
+
hx-swap="none">
|
|
101
|
+
{% if thread.is_closed %}
|
|
102
|
+
<span class="material-symbols-outlined">lock_open</span>
|
|
103
|
+
{% else %}
|
|
104
|
+
<span class="material-symbols-outlined">lock</span>
|
|
105
|
+
{% endif %}
|
|
106
|
+
</a>
|
|
107
|
+
{% endif %}
|
|
108
|
+
{% if thread|can_edit:request.user %}
|
|
109
|
+
<a class="pw-icon-button default rounded"
|
|
110
|
+
href="{% url 'punkweb_bb:thread_update' thread.id %}"
|
|
111
|
+
title="Edit">
|
|
112
|
+
<span class="material-symbols-outlined">edit</span>
|
|
113
|
+
</a>
|
|
114
|
+
{% endif %}
|
|
115
|
+
{% if thread|can_delete:request.user %}
|
|
116
|
+
<a class="pw-icon-button default rounded red"
|
|
117
|
+
title="Delete"
|
|
118
|
+
hx-get="{% url 'punkweb_bb:thread_delete' thread.id %}"
|
|
119
|
+
hx-target="#dialog-portal">
|
|
120
|
+
<span class="material-symbols-outlined">delete</span>
|
|
121
|
+
</a>
|
|
122
|
+
{% endif %}
|
|
123
|
+
</div>
|
|
58
124
|
{% endif %}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{% if thread.user.profile.priority_group %}
|
|
62
|
-
{{thread.user.profile.priority_group.name}}
|
|
63
|
-
{% else %}
|
|
64
|
-
Member
|
|
125
|
+
{% if thread.user.profile.signature|render %}
|
|
126
|
+
<div class="thread__signature">{{ thread.user.profile.signature|render }}</div>
|
|
65
127
|
{% endif %}
|
|
66
128
|
</div>
|
|
67
129
|
</div>
|
|
68
|
-
<div class="thread__user__details">
|
|
69
|
-
<div class="thread__user__details__row">
|
|
70
|
-
<div class="thread__user__details__label">Joined:</div>
|
|
71
|
-
<div class="thread__user__details__value">
|
|
72
|
-
<time datetime="{{thread.user.date_joined|date:'c'}}">{{thread.user.date_joined | date:'M j, Y'}}</time>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="thread__user__details__row">
|
|
76
|
-
<div class="thread__user__details__label">Posts:</div>
|
|
77
|
-
<div class="thread__user__details__value">{{thread.user.profile.post_count}}</div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
130
|
</div>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<a
|
|
89
|
-
class="pw-icon-button default rounded"
|
|
90
|
-
title="Move"
|
|
91
|
-
hx-get="{% url 'punkweb_bb:thread_move' thread.id %}"
|
|
92
|
-
hx-target="#dialog-portal"
|
|
93
|
-
>
|
|
94
|
-
<span class="material-symbols-outlined">move_item</span>
|
|
95
|
-
</a>
|
|
96
|
-
{% endif %}
|
|
97
|
-
{% if perms.punkweb_bb.pin_thread %}
|
|
98
|
-
<a
|
|
99
|
-
class="pw-icon-button default rounded"
|
|
100
|
-
title="{% if thread.is_pinned %}Unpin{% else %}Pin{% endif %}"
|
|
101
|
-
hx-get="{% url 'punkweb_bb:thread_pin' thread.id %}"
|
|
102
|
-
hx-swap="none"
|
|
103
|
-
>
|
|
104
|
-
{% if thread.is_pinned %}
|
|
105
|
-
<span class="material-symbols-outlined">keep_off</span>
|
|
106
|
-
{% else %}
|
|
107
|
-
<span class="material-symbols-outlined">keep</span>
|
|
108
|
-
{% endif %}
|
|
109
|
-
</a>
|
|
110
|
-
{% endif %}
|
|
111
|
-
{% if perms.punkweb_bb.close_thread %}
|
|
112
|
-
<a
|
|
113
|
-
class="pw-icon-button default rounded"
|
|
114
|
-
title="{% if thread.is_closed %}Reopen{% else %}Close{% endif %}"
|
|
115
|
-
hx-get="{% url 'punkweb_bb:thread_close' thread.id %}"
|
|
116
|
-
hx-swap="none"
|
|
117
|
-
>
|
|
118
|
-
{% if thread.is_closed %}
|
|
119
|
-
<span class="material-symbols-outlined">lock_open</span>
|
|
120
|
-
{% else %}
|
|
121
|
-
<span class="material-symbols-outlined">lock</span>
|
|
122
|
-
{% endif %}
|
|
123
|
-
</a>
|
|
124
|
-
{% endif %}
|
|
125
|
-
{% if thread|can_edit:request.user %}
|
|
126
|
-
<a
|
|
127
|
-
class="pw-icon-button default rounded"
|
|
128
|
-
href="{% url 'punkweb_bb:thread_update' thread.id %}"
|
|
129
|
-
title="Edit"
|
|
130
|
-
>
|
|
131
|
-
<span class="material-symbols-outlined">edit</span>
|
|
132
|
-
</a>
|
|
133
|
-
{% endif %}
|
|
134
|
-
{% if thread|can_delete:request.user %}
|
|
135
|
-
<a
|
|
136
|
-
class="pw-icon-button default rounded red"
|
|
137
|
-
title="Delete"
|
|
138
|
-
hx-get="{% url 'punkweb_bb:thread_delete' thread.id %}"
|
|
139
|
-
hx-target="#dialog-portal"
|
|
140
|
-
>
|
|
141
|
-
<span class="material-symbols-outlined">delete</span>
|
|
142
|
-
</a>
|
|
143
|
-
{% endif %}
|
|
144
|
-
</div>
|
|
145
|
-
{% endif %}
|
|
146
|
-
{% if thread.user.profile.signature|render %}
|
|
147
|
-
<div class="thread__signature">
|
|
148
|
-
{{thread.user.profile.signature|render}}
|
|
131
|
+
{% endif %}
|
|
132
|
+
{% for post in posts %}
|
|
133
|
+
<div id="post-{{ post.id }}" class="pw-card fluid mb-4">
|
|
134
|
+
<div class="pw-card-header thread__header">
|
|
135
|
+
<div class="thread__date">
|
|
136
|
+
<time datetime="{{ post.created_at|date:'c' }}">{{ post.created_at | date:'M j, Y' }}</time>
|
|
137
|
+
</div>
|
|
138
|
+
<a class="thread__index" href="{{ post.get_absolute_url }}">#{{ post.index }}</a>
|
|
149
139
|
</div>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
{% endif %}
|
|
140
|
+
<div class="thread">
|
|
141
|
+
<div class="thread__user">
|
|
142
|
+
<div class="thread__user__info">
|
|
143
|
+
<div class="thread__user__image">
|
|
155
144
|
|
|
156
|
-
{%
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
145
|
+
{% include 'punkweb_bb/components/profile_image.html' with user=post.user size="md" %}
|
|
146
|
+
|
|
147
|
+
</div>
|
|
148
|
+
<div class="thread__user__username">
|
|
149
|
+
<a href="{% url 'punkweb_bb:profile' post.user.id %}">{{ post.user|styled_username }}</a>
|
|
150
|
+
{% if post.user.profile.is_online %}<div class="onlineIndicator"></div>{% endif %}
|
|
151
|
+
</div>
|
|
152
|
+
<div class="thread__user__group">
|
|
153
|
+
{% if post.user.profile.priority_group %}
|
|
154
|
+
{{ post.user.profile.priority_group.name }}
|
|
155
|
+
{% else %}
|
|
156
|
+
Member
|
|
157
|
+
{% endif %}
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
<div class="thread__user__details">
|
|
161
|
+
<div class="thread__user__details__row">
|
|
162
|
+
<div class="thread__user__details__label">Joined:</div>
|
|
163
|
+
<div class="thread__user__details__value">
|
|
164
|
+
<time datetime="{{ post.user.date_joined|date:'c' }}">{{ post.user.date_joined | date:'M j, Y' }}</time>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="thread__user__details__row">
|
|
168
|
+
<div class="thread__user__details__label">Posts:</div>
|
|
169
|
+
<div class="thread__user__details__value">{{ post.user.profile.post_count }}</div>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
169
172
|
</div>
|
|
170
|
-
<div class="
|
|
171
|
-
<
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
<div class="thread__main">
|
|
174
|
+
<div class="thread__content">{{ post.content|render }}</div>
|
|
175
|
+
{% if post|can_delete:request.user or post|can_edit:request.user %}
|
|
176
|
+
<div class="thread__actions">
|
|
177
|
+
{% if post|can_edit:request.user %}
|
|
178
|
+
<a class="pw-icon-button default rounded"
|
|
179
|
+
title="Edit"
|
|
180
|
+
hx-get="{% url 'punkweb_bb:post_update' post.id %}"
|
|
181
|
+
hx-target="#dialog-portal">
|
|
182
|
+
<span class="material-symbols-outlined">edit</span>
|
|
183
|
+
</a>
|
|
184
|
+
{% endif %}
|
|
185
|
+
{% if post|can_delete:request.user %}
|
|
186
|
+
<a class="pw-icon-button default rounded red"
|
|
187
|
+
title="Delete"
|
|
188
|
+
hx-get="{% url 'punkweb_bb:post_delete' post.id %}"
|
|
189
|
+
hx-target="#dialog-portal">
|
|
190
|
+
<span class="material-symbols-outlined">delete</span>
|
|
191
|
+
</a>
|
|
192
|
+
{% endif %}
|
|
193
|
+
</div>
|
|
176
194
|
{% endif %}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
{% if post.user.profile.priority_group %}
|
|
180
|
-
{{post.user.profile.priority_group.name}}
|
|
181
|
-
{% else %}
|
|
182
|
-
Member
|
|
195
|
+
{% if post.user.profile.signature|render %}
|
|
196
|
+
<div class="thread__signature">{{ post.user.profile.signature|render }}</div>
|
|
183
197
|
{% endif %}
|
|
184
198
|
</div>
|
|
185
199
|
</div>
|
|
186
|
-
<div class="thread__user__details">
|
|
187
|
-
<div class="thread__user__details__row">
|
|
188
|
-
<div class="thread__user__details__label">Joined:</div>
|
|
189
|
-
<div class="thread__user__details__value">
|
|
190
|
-
<time datetime="{{post.user.date_joined|date:'c'}}">{{post.user.date_joined | date:'M j, Y'}}</time>
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
<div class="thread__user__details__row">
|
|
194
|
-
<div class="thread__user__details__label">Posts:</div>
|
|
195
|
-
<div class="thread__user__details__value">{{post.user.profile.post_count}}</div>
|
|
196
|
-
</div>
|
|
197
|
-
</div>
|
|
198
200
|
</div>
|
|
199
|
-
|
|
200
|
-
<div class="thread__content">
|
|
201
|
-
{{post.content|render}}
|
|
202
|
-
</div>
|
|
203
|
-
{% if post|can_delete:request.user or post|can_edit:request.user %}
|
|
204
|
-
<div class="thread__actions">
|
|
205
|
-
{% if post|can_edit:request.user %}
|
|
206
|
-
<a
|
|
207
|
-
class="pw-icon-button default rounded"
|
|
208
|
-
title="Edit"
|
|
209
|
-
hx-get="{% url 'punkweb_bb:post_update' post.id %}"
|
|
210
|
-
hx-target="#dialog-portal"
|
|
211
|
-
>
|
|
212
|
-
<span class="material-symbols-outlined">edit</span>
|
|
213
|
-
</a>
|
|
214
|
-
{% endif %}
|
|
215
|
-
{% if post|can_delete:request.user %}
|
|
216
|
-
<a
|
|
217
|
-
class="pw-icon-button default rounded red"
|
|
218
|
-
title="Delete"
|
|
219
|
-
hx-get="{% url 'punkweb_bb:post_delete' post.id %}"
|
|
220
|
-
hx-target="#dialog-portal"
|
|
221
|
-
>
|
|
222
|
-
<span class="material-symbols-outlined">delete</span>
|
|
223
|
-
</a>
|
|
224
|
-
{% endif %}
|
|
225
|
-
</div>
|
|
226
|
-
{% endif %}
|
|
227
|
-
{% if post.user.profile.signature|render %}
|
|
228
|
-
<div class="thread__signature">
|
|
229
|
-
{{post.user.profile.signature|render}}
|
|
230
|
-
</div>
|
|
231
|
-
{% endif %}
|
|
232
|
-
</div>
|
|
233
|
-
</div>
|
|
234
|
-
</div>
|
|
235
|
-
{% endfor %}
|
|
201
|
+
{% endfor %}
|
|
236
202
|
|
|
237
|
-
{% include 'punkweb_bb/components/pagination_controls.html' with paginator=posts %}
|
|
203
|
+
{% include 'punkweb_bb/components/pagination_controls.html' with paginator=posts %}
|
|
238
204
|
|
|
239
|
-
{% if
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
205
|
+
{% if request.user.is_authenticated %}
|
|
206
|
+
{% if thread|can_post:request.user %}
|
|
207
|
+
<div class="pw-card fluid mt-4">
|
|
208
|
+
<div class="pw-card-header">Reply to thread</div>
|
|
209
|
+
<div class="pw-card-content">
|
|
210
|
+
<div class="thread__reply__content">
|
|
211
|
+
<form class="pw-form"
|
|
212
|
+
action="{% url 'punkweb_bb:post_create' thread.id %}"
|
|
213
|
+
method="post">
|
|
214
|
+
{% csrf_token %}
|
|
215
|
+
{{ post_form }}
|
|
216
|
+
<div class="pw-form-actions end">
|
|
217
|
+
<button class="pw-button raised primary" type="submit">Post reply</button>
|
|
218
|
+
</div>
|
|
219
|
+
</form>
|
|
220
|
+
</div>
|
|
249
221
|
</div>
|
|
250
|
-
</
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
</div>
|
|
254
|
-
|
|
255
|
-
<div
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
{% endif %}
|
|
262
|
-
|
|
263
|
-
{% endblock %}
|
|
222
|
+
</div>
|
|
223
|
+
{% else %}
|
|
224
|
+
<div class="pw-card fluid mt-4">
|
|
225
|
+
<div class="pw-card-header">Thread closed</div>
|
|
226
|
+
<div class="pw-card-content">
|
|
227
|
+
<div>This thread is closed and you cannot reply to it.</div>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
{% endif %}
|
|
231
|
+
{% endif %}
|
|
232
|
+
{% endblock %}
|
|
@@ -1,48 +1,41 @@
|
|
|
1
1
|
{% extends 'punkweb_bb/base.html' %}
|
|
2
|
-
{% load static %}
|
|
3
|
-
|
|
4
|
-
{% block title_prefix %}Create Thread | {% endblock %}
|
|
5
|
-
{% block og_title_prefix %}Create Thread | {% endblock %}
|
|
6
2
|
|
|
7
|
-
{%
|
|
8
|
-
{{form.media.css}}
|
|
9
|
-
{% endblock %}
|
|
10
|
-
|
|
11
|
-
{% block extra_script %}
|
|
12
|
-
{{form.media.js}}
|
|
13
|
-
{% endblock %}
|
|
3
|
+
{% load static %}
|
|
14
4
|
|
|
5
|
+
{% block title_prefix %}Create Thread |{% endblock %}
|
|
6
|
+
{% block og_title_prefix %}Create Thread |{% endblock %}
|
|
7
|
+
{% block extra_head %}{{ form.media.css }}{% endblock %}
|
|
8
|
+
{% block extra_script %}{{ form.media.js }}{% endblock %}
|
|
15
9
|
{% block content %}
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
10
|
+
<nav>
|
|
11
|
+
<ul class="pw-breadcrumb">
|
|
12
|
+
<li class="pw-breadcrumb-item">
|
|
13
|
+
<a href="{% url 'punkweb_bb:index' %}">Home</a>
|
|
14
|
+
</li>
|
|
15
|
+
<li class="pw-breadcrumb-item">
|
|
16
|
+
<a href="{{ subcategory.category.get_absolute_url }}">{{ subcategory.category.name }}</a>
|
|
17
|
+
</li>
|
|
18
|
+
<li class="pw-breadcrumb-item">
|
|
19
|
+
<a href="{{ subcategory.get_absolute_url }}">{{ subcategory.name }}</a>
|
|
20
|
+
</li>
|
|
21
|
+
<li class="pw-breadcrumb-item active">Create Thread</li>
|
|
22
|
+
</ul>
|
|
23
|
+
</nav>
|
|
24
|
+
<div class="pw-card fluid">
|
|
25
|
+
<div class="pw-card-header">Create Thread</div>
|
|
26
|
+
<div class="pw-card-content">
|
|
27
|
+
<form class="pw-form"
|
|
28
|
+
action="{% url 'punkweb_bb:thread_create' subcategory.slug %}"
|
|
29
|
+
method="post">
|
|
30
|
+
{% csrf_token %}
|
|
31
|
+
{{ form }}
|
|
32
|
+
<div class="pw-form-actions end">
|
|
33
|
+
<a class="pw-button default"
|
|
34
|
+
href="{{ subcategory.get_absolute_url }}"
|
|
35
|
+
type="submit">Cancel</a>
|
|
36
|
+
<button class="pw-button raised primary" type="submit">Create Thread</button>
|
|
37
|
+
</div>
|
|
38
|
+
</form>
|
|
39
|
+
</div>
|
|
45
40
|
</div>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{% endblock %}
|
|
41
|
+
{% endblock %}
|
|
@@ -1,50 +1,41 @@
|
|
|
1
1
|
{% extends 'punkweb_bb/base.html' %}
|
|
2
|
-
{% load static %}
|
|
3
|
-
|
|
4
|
-
{% block title_prefix %}Edit Thread | {% endblock %}
|
|
5
2
|
|
|
6
|
-
{%
|
|
7
|
-
{{form.media.css}}
|
|
8
|
-
{% endblock %}
|
|
9
|
-
|
|
10
|
-
{% block extra_script %}
|
|
11
|
-
{{form.media.js}}
|
|
12
|
-
{% endblock %}
|
|
3
|
+
{% load static %}
|
|
13
4
|
|
|
5
|
+
{% block title_prefix %}Edit Thread |{% endblock %}
|
|
6
|
+
{% block extra_head %}{{ form.media.css }}{% endblock %}
|
|
7
|
+
{% block extra_script %}{{ form.media.js }}{% endblock %}
|
|
14
8
|
{% block content %}
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</form>
|
|
9
|
+
<nav>
|
|
10
|
+
<ul class="pw-breadcrumb">
|
|
11
|
+
<li class="pw-breadcrumb-item">
|
|
12
|
+
<a href="{% url 'punkweb_bb:index' %}">Home</a>
|
|
13
|
+
</li>
|
|
14
|
+
<li class="pw-breadcrumb-item">
|
|
15
|
+
<a href="{{ thread.subcategory.category.get_absolute_url }}">{{ thread.subcategory.category.name }}</a>
|
|
16
|
+
</li>
|
|
17
|
+
<li class="pw-breadcrumb-item">
|
|
18
|
+
<a href="{{ thread.subcategory.get_absolute_url }}">{{ thread.subcategory.name }}</a>
|
|
19
|
+
</li>
|
|
20
|
+
<li class="pw-breadcrumb-item">
|
|
21
|
+
<a href="{{ thread.get_absolute_url }}">{{ thread.title }}</a>
|
|
22
|
+
</li>
|
|
23
|
+
<li class="pw-breadcrumb-item active">Edit</li>
|
|
24
|
+
</ul>
|
|
25
|
+
</nav>
|
|
26
|
+
<div class="pw-card fluid">
|
|
27
|
+
<div class="pw-card-header">Edit Thread</div>
|
|
28
|
+
<div class="pw-card-content">
|
|
29
|
+
<form class="pw-form"
|
|
30
|
+
action="{% url 'punkweb_bb:thread_update' thread.id %}"
|
|
31
|
+
method="post">
|
|
32
|
+
{% csrf_token %}
|
|
33
|
+
{{ form }}
|
|
34
|
+
<div class="pw-form-actions end">
|
|
35
|
+
<a class="pw-button default" href="{{ thread.get_absolute_url }}">Cancel</a>
|
|
36
|
+
<button class="pw-button raised primary" type="submit">Save</button>
|
|
37
|
+
</div>
|
|
38
|
+
</form>
|
|
39
|
+
</div>
|
|
47
40
|
</div>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{% endblock %}
|
|
41
|
+
{% endblock %}
|