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 %}
{% endif %} {% endif %}
</li> </li>
{% if options['addCenter'] and person|chill_resolve_center is not null %} {% if options['addCenter'] and person|chill_resolve_center|length > 0 %}
{% if person|chill_resolve_center is iterable %}
{% set centers = person|chill_resolve_center %} {% set centers = person|chill_resolve_center %}
{% else %}
{% set centers = [ person|chill_resolve_center ] %}
{% endif %}
<li> <li>
<i class="fa fa-li fa-long-arrow-right"></i> <i class="fa fa-li fa-long-arrow-right"></i>
{% for c in centers %} {% for c in centers %}

View File

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

View File

@@ -36,7 +36,7 @@ final class Version20211119215630 extends AbstractMigration
public function down(Schema $schema): void 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 SELECT
cphm.person_id AS person_id, cphm.person_id AS person_id,
cma.id AS address_id, cma.id AS address_id,