DigitalState/Platform-Notification-Bundle

View on GitHub
Resources/views/Subscription/widget/entity.html.twig

Summary

Maintainability
Test Coverage
{% import 'OroUIBundle::macros.html.twig' as UI %}

<div class="widget-content">
    <div class="row-fluid form-horizontal">
        <div class="responsive-block">
            {{ UI.renderProperty('ds.notification.subscription.id.label'|trans, entity.id) }}
            {{ UI.renderHtmlProperty('ds.notification.subscription.notification.title.label'|trans, '<a href="' ~ path('ds_notification_notification_view', { id: entity.notification.id }) ~ '">' ~ entity.notification.defaultTitle ~ '</a>') }}
            {{ UI.renderHtmlProperty('ds.notification.subscription.user.username.label'|trans, '<a href="' ~ path('oro_user_view', { id: entity.user.id }) ~ '">' ~ entity.user.username ~ '</a>') }}
            {% set channels = '' %}
            {% for channel in entity.channels %}
                {% set channels = channels ~ '<span class="label label-primary">' ~ channel.defaultTitle ~ '</span>&nbsp;' %}
            {% endfor %}
            {{ UI.renderHtmlProperty('ds.notification.subscription.channels.label'|trans, channels) }}
        </div>
    </div>
    {% for widget in ds_widgets({ position: 'ds_notification_subscription_entity_subscription', context: context }, { entity: entity }) %}
        {{ widget.content|raw }}
    {% endfor %}
</div>