From e9d20bee4f73e7218e29822a72ccbcc11b82f5f4 Mon Sep 17 00:00:00 2001 From: magdev Date: Sat, 25 May 2019 16:48:31 +0200 Subject: [PATCH] unified project handling --- app/tpl/print/macros.html.twig | 8 ++++++++ app/tpl/print/parts/resume.html.twig | 6 +++--- src/Model/Person.php | 17 ----------------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/app/tpl/print/macros.html.twig b/app/tpl/print/macros.html.twig index 1d189c7..ba6cfe1 100644 --- a/app/tpl/print/macros.html.twig +++ b/app/tpl/print/macros.html.twig @@ -19,6 +19,14 @@ {% endfor %} {% endmacro %} +{% macro list_projects(projects, tag) %} + {% set tag = tag|default('li') %} + {% for project in projects %} + <{{ tag }}>{{ project.name }}: + {{ project.shortDescription }} + {% endfor %} +{% endmacro %} + {% macro list_link_array(entries, tag) %} {% set tag = tag|default('li') %} diff --git a/app/tpl/print/parts/resume.html.twig b/app/tpl/print/parts/resume.html.twig index 9a5993e..c82f688 100644 --- a/app/tpl/print/parts/resume.html.twig +++ b/app/tpl/print/parts/resume.html.twig @@ -115,11 +115,11 @@ {{ macros.list_references(person.references) }} {% endif %} - - {% if person.projects|length > 0 %} + + {% if projects|length > 0 %}

{{ 'resume.headers.current_projects'|trans }}

{% endif %} diff --git a/src/Model/Person.php b/src/Model/Person.php index c93c36b..4f360ee 100644 --- a/src/Model/Person.php +++ b/src/Model/Person.php @@ -132,12 +132,6 @@ final class Person extends BaseModel implements PhotoInterface, AnalyzableInterf */ protected $interests = array(); - /** - * Current Projects - * @var array - */ - protected $projects = array(); - /** * Constructor @@ -312,17 +306,6 @@ final class Person extends BaseModel implements PhotoInterface, AnalyzableInterf } - /** - * Get current projects - * - * @return array - */ - public function getProjects(): array - { - return $this->projects; - } - - /** * Get the work license *