From: Stéphane Jacob Date: Mon, 28 Nov 2011 13:28:40 +0000 (+0100) Subject: Displays mail icon if an adress can receive snail mail. X-Git-Tag: xorg/1.1.5~81 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=690d828227e57c6173378af1eb3507c4d4144824;p=platal.git Displays mail icon if an adress can receive snail mail. Signed-off-by: Stéphane Jacob --- diff --git a/htdocs/images/icons/email_open.gif b/htdocs/images/icons/email_open.gif new file mode 100644 index 0000000..2b72ce7 Binary files /dev/null and b/htdocs/images/icons/email_open.gif differ diff --git a/plugins/function.display_address.php b/plugins/function.display_address.php index 02e1edc..6728ee1 100644 --- a/plugins/function.display_address.php +++ b/plugins/function.display_address.php @@ -69,6 +69,11 @@ function smarty_function_display_address($param, $smarty) $map = "\"Google"; + if ($adr->flags->hasflag('mail')) { + $mail = ' Adresse courier'; + } else { + $mail = ''; + } $comment = ""; if ($adr->comment != "") { @@ -89,9 +94,9 @@ function smarty_function_display_address($param, $smarty) if ($param['titre']) { if ($param['titre_div']) - $txthtml .= "
".pl_entity_decode($param['titre'])." ".$map.$comment."
\n"; + $txthtml .= '
' . pl_entity_decode($param['titre']) . ' ' . $map . $mail . $comment . "
\n"; else - $txthtml .= "".pl_entity_decode($param['titre'])." ".$map.$comment."
\n"; + $txthtml .= '' . pl_entity_decode($param['titre']) . ' ' . $map . $mail . $comment . "
\n"; } foreach ($lines as $line) {