Closes #729: Fix positioning of addresses on public profile.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 15 Nov 2007 18:23:12 +0000 (19:23 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 15 Nov 2007 18:23:12 +0000 (19:23 +0100)
Use iteration number instead of internal id of the addresses to select left
or right.

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
ChangeLog
templates/profile/profile.tpl

index ffbace2..fbf7dbf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@ New:
 
 Bug/Wish:
 
+    * Profile:
+        - #729: Fix positioning of addresses on public profile             -FRU
+
     * XnetGrp:
         - #732: Adapt subscription text to sex                             -FRU
         - #735: Encoding of list description in member edition form        -FRU
index 43c3e9b..1a2e897 100644 (file)
@@ -131,8 +131,8 @@ function chgMainWinLoc(strPage)
   {if $x.adr}
   <div class="part">
     <h2>Contact : </h2>
-    {foreach from=$x.adr item="address" key="i" name=adresses}
-      {if $i is odd}
+    {foreach from=$x.adr item="address" name=adresses}
+      {if $smarty.foreach.adresses.iteration is even}
         {assign var=pos value="right"}
       {else}
         {assign var=pos value="left"}
@@ -147,7 +147,7 @@ function chgMainWinLoc(strPage)
       {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale :"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {/if}
-      {if $i is odd}<div class="spacer"></div>{/if}
+      {if $smarty.foreach.adresses.iteration is even}<div class="spacer"></div>{/if}
     {/foreach}
   </div>
   {/if}