projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'xorg/1.0.2/master'
[platal.git]
/
templates
/
profile
/
profile.tpl
diff --git
a/templates/profile/profile.tpl
b/templates/profile/profile.tpl
index
3056871
..
95667c1
100644
(file)
--- a/
templates/profile/profile.tpl
+++ b/
templates/profile/profile.tpl
@@
-42,9
+42,9
@@
function chgMainWinLoc(strPage)
<div id="fiche">
<div id="photo" class="part">
{assign var=photo value=$profile->getPhoto(false)}
<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()}" width="{$photo->width()}"/>{/if}
+ {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()|smarty:nodefaults))}
+ {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}
<h2>À l'X…</h2>
{if $profile->section}<div><em class="intitule">Section : </em><span>{$profile->section}</span></div>{/if}
@@
-53,16
+53,17
@@
function chgMainWinLoc(strPage)
<span>{', '|implode:$profile->getBinetsNames()}</span></div>{/if}
{if $owner && $view eq 'private'}
<span>{', '|implode:$profile->getBinetsNames()}</span></div>{/if}
{if $owner && $view eq 'private'}
- {assign var=groups value=$owner->group
Names(
true)}
+ {assign var=groups value=$owner->group
s(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/>
{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
key=gk}{if $gk != 0
}, {/if}<span title="{$group.nom}"><a href="{$group.site}">{$group.nom}</a></span>{/foreach}
+ {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}
</span></div>{/if}
{/if}
{/if}
- {assign var=networking value=$profile->getNetworking(0)}
+ {* 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}
{if count($networking) > 0}
<h2>Sur le web...</h2>
{foreach from=$networking item=network}
@@
-86,10
+87,7
@@
function chgMainWinLoc(strPage)
<div id="fiche_identite" class="part">
<div class="civilite">
{if $profile->isFemale()}•{/if}
<div id="fiche_identite" class="part">
<div class="civilite">
{if $profile->isFemale()}•{/if}
- <span {if $profile->name_tooltip neq ""}class="hinted" title="{$profile->name_tooltip}"{/if}>{$profile->shortName()}</span>
- {if $logged}
- {if $profile->nickname} (alias {$profile->nickname}){/if}
- {/if}
+ {if $view eq 'private'}{$profile->private_name}{else}{$profile->public_name}{/if}
{if $logged}
{if !$profile->isDead()}<a href="vcard/{$owner->login()}.vcf">{*
{if $logged}
{if !$profile->isDead()}<a href="vcard/{$owner->login()}.vcf">{*
@@
-108,10
+106,13
@@
function chgMainWinLoc(strPage)
{icon name=wrench title="administrer user"}</a>
{/if}
{icon name=wrench title="administrer user"}</a>
{/if}
- {if $
owner->login() eq $smarty.session.hruid
}
+ {if $
smarty.session.user->isMyProfile($profile)
}
<a href="javascript:chgMainWinLoc('profile/edit')">{icon name="user_edit" title="Modifier ma fiche"}</a>
<a href="javascript:chgMainWinLoc('profile/edit')">{icon name="user_edit" title="Modifier ma fiche"}</a>
+ {elseif hasPerm('admin') || $smarty.session.user->canEdit($profile)}
+ <a href="javascript:chgMainWinLoc('profile/edit/{$profile->hrpid}')">
+ {icon name=user_edit title="modifier la fiche"}
+ </a>
{/if}
{/if}
-
{/if}
</div>
{/if}
</div>
@@
-154,11
+155,13
@@
function chgMainWinLoc(strPage)
{/if}
<div class='spacer'></div>
</div>
{/if}
<div class='spacer'></div>
</div>
+ {else}
+ <div class='spacer'></div>
{/if}
<div class='formation'>
{/if}
<div class='formation'>
- {foreach from=$profile->nationalities() item=
nat
}
-
<img src='images/flags/{$nat}.gif' alt='{$nat}' height='11' title='{$nat
}' />
+ {foreach from=$profile->nationalities() item=
country key=code
}
+
<img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country
}' />
{/foreach}
{$profile->promo()}
{/foreach}
{$profile->promo()}
@@
-172,21
+175,24
@@
function chgMainWinLoc(strPage)
- Formation :
<ul>
{foreach from=$educations item=edu}
- Formation :
<ul>
{foreach from=$educations item=edu}
- <li>{display_education edu=$edu profile=$profile}</li>
+ <li>{display_education edu=$edu profile=$profile
full=true
}</li>
{/foreach}
</ul>
{/if}
{assign var=corps value=$profile->getCorps()}
{if $corps && ($corps->current || $corps->original)}
{/foreach}
</ul>
{/if}
{assign var=corps value=$profile->getCorps()}
{if $corps && ($corps->current || $corps->original)}
- <ul>
+
<ul>
{if $corps->current}
{if $corps->current}
- <li>Corps actuel : {$corps->current_name} {$corps->current_rank}
+ <li>
+ Corps actuel : {$corps->current_name}
+ {if $corps->current_rank}({$corps->current_rank}){/if}
+ </li>
{/if}
{/if}
- {if $corps->original}
- <li>Corps d'origine : {$corps->original_name}
+ {if $corps->
current != $corps->original && $corps->
original}
+ <li>Corps d'origine : {$corps->original_name}
</li>
{/if}
{/if}
- </ul>
+
</ul>
{/if}
</div>
{/if}
</div>
@@
-209,13
+215,13
@@
function chgMainWinLoc(strPage)
{/if}
{if $address->hasFlag('current')}
{include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle :"
{/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 :"
{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 :"
{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}<div class="spacer"></div>{/if}
{/foreach}
{/if}
{if $smarty.foreach.addresses.iteration is even}<div class="spacer"></div>{/if}
{/foreach}
@@
-229,8
+235,11
@@
function chgMainWinLoc(strPage)
{foreach from=$jobs item="job" key="i"}
{if $i neq 0}<hr />{/if}
{include file="include/emploi.tpl" job=$job}
{foreach from=$jobs item="job" key="i"}
{if $i neq 0}<hr />{/if}
{include file="include/emploi.tpl" job=$job}
+ {assign var=jobPhones value=$job->phones()}
{if $job->address()}
{if $job->address()}
- {include file="geoloc/address.tpl" address=$job->address titre="Adresse : " for=$job->company->name pos="left"}
+ {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}
<div class="spacer"> </div>
{/foreach}
{/if}
<div class="spacer"> </div>
{/foreach}