From 178ec5c10d4cc4cfd172d43bdde4057b42ae639d Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Thu, 31 Aug 2017 17:42:38 +0200 Subject: [PATCH] Refactor comment template --- app/views/request_for_comments/show.html.erb | 37 +++++++++----------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index a222fa7d..11ae2512 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -184,26 +184,23 @@ also, all settings from the rails model needed for the editor configuration in t if (index !== 0) { htmlContent += '
' } - htmlContent += '
'; - htmlContent += '
' + - '
' + preprocess(comment.username) + '
' + - '
' + comment.date + '
'; - if (comment.updated) { - htmlContent += '
' + - '' + - '<%= t('request_for_comments.comment_edited') %>' + - '
' - } - htmlContent += '
' + - '
' + commentText + '
' + - ''; - if (comment.editable) { - htmlContent += '
' + - '' + - '' + - '
'; - } - htmlContent += '
'; + htmlContent += '\ +
\ +
\ +
' + preprocess(comment.username) + '
\ +
' + comment.date + '
\ +
\ + \ + <%= t('request_for_comments.comment_edited') %> \ +
\ +
\ +
' + commentText + '
\ + \ +
\ + \ + \ +
\ +
'; }); return htmlContent; }