Updates SQL export script.
[platal.git] / templates / profile / profile.tpl
index 95667c1..bb33904 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2011 Polytechnique.org                             *}
 {*  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)
 {
-  strPage = platal_baseurl + strPage;
+  strPage = $.plURL(strPage);
   if (parent.opener) {
     try {
       parent.opener.document.location = strPage;
@@ -36,6 +36,9 @@ function chgMainWinLoc(strPage)
     document.location = strPage;
   }
 }
+
+$($.closeOnEsc);
+
 //]]></script>
 {/literal}
 
@@ -56,7 +59,10 @@ function chgMainWinLoc(strPage)
         {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&nbsp;: </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}
+        {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}
 
@@ -116,7 +122,7 @@ function chgMainWinLoc(strPage)
       {/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}
@@ -164,7 +170,7 @@ function chgMainWinLoc(strPage)
       <img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country}' />&nbsp;
       {/foreach}
 
-      {$profile->promo()}
+      {$profile->promo('details')}
 
       {if $logged && $profile->mentor_expertise}
       [<a href="referent/{$profile->hrid()}" class='popup2'>Ma fiche référent</a>]
@@ -172,7 +178,6 @@ function chgMainWinLoc(strPage)
 
       {assign var=educations value=$profile->getEducations(32)}
       {if count($educations) > 0}
-        &nbsp;-&nbsp;Formation&nbsp;:
         <ul>
         {foreach from=$educations item=edu}
           <li>{display_education edu=$edu profile=$profile full=true}</li>