change block personcontent to content more consistent with other templates and less need for if-statements

This commit is contained in:
2022-02-24 15:58:02 +01:00
parent f8ec0f85e5
commit c4e0b68ebe
64 changed files with 66 additions and 73 deletions

View File

@@ -24,22 +24,15 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt
{
/**
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*
* @var Person
*/
private $person;
private Person $person;
public function getCenter()
{
return $this->getPerson()->getCenter();
}
/**
* Get person.
*
* @return \Chill\MainBundle\Entity\Person
*/
public function getPerson()
public function getPerson(): Person
{
return $this->person;
}

View File

@@ -25,7 +25,7 @@
{% endblock %}
{% block layout_wvm_content %}
{% block admin_content %}<!-- block personcontent empty -->
{% block admin_content %}<!-- block content empty -->
<h1>{{ 'Documents configuration' |trans }}</h1>
{% endblock %}
{% endblock %}

View File

@@ -20,7 +20,7 @@
{% set activeRouteKey = '' %}
{% block title %}{{ 'Editing document for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %}
{% block personcontent %}
{% block content %}
<h1>{{ 'Edit Document' | trans }}</h1>
{{ form_errors(form) }}

View File

@@ -29,7 +29,7 @@
{{ encore_entry_script_tags('mod_async_upload') }}
{% endblock %}
{% block personcontent %}
{% block content %}
<div class="col-md-10 col-xxl">
<h1>{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}</h1>

View File

@@ -22,7 +22,7 @@
{{ 'New document for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}
{% endblock %}
{% block personcontent %}
{% block content %}
<h1>{{ 'New document for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}</h1>
{{ form_errors(form) }}

View File

@@ -27,7 +27,7 @@
{{ encore_entry_script_tags('mod_async_upload') }}
{% endblock %}
{% block personcontent %}
{% block content %}
<h1>{{ 'Document %title%' | trans({ '%title%': document.title }) }}</h1>
{{ mm.mimeIcon(document.object.type) }}