diff --git a/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss index c001c31b9..44b0190d0 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss @@ -45,6 +45,28 @@ table { } } +// styles communs pour tous les bandeaux +div.banner { + .id-number { + font-weight: lighter; + font-size: 50%; + &:before { content: '(n°'; } + &:after { content: ')'; } + } + a.phone, + a.email { + color: white; + } + ul.list-content { + margin: 0 auto; + } + span.age { + margin-left: 0.5em; + &:before { content: '('; } + &:after { content: ')'; } + } +} + /* * FLEX RESPONSIVE TABLE/BLOCK PRESENTATION */ diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 3cd0eacd5..c4b36a348 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -102,7 +102,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\Column(type="date", nullable=true) */ - private $birthdate; //to change in birthdate + private $birthdate; /** * The person's deathdate @@ -733,6 +733,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI { return $this->birthdate; } + + public function getAge(): int + { + return date_diff($this->birthdate, date_create('now'))->format("%y"); + } /** * Set placeOfBirth diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig index aea493eff..c80dbb4db 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig @@ -1,17 +1,19 @@ -