diff --git a/app/assets/stylesheets/request-for-comments.css.scss b/app/assets/stylesheets/request-for-comments.css.scss index 66171a7d..16acb580 100644 --- a/app/assets/stylesheets/request-for-comments.css.scss +++ b/app/assets/stylesheets/request-for-comments.css.scss @@ -90,6 +90,12 @@ border: 1px solid #cccccc; padding: 15px; + .comment-removed { + margin-top: 20px; + margin-bottom: 20px; + font-style: italic; + } + .popover-actions { display: flex; diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index c1ffc1d7..070e70de 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -308,11 +308,7 @@ also, all settings from the rails model needed for the editor configuration in t var commentId = $(event.target).data('comment-id'); deleteComment(commentId, editor, fileid, function () { var parent = $(button).parent().parent(); - parent.siblings().first().remove(); // potential divider - parent.remove(); // the comment itself - if (container.html() === '') { - otherComments.hide(); - } + parent.html('
<%= t('comments.deleted') %>
'); }); }); }); diff --git a/config/locales/de.yml b/config/locales/de.yml index a8681878..8cdc4817 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -156,6 +156,9 @@ de: user_exercise_feedback: one: Feedback other: Feedback + comment: + one: Kommentar + other: Kommentare errors: messages: together: 'muss zusammen mit %{attribute} definiert werden' @@ -584,4 +587,6 @@ de: estimated_time_20_to_30: "zwischen 20 und 30 Minuten" estimated_time_more_30: "mehr als 30 Minuten" working_time: "Geschätze Bearbeitungszeit für diese Aufgabe:" + comments: + deleted: "Gelöscht" diff --git a/config/locales/en.yml b/config/locales/en.yml index f53f6485..50a15db4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -177,6 +177,9 @@ en: user_exercise_feedback: one: Feedback other: Feedback + comment: + one: Comment + other: Comments errors: messages: together: 'has to be set along with %{attribute}' @@ -605,3 +608,5 @@ en: estimated_time_20_to_30: "between 20 and 30 minutes" estimated_time_more_30: "more than 30 minutes" working_time: "Estimated time working on this exercise:" + comments: + deleted: "Deleted"