mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add total count of selected items
I noticed there's a controller for that too, so might as well make use of it. The orders page has it at the top, because that's where the bulk action menu is. But on this page, the action is the import button so I put it there.
This commit is contained in:
@@ -8,12 +8,12 @@
|
||||
%p= t('.enterprise', enterprise_name: @enterprise.name)
|
||||
%br
|
||||
|
||||
= form_with url: main_app.import_admin_dfc_product_imports_path do |form|
|
||||
= form_with url: main_app.import_admin_dfc_product_imports_path, html: { "data-controller": "checked" } do |form|
|
||||
-# This is a very inefficient way of holding a json blob. Maybe base64 encode or store as a temporary file
|
||||
= form.hidden_field :enterprise_id, value: @enterprise.id
|
||||
= form.hidden_field :catalog_json, value: @catalog_json
|
||||
|
||||
%table{"data-controller": "checked" }
|
||||
%table
|
||||
%thead
|
||||
%tr
|
||||
%th
|
||||
@@ -33,5 +33,8 @@
|
||||
- else
|
||||
= t(".new")
|
||||
|
||||
%span{ "data-controller": "checked-feedback", "data-checked-feedback-translation-value": "admin.dfc_product_imports.index.selected" }
|
||||
= t(".selected", count: @items.count)
|
||||
|
||||
%br
|
||||
= form.submit t(".import")
|
||||
|
||||
@@ -854,6 +854,10 @@ en:
|
||||
select_all: "Select/deselect all"
|
||||
update: Update
|
||||
new: New
|
||||
selected:
|
||||
zero: "0 selected"
|
||||
one: "1 selected"
|
||||
other: "%{count} selected"
|
||||
import: Import
|
||||
import:
|
||||
title: "DFC product catalog import"
|
||||
|
||||
Reference in New Issue
Block a user