From a0b4e35dbd6fe5a439f30743f48ad82b67cd8f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 1 Oct 2021 02:45:38 +0200 Subject: [PATCH] Show login to comment message in annotations This way it's consistent with what we get when there are no comments. It only appears once on the page so it isn't overwhelming. --- app/assets/javascripts/votes.js | 1 - app/assets/stylesheets/legislation_process.scss | 15 --------------- .../annotations/_comments_box.html.erb | 16 +++------------- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/app/assets/javascripts/votes.js b/app/assets/javascripts/votes.js index be8f73a51..890ff1e9c 100644 --- a/app/assets/javascripts/votes.js +++ b/app/assets/javascripts/votes.js @@ -14,7 +14,6 @@ initialize: function() { App.Votes.hoverize("div.votes"); App.Votes.hoverize("div.supports"); - App.Votes.hoverize("div.comment-footer"); } }; }).call(this); diff --git a/app/assets/stylesheets/legislation_process.scss b/app/assets/stylesheets/legislation_process.scss index 11f781a1c..36a2298d1 100644 --- a/app/assets/stylesheets/legislation_process.scss +++ b/app/assets/stylesheets/legislation_process.scss @@ -630,21 +630,6 @@ .comments-wrapper { position: relative; - - .participation-not-allowed { - padding: rem-calc(20) rem-calc(8); - } - } - - .comment-footer { - position: relative; - - .participation-not-allowed { - font-size: rem-calc(14); - height: rem-calc(50); - padding: $line-height / 2; - top: -18px; - } } .comment-input { diff --git a/app/views/legislation/annotations/_comments_box.html.erb b/app/views/legislation/annotations/_comments_box.html.erb index 6d5661622..c33429e07 100644 --- a/app/views/legislation/annotations/_comments_box.html.erb +++ b/app/views/legislation/annotations/_comments_box.html.erb @@ -15,13 +15,10 @@ <% end %> <% end %> - <% if @process.allegations_phase.open? %> - <%= t("legislation.annotations.comments.publish_comment") %> -   - <% end %> - <% if @process.allegations_phase.open? %> <% if user_signed_in? %> + <%= t("legislation.annotations.comments.publish_comment") %> +   <% css_id = parent_or_commentable_dom_id(nil, annotation) %> <% else %> - -
- -
- + <%= render "shared/login_to_comment" %> <% end %> <% end %>