projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updates SQL export script.
[platal.git]
/
templates
/
profile
/
profile.tpl
diff --git
a/templates/profile/profile.tpl
b/templates/profile/profile.tpl
index
ed73b0b
..
bb33904
100644
(file)
--- a/
templates/profile/profile.tpl
+++ b/
templates/profile/profile.tpl
@@
-1,6
+1,6
@@
{**************************************************************************}
{* *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-201
0
Polytechnique.org *}
+{* Copyright (C) 2003-201
1
Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
@@
-24,7
+24,7
@@
<script type="text/javascript">//<![CDATA[
function chgMainWinLoc(strPage)
{
<script type="text/javascript">//<![CDATA[
function chgMainWinLoc(strPage)
{
- strPage =
platal_baseurl + strPage
;
+ strPage =
$.plURL(strPage)
;
if (parent.opener) {
try {
parent.opener.document.location = strPage;
if (parent.opener) {
try {
parent.opener.document.location = strPage;
@@
-36,6
+36,9
@@
function chgMainWinLoc(strPage)
document.location = strPage;
}
}
document.location = strPage;
}
}
+
+$($.closeOnEsc);
+
//]]></script>
{/literal}
//]]></script>
{/literal}
@@
-44,7
+47,7
@@
function chgMainWinLoc(strPage)
{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}
{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()|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,10
+56,13
@@
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="{if $group.site}{$group.site}{else}http://www.polytechnique.net/{$group.nom}{/if}">{$group.nom}</a></span>
+ {/foreach}
</span></div>{/if}
{/if}
</span></div>{/if}
{/if}
@@
-106,14
+112,17
@@
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>
- {if $logged && $view eq 'private'}
+ {if $logged && $view eq 'private'
&& $owner && $owner->state eq 'active'
}
<div class='maj'>
Fiche mise à jour<br />
le {$profile->last_change|date_format}
<div class='maj'>
Fiche mise à jour<br />
le {$profile->last_change|date_format}
@@
-161,7
+170,7
@@
function chgMainWinLoc(strPage)
<img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country}' />
{/foreach}
<img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country}' />
{/foreach}
- {$profile->promo()}
+ {$profile->promo(
'details'
)}
{if $logged && $profile->mentor_expertise}
[<a href="referent/{$profile->hrid()}" class='popup2'>Ma fiche référent</a>]
{if $logged && $profile->mentor_expertise}
[<a href="referent/{$profile->hrid()}" class='popup2'>Ma fiche référent</a>]
@@
-169,10
+178,9
@@
function chgMainWinLoc(strPage)
{assign var=educations value=$profile->getEducations(32)}
{if count($educations) > 0}
{assign var=educations value=$profile->getEducations(32)}
{if count($educations) > 0}
- - Formation :
<ul>
{foreach from=$educations item=edu}
<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}
{/foreach}
</ul>
{/if}