<% if question.consultation.upcoming? %>
<% elsif question.consultation.finished? && signed_in? && question.voted_by?(current_user) %>
<%= button_to decidim_consultations.question_question_votes_path(question),
method: :delete,
remote: true,
data: { disable: true },
class: "card__button button expanded success disabled",
id: "unvote_button" do %>
<%= t("questions.vote_button.already_voted", scope: "decidim") %>
<% end %>
<% elsif signed_in? && question.consultation.active? %>
<% if allowed_to? :unvote, :question, question: question %>
<%= button_to decidim_consultations.question_question_votes_path(question),
method: :delete,
remote: true,
data: { disable: true },
class: "card__button button expanded success",
id: "unvote_button" do %>
"
data-replace="<%= t("questions.vote_button.already_voted_hover", scope: "decidim") %>">
<%= t("questions.vote_button.already_voted", scope: "decidim") %>
<% end %>
<% elsif allowed_to? :vote, :question, question: question %>
<% if question.multiple? %>
<%= link_to decidim_consultations.question_question_multiple_votes_path(question),
class: "card__button button expanded",
id: "multivote_button" do %>
<%= t "questions.vote_button.vote", scope: "decidim" %>
<% end %>
<% else %>
<%= link_to "#", class: "card__button button expanded", id: "vote_button" do %>
<%= t "questions.vote_button.vote", scope: "decidim" %>
<% end %>
<% end %>
<% else %>
<%= authorized_vote_modal_button(question, remote: true, class: "button expanded light button--sc") do %>
<%= t("questions.vote_button.verification_required", scope: "decidim") %>
<% end %>
<% end %>
<% elsif question.consultation.active? %>
<%= logged_button_to decidim_consultations.question_question_votes_path(question),
class: "card__button button expanded",
data: { disable: true },
id: "vote_button" do %>
<%= t("questions.vote_button.vote", scope: "decidim") %>
<% end %>
<% end %>