comparison sat_templates/templates/bulma/list/item.html @ 298:1c330913ff13

bulma (tickets): renamed "tickets" to "lists"
author Goffi <goffi@goffi.org>
date Thu, 28 Jan 2021 18:42:59 +0100
parents sat_templates/templates/bulma/ticket/item.html@40fccd3b7cf0
children 877f01720036
comparison
equal deleted inserted replaced
297:0657982e81af 298:1c330913ff13
1 {# display a single list item
2
3 @variable item(xmlui_item): list item to display
4 @variable comments(data_object.BlogItems): comments of the list item
5 @variable comments_service(unicode): service for adding comments
6 @variable comments_node(unicode): node for adding comments
7 #}
8
9 {% set category_menu = [('list', url_list_items),
10 ('list_item_new', url_list_new),
11 ] %}
12 {% if not embedded %}{% extends 'base/base.html' %}{% endif %}
13 {% import 'input/xmlui.html' as xmlui with context %}
14 {% import 'components/avatar.html' as avatar with context %}
15 {% import 'blog/macros.html' as blog with context %}
16 {% import 'input/textbox.html' as textbox with context %}
17
18 {% block title %}{{item|adv_format('#{value.widget_value.id} {value.widget_value.title}') }}{% endblock %}
19
20 {% block confirm_message %}
21 {% trans %}Your comment has been sent{% endtrans %}
22 {% endblock confirm_message %}
23
24 {% block body %}
25 {{ icon_defs('pencil') }}
26 <div class="columns mt-4">
27 <div class="column has-background-white">
28 <div id="{{ item.widget_value['id'] }}" class="media px-1 py-1">
29 {% if identities is defined %}
30 {% if avatar is defined %}
31 <figure class="media-left">
32 {{ avatar.avatar(item.widget_value['publisher'].bare) }}
33 </figure>
34 {% endif %}
35 {% endif %}
36 <div class="media-content">
37 <div class="content">
38 <h4 class="title is-4">{{item.widget_value['title']}}</h1>
39 {{ item.widget_value['body'] }}
40
41 </div>
42 {% if comments is defined %}
43 {{ blog.show_items(comments['items']|reverse, expanded=true) }}
44 {% endif %}
45 {% if comments_node is defined %}
46 <div class="comment_post">
47 {{- textbox.comment_or_login(service=comments_service, node=comments_node) -}}
48 </div>
49 {% endif %}
50 </div>
51 {% if url_list_item_edit is defined %}
52 <div class="media-right">
53 <a href="{{url_list_item_edit}}">
54 {{ icon('pencil', cls='icon is-64x64') }}
55 </a>
56 </div>
57 {% endif %}
58 </div>
59 </div>
60 <div class="column is-one-quarter has-background-light">
61 {{
62 xmlui.generate(
63 item,
64 form=false,
65 filters={
66 'created': {
67 'filters': ['date_fmt'],
68 'filters_args':[{'fmt': 'short'}]
69 },
70 'updated': {
71 'filters': ['date_fmt'],
72 'filters_args':[{'fmt': 'short'}]
73 },
74 },
75 ignore=['publisher', 'title', 'body', 'comments_uri'],
76 )
77 }}
78 </div>
79 </div>
80 {% endblock body %}