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.

Admin: Improve tables look and feal

Damian Legawiec07dd6feb9de7
diff --git a/admin/app/assets/stylesheets/spree/admin/components/_tables.scss b/admin/app/assets/stylesheets/spree/admin/components/_tables.scss
index 5be4cb2996..71154d9a38 100644
--- a/admin/app/assets/stylesheets/spree/admin/components/_tables.scss
+++ b/admin/app/assets/stylesheets/spree/admin/components/_tables.scss
@@ -33,7 +33,7 @@ table.table {
thead {
th {
- background-color: rgba($gray-25, 0.5);
+ background-color: rgba($gray-25, 0.75);
@extend .text-muted;
font-size: $font-size-sm;
font-weight: $font-weight-normal;
@@ -79,7 +79,7 @@ table.table {
tr:hover:not(.active):not(.sortable-chosen) {
td {
- background-color: $gray-25;
+ background-color: rgba($gray-25, 0.5);
}
}
@@ -186,13 +186,15 @@ td.actions {
}
.card-lg {
- table {
- thead {
- th:first-child {
- border-top-left-radius: 0;
- }
- th:last-child {
- border-top-right-radius: 0;
+ .with-filters, turbo-frame {
+ table {
+ thead {
+ th:first-child {
+ border-top-left-radius: 0;
+ }
+ th:last-child {
+ border-top-right-radius: 0;
+ }
}
}
}
diff --git a/admin/app/assets/stylesheets/spree/admin/global/_variables.scss b/admin/app/assets/stylesheets/spree/admin/global/_variables.scss
index 3c084be714..ff62fabef7 100644
--- a/admin/app/assets/stylesheets/spree/admin/global/_variables.scss
+++ b/admin/app/assets/stylesheets/spree/admin/global/_variables.scss
@@ -205,7 +205,7 @@ $embed-responsive-aspect-ratios: (
) !default;
// tables
-$table-cell-padding: .75rem .50rem !default;
+$table-cell-padding: 1rem .50rem !default;
$code-color: $gray-600 !default;
$code-bg: $gray-25 !default;
diff --git a/admin/app/views/spree/admin/shared/_index_table.html.erb b/admin/app/views/spree/admin/shared/_index_table.html.erb
index aeee3dbab5..6486b50310 100644
--- a/admin/app/views/spree/admin/shared/_index_table.html.erb
+++ b/admin/app/views/spree/admin/shared/_index_table.html.erb
@@ -8,7 +8,7 @@
<% end %>
<% if paginated_collection.any? %>
- <div class="table-responsive" id="listing_<%= controller_name %>">
+ <div class="table-responsive <% if lookup_context.template_exists?('filters', lookup_context.prefixes, true) %>with-filters<% end %>" id="listing_<%= controller_name %>">
<table class="table">
<thead>
<%= render 'table_header' %>
diff --git a/admin/app/views/spree/admin/themes/index.html.erb b/admin/app/views/spree/admin/themes/index.html.erb
index bc4c423075..6b2c5ef4c9 100644
--- a/admin/app/views/spree/admin/themes/index.html.erb
+++ b/admin/app/views/spree/admin/themes/index.html.erb
@@ -34,9 +34,9 @@
<table class="table">
<thead>
<tr>
- <th class="bg-transparent"><%= Spree.t(:theme) %></th>
- <th class="bg-transparent"><%= Spree.t(:status) %></th>
- <th class="bg-transparent"></th>
+ <th><%= Spree.t(:theme) %></th>
+ <th><%= Spree.t(:status) %></th>
+ <th></th>
</tr>
</thead>
<tbody>