|
3 | 3 | {template avatar Person size=32 pixelRatio=2 urlOnly=false forceSquare=true imgCls=no}{strip}
|
4 | 4 | {$pixels = $size * $pixelRatio}
|
5 | 5 |
|
6 |
| - {if $Person->PrimaryPhoto} |
7 |
| - {$src = $Person->PrimaryPhoto->getThumbnailRequest($pixels, $pixels, null, $forceSquare)} |
8 |
| - {else} |
9 |
| - {capture assign=src}//www.gravatar.com/avatar/{$Person->Email|strtolower|md5}?size={$pixels}&rating=g&default={Laddr::$gravatarDefault}{/capture} |
10 |
| - {/if} |
| 6 | + {if $Person} |
| 7 | + {if $Person->PrimaryPhoto} |
| 8 | + {$src = $Person->PrimaryPhoto->getThumbnailRequest($pixels, $pixels, null, $forceSquare)} |
| 9 | + {else} |
| 10 | + {capture assign=src}//www.gravatar.com/avatar/{$Person->Email|strtolower|md5}?size={$pixels}&rating=g&default={Laddr::$gravatarDefault}{/capture} |
| 11 | + {/if} |
11 | 12 |
|
12 |
| - {if $urlOnly} |
13 |
| - {$src} |
| 13 | + {if $urlOnly} |
| 14 | + {$src} |
| 15 | + {else} |
| 16 | + <img height={$size} alt="{personName $Person}" src="{$src}" class="avatar{if $imgCls} {$imgCls}{/if}"> |
| 17 | + {/if} |
14 | 18 | {else}
|
15 |
| - <img height={$size} alt="{personName $Person}" src="{$src}" class="avatar{if $imgCls} {$imgCls}{/if}"> |
| 19 | + <span class="badge badge-pill badge-secondary">Deleted User</span> |
16 | 20 | {/if}
|
17 | 21 | {/strip}{/template}
|
18 | 22 |
|
19 | 23 | {template personLink Person photo=no photoSize=64 pixelRatio=2 linkCls=no imgCls=no nameCls=no summary=yes}{strip}
|
20 |
| - <a href="{$Person->getURL()}" title="{personName $Person}" {if $linkCls}class="{$linkCls}"{/if}> |
21 |
| - {if $photo} |
22 |
| - {$pixels = $photoSize} |
23 |
| - {if $pixelRatio} |
24 |
| - {$pixels = $photoSize * $pixelRatio} |
| 24 | + {if $Person} |
| 25 | + <a href="{$Person->getURL()}" title="{personName $Person}" {if $linkCls}class="{$linkCls}"{/if}> |
| 26 | + {if $photo} |
| 27 | + {$pixels = $photoSize} |
| 28 | + {if $pixelRatio} |
| 29 | + {$pixels = $photoSize * $pixelRatio} |
| 30 | + {/if} |
| 31 | + {if $Person->PrimaryPhoto} |
| 32 | + {$src = $Person->PrimaryPhoto->getThumbnailRequest($pixels, $pixels)} |
| 33 | + {else} |
| 34 | + {capture assign=src}//www.gravatar.com/avatar/{$Person->Email|strtolower|md5}?size={$pixels}&rating=g&default={Laddr::$gravatarDefault}{/capture} |
| 35 | + {/if} |
| 36 | + <img src="{$src}" class="avatar {if $imgCls}{$imgCls}{/if}" width="{$photoSize}" height="{$photoSize}" /> |
25 | 37 | {/if}
|
26 |
| - {if $Person->PrimaryPhoto} |
27 |
| - {$src = $Person->PrimaryPhoto->getThumbnailRequest($pixels, $pixels)} |
28 |
| - {else} |
29 |
| - {capture assign=src}//www.gravatar.com/avatar/{$Person->Email|strtolower|md5}?size={$pixels}&rating=g&default={Laddr::$gravatarDefault}{/capture} |
30 |
| - {/if} |
31 |
| - <img src="{$src}" class="avatar {if $imgCls}{$imgCls}{/if}" width="{$photoSize}" height="{$photoSize}" /> |
32 |
| - {/if} |
33 |
| - <span class="name">{personName $Person summary=$summary}</span> |
34 |
| - </a> |
| 38 | + <span class="name">{personName $Person summary=$summary}</span> |
| 39 | + </a> |
| 40 | + {else} |
| 41 | + <span class="badge badge-pill badge-secondary">Deleted User</span> |
| 42 | + {/if} |
35 | 43 | {/strip}{/template}
|
0 commit comments