Everything Report With Notes
Imports: 1

This is a version of the Everything report but it has the addition of Notes.

Preview

Report Preview


  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
<!--

How would you like your people sorted? ('first_name', 'last_name')
{% assign sorted_people = people | sort: 'first_name' %}

When should the school section print? ('Always', 'Never', 'Child')
{% assign print_school = 'Child' %}

Which sections would you like to print? (true, false)
{% assign print_apps = true %}
{% assign print_households = true %}

Which tabs would you like to print? ('All' 'None' or specific tab names 'Tab1 Tab2 Tab3')
{% assign my_tabs = 'All'%}

If no avatar exists, what image should print? To print nothing, delete the following line.
{% assign no_avatar = 'https://people.planningcenteronline.com/static/no_photo_thumbnail.gif'%}
-->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    {{ helpers.bootstrap_3 }}
    <!-- This report is styled using the Bootstrap framework. http://getbootstrap.com/css/
				 If you'd rather provide your own styles, add them to the style section below. -->

    <style>
        @page 	{margin: .125in;}   /*-- PDF margin reset --*/

        .person { page-break-inside: avoid; }
        .avatar { width: 100px; }
        .household { padding-left: 15px; }
        .family_member { width: 100px; float: left; padding-right: 15px; }
        img.family_member_avatar {
            height: 50px;
            width: 50px;
            border-radius: 25px;
            -webkit-border-radius: 25px;
            -moz-border-radius: 25px;
        }
        img.thumbnail {
            height: 100px;
            width: 100px;
            border-radius: 50px;
            -webkit-border-radius: 50px;
            -moz-border-radius: 50px;
        }
        img.primary_contact { border: 2px solid #5cd595; }
        .family_member_name { text-align: center; padding-top: 3px; }
        .tab { width: 49%; float: left; padding: 10px; }
        .tab-title { font-size: 1.3em; background-color: #eee; padding: 5px; border: 1px solid #eee; }
        .answer { padding: 5px; border: 0px solid #eee; border-top: 0px; }
    </style>
</head>
<body>
<div class="container">
    <div class="pull-right">
        <div class="well well-sm text-right">
            {{ people.size }} {{ people.size | pluralize: "person", "people" }}<br>
            List: {{ list.name }}<br>
        </div>
    </div>
    <h2>
        {{ report.name }}
        <br>
        <small>
            {{ organization.name }}
        </small>
    </h2>
    <div class="clearfix"></div>

    {% for person in sorted_people %}
        <div class="person">
            <hr>
            <div class="pull-right">
                <div class="text-right text-muted">
                    Created: {{ person.created_at | date: "%b %d, %Y" }}<br>
                    Last Updated: {{ person.updated_at | date: "%b %d, %Y" }}
                </div>
            </div>

            <div>

                <div class="media-left">
                    <img class="media-object thumbnail avatar"
                         src="{% if person.photo_url %}{{person.photo_url}}{% else %}{{no_avatar}}{% endif %}"
                         alt="{{person.name}} avatar">
                </div>

                <div class="media-body">
                    <h3 class="media-heading">{{ person.name_prefix }}
                        {{ person.first_name }}
                        {{ person.middle_name }}
                        {{ person.last_name }}
                        {{ person.name_suffix }}
                    </h3>
                    <div>
                        <div class="text-capitalize">{{ person.status }} {{ person.membership }}</div>
                        <div>
                            {% if person.child %}Child
                            {% else %}Adult
                                {% for household in person.households %}
                                    {% if household.primary_contact.name == person.name %}
                                        {% assign person_primary = true %}
                                    {% endif %}
                                {% endfor %}
                                {% if person_primary %}
                                    <span class="badge">primary</span>
                                    {% assign person_primary = false %}
                                {% endif %}
                            {% endif %}
                        </div>
                    </div>

                    {% if print_apps %}
                        <h5>
                            {% for app in person.apps %}
                                <span class="label label-default">{{ app.name }}</span>
                            {% endfor %}
                        </h5>
                    {% endif %}
                </div>
            </div>

            <!-- HOUSEHOLD -->
            {% if print_households %}
                {% for household in person.households %}
                    {% if household.people.size > 1 %}
                        <div class="row household">
                            <h4>{{ household.name }}</h4>
                            {% for household_person in household.people %}
                                {% unless household_person.id == person.id %}
                                    <div class="family_member">
                                        <div class="thumbnail">
                                            <img class="family_member_avatar {% if household_person.id == household.primary_contact.id %}primary_contact{% endif %}" src="{% if household_person.photo_url %}{{household_person.photo_url}}{% else %}{{no_avatar}}{% endif %}" alt="avatar">
                                            <div class="family_member_name">
                                                {{household_person.first_name}}
                                                {% assign household_last_name = household.name | remove: ' Household' %}
                                                {% if household_person.last_name != household_last_name %}
                                                    {{ household_person.last_name }}
                                                {% endif %}
                                            </div>
                                        </div>
                                    </div>
                                {% endunless %}
                            {% endfor %}
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}
            <!-- end HOUSEHOLD -->

            <div class="row">
                {% assign col_class = 'col-xs-6'%}
                {% unless print_school == 'Never'%}
                    {% unless print_school == 'Child' and person.child == false %}
                        {% assign col_class = 'col-xs-4'%}
                        {% assign print_person_school = true %}
                    {% endunless %}
                {% endunless %}

                <!-- CONTACT -->
                <div class="{{col_class}}">
                    <h4>Contact</h4>
                    <div>
                        {% if person.emails != empty %}
                            {% for email in person.emails %}
                                {{ email.address }} ({{ email.location }})<br>
                            {% endfor%}
                        {% endif %}

                        {% if person.phone_numbers != empty %}
                            {% for phone_number in person.phone_numbers %}
                                {{ phone_number.number }} ({{ phone_number.location }})<br>
                            {% endfor%}
                        {% endif %}

                        {% if person.addresses != empty %}
                            {% for address in person.addresses %}
                                <address>
                                    {{ address.postal_address }}<br>
                                    ({{ address.location }})
                                </address>
                            {% endfor%}
                        {% endif %}
                    </div>
                </div>
                <!-- end CONTACT -->

                <!-- DEMOGRAPHICS -->
                <div class="{{col_class}}">
                    <h4>Demographics</h4>
                    <div>
                        Birthday: {{ person.birthdate | date: '%B %d, %Y'}}<br>
                        Marital Status: {{ person.marital_status }}<br>
                        {% if person.marital_status == 'Married' and person.anniversary %}
                            Anniversary: {{ person.anniversary | date: '%B %d, %Y' }} <br>
                        {% endif %}
                        Gender: {{ person.gender }}
                    </div>
                </div>
                <!-- end DEMOGRAPHICS -->

                <!-- SCHOOL -->
                {% if print_person_school %}
                    <div class="col-xs-4">
                        <h4>School</h4>
                        <div>
                            School: {{ person.school }}<br>
                            School Type: {{ person.school_type }}<br>
                            Grade: {{ person.grade_name }} {% if person.graduation_year %}({{ person.graduation_year }}){% endif %}<br>
                        </div>

                        {% unless person.medical_notes == blank %}
                            <div class="alert alert-danger">
                                <strong>Medical notes:</strong>
                                {{ person.medical_notes }}
                            </div>
                        {% endunless %}
                    </div>
                    {% assign print_person_school = false %}
                {% endif %}
                <!-- end SCHOOL -->

            </div>

            <!-- NOTES -->
            <div class="row">
                {% for note in person.notes %}
                    <div class="tab">
                        <div class="tab-title">{{ note.category }}
										</div>



                        <div class="questions">
                            <div class="answer">
                                <span>{{ note.message }}</span>
                            </div>
                        </div>
                      
                                              <div class="questions">
                            <div class="answer">
                                <span>{{ note.author.name }} - {{ note.date | date: "%b %d, %Y" }}</span>
                            </div>
                        </div>

                    </div>
                {% endfor %}
            </div>
            <!-- end NOTES -->

            <!-- CUSTOM TABS -->

            <!-- You can also call fields directly! EXAMPLE:
								{{ person.tab_name.field_name.value }} or
								{{ person.tab_name.section_name.field_name.value }}

								Use {{tab.slug}} or {{field.slug}} within a loop to get the exact tab and field names
						-->

            <div class="row">
                {% for tab in person.tabs %}
                    {% if my_tabs == 'All' or my_tabs contains tab.name %}
                        <div class="tab">
                            <div class="tab-title">{{ tab.name }}</div>

                            {% for field in tab.fields %}
                                <div class="questions">
                                    <div class="answer">
                                        <strong>{{ field.name }}</strong>
                                        <span> {{ field.value }}</span>
                                    </div>
                                </div>
                            {% endfor %}

                        </div>
                    {% endif %}
                {% endfor %}
            </div>
            <!-- end CUSTOM TABS -->

        </div>

    {% endfor %}
</div>
</body>
</html>