Merge branch 'master' into polls-gallery-polish

This commit is contained in:
Alberto García
2017-10-07 14:26:50 +02:00
committed by GitHub
2 changed files with 53 additions and 32 deletions

View File

@@ -12,12 +12,18 @@
label: t("admin.questions.new.poll_label") %>
</div>
<%= f.text_field :title, maxlength: Poll::Question.title_max_length %>
<%= f.text_field :title %>
<div class="small-12">
<%= f.label :video_url, t("proposals.form.proposal_video_url") %>
<p class="help-text" id="video-url-help-text"><%= t("proposals.form.proposal_video_url_note") %></p>
<%= f.text_field :video_url, placeholder: t("proposals.form.proposal_video_url"), label: false,
<p class="help-text" id="video-url-help-text">
<%= t("proposals.form.proposal_video_url_note") %>
</p>
<%= f.text_field :video_url,
placeholder: t("proposals.form.proposal_video_url"),
label: false,
aria: {describedby: "video-url-help-text"} %>
</div>

View File

@@ -66,15 +66,20 @@
</div>
</div>
<% @poll.questions.map(&:question_answers).flatten.each do |answer| %>
<% if answer.description.present? || answer.images.any? || answer.documents.present? %>
<div class="expanded poll-more-info-answers">
<div class="row padding">
<% @poll.questions.map(&:question_answers).flatten.each do |answer| %>
<div class="small-12 medium-6 column end" id="answer_<%= answer.id %>"
data-toggler="medium-6 answer-divider">
<h3><%= answer.title %></h3>
<% if answer.description.present? %>
<h3><%= answer.title %></h3>
<div class="margin-top">
<%= safe_html_with_links simple_format(answer.description) %>
</div>
<% end %>
<% if answer.images.any? %>
@@ -100,8 +105,18 @@
</div>
<% end %>
</div>
<% if answer.documents.present? %>
<% answer.documents.each do |document| %>
<%= link_to document.title,
document.attachment.url,
target: "_blank",
rel: "nofollow" %>
<% end %>
<% end %>
</div>
</div>
</div>
<% end %>
<% end %>
</div>