includes poll image on polls index

This commit is contained in:
decabeza
2017-10-04 11:40:20 +02:00
parent 3edd59c8d6
commit e4205dc22a
2 changed files with 28 additions and 5 deletions

View File

@@ -1629,6 +1629,25 @@
}
}
.image-container {
background: #fafafa;
overflow: hidden;
position: relative;
}
.poll {
&.with-image {
padding: 0 $line-height / 2 0 0;
img {
height: 100%;
max-width: none;
position: absolute;
}
}
}
.poll,
.poll-question {
border: 1px solid $border;

View File

@@ -1,5 +1,5 @@
<% poll_group.each do |poll| %>
<div class="poll">
<div class="poll with-image">
<% if poll.answerable_by?(current_user) && poll.votable_by?(current_user) %>
<%= link_to poll,
class: "icon-poll-answer can-answer",
@@ -34,10 +34,14 @@
</div>
<% end %>
<div class="row" data-equalizer>
<div class="small-12 medium-3 column" data-equalizer-watch>
<!-- PENDING TO REPLACE THIS BLOCK WITH POLL MAIN IMAGE -->
<div style="background: #eee; width: 100%; height: 100%; display: block; margin: -12px;">&nbsp;</div>
<!-- /. PENDING TO REPLACE THIS BLOCK WITH POLL MAIN IMAGE -->
<div class="small-12 medium-3 column">
<div class="image-container" data-equalizer-watch>
<% if poll.image.present? %>
<%= image_tag poll.image_url(:large), alt: poll.image.title %>
<% else %>
<div class="no-image"></div>
<% end %>
</div>
</div>
<div class="small-12 medium-6 column" data-equalizer-watch>
<div class="dates"></div>