Files
nairobi/app/views/polls/results.html.erb
Javi Martín 5dc98929fc Move poll header partial to a component
This way it'll be easier to write tests for it when we change
it.
2024-06-10 16:53:13 +02:00

23 lines
748 B
Plaintext

<% provide :title, @poll.name %>
<div class="polls-results-stats">
<%= render Polls::PollHeaderComponent.new(@poll) %>
<%= render "poll_subnav" %>
<div class="row margin" data-equalizer data-equalize-on="medium">
<div class="small-12 medium-3 column sidebar" data-equalizer-watch>
<p><strong><%= t("polls.show.results.title") %></strong></p>
<ul class="menu vertical">
<%- @poll.questions.each do |question| %>
<li><%= link_to question.title, "##{question.title.parameterize}" %></li>
<% end %>
</ul>
</div>
<div class="small-12 medium-9 column" data-equalizer-watch>
<%= render Polls::Results::QuestionComponent.with_collection(@poll.questions) %>
</div>
</div>
</div>