From d9d03079e173aa438909ac0795d21adcac05e638 Mon Sep 17 00:00:00 2001 From: Angel Perez Date: Tue, 3 Oct 2017 13:29:07 -0400 Subject: [PATCH] Adapt Poll::Question 'show' action to mockup --- app/views/admin/poll/questions/_form.html.erb | 4 ---- app/views/admin/poll/questions/show.html.erb | 22 ++++++++++++------- config/locales/en/admin.yml | 3 ++- config/locales/es/admin.yml | 3 ++- config/locales/fr/admin.yml | 3 ++- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/app/views/admin/poll/questions/_form.html.erb b/app/views/admin/poll/questions/_form.html.erb index 7881936e4..5b4de0bcb 100644 --- a/app/views/admin/poll/questions/_form.html.erb +++ b/app/views/admin/poll/questions/_form.html.erb @@ -16,10 +16,6 @@ <%= f.text_field :title, maxlength: Poll::Question.title_max_length %> - <%= f.label :valid_answers %> -

<%= t("admin.questions.new.valid_answers_note") %>

- <%= f.text_field :valid_answers, label: false, aria: {describedby: "valid-answers-help-text"} %> -
<%= f.cktext_area :description, maxlength: Poll::Question.description_max_length, diff --git a/app/views/admin/poll/questions/show.html.erb b/app/views/admin/poll/questions/show.html.erb index 3f776c5c0..9d38735ca 100644 --- a/app/views/admin/poll/questions/show.html.erb +++ b/app/views/admin/poll/questions/show.html.erb @@ -24,15 +24,21 @@ <%= link_to @question.author.name, user_path(@question.author) %>

-

- <%= t("admin.questions.show.valid_answers") %> -

+ + + + + - <% @question.valid_answers.each do |answer| %> - - <%= answer %> - - <% end %> + + + + + + + + +
<%= t('admin.questions.show.valid_answers') %><%= link_to t("admin.questions.show.add_answer"), "#", class: "button hollow float-right" %>
<%= t("admin.questions.show.answer") %><%= t("admin.questions.show.description") %>

<%= t("admin.questions.show.description") %> diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 0545e6af5..2b8a18ce2 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -597,12 +597,13 @@ en: new: title: "Create Question" poll_label: "Poll" - valid_answers_note: "Enter the answers separated by commas (,)" show: proposal: Original proposal author: Author title: Title valid_answers: Valid answers + add_answer: "Add answer" + answer: "Answer" description: Description video_url: External video documents: Documents (1) diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 816cadd57..333cf9cf9 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -597,12 +597,13 @@ es: new: title: "Crear pregunta ciudadana" poll_label: "Votación" - valid_answers_note: "Escribe las respuestas separadas por comas (,)" show: proposal: Propuesta ciudadana original author: Autor title: Título valid_answers: Respuestas válidas + add_answer: "Añadir respuesta" + answer: "Respuesta" description: Descripción video_url: Video externo documents: Documentos (1) diff --git a/config/locales/fr/admin.yml b/config/locales/fr/admin.yml index ae9a44277..f509b2a94 100644 --- a/config/locales/fr/admin.yml +++ b/config/locales/fr/admin.yml @@ -377,12 +377,13 @@ fr: new: title: "Créer une question" poll_label: "Vote" - valid_answers_note: "Saisir les réponses séparées par des virgules (,)" show: proposal: Proposition originale author: Auteur title: Titre valid_answers: Réponses valides + add_answer: "Ajouter une réponse" + answer: "Réponse" description: Description preview: Voir l'aperçu recounts: