- @page_title = t('workarea.admin.pricing_discount_code_lists.index.title') .view .view__header .grid.grid--middle.grid--center .grid__cell.grid__cell--50 .view__heading = link_to "↑ #{t('workarea.admin.pricing_discount_code_lists.index.dashboard_link')}", marketing_dashboards_path, class: 'view__dashboard-button' %h1.heading--no-margin= t('workarea.admin.pricing_discount_code_lists.index.title') %p= t('workarea.admin.pricing_discount_code_lists.index.description_html', link: link_to(t('workarea.admin.pricing_discount_code_lists.index.description_link'), pricing_discounts_path)) .view__container .browsing-controls.browsing-controls--with-divider %p.browsing-controls__count{ data: { browsing_controls_count: @code_lists.length } } = t('workarea.admin.pricing_discount_code_lists.index.list_pluralize', count: @code_lists.length) - if @code_lists.any? %table.index-table %thead %tr %th.index-table__control-cell .checkbox = check_box_tag 'select_all', nil, false, id: 'select_all', class: 'checkbox__input', data: { bulk_action_select_all: '' } = label_tag 'select_all', t('workarea.admin.bulk_actions.select_all'), class: 'checkbox__label' %th= t('workarea.admin.fields.list') %th= t('workarea.admin.fields.prefix') %th= t('workarea.admin.fields.expires_at') %th= t('workarea.admin.fields.count') %th= t('workarea.admin.fields.created_at') %tbody - @code_lists.each do |code_list| %tr.index-table__row %td.index-table__control-cell .checkbox = check_box_tag 'global_id', code_list.to_gid_param, false, class: 'checkbox__input', id: dom_id(code_list), data: { bulk_action_item: '' } = label_tag dom_id(code_list), '', class: 'checkbox__label', title: t('workarea.admin.bulk_actions.add_summary_button') %td= link_to code_list.name, pricing_discount_code_list_path(code_list) %td= code_list.prefix %td= code_list.expires_at ? local_time(code_list.expires_at, :long) : 'Never' %td= code_list.count %td= local_time_ago code_list.created_at - if @code_lists.total_pages > 1 = render 'workarea/admin/shared/pagination', collection: @code_lists .workflow-bar .grid .grid__cell.grid__cell--50 = render 'workarea/admin/shared/bulk_actions', klass: Workarea::Pricing::Discount::CodeList .grid__cell.grid__cell--50.align-right = link_to t('workarea.admin.pricing_discount_code_lists.index.button'), new_pricing_discount_code_list_path, id: 'add_promo_code_list', class: 'workflow-bar__button workflow-bar__button--create'