/
club_list_with_component.htm
44 lines (39 loc) · 1.71 KB
/
club_list_with_component.htm
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
{% from 'ko_grid_body.htm' import ko_grid_body with context %}
{% from 'bs_breadcrumbs.htm' import bs_breadcrumbs with context -%}
{% from 'bs_dropdown.htm' import bs_dropdown with context -%}
{% from 'bs_navs.htm' import bs_navs with context -%}
{% from 'bs_list.htm' import bs_list with context -%}
{% from 'bs_pagination.htm' import bs_pagination with context -%}
{% extends 'cbv_list.htm' %}
{% block main -%}
{% call(has_header, has_filters, has_pagination) bs_list(view, object_list, is_paginated, page_obj) -%}
{% if has_header -%}
<card-header>
<card-title>{{ view.get_heading() }} <i>(with component)</i></card-title>
</card-header>
{% endif -%}
{% if has_filters -%}
{% for field in view.allowed_filter_fields -%}
<div class="alert alert-secondary">
<badge-primary>Demonstration of bs_navs</badge-primary>
</div>
{{ bs_navs(**view.get_filter_kwargs(field)) }}
<div class="alert alert-light">
<badge-info>Demonstration of bs_breadcrumbs</badge-info>
</div>
{{ bs_breadcrumbs(**view.get_filter_kwargs(field)) }}
<div class="alert alert-dark">
<badge-success>Demonstration of bs_dropdown</badge-success>
</div>
{{ bs_dropdown(**view.get_filter_kwargs(field)) }}
{% endfor -%}
{% elif has_pagination -%}
<div class="alert alert-info">Sample of pagination override</div>
{{ bs_pagination(cbv=view, page_obj=page_obj) }}
{% endif -%}
{% endcall -%}
{% do page_context.set_custom_scripts('sample/js/member-grid.js') -%}
{% endblock main -%}
{% block bottom_scripts %}
{{ ko_grid_body() }}
{% endblock bottom_scripts %}