Sha256: 38c697dc719c93151a0eabe37e7dabfff58198450b045a9a0ca047f256e53c33

Contents?: true

Size: 972 Bytes

Versions: 3

Compression:

Stored size: 972 Bytes

Contents

<% if current_user.present? %>
  <% if current_order && current_order.projects.include?(project) %>
    <%= action_authorized_button_to "vote", t(".added"), order_line_item_path(project_id: project), method: :delete, remote: true, data: { disable: true, budget: project.budget, "redirect-url": project_path(project) }, disabled: !current_settings.votes_enabled? || current_order_checked_out?, class: "button expanded button--sc success budget--list__action" %>
  <% else %>
    <%= action_authorized_button_to "vote", t(".add"), order_line_item_path(project_id: project), method: :post, remote: true, data: { disable: true, budget: project.budget, add: true, "redirect-url": project_path(project) }, disabled: !current_settings.votes_enabled? || current_order_checked_out?, class: "button expanded button--sc budget--list__action" %>
  <% end %>
<% else %>
  <button class="button expanded button--sc disabled" data-toggle="loginModal"><%= t(".add") %></button>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-budgets-0.11.2 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.11.1 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.11.0.pre1 app/views/decidim/budgets/projects/_project_budget_button.html.erb