diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/notification.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/notification.scss index b243fbd0b..33e3addcb 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/notification.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/notification.scss @@ -2,7 +2,8 @@ * Notifications List */ -div.notification-list { +div.notification-list, +div.notification-show { div.item-bloc { div.item-row.header { diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig index 993d53a1b..daec10373 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig @@ -10,7 +10,7 @@
-
- +
+ {% endif %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/show.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/show.html.twig index a688b3203..b4c2b0196 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Notification/show.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/show.html.twig @@ -13,73 +13,87 @@ {% endblock %} {% block content %} -
+
-

{{ notification.title }}

+

{{ notification.title }}

+
+ {% include 'ChillMainBundle:Notification:_list_item.html.twig' with { + 'data': { + 'template': handler.getTemplate(notification), + 'template_data': handler.getTemplateData(notification) + }, + 'action_button': 'false' + } %} +
+ + {# + {{ dump() }}
{% include handler.getTemplate(notification) with handler.getTemplateData(notification) %}
-
- {# à remplacer par un commentEmbeddable #} + à remplacer par un commentEmbeddable {{ notification.message|chill_markdown_to_html }}
+ #} - {% if notification.comments|length > 0 %} - {% for comment in notification.comments %} - {% if editedCommentForm is null or editedCommentId != comment.id %} -
- -
- {{ comment.content|chill_markdown_to_html }} -
+
+ {% if notification.comments|length > 0 %} + {% for comment in notification.comments %} + {% if editedCommentForm is null or editedCommentId != comment.id %} +
+ +
+ {{ comment.content|chill_markdown_to_html }} +
+ + {% if is_granted('CHILL_MAIN_NOTIFICATION_COMMENT_EDIT', comment) %} +
    +
  • + +
  • +
+ {% endif %} +
+ {% else %} +
+ + {{ form_start(editedCommentForm) }} + {{ form_widget(editedCommentForm) }} + + - {% if is_granted('CHILL_MAIN_NOTIFICATION_COMMENT_EDIT', comment) %}
    +
  • + +
  • - +
- {% endif %} -
- {% else %} -
- - {{ form_start(editedCommentForm) }} - {{ form_widget(editedCommentForm) }} + {{ form_end(editedCommentForm) }} +
+ {% endif %} + {% endfor %} + {% endif %} - + {% if appendCommentForm is not null %} +
+ {{ form_start(appendCommentForm) }} + {{ form_widget(appendCommentForm) }} -
    -
  • - -
  • -
  • - -
  • -
- {{ form_end(editedCommentForm) }} -
- {% endif %} - {% endfor %} - {% endif %} + - {% if appendCommentForm is not null %} -
- {{ form_start(appendCommentForm) }} - {{ form_widget(appendCommentForm) }} - - - -
    -
  • - -
  • -
- {{ form_end(appendCommentForm) }} -
- {% endif %} +
    +
  • + +
  • +
+ {{ form_end(appendCommentForm) }} +
+ {% endif %} +