Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.

Commit 743caab

Browse files
committed
postlist.html
1 parent 67fe674 commit 743caab

2 files changed

Lines changed: 111 additions & 0 deletions

File tree

inyoka_theme_default/static/style/inyoka/forum.less

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,28 @@
7474
.make-sm-column(8);
7575
.make-xs-column(12);
7676
}
77+
78+
&-post {
79+
.make-sm-column(4);
80+
.make-xs-column(12);
81+
}
82+
&-topic {
83+
.make-sm-column(4);
84+
.make-xs-column(12);
85+
86+
&-all-posts a {
87+
&:extend(.text-muted);
88+
}
89+
}
90+
&-forum {
91+
.make-sm-column(4);
92+
.make-xs-column(12);
93+
94+
&-all-posts a {
95+
&:extend(.text-muted);
96+
}
97+
}
98+
7799
&-item {
78100
&:extend(.list-group-item);
79101
&:extend(.panel > .list-group .list-group-item);
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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+
{{ title }} – {{ 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+
39+
<ul>
40+
{% for post in posts if (not post.hidden or not post.topic.hidden
41+
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+
{% trans %}Topic: {% endtrans %}<a href="{{ post.topic|url }}">{{ post.topic.title|e }}</a>
56+
</p>
57+
<p class="forum-topic-list-topic-all-posts">
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 }}">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+
{% trans %}Forum: {% endtrans %}<a href="{{ post.topic.forum|url }}">{{ post.topic.forum.name|e }}</a>
69+
</p>
70+
<p class="forum-topic-list-forum-all-posts">
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+
{% else %}
81+
<li>
82+
{% trans %}No topics were found.{% endtrans %}
83+
</li>
84+
{% endfor %}
85+
</ul>
86+
</div>
87+
88+
{{ rendered_pagination }}
89+
{% endblock %}

0 commit comments

Comments
 (0)