Compare commits

...

2 Commits

Author SHA1 Message Date
8423c6c99c fix banners: resolve_center is always an iterable 2021-11-22 10:55:38 +01:00
03feb78037 fix down migration 2021-11-22 10:49:56 +01:00
3 changed files with 7 additions and 15 deletions

View File

@@ -148,12 +148,8 @@
{% endif %}
{% endif %}
</li>
{% if options['addCenter'] and person|chill_resolve_center is not null %}
{% if person|chill_resolve_center is iterable %}
{% set centers = person|chill_resolve_center %}
{% else %}
{% set centers = [ person|chill_resolve_center ] %}
{% endif %}
{% if options['addCenter'] and person|chill_resolve_center|length > 0 %}
{% set centers = person|chill_resolve_center %}
<li>
<i class="fa fa-li fa-long-arrow-right"></i>
{% for c in centers %}

View File

@@ -17,18 +17,14 @@
{%- endif -%}
</div>
<div class="text-md-end">
{% if person|chill_resolve_center is not null %}
{% if person|chill_resolve_center|length > 0 %}
<span class="open_sansbold">
{{ 'Center'|trans|upper}} :
</span>
{% if person|chill_resolve_center is iterable %}
{% for c in person|chill_resolve_center %}
{{ c.name|upper }}{% if not loop.last %}, {% endif %}
{% endfor %}
{% else %}
{{ person|chill_resolve_center.name|upper }}
{% endif %}
{% for c in person|chill_resolve_center %}
{{ c.name|upper }}{% if not loop.last %}, {% endif %}
{% endfor %}
{%- endif -%}
</div>

View File

@@ -36,7 +36,7 @@ final class Version20211119215630 extends AbstractMigration
public function down(Schema $schema): void
{
$this->addSql("CREATE VIEW view_chill_person_current_address AS
$this->addSql("CREATE OR REPLACE VIEW view_chill_person_current_address AS
SELECT
cphm.person_id AS person_id,
cma.id AS address_id,