changes poll title link if results or stats are enabled

This commit is contained in:
decabeza
2017-10-20 20:56:01 +02:00
parent b64ef9f689
commit 8ee35df35f

View File

@@ -19,11 +19,27 @@
<div class="dates"></div>
<% if poll.questions.count == 1 %>
<% poll.questions.each do |question| %>
<h4><%= link_to question.title, poll %></h4>
<h4>
<% if poll.results_enabled? %>
<%= link_to question.title, poll_results_path(poll) %>
<% elsif poll.stats_enabled? %>
<%= link_to question.title, poll_stats_path(poll) %>
<% else %>
<%= link_to question.title, poll %>
<% end %>
</h4>
<%= poll_dates(poll) %>
<% end %>
<% else %>
<h4><%= link_to poll.name, poll %></h4>
<h4>
<% if poll.results_enabled? %>
<%= link_to poll.name, poll_results_path(poll) %>
<% elsif poll.stats_enabled? %>
<%= link_to poll.name, poll_stats_path(poll) %>
<% else %>
<%= link_to poll.name, poll %>
<% end %>
</h4>
<%= poll_dates(poll) %>
<ul class="margin-top">
<% poll.questions.each do |question| %>