~homeworkprod/byceps

ref: 4144a29fdeb34e20d44e5cd78a324d9f9f6a2b0d byceps/byceps/blueprints/admin/core/templates/layout/admin/_navigation_brand.html -rw-r--r-- 2.3 KiB
4144a29f — Jochen Kupperschmidt Dim archived brands in admin brand navigation dropdown 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{%- from 'macros/admin.html' import render_navigation %}
{%- from 'macros/admin/brand.html' import render_brand_admin_link, render_brand_avatar %}
{%- from 'macros/icons.html' import render_icon -%}


<section class="sidebar-section">
  <header class="sidebar-section-header sidebar-section-header--unpadded">
    <div class="dropdown">
      <button class="dropdown-toggle button button--clear button--compact">
        <div class="sidebar-section-header-layout">
          {{ render_brand_avatar(brand, '32') }}
          <div>
            <div class="sidebar-section-category">{{ _('Brand') }}</div>
            {{ brand.title }} {{ render_icon('chevron-down') }}
          </div>
        </div>
      </button>
      <ol class="dropdown-menu">
        {%- for brand in all_brands|sort(attribute='title') %}
        <li>{{ render_brand_admin_link(brand, class='dropdown-item', dim_archived=True) }}</li>
        {%- endfor %}
      </ol>
    </div>
  </header>
  {%- with navigation = Navigation(_('Brand'))
      .add_item(
        url_for('admin_dashboard.view_brand',
        brand_id=brand.id),
        _('Dashboard'),
        id='admin_dashboard_brand',
        required_permission=AdminDashboardPermission.view_brand,
        icon='dashboard')
      .add_item(
        url_for('site_admin.index_for_brand', brand_id=brand.id),
        _('Sites'),
        id='sites_admin',
        required_permission=SitePermission.view,
        icon='site')
      .add_item(
        url_for('party_admin.index_for_brand', brand_id=brand.id),
        _('Parties'),
        id='parties_admin',
        required_permission=PartyPermission.view,
        icon='date')
      .add_item(
        url_for('orga_admin.persons_for_brand', brand_id=brand.id),
        _('Organizers'),
        id='orga_admin',
        required_permission=OrgaDetailPermission.view,
        icon='users')
      .add_item(
        url_for('shop_shop_admin.view_for_brand', brand_id=brand.id),
        _('Shop'),
        id='shop_shop_admin',
        required_permission=ShopPermission.view,
        icon='shop')
      .add_item(
        url_for('more_admin.view_brand', brand_id=brand.id),
        _('More'),
        id='more_admin_brand',
        required_permission=AdminPermission.access,
        icon='ellipsis-h')
  -%}
{{ render_navigation(navigation, current_page) }}
  {%- endwith %}
</section>