Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Update page views

Łukasz Adamczyk8c487386e690
diff --git a/admin/app/views/spree/admin/pages/_filters.html.erb b/admin/app/views/spree/admin/pages/_filters.html.erb
index 06703a7b99..9446b0a102 100644
--- a/admin/app/views/spree/admin/pages/_filters.html.erb
+++ b/admin/app/views/spree/admin/pages/_filters.html.erb
@@ -1,9 +1,7 @@
-<%= search_form_for [:admin, @search], url: spree.admin_pages_path do |f| %>
- <div class="form-group">
- <%= f.label :name_cont, Spree.t(:name) %>
- <%= f.text_field :name_cont, class: 'form-control js-quick-search-target js-filterable' %>
- </div>
- <div class="form-actions">
- <%= button Spree.t(:search), 'search' %>
- </div>
+<%= search_form_for [:admin, @search], url: spree.admin_pages_path , class: "filter-wrap border-bottom", data: {controller: "filters reveal", reveal_hidden_class: "d-none"} do |f| %>
+ <%= render 'spree/admin/shared/filters_search_bar', param: :name_cont, label: Spree.t(:name) %>
+
+ <%= render "spree/admin/shared/filter_badge_template" %>
+
+ <div data-filters-target="badgesContainer" class="filter-badges-container"></div>
<% end %>
diff --git a/admin/app/views/spree/admin/pages/index.html.erb b/admin/app/views/spree/admin/pages/index.html.erb
index 3ab85c4b95..206d58d247 100644
--- a/admin/app/views/spree/admin/pages/index.html.erb
+++ b/admin/app/views/spree/admin/pages/index.html.erb
@@ -1,29 +1,30 @@
<% content_for :page_title do %>
<%= Spree.t(:pages) %>
<% end %>
-<% content_for :table_filter do %>
- <%= render 'spree/admin/pages/filters' %>
-<% end %>
<% content_for :page_actions do %>
<%= link_to Spree.t(:add_new_page), spree.new_admin_page_path, class: "btn btn-primary" if can?(:create, Spree::Page.new) %>
<% end %>
-<% if @pages.any? %>
- <div class="table-responsive">
- <table class="table">
- <thead class="text-muted">
- <tr>
- <th><%= Spree.t(:name) %></th>
- <th><%= Spree.t(:updated) %></th>
- </tr>
- </thead>
- <tbody>
- <%= render collection: @pages, partial: 'spree/admin/pages/page', cached: spree_base_cache_scope %>
- </tbody>
- </table>
- <%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @pages } %>
- </div>
-<% else %>
- <div class="text-muted p-5 d-flex align-items-center w-100 justify-content-center">
- No pages found
- </div>
-<% end %>
+
+<div class="card-lg p-0">
+ <%= render "spree/admin/pages/filters" %>
+ <% if @pages.any? %>
+ <div class="table-responsive">
+ <table class="table">
+ <thead class="text-muted">
+ <tr>
+ <th><%= Spree.t(:name) %></th>
+ <th><%= Spree.t(:updated) %></th>
+ </tr>
+ </thead>
+ <tbody>
+ <%= render collection: @pages, partial: "spree/admin/pages/page", cached: spree_base_cache_scope %>
+ </tbody>
+ </table>
+ <%= render partial: "spree/admin/shared/index_table_options", locals: { collection: @pages } %>
+ </div>
+ <% else %>
+ <div class="text-muted p-5 d-flex align-items-center w-100 justify-content-center">
+ No pages found
+ </div>
+ <% end %>
+</div>