Mercurial > libervia-templates
annotate sat_templates/templates/bulma/merge-request/item.html @ 401:0e454358ca49
bulma: update `bulma` to version `1.0.2`
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 02 Oct 2024 17:23:03 +0200 |
parents | 1c330913ff13 |
children |
rev | line source |
---|---|
298
1c330913ff13
bulma (tickets): renamed "tickets" to "lists"
Goffi <goffi@goffi.org>
parents:
247
diff
changeset
|
1 {# display a single list item |
230 | 2 |
298
1c330913ff13
bulma (tickets): renamed "tickets" to "lists"
Goffi <goffi@goffi.org>
parents:
247
diff
changeset
|
3 @variable item(xmlui_item): item to display |
1c330913ff13
bulma (tickets): renamed "tickets" to "lists"
Goffi <goffi@goffi.org>
parents:
247
diff
changeset
|
4 @variable comments(data_object.BlogItems): comments of the item |
230 | 5 @variable comments_service(unicode): service for adding comments |
6 @variable comments_node(unicode): node for adding comments | |
7 #} | |
8 | |
298
1c330913ff13
bulma (tickets): renamed "tickets" to "lists"
Goffi <goffi@goffi.org>
parents:
247
diff
changeset
|
9 {% set category_menu = [('merge-requests', url_list_items), |
1c330913ff13
bulma (tickets): renamed "tickets" to "lists"
Goffi <goffi@goffi.org>
parents:
247
diff
changeset
|
10 ('merge-request_new', url_list_new)] %} |
230 | 11 {% if not embedded %}{% extends 'base/base.html' %}{% endif %} |
12 {% import 'input/xmlui.html' as xmlui with context %} | |
13 {% import 'components/avatar.html' as avatar with context %} | |
14 {% import 'blog/macros.html' as blog with context %} | |
15 {% import 'input/textbox.html' as textbox with context %} | |
16 | |
17 {% block title %}{{item|adv_format('#{value.widget_value.id} {value.widget_value.title}') }}{% endblock %} | |
18 | |
19 {% block confirm_message %} | |
20 {% trans %}Your comment has been sent{% endtrans %} | |
21 {% endblock confirm_message %} | |
22 | |
23 {% block body %} | |
24 {{ icon_defs('pencil') }} | |
25 <section class="section"> | |
26 <div class="tab__container"> | |
27 <div class="tabs"> | |
28 <ul> | |
29 <li class="tab__btn is-active" onclick='tab_select(this, "tab_description", btn_clicked_cls="is-active")'> | |
30 <a> | |
31 {% trans %}Description{% endtrans %} | |
32 </a> | |
33 </li> | |
34 <li class="tab__btn" onclick='tab_select(this, "tab_patches", btn_clicked_cls="is-active")'> | |
35 <a> | |
36 {% trans %}Patches{% endtrans %} | |
37 </a> | |
38 </li> | |
39 </ul> | |
40 </div> | |
41 | |
42 <div class="tab__page state_clicked" id="tab_description"> | |
43 <div class="columns"> | |
44 <div class="column has-background-white"> | |
246
1928ba66c194
bulma: replaced custom styles by new spacing helpers
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
45 <div id="{{ item.widget_value['id'] }}" class="media px-1 py-1"> |
230 | 46 {% if identities is defined %} |
47 {% if avatar is defined %} | |
48 <figure class="media-left"> | |
49 {{ avatar.avatar(item.widget_value['publisher'].bare) }} | |
50 </figure> | |
51 {% endif %} | |
52 {% endif %} | |
53 <div class="media-content"> | |
54 <div class="content"> | |
55 <h4 class="title is-4">{{item.widget_value['title']}}</h1> | |
56 {{ item.widget_value['body'] }} | |
57 | |
58 </div> | |
59 {% 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
|
60 {{ blog.show_items(comments['items']|reverse, expanded=true) }} |
230 | 61 {% endif %} |
62 {% if comments_node is defined %} | |
63 <div class="comment_post"> | |
64 {{- textbox.comment_or_login(service=comments_service, node=comments_node) -}} | |
65 </div> | |
66 {% endif %} | |
67 </div> | |
298
1c330913ff13
bulma (tickets): renamed "tickets" to "lists"
Goffi <goffi@goffi.org>
parents:
247
diff
changeset
|
68 {% if url_list_item_edit is defined %} |
230 | 69 <div class="media-right"> |
298
1c330913ff13
bulma (tickets): renamed "tickets" to "lists"
Goffi <goffi@goffi.org>
parents:
247
diff
changeset
|
70 <a href="{{url_list_item_edit}}"> |
230 | 71 {{ icon('pencil', cls='icon is-64x64') }} |
72 </a> | |
73 </div> | |
74 {% endif %} | |
75 </div> | |
76 </div> | |
77 <div class="column is-one-quarter has-background-light"> | |
78 {{ | |
79 xmlui.generate( | |
80 item, | |
81 form=false, | |
82 filters={ | |
83 'created': { | |
84 'filters': ['date_fmt'], | |
85 'filters_args':[{'fmt': 'short'}] | |
86 }, | |
87 'updated': { | |
88 'filters': ['date_fmt'], | |
89 'filters_args':[{'fmt': 'short'}] | |
90 }, | |
91 'body': { | |
92 'filters': ['urlize'], | |
93 'filters_args':[{ | |
94 'nofollow': True, | |
95 'rel': 'noopener noreferrer' | |
96 }] | |
97 } | |
98 }, | |
99 ignore=['publisher', 'title', 'body', 'comments_uri'], | |
100 ) | |
101 }} | |
102 </div> | |
103 </div> | |
104 </div> | |
105 | |
106 <div class="tab__page" id="tab_patches"> | |
107 {% for patch in patches %} | |
108 <div class="card"> | |
109 <div class="card-content has-background-primary"> | |
110 <p class="commit_msg">{{patch.commit_msg}}</p> | |
111 </div> | |
246
1928ba66c194
bulma: replaced custom styles by new spacing helpers
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
112 <div class="card-footer py-5"> |
230 | 113 <div class="level"> |
114 <div class="level-left"> | |
115 <div class="level-item"> | |
116 <span class="author has-text-weight-bold">{{patch.author}}</span> | |
117 </div> | |
118 </div> | |
119 </div> | |
120 </div> | |
121 </div> | |
246
1928ba66c194
bulma: replaced custom styles by new spacing helpers
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
122 <div class="box mt-4"> |
230 | 123 <div class="diff"> |
124 {{- patch.diff|highlight('diff') -}} | |
125 </div> | |
126 </div> | |
127 {% endfor %} | |
128 </div> | |
129 </div> | |
130 </section> | |
131 {% endblock body %} |