Skip to content

Instantly share code, notes, and snippets.

@nathanp
Last active February 12, 2019 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanp/cc02920334d862fe6a328dfdfa19fd23 to your computer and use it in GitHub Desktop.
Save nathanp/cc02920334d862fe6a328dfdfa19fd23 to your computer and use it in GitHub Desktop.
Follow up for Connect Group Leaders
<script src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script>
$(document).ready( function () {
$('#CGFollowUp').DataTable( {
paging: false,
"searching": false,
"order": [3, 'asc'],
"info": false
} );
} );
</script>
<div class="grid">
<div class="table-responsive">
<table class="grid-table table table-bordered table-striped table-hover" id="CGFollowUp">
<thead>
<tr align="left" data-original-title="" title="">
<th scope="col">Name</th>
<th scope="col">Phone</th>
<th scope="col">E-Mail</th>
<th scope="col">Last Attended</th>
</tr>
</thead>
{% group where:'Id == {{ PageParameter.GroupId }}' %}
{% for group in groupItems %}
{% for Member in group.Members %}
{% assign status = Member.GroupMemberStatus %}
{% assign era = Member.Person | Attribute:'core_EraLastCheckin' | Date:'yyyy-MM-dd' %}
{% assign today = 'Now' | Date:'MM/dd/yyyy' %}
{% assign difference = era | DateDiff:today,'d' %}
{% if status == "Active" and difference > 28 %}
<tr align="left">
<td><strong>{{ Member.Person.FullName }}</strong></td>
{% if Member.Person.PhoneNumbers != empty %}
{% for PhoneNumber in Member.Person.PhoneNumbers %}
{% if PhoneNumber.NumberTypeValue.Value == "Mobile" and PhoneNumber.NumberFormatted != empty %}
<td>{{ PhoneNumber.NumberTypeValue.Value }} - {{ PhoneNumber.NumberFormatted }}</td>
{% break %}
{% elseif PhoneNumber.NumberTypeValue.Value == "Home" and PhoneNumber.NumberFormatted != empty %}
<td>{{ PhoneNumber.NumberTypeValue.Value }} - {{ PhoneNumber.NumberFormatted }}</td>
{% break %}
{% endif %}
{% endfor %}
{% else %}
<td>No phone number.</td>
{% endif %}
<td>{% if Member.Person.Email != "" %} {{ Member.Person.Email }} {% else %} No e-mail address. {% endif %}</td>
<td>{{ era }}</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
{% endgroup %}
</table>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment