From 483b657f8e7604b140dea9116b87b481aabd19b1 Mon Sep 17 00:00:00 2001 From: Aram HARUTYUNYAN Date: Tue, 18 Mar 2014 14:55:44 +0000 Subject: [PATCH] Issue #0001766: Afficher correctement en cas s'il n'y a pas de date ou lieu de naissance --- .../default/scripts/identite/lienfiche.phtml | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/application/views/default/scripts/identite/lienfiche.phtml b/application/views/default/scripts/identite/lienfiche.phtml index 50a777a5b..4f1a08a77 100644 --- a/application/views/default/scripts/identite/lienfiche.phtml +++ b/application/views/default/scripts/identite/lienfiche.phtml @@ -1,28 +1,26 @@
result->PpPm == 'PP') {?> - result->civilite)) {?> - result->civilite?>  - result->civilite=='M')?'':'e';?> - - result->nom)) {?> - result->nom?>  - - result->prenom)) {?> - result->prenom?>  - - result->nomUsage)) {?> - (result->nomUsage?>)  - - result->naissanceDate) && $this->result->naissanceDate!='0000-00-00') {?> - result->naissanceDate, 'YYYY-MM-dd')?> -
le toString('dd/MM/yyyy');?>  - - result->naissanceLieu)) {?> - à result->naissanceLieu?>  - - result->naissanceDeptPays)) {?> - (result->naissanceDeptPays?>) - + result->naissanceDate) && $this->result->naissanceDate!='0000-00-00') { + $date = new Zend_Date($this->result->naissanceDate, 'yyyy-MM-dd'); + $message = $message.' '.$this->translate("le").' '.$date->toString('dd/MM/yyyy'); + } + + if (!empty($this->result->naissanceLieu) || !empty($this->result->naissanceDeptPays)) { + $message = $message.' '.$this->translate("à").' '.$this->result->naissanceLieu.' '.$this->result->naissanceDeptPays; + } + + if ($message!='') { + if ($this->result->civilite=='' || $this->result->civilite==null) { + $message = $this->translate("Né(e)").' '.$message; + } else if ($this->result->civilite=='M') { + $message = $this->translate("Né").' '.$message; + } else { + $message = $this->translate("Née").' '.$message; + }?> + +