Mercurial > libervia-templates
annotate sat_templates/templates/bulma/ticket/item.html @ 295:1de599c5a68f
bulma (base): loading screen:
when the `loading_screen` variable is set before extending `base/base.html`, a loading
modal is shown (and must be removed via JavaScript). This avoids the user to try to use an
interface which is not reactive or working normally because JS is not fully loaded yet.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 27 Nov 2020 12:24:03 +0100 |
parents | 40fccd3b7cf0 |
children |
rev | line source |
---|---|
230 | 1 {# display a single ticket |
2 | |
3 @variable item(xmlui_item): ticket to display | |
4 @variable comments(data_object.BlogItems): comments of the ticket | |
5 @variable comments_service(unicode): service for adding comments | |
6 @variable comments_node(unicode): node for adding comments | |
7 #} | |
8 | |
9 {% set category_menu = [('tickets', url_tickets_list), | |
10 ('ticket_new', url_tickets_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') }} | |
246
1928ba66c194
bulma: replaced custom styles by new spacing helpers
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
26 <div class="columns mt-4"> |
230 | 27 <div class="column has-background-white"> |
246
1928ba66c194
bulma: replaced custom styles by new spacing helpers
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
28 <div id="{{ item.widget_value['id'] }}" class="media px-1 py-1"> |
230 | 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 %} | |
247
40fccd3b7cf0
updated code to handle blog items following data structure change in backend/Libervia
Goffi <goffi@goffi.org>
parents:
246
diff
changeset
|
43 {{ blog.show_items(comments['items']|reverse, expanded=true) }} |
230 | 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_ticket_edit is defined %} | |
52 <div class="media-right"> | |
53 <a href="{{url_ticket_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 %} |