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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<!--
QUICK CUSTOMIZATION:
SHOW ONLY OPEN SECTIONS (to print all sections, regardless of whether they are opened, set to false)
{% assign show_open_only = true %}
SECTIONS TO PRINT (to ignore open/closed status and predefine which sections to print, please set show_open_only above to false, and then set these sections accordingly)
{% assign print_titles = true %}
{% assign print_plan_notes = true %}
{% assign print_order_of_service = true %}
{% assign print_song_section = false %}
{% assign print_item_section = false %}
{% assign print_media_section = false %}
{% assign print_people = true %}
CATEGORIES TO PRINT
TO PRINT ONLY SELECTED CATEGORIES SET THESE TO false
{% assign all_people_categories = true %}
{% assign all_plan_notes_categories = true %}
AND SET INDIVIDUAL CATEGORY NAMES TO PRINT (make sure show_open_only is set correctly above)
{% array my_people_categories = "Band", "Vocals" %}
{% array my_plan_notes_categories = "General", "Band" %}
INTERNAL CODE
{% if show_open_only == true %}
{% assign print_plan_notes = plan_notes_opened %}
{% assign print_order_of_service = order_of_service_opened %}
{% endif %}
-->
<html>
<head>
<title>Plans Report</title>
<style>
* { font-family: Verdana, Arial; font-size: 10pt; }
body { padding:0; margin:0; }
td { vertical-align: top; }
.matrix { border: solid 1px black; border-collapse: collapse; }
.matrix td { border: solid 1px black; padding: 2px;}
.ministry_name { font-weight: bold; font-size: 12pt; text-align: center; background-color: black; color: white; }
.plan_dates { font-weight: bold; font-size: 10pt; text-align: center; background-color:black; color: white;}
.series_title { font-weight: bold; font-size: 10pt; text-align: center; }
.plan_title { font-size: 10pt; text-align: center; }
.section_header { background-color: #666; color: white; font-weight: bold; font-size: 10pt; }
.item { border-bottom: dotted 1px #999; }
.header { font-weight: bold; border-bottom: solid 1px black; }
.song { font-style: italic; }
.media { }
.row_header { background-color: #DDD; font-weight: bold; }
.unconfirmed { color: gray; }
.declined { color: gray; text-decoration: line-through; }
.icon-question{
display: inline-block;
color: #fff;
text-align: center;
font-size: 1em;
background: #666;
border-radius: 50%;
width: 1em;
height: 1em;
line-height: 1em;
padding: .1em;
}
</style>
</head>
<body>
<table width="100%" class="matrix">
<!-- MINISTRY NAME -->
<tr>
<td class="ministry_name"></td>
{% for plan in plans %}
<td class="ministry_name">{{ plan.ministry.name }}</td>
{% assign number_of_columns = forloop.index %}
{% endfor %}
</tr>
<!-- END MINISTRY NAME -->
<!-- PLAN DATES -->
<tr>
<td class="plan_dates"></td>
{% for plan in plans %}
<td class="plan_dates">{{ plan.dates }}</td>
{% endfor %}
</tr>
<!-- END PLAN DATES -->
<!-- SERIES AND PLAN TITLES -->
{% if print_titles == true %}
<tr>
<td class="row_header"></td>
{% for plan in plans %}
<td>
<div class="series_title">{{ plan.series_title }}</div>
<div class="plan_title">{{ plan.plan_title }}</div>
</td>
{% endfor %}
</tr>
{% endif %}
<!-- END SERIES AND PLAN TITLES -->
<!-- NOTES -->
{% if print_plan_notes == true %}
{% if all_plan_notes_categories == true %}
{% assign selected_notes_categories = plan_notes_categories %}
{% else %}
{% assign selected_notes_categories = my_plan_notes_categories %}
{% endif %}
<tr>
<td class="section_header"></td>
{% for plan in plans %}
<td class="section_header">Notes</td>
{% endfor %}
</tr>
{% for category in selected_notes_categories %}
<tr>
<td class="row_header">{{ category }}</td>
{% for plan in plans %}
<td class="people">
{% for note in plan.notes %}
{% if note.category_name == category %}
<div class="person_name">{{ note.note }}</div>
{% endif %}
{% endfor %}
</td>
{% endfor %}
</tr>
{% endfor %}
{% endif %}
<!-- END NOTES -->
<!-- ORDER OF SERVICE -->
{% if print_order_of_service == true %}
<tr>
<td class="section_header"></td>
{% for plan in plans %}
<td class="section_header">Order Of Service</td>
{% endfor %}
</tr>
<tr>
<td class="row_header"></td>
{% for plan in plans %}
<td class="songs">
{% for item in plan.items %}
{% case item.item_type %}
{% when 'Song' %}<div class="song item" >
{% when 'Header' %}<div class="header item" >
{% when 'Media' %}<div class="media item" >
{% when 'Regular' %}<div class="item" >
{% endcase %}
{{ item.title }}</div>
{% endfor %}
</td>
{% endfor %}
</tr>
{% endif %}
<!-- END ORDER OF SERVICE -->
<!-- SONGS -->
{% if print_song_section == true %}
<tr>
<td class="section_header"></td>
{% for plan in plans %}
<td class="section_header">Songs</td>
{% endfor %}
</tr>
<tr>
<td class="row_header"></td>
{% for plan in plans %}
<td class="item">
{% for item in plan.items %}
{% if item.item_type == 'Song' %}
<div class="item">{{ item.title }}</div>
{% endif %}
{% endfor %}
</td>
{% endfor %}
</tr>
{% endif %}
<!-- END SONGS -->
<!-- PLAN MEDIA -->
{% if print_media_section == true %}
<tr>
<td class="section_header"></td>
{% for plan in plans %}
<td class="section_header">Media</td>
{% endfor %}
</tr>
<tr>
<td class="row_header"></td>
{% for plan in plans %}
<td class="item">
{% for item in plan.items %}
{% if item.item_type == 'Media' %}
<div class="item">{{ item.title }}</div>
{% endif %}
{% endfor %}
</td>
{% endfor %}
</tr>
{% endif %}
<!-- END PLAN MEDIA -->
<!-- PLAN ITEMS -->
{% if print_item_section == true %}
<tr>
<td class="section_header"></td>
{% for plan in plans %}
<td class="section_header">Items</td>
{% endfor %}
</tr>
<tr>
<td class="row_header"></td>
{% for plan in plans %}
<td class="item">
{% for item in plan.items %}
{% if item.item_type == 'Regular' %}
<div class="item">{{ item.title }}</div>
{% endif %}
{% endfor %}
</td>
{% endfor %}
</tr>
{% endif %}
<!-- END PLAN ITEMS -->
<!-- PEOPLE -->
{% if print_people == true %}
{% if all_people_categories == true %}
{% assign selected_people_categories = category_with_positions %}
{% else %}
{% assign selected_people_categories = my_people_categories %}
{% endif %}
{% for selected_category in selected_people_categories %}
{% for category in category_with_positions %}
{% if category.name == selected_category or category.name == selected_category.name %}
{% if show_open_only == true and category.opened == false %}
{% else %}
<tr>
<td class="section_header">{{ category.name }}</td>
<td class="section_header" colspan="{{ number_of_columns }}"></td>
</tr>
{% for position in category.positions %}
<tr>
<td class="row_header">{{ position.name }}</td>
{% for plan in plans %}
<td class="people">
{% for plan_person in plan.plan_people_not_declined %}
{% if plan_person.position == position.name and plan_person.category.name == category.name %}
<div class="person_name {% if plan_person.status == "U"%}unconfirmed{% endif %}{% if plan_person.status == "D" %} declined{% endif %}">{{ plan_person.person.name }}{% if plan_person.status == 'U' %} <span class="icon-question">?</span>{% endif %}</div>
{% endif %}
{% endfor %}
</td>
{% endfor %}
</tr>
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
<!-- END PEOPLE -->
</table>
</body>
</html>