Merge pull request #2860 from consul/backport_1582-icon-polls
[Backport] Adds status icons on polls poll group
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
<% poll_group.each do |poll| %>
|
||||
<div class="poll with-image">
|
||||
<% if user_signed_in? && !current_user.unverified? && !poll.votable_by?(current_user) %>
|
||||
<div class="icon-poll-answer already-answer" title="<%= t("polls.index.already_answer") %>">
|
||||
<span class="show-for-sr"><%= t("polls.index.already_answer") %></span>
|
||||
<% if !user_signed_in? %>
|
||||
<div class="icon-poll-answer not-logged-in" title="<%= t("polls.index.not_logged_in") %>">
|
||||
<span class="show-for-sr"><%= t("polls.index.not_logged_in") %></span>
|
||||
</div>
|
||||
<% elsif user_signed_in? %>
|
||||
<% if current_user.unverified? %>
|
||||
<div class="icon-poll-answer unverified" title="<%= t("polls.index.unverified") %>">
|
||||
<span class="show-for-sr"><%= t("polls.index.unverified") %></span>
|
||||
</div>
|
||||
<% elsif cannot?(:answer, poll) %>
|
||||
<div class="icon-poll-answer cant-answer" title="<%= t("polls.index.cant_answer") %>">
|
||||
<span class="show-for-sr"><%= t("polls.index.cant_answer") %></span>
|
||||
</div>
|
||||
<% elsif !poll.votable_by?(current_user) %>
|
||||
<div class="icon-poll-answer already-answer" title="<%= t("polls.index.already_answer") %>">
|
||||
<span class="show-for-sr"><%= t("polls.index.already_answer") %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="row" data-equalizer data-equalize-on="medium">
|
||||
<div class="small-12 medium-3 column">
|
||||
|
||||
Reference in New Issue
Block a user