replaces link on poll title if results or stats are enabled
This commit is contained in:
@@ -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| %>
|
||||
|
||||
Reference in New Issue
Block a user