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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Improve sections.
Matthew Kennedy47e47c08d1e6
diff --git a/backend/app/assets/images/backend-arrows-fullscreen.svg b/backend/app/assets/images/backend-arrows-fullscreen.svgnew file mode 100644index 0000000000..dc0acc3ca1--- /dev/null+++ b/backend/app/assets/images/backend-arrows-fullscreen.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrows-fullscreen" viewBox="0 0 16 16">+ <path fill-rule="evenodd" d="M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707zm4.344 0a.5.5 0 0 1 .707 0l4.096 4.096V11.5a.5.5 0 1 1 1 0v3.975a.5.5 0 0 1-.5.5H11.5a.5.5 0 0 1 0-1h2.768l-4.096-4.096a.5.5 0 0 1 0-.707zm0-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707zm-4.344 0a.5.5 0 0 1-.707 0L1.025 1.732V4.5a.5.5 0 0 1-1 0V.525a.5.5 0 0 1 .5-.5H4.5a.5.5 0 0 1 0 1H1.732l4.096 4.096a.5.5 0 0 1 0 .707z"/>+</svg>\ No newline at end of filediff --git a/backend/app/views/spree/admin/cms_pages/_form.html.erb b/backend/app/views/spree/admin/cms_pages/_form.html.erbindex 7a6de98b0d..aa1183e4a1 100644--- a/backend/app/views/spree/admin/cms_pages/_form.html.erb+++ b/backend/app/views/spree/admin/cms_pages/_form.html.erb@@ -28,7 +28,7 @@</div><% end %>- <div class="card-body">+ <div class="card-body pb-2"><div class="row pb-0"><%= f.field_container :title, class: ['form-group col-6'] do %>@@ -92,9 +92,13 @@<% unless %w[new create].include? controller.action_name %><div class="row pb-0">- <div class="col-6">- <%= render partial: 'spree/admin/shared/edit_resource_links' %>- </div>+ <% if @cms_page.type != 'Spree::Cms::Pages::StandardPage' %>+ <div class="col-6">+ <%= render partial: 'spree/admin/shared/edit_resource_links' %>+ </div>+ <% else %>+ <div class="col"></div>+ <% end %><div class="col-6 text-right"><button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#cmsSeoSettings" aria-expanded="false" aria-controls="collapseExample">@@ -126,4 +130,7 @@<% end %></div></div>+ <div class="d-flex ">+ <%= render partial: 'spree/admin/shared/edit_resource_links' %>+ </div><% end %>diff --git a/backend/app/views/spree/admin/cms_sections/_form.html.erb b/backend/app/views/spree/admin/cms_sections/_form.html.erbindex ca0c890ef9..ed83a7bbdd 100644--- a/backend/app/views/spree/admin/cms_sections/_form.html.erb+++ b/backend/app/views/spree/admin/cms_sections/_form.html.erb@@ -50,7 +50,7 @@<div class="card mb-3"><div class="card-header"><h5 class="mb-0">- <%= Spree.t('admin.cms.settings_for', section: spree_humanize_type(@cms_section.type)) %>+ <%= raw Spree.t('admin.cms.settings_for', section: spree_humanize_type(@cms_section.type)) %></h5></div><div class="card-body">diff --git a/backend/app/views/spree/admin/cms_sections/edit.html.erb b/backend/app/views/spree/admin/cms_sections/edit.html.erbindex 30ddf237f2..41fb973e1e 100644--- a/backend/app/views/spree/admin/cms_sections/edit.html.erb+++ b/backend/app/views/spree/admin/cms_sections/edit.html.erb@@ -7,7 +7,7 @@<%= button_link_to(Spree.t('admin.cms.exit_to_full_screen_mode'),spree.edit_admin_cms_page_path(@cms_page) + '?section_editor_full_screen_mode=true',- class: 'btn-outline-secondary', icon: 'move.svg', id: 'admin_preview_product'+ class: 'btn-outline-secondary', icon: 'arrows-fullscreen.svg', id: 'admin_preview_product') %><% end %>diff --git a/backend/app/views/spree/admin/cms_sections/types/_hero.html.erb b/backend/app/views/spree/admin/cms_sections/types/_hero.html.erbindex a8b6bc8500..d409135ea6 100644--- a/backend/app/views/spree/admin/cms_sections/types/_hero.html.erb+++ b/backend/app/views/spree/admin/cms_sections/types/_hero.html.erb@@ -48,7 +48,7 @@<%= f.select(:linked_resource_type,spree_humanize_dropdown_values('Spree::Cms::Sections::Hero',{ const: 'LINKED_RESOURCE_TYPE' }),- {include_blank: false},+ { include_blank: false },class: 'link_switcher') %><%= f.error_message_on :linked_resource_type %><% end %>diff --git a/backend/app/views/spree/admin/cms_sections/types/_promo.html.erb b/backend/app/views/spree/admin/cms_sections/types/_promo.html.erbindex a2550c1166..33bc4a871e 100644--- a/backend/app/views/spree/admin/cms_sections/types/_promo.html.erb+++ b/backend/app/views/spree/admin/cms_sections/types/_promo.html.erb@@ -22,7 +22,7 @@<%= f.field_container :full_width_on_small, class: ['form-group col-6'] do %><div class="custom-control custom-checkbox"><%= f.check_box :full_width_on_small, class: 'custom-control-input' %>- <%= f.label :full_width_on_small, Spree.t(:full_width_on_small), class: 'custom-control-label' %>+ <%= f.label :full_width_on_small, Spree.t('admin.cms.full_width_on_small'), class: 'custom-control-label' %><%= f.error_message_on :full_width_on_small %></div><% end %>@@ -35,7 +35,6 @@<% unless @cms_section.icon.new_record? %><div id="menuItemImgContainer" class="my-3 "><%= image_tag(main_app.url_for(@cms_section.icon.attachment)) %>- <%#= link_to Spree.t(:remove_image), remove_icon_admin_menu_menu_item_path(@cms_page, @cms_section), method: :delete %></div><% end %><div id="<% unless @cms_section.icon.new_record? %>MenuItemImageButton<% end %>">@@ -60,7 +59,7 @@<%= f.select(:linked_resource_type,spree_humanize_dropdown_values('Spree::Cms::Sections::Promo',{ const: 'LINKED_RESOURCE_TYPE' }),- {include_blank: false},+ { include_blank: false },class: 'link_switcher') %><%= f.error_message_on :linked_resource_type %><% end %>diff --git a/core/config/locales/en.yml b/core/config/locales/en.ymlindex cdec448cf9..ef444f3316 100644--- a/core/config/locales/en.yml+++ b/core/config/locales/en.yml@@ -558,6 +558,7 @@ en:full_width: Full widthtitle: Titlefit: Fit To+ full_width_on_small: Full width on small devicesbutton_text: Button Textexit_to_full_screen_mode: Exit To Full Screenpage_type: Page Type@@ -578,7 +579,7 @@ en:no_sections_found_please_add_one: Add your first section to this page by clicking the + Add New Section button above.click_create_to_load_new_link: 'Click the <b>Create</b> button below to save your new page section, and load the section settings.'click_update_to_load_new_link: 'Click the <b>Update</b> button below to load the new section settings.'- settings_for: 'Available Options For %{section}'+ settings_for: 'Options For: <b>%{section} Section</b>'page_sections: '%{page_name} Sections'page_sections_info: 'The area below represents your %{page_type} displayed in %{store}, add sections and drag them into position'linkable: