Sha256: ee5c7c3fc9b893d4105fd305e525af7c9dbefd3b0e2a9e53f6a9918138377499

Contents?: true

Size: 1.36 KB

Versions: 56

Compression:

Stored size: 1.36 KB

Contents

<% if allowed_to? :vote, :initiative, initiative: initiative %>
  <% if steps %>
    <%= link_to(
      vote_label,
      initiative_initiative_signatures_path(initiative_slug: current_initiative.slug),
      class: "button expanded light button--sc"
    ) %>
  <% else %>
    <%= button_to(
      vote_label,
      initiative_initiative_signatures_path(initiative_slug: current_initiative.slug),
      remote: true,
      data: { disable: true },
      class: "button expanded light button--sc"
    ) %>
  <% end %>
<% else %>
  <% if initiative.voted_by?(current_user) %>
    <% if allowed_to? :unvote, :initiative, initiative: initiative %>
      <%= button_to(
        initiative_initiative_vote_path(initiative_slug: current_initiative.slug),
        method: :delete,
        remote: true,
        data: { disable: true },
        class: "button expanded light button--sc success"
      ) do %>
        <%= icon("check", class: "icon--small") %>
        <%= unvote_label %>
      <% end %>
    <% else %>
      <button class='button expanded button--sc success light disabled' disabled>
        <%= icon("check", class: "icon--small") %>
        <%= unvote_label %>
      </button>
    <% end %>
  <% else %>
    <%= authorized_vote_modal_button(initiative, remote: true, class: "button expanded light button--sc") do %>
      <%= verification_label %>
    <% end %>
  <% end %>
<% end %>

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
decidim-initiatives-0.27.9 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.8 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.7 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.6 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.26.10 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.26.9 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.5 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.26.8 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.4 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.3 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.26.7 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.26.5 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.2 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.1 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.26.4 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.0 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.26.3 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.0.rc2 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.27.0.rc1 app/views/decidim/initiatives/initiatives/_vote_button.html.erb
decidim-initiatives-0.26.2 app/views/decidim/initiatives/initiatives/_vote_button.html.erb