mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
notification: update comment and api endpoint for marking as read/unread
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
|
||||
{% if notification.comments|length > 0 %}
|
||||
{% for comment in notification.comments %}
|
||||
{% if editedCommentForm is null or editedCommentId != comment.id %}
|
||||
<div>
|
||||
<a id="comment-{{ comment.id }}"></a>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ comment.content|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
@@ -26,11 +28,30 @@
|
||||
{% if is_granted('CHILL_MAIN_NOTIFICATION_COMMENT_EDIT', comment) %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="#" class="btn btn-edit"></a>
|
||||
<a href="{{ chill_path_forward_return_path('chill_main_notification_show', { '_fragment': 'comment-'~comment.id, 'edit': comment.id, 'id': notification.id }) }}" class="btn btn-edit"></a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div>
|
||||
<a id="comment-{{ comment.id }}"></a>
|
||||
{{ form_start(editedCommentForm) }}
|
||||
{{ form_widget(editedCommentForm) }}
|
||||
|
||||
<input type="hidden" name="form" value="edit" />
|
||||
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ chill_path_forward_return_path('chill_main_notification_show', { '_fragment': 'comment-'~comment.id, 'id': notification.id }) }}" class="btn btn-cancel"></a>
|
||||
</li>
|
||||
<li>
|
||||
<button type="submit" class="btn btn-save"></button>
|
||||
</li>
|
||||
</ul>
|
||||
{{ form_end(editedCommentForm) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
@@ -38,6 +59,9 @@
|
||||
<div>
|
||||
{{ form_start(appendCommentForm) }}
|
||||
{{ form_widget(appendCommentForm) }}
|
||||
|
||||
<input type="hidden" name="form" value="append" />
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button type="submit" class="btn btn-save">{{ 'notification.append_comment'|trans }}</button>
|
||||
|
Reference in New Issue
Block a user