Add edited-label to edited comments

This commit is contained in:
Maximilian Grundke
2017-08-17 14:32:36 +02:00
parent 45fdbce57d
commit 48227d68f3
4 changed files with 23 additions and 3 deletions

View File

@ -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 {

View File

@ -184,9 +184,18 @@ also, all settings from the rails model needed for the editor configuration in t
if (index !== 0) {
popupContent += '<div class="popover-divider"></div>'
}
popupContent += '<p><div class="popover-username">' + comment.username + ':</div>' +
popupContent += '<p>';
popupContent += '<div class="popover-username">' + comment.username + ':</div>' +
'<div class="popover-comment">' + preprocess(comment.text) + '</div>' +
'<div class="popover-date">' + comment.date + '</div><p>';
'<div class="popover-footer">' +
'<div class="popover-date">' + comment.date + '</div>';
if (comment.updated) {
popupContent += '<div class="popover-updated">' +
'<i class="fa fa-pencil" aria-hidden="true"></i>' +
'<%= t('request_for_comments.comment_edited') %>' +
'</div>'
}
popupContent += '</div></p>'
});
var icon = $('*[data-file-id="' + fileid + '"] > .ace_gutter > .ace_gutter-layer > div:nth-child(' + (clusterRow + 1) + ')');
icon.popover({

View File

@ -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.

View File

@ -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.