The address of a dead person is her last address (Closes #951).
authorStéphane Jacob <sj@m4x.org>
Mon, 6 Jul 2009 16:07:20 +0000 (18:07 +0200)
committerStéphane Jacob <sj@m4x.org>
Tue, 7 Jul 2009 15:08:54 +0000 (17:08 +0200)
ChangeLog
templates/include/minifiche.tpl
templates/profile/profile.tpl

index e52aa43..6355b1e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@ Bug/Wish:
         - #972: Adds a legend on the email redirection page                -JAC
 
     * Profile:
+        - #951: The address of a dead person is her last address           -JAC
         - #958: Fix the address in the professionnal vcard                 -JAC
         - #970: Shows a confirmation message when the profile is modified  -JAC
 
index fa4535b..511e661 100644 (file)
         <td class="rt"><a href="{$c.web}">{$c.web}</a></td>
       </tr>
       {/if}
-      {if $c.countrytxt || $c.city}
+      {if ($c.countrytxt || $c.city) && !$c.dcd}
       <tr>
         <td class="lt">Géographie&nbsp;:</td>
         <td class="rt">{$c.city}{if $c.city && $c.countrytxt}, {/if}{$c.countrytxt}</td>
index e6a0cd3..6128b54 100644 (file)
@@ -113,7 +113,7 @@ function chgMainWinLoc(strPage)
       {/if}
       {if $x.mobile}
       <div class="mob">
-        <em class="intitule">Mobile&nbsp;: </em>{$x.mobile}
+        <em class="intitule">{if $x.dcd}Dernier m{else}M{/if}obile&nbsp;: </em>{$x.mobile}
       </div>
       {/if}
       <div class='spacer'></div>
@@ -138,6 +138,11 @@ function chgMainWinLoc(strPage)
   {if $x.adr}
   <div class="part">
     <h2>Contact&nbsp;: </h2>
+    {if $x.dcd}
+      {assign var=address_name value="Dernière adresse"}
+    {else}
+      {assign var=address_name value="Adresse"}
+    {/if}
     {foreach from=$x.adr item="address" name=adresses}
       {if $smarty.foreach.adresses.iteration is even}
         {assign var=pos value="right"}
@@ -145,13 +150,13 @@ function chgMainWinLoc(strPage)
         {assign var=pos value="left"}
       {/if}
       {if $address.active}
-      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Mon adresse actuelle&nbsp;:"
+      {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle&nbsp;:"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {elseif $address.secondaire}
-      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse secondaire&nbsp;:"
+      {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" secondaire&nbsp;:"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {else}
-      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale&nbsp;:"
+      {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale&nbsp;:"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {/if}
       {if $smarty.foreach.adresses.iteration is even}<div class="spacer"></div>{/if}