comparison sat_templates/templates/bulma/blog/item.html @ 247:40fccd3b7cf0

updated code to handle blog items following data structure change in backend/Libervia
author Goffi <goffi@goffi.org>
date Thu, 16 Jul 2020 09:08:32 +0200
parents 1928ba66c194
children 80cfec962b1e
comparison
equal deleted inserted replaced
246:1928ba66c194 247:40fccd3b7cf0
22 {{ avatar.avatar(item.author_jid) }} 22 {{ avatar.avatar(item.author_jid) }}
23 </div> 23 </div>
24 {% endif %} 24 {% endif %}
25 {% endif %} 25 {% endif %}
26 <div class="media-content"> 26 <div class="media-content">
27 {% set title = item.title_xhtml or item.title%} 27 {% set title = item.title_xhtml|safe or item.title%}
28 {% if title %} 28 {% if title %}
29 <h4 class="title is-4">{{title}}</h1> 29 <h4 class="title is-4">{{title}}</h1>
30 {% endif %} 30 {% endif %}
31 <div class="content"> 31 <div class="content">
32 <p class="subtitle is-6 has-text-grey"> 32 <p class="subtitle is-6 has-text-grey">
45 {% endif %} 45 {% endif %}
46 </small> 46 </small>
47 {% endif %} 47 {% endif %}
48 </p> 48 </p>
49 <p> 49 <p>
50 {{- item.content_xhtml or item.content|urlize or '' -}} 50 {{- item.content_xhtml|safe if item.content_xhtml is defined else item.content|urlize -}}
51 </p> 51 </p>
52 {% for comments_items in item.comments_items_list %} 52 {% for comments_data in item.comments %}
53 {% for item in comments_items %} 53 {% for item in comments_data['items'] %}
54 {% include 'blog/item.html' %} 54 {% include 'blog/item.html' %}
55 {% endfor %} 55 {% endfor %}
56 {% if allow_commenting and item_level == 1 %} 56 {% if allow_commenting and item_level == 1 %}
57 <div class="comment_post"> 57 <div class="comment_post">
58 {{- textbox.comment(service=comments_items.service, node=comments_items.node) -}} 58 {{- textbox.comment(service=comments_data.service, node=comments_data.node) -}}
59 </div> 59 </div>
60 {% endif %} 60 {% endif %}
61 {% endfor %} 61 {% endfor %}
62 62
63 </div> 63 </div>