From: Laury GvR Date: Mon, 2 Oct 2017 20:18:19 +0000 (-0400) Subject: Contacts: Add check for parent, Associated Member title X-Git-Tag: v1.0.19^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=60931bd5bc24ec60c99424c8bd0ded5c88d0d2f9;p=WP-Themes%2Ftruenorthgolf.git 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. --- 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}