Mercurial > libervia-templates
annotate default/forum/overview.html @ 145:013cfb6e6650
added basic README informations
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 02 Jun 2018 16:23:38 +0200 |
parents | efbf5423d7be |
children |
rev | line source |
---|---|
119
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 {% extends 'base/base.html' %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 {% macro generate_forums(forums_data) %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 <ul class="forum"> |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 {% for forum in forums_data %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 <li> |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 {% if 'http_url' in forum %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 <a href="{{forum['http_url']}}" class="forum_actif"> |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 {% else %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 <a> |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 {% endif %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 <span class="forum_title">{{ forum.title }}</span> |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 {% if 'short-desc' in forum %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 <p class="forum_short-desc">{{ forum['short-desc'] }}</p> |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 {% endif %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 </a> |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 {% if 'sub-forums' in forum %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 {{ generate_forums(forum['sub-forums']) }} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 {% endif %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
21 </li> |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
22 {% endfor %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
23 </ul> |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
24 {% endmacro %} |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 |
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 {% block body %} |
137
efbf5423d7be
forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents:
119
diff
changeset
|
27 {% if not forums %} |
efbf5423d7be
forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents:
119
diff
changeset
|
28 <p class="message--info">{% trans %}No forums found on this server!{% endtrans %}</p> |
efbf5423d7be
forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents:
119
diff
changeset
|
29 {% else %} |
efbf5423d7be
forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents:
119
diff
changeset
|
30 <div id="forums"> |
efbf5423d7be
forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents:
119
diff
changeset
|
31 {{ generate_forums(forums) }} |
efbf5423d7be
forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents:
119
diff
changeset
|
32 </div> |
efbf5423d7be
forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents:
119
diff
changeset
|
33 {% endif %} |
119
b085ede4d9af
forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
34 {% endblock body %} |