Fix link for displaying pending picture on profile (Closes #1166)
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Fri, 2 Jul 2010 23:55:03 +0000 (01:55 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Fri, 2 Jul 2010 23:55:03 +0000 (01:55 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
modules/profile.php
templates/profile/profile.tpl

index 20305e3..473db30 100644 (file)
@@ -259,6 +259,11 @@ class ProfileModule extends PLModule
             $view = 'private';
         }
 
+        // Display pending picture
+        if (S::logged() && Env::v('modif') == 'new') {
+            $page->assign('with_pending_pic', true);
+        }
+
         // Fetches profile's and profile's owner information and redirects to
         // marketing if the owner has not subscribed and the requirer has logged in.
         $profile = Profile::get($pid, Profile::FETCH_ALL, $view);
index df3cf2c..e1e8210 100644 (file)
@@ -42,7 +42,7 @@ function chgMainWinLoc(strPage)
 <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))}
       <h2>À l'X&hellip;</h2>