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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!--
QUICK CUSTOMIZATION:
WORSHIP LEADER POSITION NAME
{% assign worship_leader_position = "Worship Leader"%}
{% for plan in plans %}
MAKE AN ARRAY OF SERVICE TYPES
{% if forloop.first %}
{% assign ministries = plan.ministry.name %}
{% endif %}
{% unless ministries contains plan.ministry.name %}
{% assign ministries = ministries | append: '++' | append: plan.ministry.name %}
{% endunless %}
{% if forloop.last %}
{% assign service_types = ministries | split: '++' %}
{% endif %}
DETERMINE THE MAX NUMBER of SONGS
{% assign plan_songs = 0 %}
{% for item in plan.items %}
{% if item.item_type == 'Song' %}
{% assign plan_songs = plan_songs | plus: 1 %}
{% endif %}
{% endfor %}
{% unless max_songs > plan_songs %}
{% assign max_songs = plan_songs %}
{%endunless %}
{% endfor %}
-->
<html>
<head>
<title>Plans Report</title>
<style>
* { font-family: Verdana, Arial; font-size: 9pt; }
body { padding:0; margin:0; }
td { vertical-align: top; }
.column { float: left; }
.matrix { border: solid 1px black; border-collapse: collapse; width: 250px; margin: 5px; table-layout: fixed; overflow: hidden; }
.matrix td { border: solid 1px gray; padding: 2px;}
.ministry_name { font-weight: bold; font-size: 1.4em; text-align: center; background-color: silver; }
.plan_dates { font-weight: bold; text-align: center; background-color:lightgray;}
.item { border-bottom: dotted 1px #999; white-space: nowrap; }
.spacer { color: white; }
</style>
</head>
<body>
{% for service_type in service_types %} <!-- service_type array created on lines 7-35 above -->
<div class="column">
<table class="matrix">
<tr>
<td class="ministry_name">{{ service_type | remove: 'Campus' | remove: 'Services' | remove: 'Service'}}</td>
</tr>
{% for plan in plans %}
{% if plan.ministry.name == service_type %}
<!-- PLAN DATES -->
<tr>
<td class="plan_dates">
{% assign short_date = plan.dates | split: '&' %}
{{ short_date.first }}
{% for plan_person in plan.plan_people_not_declined %}
{% if plan_person.position == worship_leader_position%}
<span class="series_title">(WL: {{ plan_person.person.name }})</span>
{% endif %}
{% endfor %}
</td>
</tr>
<!-- END PLAN DATES -->
<!-- SONGS -->
{% assign song_number = 1 %}
{% for item in plan.items %}
{% if item.item_type == 'Song' %}
{% assign song_number = song_number | plus: 1 %}
<tr>
<td class="item">
{{ item.arrangement.music_key }}: {{ item.title }}
</td>
</tr>
{% endif %}
{% endfor %}
{% for i in (song_number..max_songs) %}
<tr>
<td class="spacer">.</td>
</tr>
{% endfor %}
<!-- END SONGS -->
{% assign current_ministry = plan.ministry.name %}
{% endif %}
{% endfor %}
</table>
</div>
{% endfor %}
</body>
</html>