comparison default/ticket/item.html @ 56:ea67eba3199d

ticket: first draft: those templates are the first implementations to: - show a list of tickets - create a new ticket - display a ticket an its comments
author Goffi <goffi@goffi.org>
date Sun, 05 Nov 2017 22:04:34 +0100
parents
children 50957f0669b9
comparison
equal deleted inserted replaced
55:d58fdd57df49 56:ea67eba3199d
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 {% if not embedded %}{% extends 'base/base.html' %}{% endif %}
10 {% import 'input/xmlui.html' as xmlui with context %}
11 {% import 'blog/macros.html' as blog with context %}
12 {% import 'input/comment.html' as comment with context %}
13
14 {% block title %}{{item|adv_format('[{value.widget_value.id}] {value.widget_value.title}') }}{% endblock %}
15
16 {% block confirm_message %}
17 {% trans %}Your comment has been sent{% endtrans %}
18 {% endblock confirm_message %}
19
20 {% block body %}
21 <div id="{{ item.widget_value['id'] }}" class="view single ticket box">
22 {{ xmlui.generate(item,
23 form=false,
24 filters={'created': {'filters': ['date_fmt'], filters_args:[{'fmt': 'short'}]},
25 'updated': {'filters': ['date_fmt'], filters_args:[{'fmt': 'short'}]}},
26 )}}
27 </div>
28 {% if comments is defined %}
29 <div id="blog_items">
30 {{ blog.show_items(comments|reverse, expanded=true) }}
31 </div>
32 {% endif %}
33 {% if comments_node is defined %}
34 <div class="comment_post">
35 {{- comment.comment_or_login(service=comments_service, node=comments_node) -}}
36 </div>
37 {% endif %}
38 {% endblock body %}