{% extends '@ProductsNotifications/base.html.twig' %}
{% do dom_title_section('Messages') %}
{% block header %}
{% embed '@ui2022/page__header.html.twig' with {
title: 'Messages',
} %}
{% block actions %}
{% if pagination.results_max %}
{% include '@ui2022/button--a.html.twig' with {
text: 'Create Message',
link: path('app.notifications.dashboard.default.select_modal'),
icon: 'icon-message-plane',
styles: 'primary',
modal: 'modal__new_broadcast',
} %}
{% endif %}
{% endblock %}
{% endembed %}
{% endblock %}
{% block content %}
<div class="row">
<div class="col">
{% set filterParameterCount = pagination.results.query.parameters.count ?? 0 %}
{% if not pagination.results_max and filterParameterCount == 0 %}
<div class="row">
<div class="col-3"></div>
<div class="col-5">
<div class="my-5 py-5">
<h2>Create your first message</h2>
<p>
Click "Create Message" to send your first communication.
</p>
{% include '@ui2022/button--a.html.twig' with {
text: 'Create Message',
link: path('app.notifications.dashboard.default.select_modal'),
styles: 'primary',
modal: 'modal__new_broadcast',
} %}
{% include '@ui2022/button--a.html.twig' with {
text: 'Watch Video',
link: 'https://www.schoolnow.com',
target: '_blank',
styles: 'white',
} %}
</div>
</div>
<div class="col-1">
<div class="my-5 py-5 text-center text-black-50">
<i class="far fa-fw fa-8x fa-comment-alt-lines"></i>
</div>
</div>
</div>
{% elseif not pagination.results_max and filterParameterCount > 0 %}
<div class="row">
<div class="col-3"></div>
<div class="col-5">
<div class="my-5 py-5">
<h2>Sorry, no messages were found matching that criteria</h2>
{% include '@ui2022/button--a.html.twig' with {
text: 'Clear Search Filter',
link: path('app.notifications.dashboard.messages.main'),
styles: 'white',
} %}
</div>
</div>
<div class="col-1">
<div class="my-5 py-5 text-center text-black-50">
<i class="far fa-fw fa-8x fa-comment-alt-lines"></i>
</div>
</div>
</div>
{% else %}
{% include '@ProductsNotifications/dashboard/messages/includes/_filter.html.twig' %}
<div id="{{ form.vars.id }}__results">
{% include '@ProductsNotifications/dashboard/messages/includes/_results.html.twig' %}
</div>
{% endif %}
</div>
</div>
{% endblock %}
{% block modals %}
{{ parent() }}
{% include '@ui2022/modal.html.twig' with {
dialog_styles: 'scrollable centered',
attr: {
id: 'modal__new_broadcast',
class: 'modal-ajax',
},
} %}
{% include '@ui2022/modal.html.twig' with {
attr: {
id: 'modal__result_delete',
class: 'modal-ajax modal-delete',
},
dialog_styles: 'dialog--createmsg',
} %}
{% include '@ui2022/modal.html.twig' with {
attr: {
id: 'modal__result_unschedule',
class: 'modal-ajax modal-delete',
},
dialog_styles: 'dialog--createmsg',
} %}
{% endblock %}