From f4774894e7ee94a904c5501d3e2c30529b48ca9e Mon Sep 17 00:00:00 2001 From: Angel Perez Date: Wed, 4 Oct 2017 16:59:23 -0400 Subject: [PATCH] Adapt Admin::Poll::Question 'show' action to new design MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes required as per issues #1855 and #1951 Fixes PR #1977, note n° 2 --- app/views/admin/poll/questions/show.html.erb | 48 +++++++++++--------- config/locales/en/admin.yml | 4 +- config/locales/es/admin.yml | 5 +- config/locales/fr/admin.yml | 10 ++-- 4 files changed, 40 insertions(+), 27 deletions(-) diff --git a/app/views/admin/poll/questions/show.html.erb b/app/views/admin/poll/questions/show.html.erb index 7037afd5f..1cde20f5c 100644 --- a/app/views/admin/poll/questions/show.html.erb +++ b/app/views/admin/poll/questions/show.html.erb @@ -24,29 +24,35 @@ <%= link_to @question.author.name, user_path(@question.author) %>

- - - - - +
- <%= t('admin.questions.show.valid_answers') %> - - <%= link_to t("admin.questions.show.add_answer"), - new_admin_question_answer_path(@question), - class: "button hollow float-right" %> -
+ + + + + - - - - + + + + + + - <% @question.question_answers.each do |answer| %> - - - - - <% end %> + + <% @question.question_answers.each do |answer| %> + + + + + + <% end %> +
+ <%= t('admin.questions.show.valid_answers') %> + + <%= link_to t("admin.questions.show.add_answer"), + new_admin_question_answer_path(@question), + class: "button hollow float-right" %> +
<%= t("admin.questions.show.answers.title") %><%= t("admin.questions.show.answers.description") %>
<%= t("admin.questions.show.answers.title") %><%= t("admin.questions.show.answers.description") %><%= t("admin.questions.show.answers.videos") %>
<%= answer.title %><%= answer.description %>
<%= answer.title %><%= answer.description %><%= link_to t("admin.questions.show.answers.video_list", count: 0), "#" %>
<% if @question.video_url.present? %> diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 8202695f1..e28c7f40b 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -592,12 +592,14 @@ en: author: Author title: Title valid_answers: Valid answers - add_answer: "Add answer" + add_answer: Add answer video_url: External video documents: Documents (1) answers: title: Answer description: Description + videos: Videos + video_list: Video list (%{count}) answers: new: title: "New answer" diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 3ff3abcb5..f025437cf 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -592,14 +592,15 @@ es: author: Autor title: Título valid_answers: Respuestas válidas - add_answer: "Añadir respuesta" - description: Descripción + add_answer: Añadir respuesta video_url: Video externo documents: Documentos (1) preview: Ver en la web answers: title: Respuesta description: Descripción + videos: Vídeos + video_list: Lista de vídeos (%{count}) answers: new: title: "Nueva respuesta" diff --git a/config/locales/fr/admin.yml b/config/locales/fr/admin.yml index e000c8a28..0217c9217 100644 --- a/config/locales/fr/admin.yml +++ b/config/locales/fr/admin.yml @@ -382,10 +382,14 @@ fr: author: Auteur title: Titre valid_answers: Réponses valides - add_answer: "Ajouter une réponse" - answer: "Réponse" - description: Description + add_answer: Ajouter une réponse + documents: Documents (1) preview: Voir l'aperçu + answers: + title: Réponse + description: Description + videos: Vidéos + video_list: Liste des vidéos (%{count}) answers: new: title: "Nouvelle réponse"