Debian Codegraph @

sat_templates/templates/bulma/list/item.html

raw symbols SCIP
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', 'trash-empty') }}
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 {{item|xmlui_class(["status", "priority", "severity"])}}">
38 <h4 class="title is-4">{{item.widget_value['title']}}</h1>
39 {{ item.widget_value['body']|safe }}
40
41 </div>
42 <nav class="level">
43 <div class="level-left">
44 {% if can_modify %}
45 <div class="level-item is-size-7 x-is-hoverable-primary action_delete">
46 {{ icon('trash-empty', cls='icon is-small') }}
47 </div>
48 {% endif %}
49 </div>
50 </nav>
51 {% if comments is defined %}
52 {{ blog.show_items(comments['items']|reverse, expanded=true) }}
53 {% endif %}
54 {% if comments_node is defined %}
55 <div class="comment_post">
56 {{- textbox.comment_or_login(service=comments_service, node=comments_node) -}}
57 </div>
58 {% endif %}
59 </div>
60 {% if can_modify %}
61 <div class="media-right">
62 <a href="{{url_list_item_edit}}">
63 {{ icon('pencil', cls='icon is-64x64') }}
64 </a>
65 </div>
66 {% endif %}
67 </div>
68 </div>
69 <div class="column is-one-quarter has-background-light">
70 {{
71 xmlui.generate(
72 item,
73 form=false,
74 filters={
75 'created': {
76 'filters': ['date_fmt'],
77 'filters_args':[{'fmt': 'short'}]
78 },
79 'updated': {
80 'filters': ['date_fmt'],
81 'filters_args':[{'fmt': 'short'}]
82 },
83 },
84 ignore=['publisher', 'title', 'body', 'comments_uri'],
85 )
86 }}
87 </div>
88 </div>
89 {% endblock body %}