Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: introduce ibexa 3 compatibility #80

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
feat: fix default email template
  • Loading branch information
René Hrdina committed Apr 19, 2022
commit 52b9532964a5dbbb8397a3fb6c9be3291f96c784
11 changes: 6 additions & 5 deletions bundle/Resources/views/email/default.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{# event \Netgen\Bundle\InformationCollectionBundle\Event\InformationCollected #}
{# content \eZ\Publish\API\Repository\Values\Content\Content #}
{# @var event \Netgen\InformationCollection\API\Value\Event\InformationCollected #}
{# @var content \eZ\Publish\API\Repository\Values\Content\Content #}
{# @var content_type \eZ\Publish\API\Repository\Values\ContentType\ContentType #}

{% block email %}

Expand All @@ -12,14 +13,14 @@
{{ ez_field_name(content, field_name) }}:
</div>
<div class="value">
{% if content_type.fieldDefinitionsByIdentifier[field_name].fieldTypeIdentifier == 'ezselection' %}
{% if content_type.fieldDefinitions.get(field_name).fieldTypeIdentifier == 'ezselection' %}
{% set selectionArray=field_value.value|split('-') %}
{% if selectionArray|length > 1 %}<ul>{% endif %}
{% for selected_key, selected_value in selectionArray %}
{% if loop.length == 1 %}
{{ content_type.fieldDefinitionsByIdentifier[field_name].fieldSettings.options[selected_value] }}<br>
{{ content_type.fieldDefinitions.get(field_name).fieldSettings.options[selected_value] }}<br>
{% else %}
<li>{{ content_type.fieldDefinitionsByIdentifier[field_name].fieldSettings.options[selected_value] }}</li><br>
<li>{{ content_type.fieldDefinitions.get(field_name).fieldSettings.options[selected_value] }}</li><br>
{% endif %}
{% endfor %}
{% if selectionArray|length > 1 %}</ul>{% endif %}
Expand Down