Merge branch 'master' into polls-gallery-polish
This commit is contained in:
@@ -12,13 +12,19 @@
|
||||
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,
|
||||
aria: {describedby: "video-url-help-text"} %>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="small-12 medium-6 large-4 margin-top">
|
||||
|
||||
@@ -66,42 +66,57 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="expanded poll-more-info-answers">
|
||||
<div class="row padding">
|
||||
<% @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">
|
||||
|
||||
<% if answer.description.present? %>
|
||||
<h3><%= answer.title %></h3>
|
||||
<% end %>
|
||||
|
||||
<% if answer.images.any? %>
|
||||
<%= render "gallery", answer: answer %>
|
||||
<% end %>
|
||||
|
||||
<% if answer.description.present? %>
|
||||
<div class="margin-top">
|
||||
<div id="answer_description_<%= answer.id %>" class="answer-description short" data-toggler="short">
|
||||
<% if answer.description.present? %>
|
||||
<div class="margin-top">
|
||||
<%= safe_html_with_links simple_format(answer.description) %>
|
||||
</div>
|
||||
<a id="read_more_<%= answer.id %>"
|
||||
data-toggle="answer_description_<%= answer.id %> read_more_<%= answer.id %> read_less_<%= answer.id %>"
|
||||
data-toggler="hide">
|
||||
<%= t("polls.show.read_more", answer: answer.title) %>
|
||||
</a>
|
||||
<a id="read_less_<%= answer.id %>"
|
||||
data-toggle="answer_description_<%= answer.id %> read_more_<%= answer.id %> read_less_<%= answer.id %>"
|
||||
data-toggler="hide"
|
||||
class="hide">
|
||||
<%= t("polls.show.read_less", answer: answer.title) %>
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if answer.images.any? %>
|
||||
<%= render "gallery", answer: answer %>
|
||||
<% end %>
|
||||
|
||||
<% if answer.description.present? %>
|
||||
<div class="margin-top">
|
||||
<div id="answer_description_<%= answer.id %>" class="answer-description short" data-toggler="short">
|
||||
<%= safe_html_with_links simple_format(answer.description) %>
|
||||
</div>
|
||||
<a id="read_more_<%= answer.id %>"
|
||||
data-toggle="answer_description_<%= answer.id %> read_more_<%= answer.id %> read_less_<%= answer.id %>"
|
||||
data-toggler="hide">
|
||||
<%= t("polls.show.read_more", answer: answer.title) %>
|
||||
</a>
|
||||
<a id="read_less_<%= answer.id %>"
|
||||
data-toggle="answer_description_<%= answer.id %> read_more_<%= answer.id %> read_less_<%= answer.id %>"
|
||||
data-toggler="hide"
|
||||
class="hide">
|
||||
<%= t("polls.show.read_less", answer: answer.title) %>
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if answer.documents.present? %>
|
||||
<% answer.documents.each do |document| %>
|
||||
<%= link_to document.title,
|
||||
document.attachment.url,
|
||||
target: "_blank",
|
||||
rel: "nofollow" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user