X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=inline;f=templates%2Fprofile%2Fprofile.tpl;h=20acccd3aaca2e61db1b89808fc9d58f72aa9670;hb=7937d89ecfc74726af9ae64d9211d53e6bbcc4e5;hp=e1e8210a0708d5638bfedddf1b4148bb5acd93e7;hpb=0c54d458de4782d691b9bcdeac872982c1027231;p=platal.git diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index e1e8210..20acccd 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2010 Polytechnique.org *} +{* Copyright (C) 2003-2014 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -24,7 +24,7 @@ {/literal} -
{assign var=photo value=$profile->getPhoto(false)} {if $photo}Photo de {$profile->fullName()}{/if} - {if $logged && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups()|smarty:nodefaults))} + {if $logged && $view->isVisible(#Visibility::EXPORT_AX#) && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups(true,true)|smarty:nodefaults))}

À l'X…

{if $profile->section}
Section : {$profile->section}
{/if} - {assign var=binets value=$profile->getBinets()} + {assign var=binets value=$profile->getFullBinets()} {if $binets|@count}
Binet{if count($binets) > 1}s{/if} : - {', '|implode:$profile->getBinetsNames()}
{/if} +
+ {foreach from=$binets item=binet name=binets} + {if !$smarty.foreach.binets.first}, {/if} + {if $binet.url}{/if}{$binet.text}{if $binet.url}{/if} + {/foreach} +
{/if} - {if $owner && $view eq 'private'} - {assign var=groups value=$owner->groupNames(true)} + {if $owner && $view->isVisible(#Visibility::EXPORT_AX#)} + {assign var=groups value=$owner->groups(true,true)} {if $groups|@count}
Groupe{if count($groups) > 1}s{/if} et institution{if count($groups) > 1}s{/if} X :
- {foreach from=$groups item=group key=gk}{if $gk != 0}, {/if}{$group.nom}{/foreach} + {foreach from=$groups item=group name=groups} + {if !$smarty.foreach.groups.first}, {/if} + {$group.nom} + {/foreach}
{/if} {/if} {/if} - {assign var=networking value=$profile->getNetworking(0)} + {assign var=networking value=$profile->getNetworking(#Profile::NETWORKING_ALL#)} {if count($networking) > 0}

Sur le web...

{foreach from=$networking item=network} @@ -76,6 +86,14 @@ function chgMainWinLoc(strPage) {/foreach} {/if} + {assign var=hobbies value=$profile->getHobbies()} + {if count($hobbies) > 0} +

Hobbies...

+ {foreach from=$hobbies key=type item=text} +
{$type} : {$text}
+ {/foreach} + {/if} + {if $profile->freetext}

Commentaires :

{$profile->freetext|miniwiki|smarty:nodefaults} @@ -86,9 +104,9 @@ function chgMainWinLoc(strPage)
{if $profile->isFemale()}•{/if} - name_tooltip neq ""}class="hinted" title="{$profile->name_tooltip}"{/if}>{$profile->shortName()} - {if $logged} - {if $profile->nickname} (alias {$profile->nickname}){/if} + {if $view->isVisible(#Visibility::EXPORT_PRIVATE#)}{$profile->private_name}{else}{$profile->public_name}{/if} + {if ( hasPerm('admin') || $smarty.session.user->canEdit($profile)) && $view->isVisible(#Visibility::EXPORT_PRIVATE#)} + ({$profile->ax_id}) {/if} {if $logged} @@ -108,14 +126,17 @@ function chgMainWinLoc(strPage) {icon name=wrench title="administrer user"} {/if} - {if $owner->login() eq $smarty.session.hruid} + {if $smarty.session.user->isMyProfile($profile)} {icon name="user_edit" title="Modifier ma fiche"} + {elseif hasPerm('admin') || $smarty.session.user->canEdit($profile)} + + {icon name=user_edit title="modifier la fiche"} + {/if} - {/if}
- {if $logged && $view eq 'private'} + {if $logged && $view->isVisible(#Visibility::EXPORT_AX#) && $owner && $owner->state eq 'active'}
Fiche mise à jour
le {$profile->last_change|date_format} @@ -124,9 +145,9 @@ function chgMainWinLoc(strPage) {* 121634816 is Profile::PHONE_LINK_PROFILE | Profile::PHONE_TYPE_ANY = 0x7400000 *} {assign var=phones value=$profile->getPhones(121634816)} - {if ($logged && $view eq 'private') || count($phones) > 0} + {if ($logged && $view->isVisible(#Visibility::EXPORT_AX#)) || count($phones) > 0}
- {if $logged && $view eq 'private'} + {if $logged && $view->isVisible(#Visibility::EXPORT_AX#)} + {else} +
{/if}
- {foreach from=$profile->nationalities() item=nat} - {$nat}  + {foreach from=$profile->nationalities() item=country key=code} + {$code}  {/foreach} - {$profile->promo()} + {$profile->promo('details')} - {if $logged && $profile->mentor_expertise} + {if $logged && $view->isVisible(#Visibility::EXPORT_AX#) && $profile->mentor_expertise} [Ma fiche référent] {/if} {assign var=educations value=$profile->getEducations(32)} {if count($educations) > 0} -  - Formation :
    {foreach from=$educations item=edu} -
  • {display_education edu=$edu profile=$profile}
  • +
  • {display_education edu=$edu profile=$profile full=true}
  • {/foreach}
{/if} {assign var=corps value=$profile->getCorps()} {if $corps && ($corps->current || $corps->original)} -
    +
      {if $corps->current} -
    • Corps actuel : {$corps->current_name} {$corps->current_rank}
    • +
    • + Corps actuel : {$corps->current_name} + {if $corps->current_rank}({$corps->current_rank}){/if} +
    • {/if} - {if $corps->original} + {if $corps->current != $corps->original && $corps->original}
    • Corps d'origine : {$corps->original_name}
    • {/if} -
    +
{/if}
@@ -209,13 +234,13 @@ function chgMainWinLoc(strPage) {/if} {if $address->hasFlag('current')} {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle :" - for="`$profile->firstname` `$profile->lastname`" pos=$pos} + for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null} {elseif $address->hasFlag('secondary')} {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" secondaire :" - for="`$profile->firstname` `$profile->lastname`" pos=$pos} + for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null} {else} {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale :" - for="`$profile->firstname` `$profile->lastname`" pos=$pos} + for="`$profile->firstname` `$profile->lastname`" pos=$pos phones=null} {/if} {if $smarty.foreach.addresses.iteration is even}
{/if} {/foreach} @@ -229,11 +254,11 @@ function chgMainWinLoc(strPage) {foreach from=$jobs item="job" key="i"} {if $i neq 0}
{/if} {include file="include/emploi.tpl" job=$job} - {assign var=phones value=$job->phones()} + {assign var=jobPhones value=$job->phones()} {if $job->address()} - {include file="geoloc/address.tpl" address=$job->address() titre="Adresse : " for=$job->company->name pos="left" phones=$phones} - {elseif $phones} - {display_phones tels=$phones} + {include file="geoloc/address.tpl" address=$job->address() titre="Adresse : " for=$job->company->name pos="left" phones=$jobPhones} + {elseif $jobPhones|@count neq 0} + {display_phones tels=$jobPhones} {/if}
 
{/foreach} @@ -248,7 +273,7 @@ function chgMainWinLoc(strPage)
{$m.text}
- {$m.text}
{$m.grade} + {$m.text}{if $m.level} ({$m.level}){/if}
{$m.grade}
{/foreach} @@ -263,14 +288,14 @@ function chgMainWinLoc(strPage)
{/if} - {if $view eq 'public'} + {if $view->level() eq #Visibility::VIEW_PUBLIC#}
Cette fiche est publique et visible par tout internaute,
vous pouvez aussi voir celle réservée aux X.
- {elseif $view eq 'ax'} + {elseif $view->level() eq #Visibility::VIEW_AX#}
Cette fiche est privée et ne recense que les informations transmises à l'AX. @@ -281,4 +306,4 @@ function chgMainWinLoc(strPage)
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} +{* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}