Skip to content

Instantly share code, notes, and snippets.

@nathanp
Last active February 12, 2019 23:43

Revisions

  1. nathanp revised this gist Feb 12, 2019. 1 changed file with 38 additions and 38 deletions.
    76 changes: 38 additions & 38 deletions Connect Group Follow Up.lava
    Original file line number Diff line number Diff line change
    @@ -13,44 +13,44 @@
    <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 %}
    <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>
  2. nathanp revised this gist Feb 12, 2019. 1 changed file with 38 additions and 36 deletions.
    74 changes: 38 additions & 36 deletions Connect Group Follow Up.lava
    Original file line number Diff line number Diff line change
    @@ -13,42 +13,44 @@
    <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>{{ Member.Person.FullName }}</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>
    {% elseif PhoneNumber.NumberTypeValue.Value == "Home" and PhoneNumber.NumberFormatted == empty %}
    <td>{{ PhoneNumber.NumberTypeValue.Value }} - {{ PhoneNumber.NumberFormatted }}</td>
    {% 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 %}
    <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>
  3. nathanp revised this gist Feb 12, 2019. No changes.
  4. nathanp revised this gist Feb 12, 2019. 1 changed file with 29 additions and 25 deletions.
    54 changes: 29 additions & 25 deletions Connect Group Follow Up.lava
    Original file line number Diff line number Diff line change
    @@ -20,31 +20,35 @@
    <th scope="col">Last Attended</th>
    </tr>
    </thead>
    {% for Member in Context.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>{{ Member.Person.FullName }}</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>
    {% elseif PhoneNumber.NumberTypeValue.Value == "Home" and PhoneNumber.NumberFormatted == empty %}
    <td>{{ PhoneNumber.NumberTypeValue.Value }} - {{ PhoneNumber.NumberFormatted }}</td>
    {% 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 %}
    {% 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>{{ Member.Person.FullName }}</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>
    {% elseif PhoneNumber.NumberTypeValue.Value == "Home" and PhoneNumber.NumberFormatted == empty %}
    <td>{{ PhoneNumber.NumberTypeValue.Value }} - {{ PhoneNumber.NumberFormatted }}</td>
    {% 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>
  5. nathanp created this gist Feb 12, 2019.
    50 changes: 50 additions & 0 deletions Connect Group Follow Up.lava
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    <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>
    {% for Member in Context.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>{{ Member.Person.FullName }}</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>
    {% elseif PhoneNumber.NumberTypeValue.Value == "Home" and PhoneNumber.NumberFormatted == empty %}
    <td>{{ PhoneNumber.NumberTypeValue.Value }} - {{ PhoneNumber.NumberFormatted }}</td>
    {% 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 %}
    </table>
    </div>
    </div>