view sat_templates/templates/bulma/list/overview.html @ 303:877f01720036

bulma (lists): creation, invitations, item deletion: - add interface to create lists from templates - show list specific icon when available in lists discovery - owned lists can be deleted from lists discovery - lists can now be created from templates - when edition is allowed, a delete button let now delete a list item from single item view - new button to launch invitation manager from list overview
author Goffi <goffi@goffi.org>
date Sat, 20 Feb 2021 13:39:11 +0100
parents 1c330913ff13
children 27511c821481
line wrap: on
line source

{# display the list of list #}

{% set category_menu = [('list_item_new', url_list_new)] %}
{% extends 'base/base.html' %}
{% import 'input/xmlui.html' as xmlui with context %}
{% import 'input/navigation.html' as navigation with context %}
{% import 'input/textbox.html' as textbox with context %}

{% block body %}
<section class="section has-background-white">
    <nav class="level mb-4">
        <div class="level-left">
            <div class="level-item">
                {{ component.action_button(url_list_new) }}
            </div>
            {% if owner %}
                <div class="level-item">
                    {{
                        component.action_button(
                            "#",
                            label=_("manage invitations"),
                            icon="group",
                            id="button_manage")
                    }}
                </div>
            {% endif %}
        </div>
        <div class="level-right">
            <div class="level-item">
                {{ textbox.search() }}
            </div>
        </div>
    </nav>
    <div id="list" class="container has-background-white px-1 py-1">
        {{ xmlui.generate_list(
              list_items,
              (
                  ('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-wrap',
                   'author': 'is-size-7'
               },
               on_click=on_list_item_click)
        }}
    </div>
</section>
{{ navigation.prev_next(_("previous page"), _("next page")) }}
{% endblock body %}