forked from kehers/suet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusers-cold.liquid
67 lines (65 loc) · 4.3 KB
/
users-cold.liquid
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
67
{% include 'partials/header-dashboard.liquid' %}
<section>
<div class="container">
<div class="bar">
<div class="row">
<div class="twelve columns">
<h6><a href="/users">All Users</a> <span style="padding-left:15px">Cold Subscribers</span></h6>
<div>
Users that haven't opened a mail in the last <form style="display:inline"><input type="text" name="days" value="{{ data.days }}" style="height:auto;top:1px;position:relative;width:40px"> days <button class="button button-primary" type="submit" style="padding:7px 10px;height:auto;line-height:normal"><i class="icon-menu"></i></button></form>
</div>
</div>
</div>
</div>
<div class="feed">
<!-- Make responsive: https://css-tricks.com/responsive-data-tables/ -->
<table class="u-full-width">
<thead>
<tr>
<th><a href="?days={{ data.days }}&sort=last_seen&dir={% if query.dir == 'desc' %}asc{% else %}desc{% endif %}">Last<br>Interaction{% if query.sort == 'last_seen' %} <i class="icon-arrow-{% if query.dir == 'asc' %}up{% else %}down{% endif %}"></i>{% endif %}</a></th>
<th><a href="?days={{ data.days }}&sort=email&dir={% if query.dir == 'desc' %}asc{% else %}desc{% endif %}">Email{% if query.sort == 'email' %} <i class="icon-arrow-{% if query.dir == 'asc' %}up{% else %}down{% endif %}"></i>{% endif %}</a></th>
<th class="center"><a href="?days={{ data.days }}&sort=delivered&dir={% if query.dir == 'desc' %}asc{% else %}desc{% endif %}">Delivered{% if query.sort == 'delivered' %} <i class="icon-arrow-{% if query.dir == 'asc' %}up{% else %}down{% endif %}"></i>{% endif %}</a></th>
<th class="center">Bounced</th>
<th class="center"><a href="?days={{ data.days }}&sort=opened&dir={% if query.dir == 'desc' %}asc{% else %}desc{% endif %}">Opened{% if query.sort == 'opened' %} <i class="icon-arrow-{% if query.dir == 'asc' %}up{% else %}down{% endif %}"></i>{% endif %}</a></th>
<th class="center">Unique<br>opens</th>
<th class="center"><a href="?days={{ data.days }}&sort=clicked&dir={% if query.dir == 'desc' %}asc{% else %}desc{% endif %}">Clicked{% if query.sort == 'clicked' %} <i class="icon-arrow-{% if query.dir == 'asc' %}up{% else %}down{% endif %}"></i>{% endif %}</a></th>
<th class="center">Unique<br>clicks</th>
</tr>
</thead>
{% for event in data.data %}
<tr>
<td>{{ event.timeago }}</td>
<td><a href="/users/{{ event.email }}">{{ event.email }}</a></td>
<td class="center">
<a href="/users/{{ event.email }}">{{ event.delivered | default: '0' }}</a>
</td>
<td class="center">
{% if event.bounced %}<span class="fade">{{ event.bounced }}</span>{% endif %}</a>
</td>
<td class="center">
<a href="/users/{{ event.email }}">{{ event.opened | default: '0' }}</a>
</td>
<td class="center">
{% if event.unique_opens %}<span class="fade">{{ event.unique_opens }}</span>{% endif %}</a></a>
</td>
<td class="center">
<a href="/users/{{ event.email }}">{{ event.clicked | default: '0' }}</a>
</td>
<td class="center">
{% if event.unique_clicks %}<span class="fade">{{ event.unique_clicks }}</span>{% endif %}</a></a>
</td>
</tr>
{% endfor %}
</table>
</div>
<p style="padding-top:15px">Note: Data may not be accurate as some email service provider (ESP) may not record open or click actions. If you've disabled click tracking (another way opens are tracked), this may even be more inaccurate.</p>
{% if data.data %}
{% assign next = data.offset | plus: data.count %}
{% assign prev = data.offset | minus: data.limit %}
{% assign q = query | remove: 'offset' %}
<p class="right top-20">{{ data.offset | plus: 1 | format }} to {{ next | format }} of {{ data.total | format }}</p>
<p class="pagination">{% if data.offset > 0 %}<a href="?{{ q }}{% if prev > 0 %}&offset={{ prev }}{% endif %}" class="button button-primary">Prev</a>{% endif %}{% if next < data.total %}<a href="?{{ q }}&offset={{ data.offset | plus: data.count }}" class="button button-primary">Next</a>{% endif %}</p>
{% endif %}
</div>
</section>
{% include 'partials/footer.liquid' %}