Block-Out Dates
Imports: 4

Default Planning Center Services Report

Preview

Report Preview


<!--
QUICK CUSTOMIZATION:

{% assign print_picture = "true" %}
{% assign print_email = "false" %}
{% assign print_phone = "false" %}
{% assign print_address = "false" %}
{% assign print_birthday = "false" %}
{% assign print_anniversary = "false" %}
{% assign print_notes = "false" %}

{% assign picture_width = "50" %}

SORTING:
{% assign sorted_people = people | sort: "first_name" %}
You can sort on:
	- last_name
	- first_name
	- updated_at
	- last_scheduled
	- created_at
	- logged_in_at
-->

<html>
    <head>
        <title>People</title>
        <style>
            * { font-family: Verdana, Arial; font-size: 10pt; }
            body { padding:0; margin:0; }

.container { width: 600px; margin: 0 auto; }

.people { border-collapse: collapse; border: solid 1px black; width: 100%; font-size: 0.9em;  }

.people th {
background-color: #DDD;
font-size: 12pt;
text-align: left;
padding: 2px;
vertical-align: center;
border: solid 1px black;
}

.people td {
padding: 2px;
vertical-align: top;
border: solid 1px black;
} 

.address {
align: left;
border-collapse: collapse;
margin: 0;
padding: 0;
}

.address td {
border: none;
margin: 0;
padding: 0;
}

H1 {
font-size: 26pt;
text-align: center;
padding: 0;
margin: 0;
}

H2 {
font-size: 16pt;
text-align: center;
padding: 0;
margin: 0;
}

        </style>
    </head>
    <body>
    <div class="container">
        <h1>Block-Out Dates</h1>
        <h2>{{ organization.name }}</h2>
        </br>
	<table class="people">
              <tr>
                 {% if print_picture == "true"%}<th></th>{% endif %}
        	 <th>Name</th>
        	 <th>Block-Out Dates</th>
                 {% if print_email == "true"%}<th>Email</th>{% endif %}
                 {% if print_phone == "true"%}<th>Phone</th>{% endif %}
                 {% if print_address == "true"%}<th>Address</th>{% endif %}
                 {% if print_birthday == "true"%}<th>Birthday</th>{% endif %}
                 {% if print_anniversary == "true"%}<th>Anniversary</th>{% endif %}
                 {% if print_notes == "true"%}<th>Notes</th>{% endif %}
              </tr>
            {% for person in sorted_people %}
                   {% if person.block_out_dates.size != 0 %}
			<tr>
                 		{% if print_picture == "true"%}<td style="padding: 0; width:{{ picture_width }}px; height:{{ picture_width }}px;">{% if person.photo_thumbnail_url != "/assets/no_photo_thumbnail.gif" %}<img src="{{ person.photo_thumbnail_url }}" width={{ picture_width }} />{% endif %}</td>{% endif %}
	        	    	<td>{{ person.name }}</td>
                		<td>
					{% for block_out_date in person.block_out_dates %}
                                            {% capture start_year_day %}{{ block_out_date.starts_at | date: '%j' }}{% endcapture %}
                                            {% capture end_year_day %}{{ block_out_date.ends_at | date: '%j' }}{% endcapture %}
                                            {% capture start_time %}{{ block_out_date.starts_at | date: '%I:%M%p' }}{% endcapture %}
                                            {% capture end_time %}{{ block_out_date.ends_at | date: '%I:%M%p' }}{% endcapture %}
                                  
                                            {% if start_year_day == end_year_day %}
                                              {% if start_time == '12:00AM' AND end_time == '11:59PM' %}
                                                <div>{{ block_out_date.starts_at | date: '%b %d, %Y' }}{% if block_out_date.name != '' %}{{ block_out_date.name | prepend:': '}}{% endif %}</div>
                                              {% else %}
                                                <div>{{ block_out_date.starts_at | date: '%b %d, %Y %I:%M%p' }} - {{ block_out_date.ends_at | date: '%I:%M%p' }}{% if block_out_date.name != '' %}{{ block_out_date.name | prepend:': '}}{% endif %}</div>
                                              {% endif %}
                                            {% else %}
                                              {% if start_time == '12:00AM' AND end_time == '11:59PM' %}
                                                <div>{{ block_out_date.starts_at | date: '%b %d, %Y' }} - {{ block_out_date.ends_at | date: '%b %d, %Y' }}{{ block_out_date.name | prepend:': ' }}</div>
                                              {% else %}
                                                <div>{{ block_out_date.starts_at | date: '%b %d, %Y %I:%M%p' }} - {{ block_out_date.ends_at | date: '%b %d, %Y %I:%M%p' }}{{ block_out_date.name | prepend:': ' }}</div>
                                              {% endif %}
                                  {% endif %}
                                        {% endfor %} 
				</td>
                		{% if print_email == "true" %}<td>
					{% for email in person.emails %}
						<div>{{ email.address }}</div>
					{% endfor %} 
				</td>{% endif %}
                		{% if print_phone == "true" %}<td>
                			{% for phone_number in person.phone_numbers %}
						<div>{{ phone_number.type_name }}: {{ phone_number.number }} {{ phone_number.extension }}</div>
					{% endfor %}
				</td>{% endif %}
                		{% if print_address == "true" %}<td>
                			{% for address in person.addresses %}
						<div><table class="address"><tr><td>{{ address.type_name }}:  </td><td>{{ address.line_1 }}</br>{{ address.city }}, {{ address.state }} {{ address.zip }}</td></tr></table></div>
					{% endfor %}
				</td>{% endif %}
                		{% if print_birthday == "true" %}<td>
					<div>{{ person.birthdate | date: '%m/%d/%y' | downcase }}</div>
				</td>{% endif %}
                		{% if print_anniversary == "true" %}<td>
					<div>{{ person.anniversary | date: '%m/%d/%y' | downcase }}</div>
				</td>{% endif %}
                		{% if print_notes == "true" %}<td>
					<div>{{ person.notes }}</div>
				</td>{% endif %}
			</tr>
                   {% endif %}
	     {% endfor %}
        </table>
    </div>
    </body>
</html>