-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
grid.html.twig
53 lines (52 loc) · 1.79 KB
/
grid.html.twig
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
{#
Variables
- page
- items
- totalItems
- tmpl
- indexMode
- route
- routeParameters
- sessionVar
- limit
- objectId
- noContactList
- target
- currentRoute
- mauticContent
#}
{% set isIndex = 'index' == tmpl ? true : false %}
{% extends isIndex ? '@MauticLead/Lead/list.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
{% block content %}
{{ include('@MauticLead/Lead/_filter.html.twig') }}
<div class="pa-md bg-auto">
{% if items|length > 0 %}
<div class="row shuffle-grid">
{% for item in items %}
{{ include('@MauticLead/Lead/grid_card.html.twig', {'contact': item, 'noContactList': noContactList|default([])}) }}
{% endfor %}
</div>
{% else %}
{{ include('@MauticCore/Helper/noresults.html.twig', {'header': 'mautic.lead.grid.noresults.header', 'message': 'mautic.lead.grid.noresults.message'}) }}
<div class="clearfix"></div>
{% endif %}
</div>
{% if items|length > 0 %}
<div class="panel-footer">
{% set route = route is defined ? route : (link|default('mautic_contact_index')) %}
{% set routeParameters = routeParameters|default([]) %}
{% if objectId is defined %}
{% set routeParameters = routeParameters|merge({'objectId': objectId}) %}
{% endif %}
{{ include('@MauticCore/Helper/pagination.html.twig', {
'totalItems': totalItems,
'page': page,
'limit': limit,
'baseUrl': path(route, routeParameters),
'tmpl': tmpl not in ['grid', 'index'] ? tmpl : indexMode,
'sessionVar': sessionVar|default('lead'),
'target': target|default('.page-list'),
}) }}
</div>
{% endif %}
{% endblock %}