Adapt Poll::Question 'show' action to mockup

This commit is contained in:
Angel Perez
2017-10-03 13:29:07 -04:00
parent ccb80ce967
commit d9d03079e1
5 changed files with 20 additions and 15 deletions

View File

@@ -16,10 +16,6 @@
<%= f.text_field :title, maxlength: Poll::Question.title_max_length %>
<%= f.label :valid_answers %>
<p class="help-text" id="valid-answers-help-text"><%= t("admin.questions.new.valid_answers_note") %></p>
<%= f.text_field :valid_answers, label: false, aria: {describedby: "valid-answers-help-text"} %>
<div class="ckeditor">
<%= f.cktext_area :description,
maxlength: Poll::Question.description_max_length,

View File

@@ -24,15 +24,21 @@
<%= link_to @question.author.name, user_path(@question.author) %>
</p>
<p>
<strong><%= t("admin.questions.show.valid_answers") %></strong>
</p>
<table>
<tr>
<th colspan="1" scope="colgroup"><%= t('admin.questions.show.valid_answers') %></th>
<th colspan="1" scope="colgroup"><%= link_to t("admin.questions.show.add_answer"), "#", class: "button hollow float-right" %></th>
</tr>
<% @question.valid_answers.each do |answer| %>
<span class="button">
<%= answer %>
</span>
<% end %>
<tr>
<th scope="col"><%= t("admin.questions.show.answer") %></th>
<th scope="col"><%= t("admin.questions.show.description") %></th>
</tr>
<tr>
</tr>
</table>
<p>
<strong><%= t("admin.questions.show.description") %></strong>

View File

@@ -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)

View File

@@ -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)

View File

@@ -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: