comparison sat_templates/templates/bulma/ticket/item.html @ 230:0e69b5843c2f

theme: bulma theme first draft: This theme uses the Bulma CSS framework, Brython to handle the menu on touch devices, and Sass to customize Bulma. CSS default fallbacks are disabled as Bulma uses its own naming conventions, and default fallbacks would lead to hard to debug conflicts. `common.js` has been slightly improved to handle custom classed in `tab_select` The theme is not complete yet, but it is functional.
author Goffi <goffi@goffi.org>
date Tue, 19 May 2020 00:02:34 +0200
parents
children 1928ba66c194
comparison
equal deleted inserted replaced
229:739c3e6999fa 230:0e69b5843c2f
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') }}
26 <div class="columns has-margin-top-1">
27 <div class="column has-background-white">
28 <div id="{{ item.widget_value['id'] }}" class="media has-padding-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|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_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 %}