From 8682e426acd2d2e9e36729ae19a57de0943538db Mon Sep 17 00:00:00 2001 From: Fernando Blat Date: Thu, 5 Jan 2017 13:08:06 +0100 Subject: [PATCH] Show warning if phase is not open --- .../legislation/questions/_participation_not_allowed.html.erb | 4 ++++ config/locales/en.yml | 1 + config/locales/es.yml | 1 + 3 files changed, 6 insertions(+) diff --git a/app/views/legislation/questions/_participation_not_allowed.html.erb b/app/views/legislation/questions/_participation_not_allowed.html.erb index b330f7fe0..b186c2f5b 100644 --- a/app/views/legislation/questions/_participation_not_allowed.html.erb +++ b/app/views/legislation/questions/_participation_not_allowed.html.erb @@ -17,4 +17,8 @@ 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 %> +<% elsif !@process.open_phase?(:debate) %> + <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 95cc42db4..a28c03910 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -295,6 +295,7 @@ en: unauthenticated: You must %{signin} or %{signup} to participate. verified_only: Only verified users can participate, %{verify_account}. verify_account: verify your account + debate_phase_not_open: Debate phase has finished and answers are not accepted anymore locale: English notifications: index: diff --git a/config/locales/es.yml b/config/locales/es.yml index 3a2cf0faa..9424c42f3 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -295,6 +295,7 @@ es: unauthenticated: Necesitas %{signin} o %{signup} para participar en el debate. verified_only: Solo los usuarios verificados pueden participar en el debate, %{verify_account}. verify_account: verifica tu cuenta + debate_phase_not_open: La fase de debate previo ya ha finalizado y en este momento no se aceptan respuestas locale: EspaƱol notifications: index: