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.

Clean up admin forms to center them for better UX (#12934)

Damian Legawiecc98cd5d35831
diff --git a/admin/app/controllers/spree/admin/digital_assets_controller.rb b/admin/app/controllers/spree/admin/digital_assets_controller.rb
index dd27b81cd5..ef628025d0 100644
--- a/admin/app/controllers/spree/admin/digital_assets_controller.rb
+++ b/admin/app/controllers/spree/admin/digital_assets_controller.rb
@@ -46,6 +46,7 @@ module Spree
end
def add_breadcrumbs
+ add_breadcrumb @product.name, spree.edit_admin_product_path(@product)
add_breadcrumb Spree.t(:digital_assets), spree.admin_product_digital_assets_path(@product)
end
end
diff --git a/admin/app/views/spree/admin/admin_users/show.html.erb b/admin/app/views/spree/admin/admin_users/show.html.erb
index b8fa12abaa..608b8be555 100644
--- a/admin/app/views/spree/admin/admin_users/show.html.erb
+++ b/admin/app/views/spree/admin/admin_users/show.html.erb
@@ -13,7 +13,7 @@
<div class="card-header">
<h5 class="card-title">
<%= icon 'history', class: 'mr-1' %>
- <%= Spree.t(:audit_log) %>
+ <%= Spree.t('admin.audit_log') %>
</h5>
</div>
<div class="card-body">
diff --git a/admin/app/views/spree/admin/dashboard/getting_started.html.erb b/admin/app/views/spree/admin/dashboard/getting_started.html.erb
index 53c61f9c53..9afb2094a7 100644
--- a/admin/app/views/spree/admin/dashboard/getting_started.html.erb
+++ b/admin/app/views/spree/admin/dashboard/getting_started.html.erb
@@ -1,5 +1,5 @@
<div class="row pt-3">
- <div class="col-lg-8 mb-4">
+ <div class="col-lg-8 offset-lg-2 mb-4">
<h2 class="page-header-title">
<%= Spree.t('admin.getting_started') %>
</h2>
@@ -17,6 +17,4 @@
<% end %>
<% end %>
</div>
- <div class="col-lg-4">
- </div>
</div>
diff --git a/admin/app/views/spree/admin/integrations/index.html.erb b/admin/app/views/spree/admin/integrations/index.html.erb
index 158e2ff6e8..4b0dcded9d 100644
--- a/admin/app/views/spree/admin/integrations/index.html.erb
+++ b/admin/app/views/spree/admin/integrations/index.html.erb
@@ -2,22 +2,22 @@
<%= Spree.t(:integrations) %>
<% end %>
-<%= content_for(:page_alerts) do %>
- <div class="alert alert-info">
- <%= Spree.t('admin.integrations.page_subtitle') %>
- </div>
-<% end %>
-
-<div class="container px-lg-0 mt-2">
- <% grouped_available_store_integrations.each do |group, integrations| %>
- <% if group.present? %>
- <div class="my-2 text-muted font-weight-light text-uppercase"><%= Spree.t(group) %></div>
- <% end %>
+<div class="row">
+ <div class="col-lg-8 offset-lg-2">
+ <div class="alert alert-info mb-4">
+ <%= Spree.t('admin.integrations.page_subtitle') %>
+ </div>
- <div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 mb-4">
- <% integrations.each do |integration| %>
- <%= render 'spree/admin/integrations/integration', integration_class: integration %>
+ <% grouped_available_store_integrations.each do |group, integrations| %>
+ <% if group.present? %>
+ <div class="my-2 text-muted font-weight-light text-uppercase"><%= Spree.t(group) %></div>
<% end %>
- </div>
- <% end %>
+
+ <div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 mb-4">
+ <% integrations.each do |integration| %>
+ <%= render 'spree/admin/integrations/integration', integration_class: integration %>
+ <% end %>
+ </div>
+ <% end %>
+ </div>
</div>
diff --git a/admin/app/views/spree/admin/payment_methods/_form.html.erb b/admin/app/views/spree/admin/payment_methods/_form.html.erb
index 30d832b69a..a2fad8b657 100644
--- a/admin/app/views/spree/admin/payment_methods/_form.html.erb
+++ b/admin/app/views/spree/admin/payment_methods/_form.html.erb
@@ -2,69 +2,62 @@
<%= render "spree/admin/payment_methods/configuration_guides/#{@object.configuration_guide_partial_name}", f: f %>
<% end %>
+<% if !preference_fields(@object, f).empty? || @object.respond_to?(:custom_form_fields_partial_name) %>
+ <div class="card mb-4">
+ <div class="card-header">
+ <h5 class="card-title"><%= Spree.t(:payment_provider_settings) %></h5>
+ </div>
+ <div class="card-body">
+ <%= preference_fields(@object, f) unless preference_fields(@object, f).empty? %>
-<div class="row">
- <% if !preference_fields(@object, f).empty? || @object.respond_to?(:custom_form_fields_partial_name) %>
- <div class="col-12 col-md-6">
- <div class="card mb-4">
- <div class="card-header">
- <h5 class="card-title"><%= Spree.t(:payment_provider_settings) %></h5>
- </div>
- <div class="card-body">
- <%= preference_fields(@object, f) unless preference_fields(@object, f).empty? %>
-
- <% if @object.respond_to?(:custom_form_fields_partial_name) %>
- <%= render "spree/admin/payment_methods/custom_form_fields/#{@object.custom_form_fields_partial_name}", f: f %>
- <% end %>
- </div>
- </div>
+ <% if @object.respond_to?(:custom_form_fields_partial_name) %>
+ <%= render "spree/admin/payment_methods/custom_form_fields/#{@object.custom_form_fields_partial_name}", f: f %>
+ <% end %>
</div>
- <% end %>
+ </div>
+<% end %>
- <div class="col-12 col-md-6">
- <div class="card mb-4">
- <div class="card-header">
- <h5 class="card-title"><%= Spree.t(:display_settings) %></h5>
- </div>
- <div class="card-body">
- <div class="form-group">
- <%= label_tag :payment_method_name, Spree.t(:name) %>
- <%= text_field :payment_method, :name, class: 'form-control' %>
- <span class="text-muted form-text mt-2">
- This name will be used to identify the payment method on the storefront
- </span>
+<div class="card mb-4">
+ <div class="card-header">
+ <h5 class="card-title"><%= Spree.t(:display_settings) %></h5>
+ </div>
+ <div class="card-body">
+ <div class="form-group">
+ <%= label_tag :payment_method_name, Spree.t(:name) %>
+ <%= text_field :payment_method, :name, class: 'form-control' %>
+ <span class="text-muted form-text mt-2">
+ This name will be used to identify the payment method on the storefront
+ </span>
- <%= error_message_on :payment_method, :name %>
- </div>
+ <%= error_message_on :payment_method, :name %>
+ </div>
- <% if can?(:manage, Spree::Store) && available_stores.count > 1 %>
- <div class="form-group">
- <%= label_tag :payment_method_stores, Spree.t(:stores) %>
- <%= f.collection_check_boxes :store_ids, available_stores, :id, :name do |b| %>
- <div class="custom-control custom-checkbox mb-1">
- <%= b.check_box(class: 'custom-control-input') %>
- <%= b.label(class: 'custom-control-label') %>
- </div>
- <% end %>
+ <% if can?(:manage, Spree::Store) && available_stores.count > 1 %>
+ <div class="form-group">
+ <%= label_tag :payment_method_stores, Spree.t(:stores) %>
+ <%= f.collection_check_boxes :store_ids, available_stores, :id, :name do |b| %>
+ <div class="custom-control custom-checkbox mb-1">
+ <%= b.check_box(class: 'custom-control-input') %>
+ <%= b.label(class: 'custom-control-label') %>
</div>
<% end %>
+ </div>
+ <% end %>
- <div class="form-group">
- <%= label_tag :payment_method_display_on, Spree.t(:display) %>
- <%= f.select :display_on, display_on_options, {}, { class: 'custom-select' } %>
- </div>
- <div class="form-group">
- <%= label_tag :payment_method_auto_capture, Spree.t(:auto_capture) %>
- <%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes).to_s, true], [Spree.t(:say_no).to_s, false]], {}, {class: 'custom-select'}) %>
- </div>
+ <div class="form-group">
+ <%= label_tag :payment_method_display_on, Spree.t(:display) %>
+ <%= f.select :display_on, display_on_options, {}, { class: 'custom-select' } %>
+ </div>
+ <div class="form-group">
+ <%= label_tag :payment_method_auto_capture, Spree.t(:auto_capture) %>
+ <%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes).to_s, true], [Spree.t(:say_no).to_s, false]], {}, {class: 'custom-select'}) %>
+ </div>
- <div class="form-group">
- <label><%= Spree.t(:active) %></label>
- <div class="custom-control custom-switch">
- <%= f.check_box :active, class: 'custom-control-input' %>
- <%= f.label :active, '&nbsp;'.html_safe, class: 'custom-control-label' %>
- </div>
- </div>
+ <div class="form-group">
+ <label><%= Spree.t(:active) %></label>
+ <div class="custom-control custom-switch">
+ <%= f.check_box :active, class: 'custom-control-input' %>
+ <%= f.label :active, '&nbsp;'.html_safe, class: 'custom-control-label' %>
</div>
</div>
</div>
diff --git a/admin/app/views/spree/admin/payment_methods/edit.html.erb b/admin/app/views/spree/admin/payment_methods/edit.html.erb
index 43ef2e4707..24df2dcee8 100644
--- a/admin/app/views/spree/admin/payment_methods/edit.html.erb
+++ b/admin/app/views/spree/admin/payment_methods/edit.html.erb
@@ -2,9 +2,13 @@
<%= page_header_back_button spree.admin_payment_methods_path %>
<%= @payment_method.name %>
<% end %>
-<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
<%= form_for @payment_method, as: :payment_method, url: spree.admin_payment_method_path(@payment_method) do |f| %>
- <%= render 'form', f: f %>
- <%= render 'spree/admin/shared/edit_resource_links', f: f %>
+ <div class="row">
+ <div class="col-lg-6 offset-lg-3">
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
+ <%= render 'form', f: f %>
+ <%= render 'spree/admin/shared/edit_resource_links', f: f %>
+ </div>
+ </div>
<% end %>
diff --git a/admin/app/views/spree/admin/payment_methods/new.html.erb b/admin/app/views/spree/admin/payment_methods/new.html.erb
index 3bd36f79d0..9b5fcb0be9 100644
--- a/admin/app/views/spree/admin/payment_methods/new.html.erb
+++ b/admin/app/views/spree/admin/payment_methods/new.html.erb
@@ -3,10 +3,13 @@
<%= @payment_method.name %>
<% end %>
-<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
-
<%= form_for @payment_method, as: :payment_method, url: spree.admin_payment_methods_path do |f| %>
<%= f.hidden_field :type %>
- <%= render 'form', f: f %>
- <%= render 'spree/admin/shared/new_resource_links' %>
+ <div class="row">
+ <div class="col-lg-6 offset-lg-3">
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
+ <%= render 'form', f: f %>
+ <%= render 'spree/admin/shared/new_resource_links' %>
+ </div>
+ </div>
<% end %>
diff --git a/admin/app/views/spree/admin/profile/edit.html.erb b/admin/app/views/spree/admin/profile/edit.html.erb
index ff45242628..a2e613838d 100644
--- a/admin/app/views/spree/admin/profile/edit.html.erb
+++ b/admin/app/views/spree/admin/profile/edit.html.erb
@@ -2,10 +2,14 @@
<%= Spree.t('admin.edit_profile') %>
<% end %>
+<%= content_for :page_actions do %>
+ <%= turbo_save_button_tag Spree.t('actions.update'), form: 'edit_user' %>
+<% end %>
+
<%= form_for @user, url: spree.admin_profile_path, method: :put, as: :user do |f| %>
<div class="row">
- <div class="col-lg-6 mb-4">
- <div class="card">
+ <div class="col-lg-6 offset-lg-3">
+ <div class="card mb-4">
<div class="card-header">
<h5 class="card-title"><%= Spree.t('admin.personal_details') %></h5>
</div>
@@ -30,9 +34,7 @@
</div>
</div>
</div>
- </div>
- <div class="col-lg-6 mb-4">
<div class="card">
<div class="card-header">
<h5 class="card-title"><%= Spree.t('admin.notifications') %></h5>
@@ -72,8 +74,4 @@
</div>
</div>
</div>
-
- <div class="form-actions">
- <%= turbo_save_button_tag Spree.t('actions.update') %>
- </div>
<% end %>
diff --git a/admin/app/views/spree/admin/promotions/_form.html.erb b/admin/app/views/spree/admin/promotions/_form.html.erb
deleted file mode 100644
index bed1b7067b..0000000000
--- a/admin/app/views/spree/admin/promotions/_form.html.erb
+++ /dev/null
@@ -1,47 +0,0 @@
-<%= render 'spree/admin/shared/error_messages', target: @promotion %>
-
-<div class="row">
- <div class="col-12 col-lg-8">
- <div class="card mb-4">
- <div class="card-header">
- <h5 class="card-title">
- <%= Spree.t(:details) %>
- </h5>
- </div>
- <div class="card-body">
- <div class="form-group">
- <%= f.label :name %>
- <%= f.text_field :name, class: 'form-control', required: true, autofocus: true %>
- <%= f.error_message_on :name %>
- <span class="form-text text-muted mt-2">
- Customers will see this in their cart and at checkout.
- </span>
- </div>
- </div>
- </div>
-
- <div class="card">
- <div class="card-header">
- <h5 class="card-title">
- <%= Spree.t(:kind) %>
- </h5>
- </div>
- <div class="card-body">
- <%= render 'spree/admin/promotions/form/kind', f: f %>
- </div>
- </div>
- </div>
-
- <div class="col-12 col-lg-4">
- <div class="card">
- <div class="card-header">
- <h5 class="card-title">
- <%= Spree.t(:settings) %>
- </h5>
- </div>
- <div class="card-body">
- <%= render 'spree/admin/promotions/form/settings', f: f %>
- </div>
- </div>
- </div>
-</div>
diff --git a/admin/app/views/spree/admin/promotions/new.html.erb b/admin/app/views/spree/admin/promotions/new.html.erb
index 314455a986..4ac29ad4ed 100644
--- a/admin/app/views/spree/admin/promotions/new.html.erb
+++ b/admin/app/views/spree/admin/promotions/new.html.erb
@@ -3,9 +3,55 @@
<%= Spree.t(:new_promotion) %>
<% end %>
<%= form_for :promotion, url: collection_url do |f| %>
- <%= render 'form', f: f %>
- <p class="alert alert-info text-center mt-3">
- In the next step you will be able to add actions and rules to your promotion
- </p>
- <%= render 'spree/admin/shared/new_resource_links' %>
+
+ <div class="row">
+ <div class="col-12 col-lg-6 offset-lg-3">
+ <%= render 'spree/admin/shared/error_messages', target: @promotion %>
+
+ <div class="card mb-4">
+ <div class="card-header">
+ <h5 class="card-title">
+ <%= Spree.t(:details) %>
+ </h5>
+ </div>
+ <div class="card-body">
+ <div class="form-group">
+ <%= f.label :name %>
+ <%= f.text_field :name, class: 'form-control', required: true, autofocus: true %>
+ <%= f.error_message_on :name %>
+ <span class="form-text text-muted mt-2">
+ Customers will see this in their cart and at checkout.
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <div class="card mb-4">
+ <div class="card-header">
+ <h5 class="card-title">
+ <%= Spree.t(:kind) %>
+ </h5>
+ </div>
+ <div class="card-body">
+ <%= render 'spree/admin/promotions/form/kind', f: f %>
+ </div>
+ </div>
+
+ <div class="card mb-4">
+ <div class="card-header">
+ <h5 class="card-title">
+ <%= Spree.t(:settings) %>
+ </h5>
+ </div>
+ <div class="card-body">
+ <%= render 'spree/admin/promotions/form/settings', f: f %>
+ </div>
+ </div>
+
+ <p class="alert alert-info text-center">
+ In the next step you will be able to add actions and rules to your promotion
+ </p>
+ <%= render 'spree/admin/shared/new_resource_links' %>
+ </div>
+ </div>
<% end %>
diff --git a/admin/app/views/spree/admin/shared/_content_header.html.erb b/admin/app/views/spree/admin/shared/_content_header.html.erb
index 90623b3c90..b74255f330 100644
--- a/admin/app/views/spree/admin/shared/_content_header.html.erb
+++ b/admin/app/views/spree/admin/shared/_content_header.html.erb
@@ -38,7 +38,7 @@
<% if record.respond_to?(:audits) && spree.respond_to?(:admin_audits_path) && defined?(Audited) && can?(:read, Audited.audit_class) %>
<a href="<%= spree.admin_audits_path(q: { auditable_id_eq: record.id, auditable_type_eq: record.class.to_s }) %>" target="_blank" class="dropdown-item">
<%= icon 'history' %>
- <%= Spree.t(:audit_log) %>
+ <%= Spree.t('admin.audit_log') %>
</a>
<% end %>
<% if record.respond_to?(:number) %>
diff --git a/admin/app/views/spree/admin/storefront/edit.html.erb b/admin/app/views/spree/admin/storefront/edit.html.erb
index b4adf6d5b0..e85a9f66a7 100644
--- a/admin/app/views/spree/admin/storefront/edit.html.erb
+++ b/admin/app/views/spree/admin/storefront/edit.html.erb
@@ -6,15 +6,19 @@
<%= Spree.t(:settings) %>
<% end %>
-<%= content_for(:page_actions) do %>
+<%= content_for(:page_actions_dropdown) do %>
<%= link_to_edit_translations(@store) %>
<% end %>
+<%= content_for(:page_actions) do %>
+ <%= turbo_save_button_tag Spree.t('actions.update'), form: "edit_store_#{@store.id}" %>
+<% end %>
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @store }, class: 'mb-5 pb-5' %>
<%= form_for @store, url: spree.admin_storefront_path, method: :patch do |f| %>
<div class="row">
- <div class="col-lg-6">
+ <div class="col-lg-6 offset-lg-3">
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title">
@@ -85,9 +89,7 @@
</div>
</div>
</div>
- </div>
- <div class="col-lg-6">
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title">
@@ -139,6 +141,4 @@
</div>
</div>
</div>
-
- <%= render 'spree/admin/stores/form/buttons' %>
<% end %>
diff --git a/admin/app/views/spree/admin/stores/edit.html.erb b/admin/app/views/spree/admin/stores/edit.html.erb
index 764e8d111e..75a04e6d9a 100644
--- a/admin/app/views/spree/admin/stores/edit.html.erb
+++ b/admin/app/views/spree/admin/stores/edit.html.erb
@@ -9,5 +9,4 @@
<%= render partial: 'spree/admin/stores/form/emails', locals: { f: f } if params[:section] == 'emails' %>
<%= render partial: 'spree/admin/stores/form/checkout', locals: { f: f } if params[:section] == 'checkout' %>
<%= render partial: 'spree/admin/stores/form/policies', locals: { f: f } if params[:section] == 'policies' %>
- <%= render 'spree/admin/stores/form/buttons' %>
<% end %>
diff --git a/admin/app/views/spree/admin/stores/form/_checkout.html.erb b/admin/app/views/spree/admin/stores/form/_checkout.html.erb
index 2f9b59e9b0..03eddad05a 100644
--- a/admin/app/views/spree/admin/stores/form/_checkout.html.erb
+++ b/admin/app/views/spree/admin/stores/form/_checkout.html.erb
@@ -2,33 +2,14 @@
<%= Spree.t(:checkout) %> <%= Spree.t(:settings) %>
<% end %>
-<%= content_for :page_alerts do %>
- <div class="alert alert-info mb-3">
- <p>
- <%= Spree.t('admin.checkout_settings.policy_copy', policies_link: link_to(Spree.t(:policies), spree.edit_admin_store_path + '?section=policies', class: 'alert-link')).html_safe %>
- </p>
- </div>
-<% end %>
-
<div class="row">
- <div class="col-lg-7">
- <div class="card mb-4">
- <div class="card-header">
- <h5 class="card-title"><%= Spree.t(:checkout_message) %></h5>
- </div>
-
- <div class="card-body">
- <p class="text-muted">
- <%= Spree.t('admin.checkout_settings.checkout_message_description') %>
- </p>
- <div class="trix-container">
- <%= f.rich_text_area :checkout_message, class: 'overflow-auto', style: 'height: 300px' %>
- </div>
- </div>
+ <div class="col-lg-6 offset-lg-3">
+ <div class="alert alert-info mb-3">
+ <p>
+ <%= Spree.t('admin.checkout_settings.policy_copy', policies_link: link_to(Spree.t(:policies), spree.edit_admin_store_path + '?section=policies', class: 'alert-link')).html_safe %>
+ </p>
</div>
- </div>
- <div class="col-lg-5">
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title"><%= Spree.t(:settings) %></h5>
@@ -66,5 +47,20 @@
</div>
</div>
</div>
+
+ <div class="card mb-4">
+ <div class="card-header">
+ <h5 class="card-title"><%= Spree.t(:checkout_message) %></h5>
+ </div>
+
+ <div class="card-body">
+ <p class="text-muted">
+ <%= Spree.t('admin.checkout_settings.checkout_message_description') %>
+ </p>
+ <div class="trix-container">
+ <%= f.rich_text_area :checkout_message, class: 'overflow-auto', style: 'height: 300px' %>
+ </div>
+ </div>
+ </div>
</div>
</div>
diff --git a/admin/app/views/spree/admin/stores/form/_emails.html.erb b/admin/app/views/spree/admin/stores/form/_emails.html.erb
index 57b4b4ad51..4e8838ab0d 100644
--- a/admin/app/views/spree/admin/stores/form/_emails.html.erb
+++ b/admin/app/views/spree/admin/stores/form/_emails.html.erb
@@ -3,24 +3,7 @@
<% end %>
<div class="row">
- <div class="col-lg-6">
- <div class="card mb-4">
- <div class="card-header">
- <h5 class="card-title">Logo for emails</h5>
- </div>
- <div class="card-body">
- <p class="text-muted">This logo is included in all email notifications such as order confirmation</p>
- <%= render 'active_storage/upload_form', form: f, field_name: :mailer_logo, width: 204, height: 104 %>
- <p class="form-text text-muted mb-0 mt-2">
- We recommend images with a transparent background.
- <br />
- Only JPEG and PNG formats are supported.
- </p>
- </div>
- </div>
- </div>
-
- <div class="col-lg-6">
+ <div class="col-lg-6 offset-lg-3">
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title">Email addresses</h5>
@@ -55,5 +38,20 @@
</div>
</div>
</div>
+
+ <div class="card mb-4">
+ <div class="card-header">
+ <h5 class="card-title">Logo for emails</h5>
+ </div>
+ <div class="card-body">
+ <p class="text-muted">This logo is included in all email notifications such as order confirmation</p>
+ <%= render 'active_storage/upload_form', form: f, field_name: :mailer_logo, width: 204, height: 104 %>
+ <p class="form-text text-muted mb-0 mt-2">
+ We recommend images with a transparent background.
+ <br />
+ Only JPEG and PNG formats are supported.
+ </p>
+ </div>
+ </div>
</div>
</div>
diff --git a/admin/app/views/spree/admin/variants/edit.html.erb b/admin/app/views/spree/admin/variants/edit.html.erb
index 432701f8ca..af1bc365c6 100644
--- a/admin/app/views/spree/admin/variants/edit.html.erb
+++ b/admin/app/views/spree/admin/variants/edit.html.erb
@@ -3,18 +3,15 @@
<%= @variant.human_name %>
<% end %>
-<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @variant } %>
-
<%= form_for [:admin, @product, @variant] do |f| %>
<div class="row">
- <div class="col-lg-6">
+ <div class="col-lg-6 offset-lg-3">
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @variant } %>
<%= render 'spree/admin/variants/form/basic', f: f %>
<%= render 'spree/admin/variants/form/pricing', f: f %>
<%= render 'spree/admin/variants/form/inventory', f: f %>
- </div>
- <div class="col-lg-6">
<%= render 'spree/admin/variants/form/media', viewable: @variant %>
+ <%= render 'spree/admin/shared/edit_resource_links', f: f %>
</div>
</div>
- <%= render 'spree/admin/shared/edit_resource_links', f: f %>
<% end %>
diff --git a/core/config/locales/en.yml b/core/config/locales/en.yml
index f38cd960c2..e735ceddd9 100644
--- a/core/config/locales/en.yml
+++ b/core/config/locales/en.yml
@@ -686,7 +686,6 @@ en:
associated_adjustment_closed: The associated adjustment is closed, and will not be recalculated. Do you want to open it?
at_symbol: "@"
attachments: Attachments
- audit_log: Audit Log
author: Author
authorization_failure: Authorization Failure
authorized: Authorized