Updating front end
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 24 Apr 2019 18:20:02 +0000 (14:20 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 24 Apr 2019 18:20:02 +0000 (14:20 -0400)
Use first then last name and place CGCS next to name.
Use only the organization section (not contact info)
Add Spouse custom field to the bottom of phone and website section.

glm-member-db-contacts/views/front/contacts/list.html

index 7383be1..1edf980 100644 (file)
@@ -79,14 +79,14 @@ and open the template in the editor.
 
                     <div class="glm-member-list-container glm-member-container small-12 columns">
                         <div class="glm-member-list-data small-12 columns">
-                            {if $contact.image}
+                            {if $contact.image && $settings.enable_profile_image}
                             <div class="glm-member-list-active-info small-9 columns">
                             {else}
                             <div class="glm-member-list-active-info small-12 columns">
                             {/if}
 
                                 <h4 class="glm-member-title">
-                                    {$contact.lname}, {$contact.fname}
+                                    {$contact.fname} {$contact.lname}{if $cgcs == 'Yes'}, CGCS{/if}
 
                                 </h4>
                                 <div class="row glm-contact-info">
@@ -106,40 +106,27 @@ and open the template in the editor.
                                     {$contact_mobile_phone=""}
                                     {$contact_office_phone=""}
                                     {$cgcs = apply_filters( 'glm_custom_fields', 'CGCS?', $contact.id )}
-                                    {if $contact.contact_publish.value == true }
-                                        {$contact_fname=$contact.fname}
-                                        {$contact_lname=$contact.lname}
-                                        {$contact_addr1=$contact.addr1}
-                                        {$contact_addr2=$contact.addr2}
-                                        {$contact_city=$contact.city}
-                                        {$contact_state=$contact.state}
-                                        {$contact_zip=$contact.zip}
-                                        {$contact_phone=$contact.home_phone}
-                                        {$contact_mobile_phone=$contact.home_phone}
-                                        {$contact_email=$contact.alt_email}
-                                    {else if $contact.business_publish.value == true}
-                                        {$contact_fname=$contact.business_fname}
-                                        {$contact_lname=$contact.business_lname}
-                                        {$contact_addr1=$contact.business_addr1}
-                                        {$contact_addr2=$contact.business_addr2}
-                                        {$contact_city=$contact.business_city}
-                                        {$contact_state=$contact.business_state}
-                                        {$contact_zip=$contact.business_zip}
-                                        {$contact_phone=$contact.business_phone}
-                                        {$contact_office_phone=$contact.office_phone}
-                                        {$contact_mobile_phone=$contact.business_mobile}
-                                        {$contact_fax=$contact.fax}
-                                        {$contact_email=$contact.business_email}
-                                        {$contact_url=$contact.url}
-                                        {$contact_org=$contact.org}
-                                        {$contact_title=$contact.title}
-                                    {/if}
+                                    {$contact_fname=$contact.business_fname}
+                                    {$contact_lname=$contact.business_lname}
+                                    {$contact_addr1=$contact.business_addr1}
+                                    {$contact_addr2=$contact.business_addr2}
+                                    {$contact_city=$contact.business_city}
+                                    {$contact_state=$contact.business_state}
+                                    {$contact_zip=$contact.business_zip}
+                                    {$contact_phone=$contact.business_phone}
+                                    {$contact_office_phone=$contact.office_phone}
+                                    {$contact_mobile_phone=$contact.business_mobile}
+                                    {$contact_fax=$contact.fax}
+                                    {$contact_email=$contact.business_email}
+                                    {$contact_url=$contact.url}
+                                    {$contact_org=$contact.org}
+                                    {$contact_title=$contact.title}
                                     {if $contact.business_publish.value == true && $contact.contact_publish.value != true}
                                     <div class="small-12 columns">
                                         {if $contact_title}
                                         <div class="glm-contact-info-descr">
                                             <span class="field-value">
-                                                {$contact_title}{if $cgcs == 'Yes'}, CGCS{/if}
+                                                {$contact_title}
                                             </span>
                                         </div>
                                         {/if}
@@ -233,10 +220,19 @@ and open the template in the editor.
                                             </span>
                                         </div>
                                         {/if}
+                                        {$spouse = apply_filters( 'glm_custom_fields', 'Spouse', $contact.id )}
+                                        {if $spouse}
+                                        <div class="glm-contact-info-url">
+                                            <span class="field-title">Spouse </span>
+                                            <span class="field-value">
+                                                {$spouse}
+                                            </span>
+                                        </div>
+                                        {/if}
                                     </div>
                                 </div>
                             </div>
-                            {if $contact.image}
+                            {if $contact.image && $settings.enable_profile_image}
                                 <div class="glm-contact-list-image small-3 columns">
                                     <img src="{$glmPluginMediaUrl}/images/{$settings.list_logo_size}/{$contact.image}">
                                 </div>