- @page_title = t('workarea.admin.tax_rates.index.title', category: @category.name) .view .view__header .grid.grid--middle.grid--center .grid__cell.grid__cell--50 .view__heading = link_to_index_for(@category) %h1= link_to @category.name, url_for(@category) .view__container = render_cards_for(@category, :rates) %h2.view__heading= pluralize(@rates.count, 'Rate') - if @rates.blank? = link_to t('workarea.admin.tax_rates.index.empty_button'), new_data_file_tax_import_path(tax_category_id: @category.id), class: 'align-center' - else %table %thead %tr %th= t('workarea.admin.tax_rates.index.table.percentage') %th = t('workarea.admin.tax_rates.index.table.min_value') = link_to '#min-value-tooltip', data: { tooltip: '' } do = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.tax_rates.index.table.min_value_link')) %span#min-value-tooltip.tooltip-content= t('workarea.admin.tax_rates.index.table.min_value_tooltip') %th = t('workarea.admin.tax_rates.index.table.max_value') = link_to '#max-value-tooltip', data: { tooltip: '' } do = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.tax_rates.index.table.max_value_link')) %span#max-value-tooltip.tooltip-content= t('workarea.admin.tax_rates.index.table.max_value_tooltip') %th= t('workarea.admin.tax_rates.index.table.country') %th= t('workarea.admin.tax_rates.index.table.region') %th= t('workarea.admin.tax_rates.index.table.postal_code') %th= t('workarea.admin.tax_rates.index.table.charge_on_shipping') %tbody - @rates.each do |rate| %tr %td= number_to_percentage(rate.percentage * 100, precision: 1) %td= rate.tier_min.present? ? number_to_currency(rate.tier_min) : t('workarea.admin.tax_rates.index.not_applicable') %td= rate.tier_max.present? ? number_to_currency(rate.tier_max) : t('workarea.admin.tax_rates.index.not_applicable') %td= rate.country.alpha2 %td= rate.region %td= rate.postal_code %td= rate.charge_on_shipping ? t('workarea.admin.true') : t('workarea.admin.false') - if @rates.total_pages > 1 = render 'workarea/admin/shared/pagination', collection: @rates .workflow-bar .grid.grid--auto.grid--right.grid--middle .grid__cell= link_to t('workarea.admin.tax_rates.index.button'), new_data_file_tax_import_path(tax_category_id: @category.id), id: 'bulk_import', class: 'workflow-bar__button workflow-bar__button--update'