-{if $logged and $x.forlife eq $smarty.session.forlife}
-[<a href="javascript:chgMainWinLoc('profile/edit')">Modifier ma fiche</a>]
-{/if}
-
-<table id="fiche" cellpadding="0" cellspacing="0">
- <tr>
- <td id="fiche_identite">
- <div class="civilite">
- {if $x.sexe}•{/if}
- {$x.prenom} {if $x.nom_usage eq ""}{$x.nom}{else}{$x.nom_usage} ({$x.nom}){/if}
- {if $logged}
- {if $x.nickname} (alias {$x.nickname}){/if}
- <a href="vcard/{$x.forlife}.vcf">{*
- *}{icon name=vcard title="Afficher la carte de visite"}</a>
- {if !$x.is_contact}
- <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&user={$x.forlife}')">
+<div id="fiche">
+ <div id="photo" class="part">
+ {assign var=photo value=$profile->getPhoto(false)}
+ {if $photo}<img alt="Photo de {$profile->fullName()}" src="photo/{$profile->hrid()}{if $with_pending_pic}/req{/if}" width="{$photo->width()}"/>{/if}
+
+ {if $logged && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups(true,true)|smarty:nodefaults))}
+ <h2>À l'X…</h2>
+ {if $profile->section}<div><em class="intitule">Section : </em><span>{$profile->section}</span></div>{/if}
+
+ {assign var=binets value=$profile->getBinets()}
+ {if $binets|@count}<div><em class="intitule">Binet{if count($binets) > 1}s{/if} : </em>
+ <span>{', '|implode:$profile->getBinetsNames()}</span></div>{/if}
+
+ {if $owner && $view eq 'private'}
+ {assign var=groups value=$owner->groups(true,true)}
+ {if $groups|@count}<div><em class="intitule">Groupe{if count($groups) > 1}s{/if} et institution{if count($groups) > 1}s{/if} X : </em>
+ <span><br/>
+ {foreach from=$groups item=group name=groups}{if !$smarty.foreach.groups.first}, {/if}<span title="{$group.nom}"><a href="{$group.site}">{$group.nom}</a></span>{/foreach}
+ </span></div>{/if}
+ {/if}
+
+ {/if}
+
+ {* 458752 stands for 0x70000 = Profile::NETWORKING_ALL *}
+ {assign var=networking value=$profile->getNetworking(458752)}
+ {if count($networking) > 0}
+ <h2>Sur le web...</h2>
+ {foreach from=$networking item=network}
+ <img style="width: auto; padding: 0" src="profile/networking/{$network.nwid}" alt="{$network.name}" title="{$network.name}"/>
+ {if $network.link}
+ <a href="{$network.link|replace:'%s':$network.address}">{$network.address}</a>
+ {else}
+ {$network.address}
+ {/if}
+ <br/>
+ {/foreach}
+ {/if}
+
+ {if $profile->freetext}
+ <h2>Commentaires :</h2>
+ <span>{$profile->freetext|miniwiki|smarty:nodefaults}</span>
+ {/if}
+
+ </div>
+
+ <div id="fiche_identite" class="part">
+ <div class="civilite">
+ {if $profile->isFemale()}•{/if}
+ {if $view eq 'private'}{$profile->private_name}{else}{$profile->public_name}{/if}
+
+ {if $logged}
+ {if !$profile->isDead()}<a href="vcard/{$owner->login()}.vcf">{*
+ *}{icon name=vcard title="Afficher la carte de visite"}</a>{/if}
+
+ {if !$smarty.session.user->isContact($profile)}
+ <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&user={$owner->login()}&token={xsrf_token}')">