Note we aren't using flex-with-gap because currently (until we decide to use the `gap` property) this mixin sets a negative margin that would move the border of this element to the left.
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
<div class="poll with-image">
|
|
<%= render Polls::AccessStatusComponent.new(poll) %>
|
|
|
|
<div class="image-container">
|
|
<% if poll.image.present? %>
|
|
<%= image_tag poll.image.variant(:large), alt: poll.image.title.unicode_normalize %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="poll-info">
|
|
<% if poll.questions.one? %>
|
|
<h4><%= link_to_poll poll.questions.first.title, poll %></h4>
|
|
<div class="dates"><%= dates %></div>
|
|
<% else %>
|
|
<h4><%= link_to_poll poll.name, poll %></h4>
|
|
<div class="dates"><%= dates %></div>
|
|
|
|
<ul class="margin-top">
|
|
<% poll.questions.sort_for_list.each do |question| %>
|
|
<li><%= question.title %></li>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|
|
<%= render Polls::GeozonesComponent.new(poll) %>
|
|
<%= render SDG::TagListComponent.new(poll, limit: 5, linkable: false) %>
|
|
</div>
|
|
|
|
<% if poll.expired? %>
|
|
<%= link_to_poll t("polls.index.participate_button_expired"), poll, class: "button hollow expanded" %>
|
|
<% else %>
|
|
<%= link_to_poll t("polls.index.participate_button"), poll, class: "button hollow expanded" %>
|
|
<% end %>
|
|
</div>
|