" data-message-ok="<%= t("question_votes.create.success", scope: "decidim.consultations") %>" data-title-ko="<%= t("question_votes.create.title_error", scope: "decidim.consultations") %>" data-message-ko="<%= t("question_votes.create.error", scope: "decidim.consultations") %>">

<%# Check if controller has questions_helper %> <% if defined? display_next_previous_button %>
<%= display_next_previous_button(:previous, "float-left") %>
<% if question.consultation.upcoming? %>
<%= t("questions.vote_button.vote", scope: "decidim") %>
<%= t "questions.vote_button.starting_from", scope: "decidim", date: l(question.start_voting_date) %>
<% 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 %>
<%= display_next_previous_button(:next, "float-right") %>
<%= display_next_previous_button(:previous, "expanded") %>
<%= display_next_previous_button(:next, "expanded") %>
<% end %> <%= render partial: "decidim/consultations/questions/vote_modal", locals: { question: question } %> <%= render partial: "decidim/consultations/questions/vote_modal_confirm", locals: { question: question } %> <%= javascript_include_tag "decidim/consultations/utils" %> <%= javascript_include_tag "decidim/consultations/vote_dialog" %>