From 60931bd5bc24ec60c99424c8bd0ded5c88d0d2f9 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Mon, 2 Oct 2017 16:18:19 -0400 Subject: [PATCH] Contacts: Add check for parent, Associated Member title On the contacts list, each child now has an Associated Member field title (each parent does not) which is intended to have the same title as the member (parent). Furthermore, a check was added to make sure only the children of a particular parent show up under that parent as well as making sure that parents with no subs that are still in the array of parents won't try to output nonexistent subs. --- .../views/front/contacts/list.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/glm-member-db-contacts/views/front/contacts/list.html b/glm-member-db-contacts/views/front/contacts/list.html index 8c1be36..8cc6151 100644 --- a/glm-member-db-contacts/views/front/contacts/list.html +++ b/glm-member-db-contacts/views/front/contacts/list.html @@ -92,18 +92,22 @@ and open the template in the editor. {if $contact.title}
{$contact.title}
{/if} {if $contacts_with_subs !== false} {foreach $contacts_with_subs as $contact_with_subs} - - {foreach $contact_with_subs["subs"] as $contact_sub} -
{$contact_sub["title"]}{$contact_sub["fname"]}
- {/foreach} - + + + {if $contact_with_subs["id"] == $contact.id && "subs"|array_key_exists:$contact_with_subs} + {foreach $contact_with_subs["subs"] as $contact_sub} +
{$contact_sub["title"]}{$contact_sub["fname"]} {$contact_sub["lname"]}
+ {/foreach} + {/if} {/foreach} {/if} {/if} {if $contact.ref_type.name}
- {if $contact.ref_dest_name} - {$contact.ref_dest_name} + {if $contact.primary_contact.value == false} + {if $contact.ref_dest_name} + Associated Member: {$contact.ref_dest_name} + {/if} {/if}
{/if} -- 2.17.1