DigitalState/Platform-Notification-Bundle

View on GitHub
Resources/views/Notification/index.html.twig

Summary

Maintainability
Test Coverage
{% extends 'OroUIBundle:actions:index.html.twig' %}

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

{% set pageTitle = 'ds.notification.page.index.title'|trans %}

{% block navButtons %}
    {% if resource_granted('ds.notification.notification.create') %}
        <div class="btn-group pull-right">
            <a href="{{ path('ds_notification_notification_create') }}" class="btn btn-primary action-button">
                {% trans %}ds.notification.button.create{% endtrans %}
            </a>
            {% set widgets = ds_widgets({ position: 'ds_notification_notification_button_create' }) %}
            {% if widgets is not empty %}
                <a href="#" class="btn-primary btn dropdown-toggle" data-toggle="dropdown">
                    <span class="caret"></span>
                </a>
                <ul class="dropdown-menu">
                    {% for widget in widgets %}
                        <li>
                            {{ widget.content|raw }}
                        </li>
                    {% endfor %}
                </ul>
            {% endif %}
        </div>
    {% endif %}
{% endblock %}