mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Open links outside of frame by default
This page is big enough and it's hard to see how everything works. So links work like links by default (eg edit and clone). Other links and forms are special, and will reload only the frame: this is now explicit in the code.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
%turbo-frame#products-content{ refresh: "morph" }
|
||||
%turbo-frame#products-content{ target: "_top", refresh: "morph" }
|
||||
.spinner-overlay{ "data-controller": "loading", "data-products-target": "loading", class: "hidden" }
|
||||
.spinner-container
|
||||
.spinner
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
= form_with url: admin_products_path, id: "filters", method: :get, data: { "search-target": "form" } do
|
||||
= form_with url: admin_products_path, id: "filters", method: :get, data: { "search-target": "form", 'turbo-frame': "_self" } do
|
||||
= hidden_field_tag :page, nil, class: "page"
|
||||
= hidden_field_tag :per_page, nil, class: "per-page"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
= t(".pagination.total_html", total: pagy.count, from: pagy.from, to: pagy.to)
|
||||
|
||||
- if search_term.present? || producer_id.present? || category_id.present?
|
||||
%a{ href: url_for(page: 1), class: "button disruptive" }
|
||||
%a{ href: url_for(page: 1), class: "button disruptive", 'data-turbo-frame': "_self" }
|
||||
= t(".pagination.clear_search")
|
||||
|
||||
%form.with-dropdown
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
= form_with url: bulk_update_admin_products_path, method: :post, id: "products-form",
|
||||
builder: BulkFormBuilder,
|
||||
html: { data: { controller: "bulk-form",
|
||||
html: { data: { 'turbo-frame': "_self",
|
||||
controller: "bulk-form",
|
||||
'bulk-form-disable-selector-value': "#sort,#filters",
|
||||
'bulk-form-error-value': defined?(@error_counts),
|
||||
} } do |form|
|
||||
|
||||
Reference in New Issue
Block a user