From 48227d68f3b5a84350fe3fae53a0d63da17c3bfb Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Thu, 17 Aug 2017 14:32:36 +0200 Subject: [PATCH] Add edited-label to edited comments --- .../stylesheets/request-for-comments.css.scss | 11 ++++++++++- app/views/request_for_comments/show.html.erb | 13 +++++++++++-- config/locales/de.yml | 1 + config/locales/en.yml | 1 + 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/request-for-comments.css.scss b/app/assets/stylesheets/request-for-comments.css.scss index c66d0393..eb3fbba3 100644 --- a/app/assets/stylesheets/request-for-comments.css.scss +++ b/app/assets/stylesheets/request-for-comments.css.scss @@ -30,9 +30,18 @@ word-wrap: break-word; } +.popover-footer { + margin-top: 10px; + margin-bottom: 10px; + width: 100%; +} + .popover-date { color: #008cba; - margin-top: 10px; +} + +.popover-updated { + font-style: italic; } .popover-divider { diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index a9bf7c65..f3d5ee7a 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -184,9 +184,18 @@ also, all settings from the rails model needed for the editor configuration in t if (index !== 0) { popupContent += '
' } - popupContent += '

' + comment.username + ':
' + + popupContent += '

'; + popupContent += '

' + comment.username + ':
' + '
' + preprocess(comment.text) + '
' + - '
' + comment.date + '

'; + '

' }); var icon = $('*[data-file-id="' + fileid + '"] > .ace_gutter > .ace_gutter-layer > div:nth-child(' + (clusterRow + 1) + ')'); icon.popover({ diff --git a/config/locales/de.yml b/config/locales/de.yml index 021f65a7..090b1823 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -466,6 +466,7 @@ de: write_a_thank_you_node: "Wenn Sie möchten, können Sie sich bei allen Mitstudenten, die Ihnen bei der Beantwortung Ihrer Frage geholfen haben, bedanken:" send_thank_you_note: "Senden" cancel_thank_you_note: "Nichts senden" + comment_edited: "bearbeitet" sessions: create: failure: Fehlerhafte E-Mail oder Passwort. diff --git a/config/locales/en.yml b/config/locales/en.yml index 9a334697..1d7ed507 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -487,6 +487,7 @@ en: write_a_thank_you_node: "If you want, you can write a thank you note to all your commenters:" send_thank_you_note: "Send" cancel_thank_you_note: "Don't send" + comment_edited: "edited" sessions: create: failure: Invalid email or password.