diff sat_templates/templates/bulma/ticket/overview.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 f5f428a50c10
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sat_templates/templates/bulma/ticket/overview.html	Tue May 19 00:02:34 2020 +0200
@@ -0,0 +1,38 @@
+{# display the list of tickets #}
+
+{% set category_menu = [('ticket_new', url_tickets_new)] %}
+{% extends 'base/base.html' %}
+{% import 'input/xmlui.html' as xmlui with context %}
+{% import 'input/navigation.html' as navigation with context %}
+
+{% block body %}
+<section class="section has-background-white">
+    <div class="content has-items-centered is-flex">
+        {{ component.action_button(url_tickets_new) }}
+    </div>
+    <div id="tickets" class="container has-background-white has-padding-1">
+        {{ xmlui.generate_list(
+              tickets,
+              (
+                  ('title', _('Title')),
+                  ('labels', _('Labels')),
+                  ('id', _('Id')),
+                  ('author', _('Author')),
+              ),
+              {
+                  'id': '\n#{value}',
+                  'author': _('by {value}'),
+              },
+               item_class_fields=['status', 'priority', 'severity'],
+               field_class_map={
+                   'title': 'has-text-weight-bold',
+                   'labels': 'tag is-rounded x-is-hoverable',
+                   'id': 'has-text-grey-light is-size-7 has-whitespace-pre',
+                   'author': 'is-size-7'
+               },
+               on_click=on_ticket_click)
+        }}
+    </div>
+</section>
+{{ navigation.prev_next(_("previous page"), _("next page")) }}
+{% endblock body %}