From 355d68c7f824fc3490b7f0a035b6642eea7f868b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mar=C3=ADa=20Checa?=
Date: Thu, 7 Sep 2017 17:15:20 +0200
Subject: [PATCH] Added video URL and document to poll question preview
---
app/views/admin/poll/questions/show.html.erb | 15 +++++++++++++++
config/locales/en/admin.yml | 2 ++
config/locales/es/admin.yml | 4 +++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/app/views/admin/poll/questions/show.html.erb b/app/views/admin/poll/questions/show.html.erb
index 3be660f79..3f776c5c0 100644
--- a/app/views/admin/poll/questions/show.html.erb
+++ b/app/views/admin/poll/questions/show.html.erb
@@ -40,6 +40,21 @@
<%= @question.description %>
+ <% if @question.video_url.present? %>
+
+ <%= t("admin.questions.show.video_url") %>
+
+ <%= @question.video_url %>
+
+ <% end %>
+
+ <% if @question.documents.any? %>
+
+ <%= t("admin.questions.show.documents") %>
+
+ <%= @question.documents.first.title %>
+
+ <% end %>
<%= link_to t("admin.questions.show.preview"), question_path(@question) %>
diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml
index c91719104..d62d80e75 100644
--- a/config/locales/en/admin.yml
+++ b/config/locales/en/admin.yml
@@ -590,6 +590,8 @@ en:
title: Title
valid_answers: Valid answers
description: Description
+ video_url: External video
+ documents: Documents
preview: View on website
recounts:
index:
diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml
index 58fd31aa1..76fc72204 100644
--- a/config/locales/es/admin.yml
+++ b/config/locales/es/admin.yml
@@ -509,7 +509,7 @@ es:
assignments: "Turnos en esta urna"
no_assignments: "Esta urna no tiene turnos asignados"
flash:
- create: "Añadido turno de presidente de mesa"
+ create: "Añadido turno de presidente de mesa"
destroy: "Eliminado turno de presidente de mesa"
poll_booth_assignments:
flash:
@@ -590,6 +590,8 @@ es:
title: Título
valid_answers: Respuestas válidas
description: Descripción
+ video_url: Video externo
+ documents: Documentos
preview: Ver en la web
recounts:
index: