mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 10:29:42 +00:00
Resolve "Notification: envoi à des groupes utilisateurs"
This commit is contained in:
@@ -18,8 +18,9 @@
|
||||
{%- endif -%}
|
||||
{%- endblock form_label %}
|
||||
|
||||
{# this has been rewritten for chill #}
|
||||
{% block form_label_class -%}
|
||||
col-sm-4
|
||||
{% if 'div_col_width' in label_attr|default({})|keys %}{% if label_attr['div_col_width'] is not same as false %}{{ label_attr['div_col_width'] }}{% endif %}{% else %}col-sm-4{% endif %}
|
||||
{%- endblock form_label_class %}
|
||||
|
||||
{# Rows #}
|
||||
|
@@ -69,41 +69,44 @@
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if c.notification.addressees|length > 0 %}
|
||||
{% if c.notification.addressees|length > 0 or c.notification.addresseeUserGroups|length > 0 %}
|
||||
<li class="notification-to">
|
||||
{% if c.notification_cc is defined %}
|
||||
{% if c.notification_cc %}
|
||||
<span class="item-key">
|
||||
<abbr title="{{ 'notification.sent_cc' | trans }}">
|
||||
{{ "notification.cc" | trans }} :
|
||||
</abbr>
|
||||
</span>
|
||||
<abbr title="{{ 'notification.sent_cc' | trans }}">
|
||||
{{ "notification.cc" | trans }} :
|
||||
</abbr>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="item-key">
|
||||
<abbr title="{{ 'notification.sent_to' | trans }}">
|
||||
{{ "notification.to" | trans }} :
|
||||
</abbr>
|
||||
</span>
|
||||
<abbr title="{{ 'notification.sent_to' | trans }}">
|
||||
{{ "notification.to" | trans }} :
|
||||
</abbr>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="item-key">
|
||||
<abbr title="{{ 'notification.sent_to' | trans }}">
|
||||
{{ "notification.to" | trans }} :
|
||||
</abbr>
|
||||
</span>
|
||||
<abbr title="{{ 'notification.sent_to' | trans }}">
|
||||
{{ "notification.to" | trans }} :
|
||||
</abbr>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% for a in c.notification.addressees %}
|
||||
<span class="badge-user">
|
||||
{{ a | chill_entity_render_string({'at_date': c.notification.date}) }}
|
||||
</span>
|
||||
{{ a | chill_entity_render_string({'at_date': c.notification.date}) }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
{% for a in c.notification.addressesEmails %}
|
||||
<span
|
||||
class="badge-user"
|
||||
title="{{ 'notification.Email with access link'|trans|e('html_attr') }}"
|
||||
>
|
||||
{{ a }}
|
||||
</span>
|
||||
{{ a }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
{% for ug in c.notification.addresseeUserGroups %}
|
||||
{{ ug|chill_entity_render_box }}
|
||||
{% endfor %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
@@ -21,8 +21,6 @@
|
||||
{{ form_row(form.title, { 'label': 'notification.subject'|trans }) }}
|
||||
{{ form_row(form.addressees, { 'label': 'notification.sent_to'|trans }) }}
|
||||
|
||||
{{ form_row(form.addressesEmails) }}
|
||||
|
||||
{% include handler.template(notification) with handler.templateData(notification) %}
|
||||
|
||||
<div class="mb-3 row">
|
||||
|
@@ -0,0 +1,24 @@
|
||||
{% apply markdown_to_html %}
|
||||
# {{ 'notification.daily_digest.title'|trans }}
|
||||
|
||||
{{ 'notification.daily_digest.greeting'|trans({'%user%': user.label ?? user.email}) }},
|
||||
|
||||
{{ 'daily_notifications'|trans({'notification_count': notification_count}) }}
|
||||
|
||||
{% for notification in notifications %}
|
||||
## {{ notification.title }}
|
||||
|
||||
{{ notification.message }}
|
||||
|
||||
{{ 'notification.daily_digest.view_notification'|trans }}
|
||||
|
||||
{{ absolute_url(path('chill_main_notification_show', {'_locale': user.locale, 'id': notification.id }, false)) }}
|
||||
|
||||
{% if not loop.last %}
|
||||
---
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
---
|
||||
{{ 'notification.daily_digest.signature'|trans }}
|
||||
{% endapply %}
|
@@ -20,7 +20,7 @@
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
|
||||
{% block title %}{{"My profile"|trans}}{% endblock %}
|
||||
{% block title %}{{"user.profile.title"|trans}}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="justify-content-center col-10">
|
||||
@@ -45,9 +45,35 @@
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.phonenumber) }}
|
||||
|
||||
<h2 class="mb-4">{{ 'user.profile.notification_preferences'|trans }}</h2>
|
||||
<table class="table table-striped align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'notification.flags.type'|trans }}</th>
|
||||
<th class="text-center">{{ 'notification.flags.preferences.immediate_email'|trans }}</th>
|
||||
<th class="text-center">{{ 'notification.flags.preferences.daily_email'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-hover table-group-divider">
|
||||
{% for flag in form.notificationFlags %}
|
||||
<tr>
|
||||
<td class="col-sm-6">
|
||||
{{ form_label(flag, null, {'label_attr': {'div_col_width': false}}) }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ form_widget(flag.immediate_email, {'label_attr': { 'class': 'checkbox-inline checkbox-switch'}}) }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ form_widget(flag.daily_email, {'label_attr': { 'class': 'checkbox-inline checkbox-switch'}}) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr': { 'class': 'btn btn-save' } } ) }}
|
||||
<button type="submit" class="btn btn-save">{{ 'Save'|trans }}</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
Reference in New Issue
Block a user