unified project handling

This commit is contained in:
2019-05-25 16:48:31 +02:00
parent 665e9eedc3
commit e9d20bee4f
3 changed files with 11 additions and 20 deletions

View File

@@ -19,6 +19,14 @@
{% endfor %}
{% endmacro %}
{% macro list_projects(projects, tag) %}
{% set tag = tag|default('li') %}
{% for project in projects %}
<{{ tag }}><em>{{ project.name }}:</em>
{{ project.shortDescription }}</{{ tag }}>
{% endfor %}
{% endmacro %}
{% macro list_link_array(entries, tag) %}
{% set tag = tag|default('li') %}

View File

@@ -116,10 +116,10 @@
</ul>
{% endif %}
{% if person.projects|length > 0 %}
{% if projects|length > 0 %}
<h3>{{ 'resume.headers.current_projects'|trans }}</h3>
<ul>
{{ macros.list_simple_array(person.projects) }}
{{ macros.list_projects(projects) }}
</ul>
{% endif %}

View File

@@ -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
*