Show profile image on contact list if the contact has an image
authorLaury GvR <laury@gaslightmedia.com>
Wed, 20 Sep 2017 20:59:48 +0000 (16:59 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 20 Sep 2017 20:59:48 +0000 (16:59 -0400)
views/front/contacts/list.html

index 8eb904c..0f7127c 100644 (file)
@@ -39,12 +39,12 @@ and open the template in the editor.
                 </div>
             </div>
         </div>
-        
+
         <br clear="all">
 
         <p><b>Total found:</b> {$numbContacts}&nbsp;&nbsp;</p>
 
-        
+
         {if $settings.list_show_search_alpha}
             <div class="glm-alpha-links">
                 <a href="{$thisUrl}?glm_action=list&textSearch={$textSearch}&alpha=" class="glm-alpha-link{if !$alphaSelected} glm-alpha-link-selected{/if}">All</a>
@@ -63,12 +63,20 @@ and open the template in the editor.
             <br>
             showing {$start} through {$lastDisplayed} of {$filteredContactsFound}
         {/if}
-        
+
         {if $haveContacts}
             {foreach $contacts as $contact}
             <div class="glm-member-list-container glm-member-container small-12 columns">
                 <div class="glm-member-list-data small-12 columns">
+                    {if $contact.image}
+                    <div class="glm-contact-list-image small-3 columns">
+                        <img src="{$glmPluginMediaUrl}/images/{$settings.list_logo_size}/{$contact.image}">
+                    </div>
+                    <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}
                         </h4>
@@ -96,12 +104,12 @@ and open the template in the editor.
                                 {if $contact.office_phone}<div class="glm-contact-info-phone">{$contact.office_phone}</div>{/if}
                                 {if $contact.fax}<div class="glm-contact-info-fax">{$contact.fax}</div>{/if}
                                 {if $contact.email}<div class="glm-contact-info-email">Email: <a href="mailto:{$contact.email}" target="_top">{$contact.email}</a></div>{/if}
-                            </div>   
+                            </div>
                         </div>
                     </div>
                 </div>
             </div>
-            {/foreach}    
+            {/foreach}
         {else}
                 <tr class="alternate"><td colspan="7">(no contacts listed)</td></tr>
         {/if}
@@ -114,7 +122,7 @@ and open the template in the editor.
             showing {$start} through {$lastDisplayed} of {$filteredContactsFound}
         {/if}
     </form>
-            
+
 {include file='front/footer.html'}
 
     </body>