Replace old open_phase? method for new phase/publication open? on Legislative Process
This commit is contained in:
@@ -15,12 +15,12 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @process.open_phase?(:allegations) %>
|
||||
<% if @process.allegations_phase.open? %>
|
||||
<a class="button publish-comment" href="#"><strong><%= t('legislation.annotations.comments.publish_comment') %></strong></a>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% if @process.open_phase?(:allegations) %>
|
||||
<% if @process.allegations_phase.open? %>
|
||||
<% if user_signed_in? %>
|
||||
<% css_id = parent_or_commentable_dom_id(nil, annotation) %>
|
||||
<div id="js-comment-form-annotation-<%= annotation.id %>" style="display:none" class="comment-form js-comment-form-annotation">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="comments-wrapper">
|
||||
<div class="comment-input">
|
||||
<% if !@process.open_phase?(:allegations) %>
|
||||
<% if !@process.allegations_phase.open? %>
|
||||
<div data-alert class="callout primary">
|
||||
<%= t("legislation.annotations.form.phase_not_open") %>
|
||||
</div>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<section class="legislation-annotatable"
|
||||
data-legislation-draft-version-id="<%= @draft_version.id %>"
|
||||
data-legislation-annotatable-base-url="<%= legislation_process_draft_version_path(@process, @draft_version) %>"
|
||||
data-legislation-open-phase="<%= @process.open_phase?(:allegations) %>"
|
||||
data-legislation-open-phase="<%= @process.allegations_phase.open? %>"
|
||||
>
|
||||
<% end %>
|
||||
<%= @draft_version.body_html.html_safe %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% if question.question_options.any? %>
|
||||
<% if process.open_phase?(:debate) && !answer.persisted? %>
|
||||
<% if process.debate_phase.open? && !answer.persisted? %>
|
||||
|
||||
<%= 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| %>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
signin: link_to(t("legislation.questions.participation.signin"), new_user_session_path),
|
||||
signup: link_to(t("legislation.questions.participation.signup"), new_user_registration_path)).html_safe %>
|
||||
</div>
|
||||
<% elsif !@process.open_phase?(:debate) %>
|
||||
<% elsif !@process.debate_phase.open? %>
|
||||
<div class="participation-not-allowed" style='display:none' aria-hidden="false">
|
||||
<%= t("legislation.questions.participation.debate_phase_not_open") %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user