Sha256: 8071c9adebf0b0c624ad86a4439484d4d0f22f21e43bcacc8d87f27aa319e2d0

Contents?: true

Size: 1.07 KB

Versions: 16

Compression:

Stored size: 1.07 KB

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? || !current_participatory_space.can_participate?(current_user), 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? || !current_participatory_space.can_participate?(current_user), 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

16 entries across 16 versions & 1 rubygems

Version Path
decidim-budgets-0.16.1 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.16.0 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.15.2 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.15.1 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.15.0 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.14.4 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.14.3 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.14.2 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.14.1 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.13.1 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.12.2 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.13.0 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.12.1 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.13.0.pre1 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.12.0 app/views/decidim/budgets/projects/_project_budget_button.html.erb
decidim-budgets-0.12.0.pre app/views/decidim/budgets/projects/_project_budget_button.html.erb