alchemy-solidus 6.1.0 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1f5bba357c3cd5b1c2ac4d48318c3a065b613119dbf4e943bc898e7a7e19023
4
- data.tar.gz: 2dbb9d3332bb54316c30d13d86bfcdff8652af481c268c3c6b410fec0989b57d
3
+ metadata.gz: d0871f7a06ef602fcd95d7c20e3caf64016e226fd6741fb00634a1eadf8d1ee0
4
+ data.tar.gz: 4f8e1ea07ac7881657577aac59f70542aaf292a52c084a05eb56c736d8489156
5
5
  SHA512:
6
- metadata.gz: 29b570fd3d5f343ce57fe95667b7a0a5ba12cafd8986ab45cd0c65beab62cc9003bac2c8628c1867a4e1de3cb475fdd39260fa3ef5535c9c887c00b5a2ecff2f
7
- data.tar.gz: d7271dbe863c5527090751ef60dcce3043f23e51a8c3d4e4d88e7b8a38145acd17f759839ac01435c47eda9f0830f9eaba1ba8c3937f6633e280a56c40940238
6
+ metadata.gz: 066107a45e63c075b4fe68ad8588c396d0b60cba2af16e32881078aa29d356e34c72e4338150db683a23bda4489e34f51dc1960f216d74356afeec5e38d758ef
7
+ data.tar.gz: c92e64257ab9a192086ca5dffbf27f1ce32fb6435c1f82fa6f07994f933489359490002f519d10fe2206de53ff03571d88fb12f62692f0f29b6d718d3941211f
data/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  [![CI](https://github.com/AlchemyCMS/alchemy-solidus/workflows/CI/badge.svg?branch=main)](https://github.com/AlchemyCMS/alchemy-solidus/actions?query=workflow%3ACI+branch%3Amain)
2
2
  [![Gem Version](https://badge.fury.io/rb/alchemy-solidus.svg)](https://badge.fury.io/rb/alchemy-solidus)
3
3
 
4
+ # Sponsoring
5
+
6
+ Development and maintenance is sponsored by [Blish](https://blish.cloud/).
7
+
8
+ [![BLISH Logo](https://blish.cloud/BLISH_Logo.svg)](https://blish.cloud)
9
+
4
10
  # Alchemy-Solidus
5
11
 
6
12
  This is a [AlchemyCMS](https://alchemy-cms.com) and [Solidus](https://solidus.io) integration gem.
@@ -1,3 +1,68 @@
1
1
  if defined?(Alchemy::Devise::Engine)
2
2
  Spree.user_class = "Alchemy::User"
3
3
  end
4
+
5
+ Spree::Backend::Config.configure do |config|
6
+ alchemy_menu_item = if Spree.solidus_gem_version >= Gem::Version.new("4.2.0")
7
+ config.class::MenuItem.new(
8
+ label: :cms,
9
+ icon: "copy",
10
+ condition: -> { can?(:index, :alchemy_admin_dashboard) },
11
+ url: -> { Alchemy::Engine.routes.url_helpers.admin_dashboard_path },
12
+ children: [
13
+ config.class::MenuItem.new(
14
+ label: :pages,
15
+ condition: -> { can?(:index, :alchemy_admin_pages) },
16
+ url: -> { Alchemy::Engine.routes.url_helpers.admin_pages_path },
17
+ match_path: "/pages"
18
+ ),
19
+ config.class::MenuItem.new(
20
+ label: :languages,
21
+ condition: -> { can?(:index, :alchemy_admin_sites) },
22
+ url: -> { Alchemy::Engine.routes.url_helpers.admin_sites_path },
23
+ match_path: "/languages"
24
+ ),
25
+ (if defined?(Alchemy::Devise::Engine)
26
+ config.class::MenuItem.new(
27
+ label: :users,
28
+ condition: -> { can?(:index, :alchemy_admin_users) },
29
+ url: -> { Alchemy::Engine.routes.url_helpers.admin_users_path },
30
+ match_path: "/users"
31
+ )
32
+ end),
33
+ config.class::MenuItem.new(
34
+ label: :tags,
35
+ condition: -> { can?(:index, :alchemy_admin_tags) },
36
+ url: -> { Alchemy::Engine.routes.url_helpers.admin_tags_path }
37
+ ),
38
+ config.class::MenuItem.new(
39
+ label: :pictures,
40
+ condition: -> { can?(:index, :alchemy_admin_pictures) },
41
+ url: -> { Alchemy::Engine.routes.url_helpers.admin_pictures_path }
42
+ ),
43
+ config.class::MenuItem.new(
44
+ label: :attachments,
45
+ condition: -> { can?(:index, :alchemy_admin_attachments) },
46
+ url: -> { Alchemy::Engine.routes.url_helpers.admin_attachments_path }
47
+ )
48
+ ].compact
49
+ )
50
+ else
51
+ config.class::MenuItem.new(
52
+ [:pages, :sites, :languages, :tags, :users, :pictures, :attachments],
53
+ "copy",
54
+ label: :cms,
55
+ condition: -> { can?(:index, :alchemy_admin_dashboard) },
56
+ partial: "spree/admin/shared/alchemy_sub_menu",
57
+ url: "/admin/pages",
58
+ match_path: "/pages"
59
+ )
60
+ end
61
+ config.menu_items << alchemy_menu_item
62
+ end
63
+
64
+ Rails.application.config.after_initialize do
65
+ if Spree::Backend::Config.menu_items.many? { |menu_item| menu_item.label == :cms }
66
+ Alchemy::Deprecation.warn("You configured the Alchemy menu items in your app's initializers. We can do that for you now! Please remove the menu item with the label `:cms`.")
67
+ end
68
+ end
@@ -0,0 +1,20 @@
1
+ de:
2
+ alchemy:
3
+ choose_product_to_link: Wähle ein Produkt zum Verlinken aus
4
+ link_overlay_tab_label:
5
+ product: Produkt
6
+ solidus:
7
+ search_variant: Suche eine Variante per Name oder SKU
8
+ search_product: Suche ein Produkt per Name
9
+ search_taxon: Suche eine Kategorie per Name
10
+ spree:
11
+ admin:
12
+ tab:
13
+ cms: CMS
14
+ pages: Seiten
15
+ sites: Websites
16
+ languages: Sprachen
17
+ tags: Tags
18
+ users: Benutzer
19
+ pictures: Bilder
20
+ attachments: Dateien
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
  module Solidus
3
- VERSION = "6.1.0"
3
+ VERSION = "6.3.0"
4
4
  end
5
5
  end
@@ -90,27 +90,6 @@ module Alchemy
90
90
  end
91
91
  end
92
92
 
93
- def inject_admin_tab
94
- inject_into_file "config/initializers/spree.rb",
95
- {
96
- after:
97
- "Spree::Backend::Config.configure do |config|\n"
98
- } do
99
- <<~ADMIN_TAB
100
- \ # AlchemyCMS admin tabs
101
- \ config.menu_items << config.class::MenuItem.new(
102
- \ [:pages, :sites, :languages, :tags, :users, :pictures, :attachments],
103
- \ 'copy',
104
- \ label: :cms,
105
- \ condition: -> { can?(:index, :alchemy_admin_dashboard) },
106
- \ partial: 'spree/admin/shared/alchemy_sub_menu',
107
- \ url: '/admin/pages',
108
- \ match_path: '/pages'
109
- \ )
110
- ADMIN_TAB
111
- end
112
- end
113
-
114
93
  def create_admin_user
115
94
  if alchemy_devise_present? && !options[:skip_alchemy_user_generator] &&
116
95
  Alchemy::User.count.zero?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-solidus
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-11 00:00:00.000000000 Z
11
+ date: 2023-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -258,6 +258,7 @@ files:
258
258
  - app/views/spree/admin/shared/_alchemy_sub_menu.html.erb
259
259
  - config/initializers/alchemy.rb
260
260
  - config/initializers/spree.rb
261
+ - config/locales/alchemy_solidus.de.yml
261
262
  - config/locales/alchemy_solidus_en.yml
262
263
  - config/locales/alchemy_solidus_it.yml
263
264
  - config/locales/en.yml