Merge pull request #2006 from wairbut-m2c/aperez-admin-polls-adjustments
Adjuments for Poll-related features
This commit is contained in:
@@ -12,13 +12,19 @@
|
|||||||
label: t("admin.questions.new.poll_label") %>
|
label: t("admin.questions.new.poll_label") %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= f.text_field :title, maxlength: Poll::Question.title_max_length %>
|
<%= f.text_field :title %>
|
||||||
|
|
||||||
<div class="small-12">
|
<div class="small-12">
|
||||||
<%= f.label :video_url, t("proposals.form.proposal_video_url") %>
|
<%= 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">
|
||||||
aria: {describedby: "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>
|
||||||
|
|
||||||
<div class="small-12 medium-6 large-4 margin-top">
|
<div class="small-12 medium-6 large-4 margin-top">
|
||||||
|
|||||||
@@ -66,29 +66,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="expanded poll-more-info-answers">
|
<% @poll.questions.map(&:question_answers).flatten.each do |answer| %>
|
||||||
<div class="row padding">
|
<% 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 %>"
|
||||||
<div class="small-12 medium-6 column end" id="answer_<%= answer.id %>"
|
|
||||||
data-toggler=".medium-6">
|
data-toggler=".medium-6">
|
||||||
|
|
||||||
<% if answer.description.present? %>
|
|
||||||
<h3><%= answer.title %></h3>
|
<h3><%= answer.title %></h3>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if answer.images.any? %>
|
<% if answer.description.present? %>
|
||||||
<%= render "gallery", answer: answer %>
|
<div class="margin-top">
|
||||||
<% end %>
|
<%= safe_html_with_links simple_format(answer.description) %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if answer.description.present? %>
|
<% if answer.images.any? %>
|
||||||
<div class="margin-top">
|
<%= render "gallery", answer: answer %>
|
||||||
<%= safe_html_with_links simple_format(answer.description) %>
|
<% end %>
|
||||||
</div>
|
|
||||||
<% end %>
|
<% if answer.documents.present? %>
|
||||||
|
<% answer.documents.each do |document| %>
|
||||||
|
<tr>
|
||||||
|
<td><%= link_to document.title,
|
||||||
|
document.attachment.url,
|
||||||
|
target: "_blank",
|
||||||
|
rel: "nofollow" %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
</div>
|
||||||
</div>
|
<% end %>
|
||||||
</div>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user