FEATURE: enable new admin sidebar by default (#26391)
By default, enable the new admin sidebar. In addition, migration was created for old sites to keep the old admin panel.
This commit is contained in:
parent
eaaffc025c
commit
3ce386c22f
|
@ -2361,7 +2361,7 @@ developer:
|
||||||
admin_sidebar_enabled_groups:
|
admin_sidebar_enabled_groups:
|
||||||
type: group_list
|
type: group_list
|
||||||
list_type: compact
|
list_type: compact
|
||||||
default: ""
|
default: "1"
|
||||||
allow_any: false
|
allow_any: false
|
||||||
refresh: true
|
refresh: true
|
||||||
lazy_load_categories_groups:
|
lazy_load_categories_groups:
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class DisableAdminSidebarForExistingSites < ActiveRecord::Migration[7.0]
|
||||||
|
def up
|
||||||
|
# keep old admin menu for existing sites
|
||||||
|
execute <<~SQL if Migration::Helpers.existing_site?
|
||||||
|
INSERT INTO site_settings(name, data_type, value, created_at, updated_at)
|
||||||
|
VALUES('admin_sidebar_enabled_groups', 20, '-1', NOW(), NOW())
|
||||||
|
ON CONFLICT (name) DO NOTHING
|
||||||
|
SQL
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
raise ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue