diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index ffb7f07f9..4fd3010a4 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -2080,6 +2080,18 @@ table { } } +.comment-header { + + .comments-count { + @include has-fa-icon(comment, solid); + + &::before { + margin-right: 0.3rem; + color: #838383; + } + } +} + // 16. Flags // --------- diff --git a/app/assets/stylesheets/legislation_process.scss b/app/assets/stylesheets/legislation_process.scss index 68557d2b5..2592c59e3 100644 --- a/app/assets/stylesheets/legislation_process.scss +++ b/app/assets/stylesheets/legislation_process.scss @@ -603,20 +603,10 @@ } .comment-header { - color: #838383; padding-bottom: rem-calc(8); margin-bottom: rem-calc(16); border-bottom: 1px solid $border; - .comment-number { - color: $text; - display: inline-block; - } - - .icon-comment { - margin-right: rem-calc(8); - } - a .icon-expand { color: #838383; font-size: $small-font-size; diff --git a/app/views/legislation/annotations/_comment_header.html.erb b/app/views/legislation/annotations/_comment_header.html.erb index 12a386206..c3ee785ec 100644 --- a/app/views/legislation/annotations/_comment_header.html.erb +++ b/app/views/legislation/annotations/_comment_header.html.erb @@ -1,9 +1,6 @@ - - -
- <%= t("legislation.annotations.comments.comments_count", - count: annotation.comments.roots.count) %> -
+ + <%= t("legislation.annotations.comments.comments_count", count: annotation.comments.roots.count) %> + <%= render "annotation_link", annotation: annotation %> diff --git a/app/views/legislation/annotations/_form.html.erb b/app/views/legislation/annotations/_form.html.erb index c843141f2..f71606283 100644 --- a/app/views/legislation/annotations/_form.html.erb +++ b/app/views/legislation/annotations/_form.html.erb @@ -1,7 +1,6 @@
- -
<%= t("legislation.annotations.comments.comments_count", count: 0) %>
+ <%= t("legislation.annotations.comments.comments_count", count: 0) %>
diff --git a/app/views/legislation/annotations/comments.js.erb b/app/views/legislation/annotations/comments.js.erb index 4e5a676c7..1e0985217 100644 --- a/app/views/legislation/annotations/comments.js.erb +++ b/app/views/legislation/annotations/comments.js.erb @@ -14,11 +14,11 @@ if ($(".comment").length == 0) { $("#annotation-link a").attr("href", new_annotation_link) - var current_comment_text = $(".comment-number").text() + var current_comment_text = $(".comments-count").text() var current_comment_count = current_comment_text.match(/\d+/)[0] var new_comment_count = parseInt(current_comment_count) + parseInt(<%= @annotation.comments.roots.count %>) var new_comment_count_text = current_comment_text.replace(/(\d+)/, new_comment_count); - $(".comment-number").text(new_comment_count_text) + $(".comments-count").text(new_comment_count_text) } <%= render "comments_box_form", comment: @comment, annotation: @annotation %> diff --git a/app/views/legislation/draft_versions/_comments_panel.html.erb b/app/views/legislation/draft_versions/_comments_panel.html.erb index 178fca4e3..d7187359e 100644 --- a/app/views/legislation/draft_versions/_comments_panel.html.erb +++ b/app/views/legislation/draft_versions/_comments_panel.html.erb @@ -7,8 +7,7 @@