A short explanation. . .
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
{% assign sorted_people = people | sort: "anniversary_day" %}
{% assign houses = "" %}
<html>
<head>
<title>Anniversaries</title>
{{ helpers.bootstrap_3 }}
<style>
@page { margin: 0.5in; size: US-Letter; }
body { font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; }
</style>
</head>
<body>
<h1>
{{ filter.name }}
</h1>
<table class="table table-condensed phone_numbers">
<thead>
<tr>
<th>Names</th>
<th>Anniversary</th>
<th>Address</th>
</tr>
</thead>
<tbody>
{% for person in sorted_people %}
{% assign show_hh = "No" %}
{% assign first = "" %}
{% for household in person.households %}
{% assign households_shown = houses | split: "," %}
{% assign this_house = household.id | downcase %}
{% if households_shown contains this_house %}
{% else %}
{% for adult in household.active_adults %}
{% if adult.marital_status == "Married" or adult.marital_status == "Remarried" %}
{% assign first = first | append: adult.first_name | append: "," %}
{% assign last = adult.last_name %}
{% assign show_hh = "Yes" %}
{% endif %}
{% endfor %}
{% if show_hh == "Yes" %}
<tr>
<td>{% assign fnames = first | split: "," %}{% for name in fnames %}{{ name }}{% unless forloop.last %} & {% endunless %}{% endfor %} {{ last }}</td>
<td>{{ person.anniversary | date: "%b %d" }}</td>
<td>{{ person.primary_address.postal_address }} </td>
</tr>
{% endif %}
{% assign houses = houses | append: this_house | append: "," %}
{% endif %}
{% endfor %}
{% endfor %}
</tbody>
</table>
</body>
</html>