Sha256: 35068628d1f1ce7534e2e6c5989e75ffdd504c7e4ff51544b4676fdc5fcb1bf0

Contents?: true

Size: 1.79 KB

Versions: 117

Compression:

Stored size: 1.79 KB

Contents

<% content_for :page_title do %>
  <%= plural_resource_name(Spree::TaxRate) %>
<% end %>

<% content_for :page_actions do %>
  <%= button_link_to Spree.t(:new_tax_rate), new_object_url, class: "btn-success", icon: 'add' %>
<% end if can? :create, Spree::TaxRate %>

<% if @tax_rates.any? %>
  <table class="table">
    <thead>
      <tr data-hook="rate_header">
        <th><%= Spree.t(:zone) %></th>
        <th><%= Spree.t(:name) %></th>
        <th><%= Spree.t(:tax_category) %></th>
        <th><%= Spree.t(:amount) %></th>
        <th><%= Spree.t(:included_in_price) %></th>
        <th><%= Spree.t(:show_rate_in_label) %></th>
        <th><%= Spree.t(:calculator) %></th>
        <th></th>
      </tr>
    </thead>
    <tbody>
      <% @tax_rates.each do |tax_rate|%>
      <tr id="<%= spree_dom_id tax_rate %>" data-hook="rate_row">
        <td><%=tax_rate.zone.try(:name) || Spree.t(:not_available) %></td>
        <td><%=tax_rate.name %></td>
        <td><%=tax_rate.tax_category.try(:name) || Spree.t(:not_available) %></td>
        <td><%=tax_rate.amount %></td>
        <td><%=tax_rate.included_in_price? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
        <td><%=tax_rate.show_rate_in_label? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
        <td><%=tax_rate.calculator.to_s %></td>
        <td class="actions actions-2 text-right">
          <%= link_to_edit(tax_rate, no_text: true) if can? :edit, tax_rate %>
          <%= link_to_delete(tax_rate, no_text: true) if can? :delete, tax_rate %>
        </td>
      </tr>
      <% end %>
    </tbody>
  </table>
<% else %>
  <div class="alert alert-info no-objects-found">
    <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::TaxRate)) %>,
    <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::TaxRate %>!
  </div>
<% end %>

Version data entries

117 entries across 117 versions & 1 rubygems

Version Path
spree_backend-4.0.9 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.1.15 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.1.14 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.0.8 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-3.7.14.1 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.1.13.1 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.0.7.1 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.0.7 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-3.7.14 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.1.13 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.0.6 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-3.7.13 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.0.5 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.1.12 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-3.7.12 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.0.4 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-3.7.11 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.1.11 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.1.10 app/views/spree/admin/tax_rates/index.html.erb
spree_backend-4.1.9 app/views/spree/admin/tax_rates/index.html.erb