From: Stéphane Jacob Date: Tue, 3 May 2011 12:20:47 +0000 (+0200) Subject: Displays where the address has been geocoded in profile edition. X-Git-Tag: xorg/1.1.2~62^2~33 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3ac6d61d1b4fb9d82a9696a7815b89e43d1c44e6;p=platal.git Displays where the address has been geocoded in profile edition. Signed-off-by: Stéphane Jacob --- diff --git a/classes/profile.php b/classes/profile.php index e63bfe5..5ecfca7 100644 --- a/classes/profile.php +++ b/classes/profile.php @@ -283,6 +283,25 @@ class Profile implements PlExportable return 0; } + // Returns the profile's color. + public function promoColor() + { + switch ($this->mainEducation()) { + case 'X': + if (($this->yearpromo() % 2) === 0) { + return 'red'; + } else { + return 'yellow'; + } + case 'M': + return 'green'; + case 'D': + return 'blue'; + default: + return 'gray'; + } + } + /** Print a name with the given formatting: * %s = • for women * %f = firstname diff --git a/templates/geoloc/form.address.tpl b/templates/geoloc/form.address.tpl index 0fb4845..aee9584 100644 --- a/templates/geoloc/form.address.tpl +++ b/templates/geoloc/form.address.tpl @@ -20,21 +20,31 @@ {* *} {**************************************************************************} -
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + {if t($address.latitude)} + Position de l'adresse + {/if} + + {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/templates/profile/adresses.address.tpl b/templates/profile/adresses.address.tpl index e39d426..712212c 100644 --- a/templates/profile/adresses.address.tpl +++ b/templates/profile/adresses.address.tpl @@ -40,7 +40,7 @@ - + + + {include file="geoloc/form.address.tpl" prefname=$prefname prefid=$prefid address=$address id=$i} + + {if !$isMe} + - - + + {include file="geoloc/form.address.tpl" prefname="`$jobpref`[w_address]" + prefid=$jobid address=$job.w_address class="pair"} {if $hiddenaddr}
+
+ {include file="include/flags.radio.tpl" name="`$prefname`[pub]" val=$address.pub mainField='addresses' mainId=$i subField='phones' subId=-1} +
-
- {include file="include/flags.radio.tpl" name="`$prefname`[pub]" val=$address.pub mainField='addresses' mainId=$i subField='phones' subId=-1} -
-
-
- {include file="geoloc/form.address.tpl" prefname=$prefname prefid=$prefid address=$address id=$i} -
+ Adress postale :
{$address.postalText|nl2br}
+
+ {else} + + {/if}
+ {foreach from=$address.phones key=t item=tel}
{include file="profile/phone.tpl" prefname="`$prefname`[phones]" prefid="`$prefid`_phones" telid=$t tel=$tel diff --git a/templates/profile/jobs.job.tpl b/templates/profile/jobs.job.tpl index 8150c41..68958f0 100644 --- a/templates/profile/jobs.job.tpl +++ b/templates/profile/jobs.job.tpl @@ -184,20 +184,14 @@
-
-
Adresse
-
- {include file="include/flags.radio.tpl" name="`$jobpref`[w_address][pub]" val=$job.w_address.pub - subField='w_address' mainField='jobs' mainId=$i subId=''} -
-
- {include file="geoloc/form.address.tpl" prefname="`$jobpref`[w_address]" - prefid=$jobid address=$job.w_address} -
-
+
Adresse + {include file="include/flags.radio.tpl" name="`$jobpref`[w_address][pub]" val=$job.w_address.pub + subField='w_address' mainField='jobs' mainId=$i subId=''}
Adresse (masquée)