Skip to content
This repository was archived by the owner on Aug 10, 2021. It is now read-only.

Does this version work with Spree 4.0? #150

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/overrides/add_rich_editor_tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
virtual_path: 'spree/admin/shared/sub_menu/_configuration',
name: 'add_rich_editor_tab',
insert_bottom: '[data-hook="admin_configurations_sidebar_menu"]',
text: '<li<%== " class=\"active\"" if controller.controller_name == "editor_settings" %>><%= link_to Spree.t(:rich_editor), spree.edit_admin_editor_settings_path %></li>'
text: '<%= configurations_sidebar_menu_item Spree.t(:rich_editor, scope: :editor_settings),
spree.edit_admin_editor_settings_path %>'
)
4 changes: 2 additions & 2 deletions app/views/spree/admin/editor_settings/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<%= Spree.t(:rich_editor) %>
<% end %>

<%= form_tag admin_editor_settings_path, method: :put do %>
<%= form_tag spree.admin_editor_settings_path, method: :put do %>

<fieldset>
<div data-hook="admin_editor_method_form_fields">
<div class="row">
<div class="col-md-12" data-hook="editor_preferences">
<div class="col-md-12 mx-4" data-hook="editor_preferences">
<fieldset>
<legend><%= Spree.t(:rich_editor) %></legend>
<div class="form-group">
Expand Down
6 changes: 4 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Spree::Core::Engine.add_routes do
namespace :admin do
resource :editor_settings, only: [:edit, :update]
scope '(:locale)', locale: /#{Spree.available_locales.join('|')}/, defaults: { locale: nil } do
namespace :admin do
resource :editor_settings, only: [:edit, :update]
end
end
end