Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 58647d9

Browse files
committedAug 13, 2016
WIP: postlist.html
1 parent e135f8b commit 58647d9

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{#
2+
forum/postlist.html
3+
~~~~~~~~~~~~~~~~~~~
4+
5+
Show a list of all posts for a given user.
6+
7+
:copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details.
8+
:license: BSD, see LICENSE for more details.
9+
#}
10+
{% extends 'forum/base.html' %}
11+
12+
{% block title %}
13+
{{ username }} – {{ super() }}
14+
{% endblock %}
15+
16+
{% block breadcrumb %}
17+
{{ super() }}
18+
19+
{% if forum %}
20+
{{ macros.breadcrumb_item(forum.name, href('forum', 'author', username|e, 'forum', forum.slug)) }}
21+
{% elif topic %}
22+
{{ macros.breadcrumb_item(topic.title, href('forum', 'author', username|e, 'topic', topic.slug)) }}
23+
{% endif %}
24+
{{ macros.breadcrumb_item(_('Posts by') + ' ' + username, href('forum', 'author', username|e)) }}
25+
{% endblock %}
26+
27+
28+
{% block content %}
29+
{% set rendered_pagination = macros.render_pagination(pagination) %}
30+
{{ rendered_pagination }}
31+
32+
<div class="forum-topic-list">
33+
<div class="forum-topic-list-heading">
34+
<h1>
35+
{{ title }}
36+
</h1>
37+
</div>
38+
</div>
39+
40+
<ul>
41+
{% for post in posts if (not post.hidden or not post.topic.hidden or can_moderate(post.topic)) %}
42+
<li class="forum-topic-list-item">
43+
<div class="row">
44+
<div class="forum-topic-list-post">
45+
{% if can_moderate(post.topic) and post.hidden %}{% trans %}[Hidden]{% endtrans %}{% endif %}
46+
<a href="{{ post|url }}">
47+
{% trans date=post.pub_date|datetime %}
48+
Post on {{ date }}
49+
{% endtrans %}
50+
</a>
51+
</div>
52+
53+
<div class="forum-topic-list-topic">
54+
<p class="topic_title">
55+
<a href="{{ post.topic|url }}">{{ post.topic.title|e }}</a>
56+
</p>
57+
<p class="description note">
58+
{% trans author=username|e,
59+
userlink=href('portal', 'user', username|e),
60+
link=href('forum', 'author', username|e, 'topic', post.topic.slug) %}
61+
<a href="{{ link }}">All posts by {{ author }} in this topic</a>
62+
{% endtrans %}
63+
</p>
64+
</div>
65+
66+
<div class="forum-topic-list-forum">
67+
<p class="topic_title">
68+
<a href="{{ post.topic.forum|url }}">{{ post.topic.forum.name|e }}</a>
69+
</p>
70+
<p class="description note">
71+
{% trans author=username|e,
72+
userlink=href('portal', 'user', username|e),
73+
link=href('forum', 'author', username|e, 'forum', post.topic.forum.slug) %}
74+
<a href="{{ link }}">Posts by {{ author }} in this forum</a>
75+
{% endtrans %}
76+
</p>
77+
</div>
78+
</div>
79+
</li>
80+
{% endfor %}
81+
</ul>
82+
{{ rendered_pagination }}
83+
{% endblock %}

0 commit comments

Comments
 (0)
This repository has been archived.