Only uses autoload to require validation classes.
[platal.git] / templates / include / minifiche.tpl
index 698a549..0daa537 100644 (file)
     <div class="nom">
       {if $profile->isFemale()}&bull;{/if}
       {if !$dead && $registered}<a href="profile/{$profile->hrid()}" class="popup2">{/if}
-      {$profile->full_name}
+      {$profile->directory_name}
       {if !$dead && $registered}</a>{/if}
     </div>
 
     <div class="edu">
-      {foreach from=$profile->nationalities() item=nat}
-      <img src='images/flags/{$nat}.gif' alt='{$nat}' height='11' title='{$nat}' />&nbsp;
+      {foreach from=$profile->nationalities() item=country key=code}
+      <img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country}' />&nbsp;
       {/foreach}
       {$profile->promo()}{*
-      *}{foreach from=$profile->getExtraEducations(4) item=edu}, {display_education edu=$edu profile=$profile}{/foreach}{*
+      *}{foreach from=$profile->getExtraEducations(4) item=edu}, {display_education edu=$edu profile=$profile full=false}{/foreach}{*
       *}{if $dead}, {"décédé"|sex:"décédée":$profile} le {$profile->deathdate|date_format}{/if}
     </div>
   </div>
 
   {if $withAuth}
   <div class="noprint bits">
+    {if $registered || (!$dead && $hasowner)}
     <div>
       {if !$registered && !$dead && $hasowner}
-        {if $show_action && ($show_action eq 'ajouter')}
+        {if !$smarty.session.user->isWatchedUser($profile)}
     <a href="carnet/notifs/add_nonins/{$user->login()}?token={xsrf_token}">{*
     *}{icon name=add title="Ajouter à la liste de mes surveillances"}</a>
         {else}
@@ -98,6 +99,7 @@
         {/if}
       {/if}
     </div>
+    {/if}
 
     {if hasPerm('admin') && $hasowner}
     <div>
     {assign var=address value=$profile->getMainAddress()}
     {assign var=web     value=$profile->getWebSite()}
     {assign var=job     value=$profile->getMainJob()}
-    {if $web || $profile->mobile || ($address && $address->country) || $job || !$registered}
+    {if $web || $profile->mobile || ($address && $address->country) || $job || !$registered || $user->lost}
     <table cellspacing="0" cellpadding="0">
       {if $web}
       <tr>
-        <td class="lt">Page web&nbsp;:</td>
-        <td class="rt"><a href="{$web}">{$web}</a></td>
+        <td class="lt">{$web.name}&nbsp;:</td>
+        <td class="rt"><a href="{$web.address}">{$web.address}</a></td>
       </tr>
       {/if}
       {if $address && $address->country}
         <td class="smaller" colspan="2">
           {"Ce"|sex:"Cette":$profile} camarade n'est pas {"inscrit"|sex:"inscrite":$profile}.
           <a href="marketing/public/{$user->login()}" class='popup'>Si tu connais son adresse email,
-          <strong>n'hésite pas à nous la transmettre !</a>
+          <strong>n'hésite pas à nous la transmettre !</strong></a>
         </td>
       </tr>
       {elseif $user->state neq 'disabled' && $user->lost}