diff --git a/app/assets/javascripts/votes.js b/app/assets/javascripts/votes.js index c782d428b..be8f73a51 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.debate-questions"); App.Votes.hoverize("div.comment-footer"); } }; diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 33509d545..6a80b0ed8 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -327,6 +327,10 @@ } } +.debate-questions .debate-questions .participation-not-allowed { + position: static; +} + .bullet { color: $text; } diff --git a/app/views/legislation/questions/_answer_form.html.erb b/app/views/legislation/questions/_answer_form.html.erb index 6030b57de..8499082fa 100644 --- a/app/views/legislation/questions/_answer_form.html.erb +++ b/app/views/legislation/questions/_answer_form.html.erb @@ -1,5 +1,5 @@ <% if question.question_options.any? %> - <% if process.debate_phase.open? && !answer.persisted? %> + <% if process.debate_phase.open? && !answer.persisted? && can?(:create, Legislation::Answer) %> <%= form_for answer, url: legislation_process_question_answers_path(process, question, answer), remote: true, html: { class: "controls-stacked" } do |f| %> <% question.question_options.each do |question_option| %> @@ -25,4 +25,6 @@ <% end %> + + <%= render "participation_not_allowed" %> <% end %> diff --git a/app/views/legislation/questions/_participation_not_allowed.html.erb b/app/views/legislation/questions/_participation_not_allowed.html.erb index 9bbc88c9a..4e72372bb 100644 --- a/app/views/legislation/questions/_participation_not_allowed.html.erb +++ b/app/views/legislation/questions/_participation_not_allowed.html.erb @@ -1,23 +1,23 @@ <% if user_signed_in? && current_user.organization? %> -