annotate sat_templates/templates/default/forum/view_topics.html @ 413:0190a0d32909 default tip

Forum: Major redesign of forums: Forums have been redesigned. They follow the new general design with 2 or 3 panels, allowing to have directly a forum if one is found/set up, and a panel on the left to search/discover other ones. Categories have been rewritten to be usable with pubsub relationships, a XEP-0277 type node is used for topics, and each item has a comments node for the threads. The thread view is set in `forum/show_messages.html` template. It has a header with a search box and a button to (un)subscribe. Items are displayed with the same macros as for the blog items. Below a room is set for editor, tags and attachments. rel 463
author Goffi <goffi@goffi.org>
date Fri, 05 Sep 2025 21:54:09 +0200
parents e9f0a4215e46
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
120
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {% if not embedded %}{% extends 'base/base.html' %}{% endif %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
2 {% import 'input/field.html' as field with context%}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
3 {% import 'input/textbox.html' as textbox with context %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
4 {% import 'input/navigation.html' as navigation with context %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
5 {% import 'components/avatar.html' as avatar with context %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
6
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
7 {% block body %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
8
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
9 {% if not topics %}
128
4f27ce980ced css: started to refactor CSS class to follow BEM conventions
Goffi <goffi@goffi.org>
parents: 120
diff changeset
10 <div class="message--info">
120
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
11 {% trans %}There is not message yet in this forum.{% endtrans %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
12 {% if profile %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
13 {% trans %}You can start a topic of interest by filling this form.{% endtrans %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
14 {% else %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
15 {% trans %}You can login to create a new topic.{% endtrans %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
16 {% endif %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
17 </div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
18 {% endif %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {% if profile %}
133
0a0d9a953d98 css: some more refactoring
Goffi <goffi@goffi.org>
parents: 128
diff changeset
20 <div class="forum__topic_create">
120
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
21 {% call textbox.textbox(service, node, placeholder=_("Your message"), submit_label=_("Create topic"), type="new_topic") %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
22 {{ field.text("title", placeholder=_("Your topic (try to be short and explicit)"), required=True) }}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
23 {% endcall %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
24 </div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
25 {% endif %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
26
133
0a0d9a953d98 css: some more refactoring
Goffi <goffi@goffi.org>
parents: 128
diff changeset
27 <div class="forum__topics">
120
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
28 {% for topic in topics %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
29 <div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
30 <a href="{{topic.http_uri}}">
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
31 {{ avatar.avatar(topic.author) }}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
32 {{topic.title}}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
33 </a>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
34 </div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
35 {% endfor %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
36 </div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
37
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
38 {{ navigation.prev_next(_("older topics"), _("newer topics")) }}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
39 {% endblock body %}