annotate default/blog/articles.html @ 23:2de729fac73b

babel settings + fr and sk translations, first drafts
author Goffi <goffi@goffi.org>
date Sun, 21 May 2017 16:14:11 +0200
parents 8fa2fd2e928e
children f371bc50ea45
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 8
diff changeset
1 {% if not embedded %}{% extends 'base/base.html' %}{% endif %}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 8
diff changeset
2 {% import 'input/comment.html' as comment %}
8
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
3
16
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
4 {% macro show_items(items, comments=False) %}
8
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
5 {# show items and comments items if present after each item,
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
6 then post form if allow_commenting is set #}
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
7 {% for item in items %}
16
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
8 {% if not comments %}<div class="main_article">{% endif %}
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
9 {% include 'blog/item.html' %}
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
10 {% if not comments %}</div>{% endif %}
10
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 8
diff changeset
11
16
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
12 {# we recursively display comments for all comments nodes (usually there's only one) #}
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
13 {% for comments_items in item.comments_items_list %}
20
8fa2fd2e928e default: added i18n support
Goffi <goffi@goffi.org>
parents: 16
diff changeset
14 <button class="comments_btn" onclick="document.getElementById('{{comments_panel|next_gidx}}').classList.toggle('show')">{% trans %}show comments{% endtrans %} ({{comments_items|count}})</button>
16
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
15 <div id="{{comments_panel|cur_gidx}}" class="comments_panel">
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
16 {% if allow_commenting %}
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
17 <div class="comment_post">
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
18 {{ comment.comment(service=comments_items.service, node=comments_items.node) }}
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
19 </div>
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
20 {% endif %}
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
21
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
22 <div class="comments">
8cdcbe0d7dee blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents: 10
diff changeset
23 {{show_items(comments_items, comments=True)}}
8
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
24 </div>
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
25 </div>
10
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 8
diff changeset
26
8
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
27 {% endfor %}
10
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 8
diff changeset
28
8
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
29 {% endfor %}
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
30 {% endmacro %}
0
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
31
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
32 {% block body %}
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
33 <div id="blog_items">
8
7353e5c54359 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form
Goffi <goffi@goffi.org>
parents: 0
diff changeset
34 {{ show_items(items) }}
0
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
35 </div>
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
36 {% endblock body %}