alchemy_cms 7.0.8 → 7.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/alchemy_cms.gemspec +1 -1
- data/app/assets/stylesheets/alchemy/labels.scss +1 -4
- data/app/controllers/alchemy/admin/languages_controller.rb +2 -1
- data/app/controllers/concerns/alchemy/admin/current_language.rb +5 -1
- data/app/models/alchemy/page/page_elements.rb +11 -2
- data/app/views/alchemy/admin/resources/_filter.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +1 -1
- data/app/views/alchemy/admin/tags/_tag.html.erb +6 -2
- data/lib/alchemy/controller_actions.rb +4 -17
- data/lib/alchemy/version.rb +1 -1
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8da1dca92c99bbe46045a378b3a2f9b7585c168adf95c5887f487e6145ccc8fa
|
4
|
+
data.tar.gz: 2b03c7720954bd3293b461ea3888cbdc7688658cf4d55ee93f34d0ee0665b784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb3960ce49c6f137040b72458438fff2bb698898fe9ad64370980dd4dcd97df9cbce2033f5b13b2011e40c173b6acc7b9a05ef1146a1d042f1adbf755734eb57
|
7
|
+
data.tar.gz: 86bd60f2a5af41044b7fa23245bd82ed4e204ad01a1630efcc5327d7b25ee38500e69fa8fcf69bd55c2048687279ff8394c5c98601d4a0edc0f63438924e23cb
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 7.0.9 (2024-02-27)
|
4
|
+
|
5
|
+
- [7.0] Fix tags view for missing taggables [#2757](https://github.com/AlchemyCMS/alchemy_cms/pull/2757) ([tvdeyen](https://github.com/tvdeyen))
|
6
|
+
- [7.0-stable] Merge pull request #2752 from tvdeyen/fix-copy-elements-order [#2753](https://github.com/AlchemyCMS/alchemy_cms/pull/2753) ([alchemycms-bot](https://github.com/alchemycms-bot))
|
7
|
+
- [7.0-stable] Merge pull request #2689 from robinboening/fix_switching_to_default_language [#2745](https://github.com/AlchemyCMS/alchemy_cms/pull/2745) ([alchemycms-bot](https://github.com/alchemycms-bot))
|
8
|
+
- [7.0-stable] Merge pull request #2720 from sascha-karnatz/restrict-turbo-rails-version [#2725](https://github.com/AlchemyCMS/alchemy_cms/pull/2725) ([alchemycms-bot](https://github.com/alchemycms-bot))
|
9
|
+
- [7.0-stable] Merge pull request #2665 from tvdeyen/resource-filter-fixes [#2668](https://github.com/AlchemyCMS/alchemy_cms/pull/2668) ([alchemycms-bot](https://github.com/alchemycms-bot))
|
10
|
+
|
3
11
|
## 7.0.8 (2023-12-28)
|
4
12
|
|
5
13
|
- [7.0-stable] Merge pull request #2658 from tvdeyen/fix-contactform-mailer [#2660](https://github.com/AlchemyCMS/alchemy_cms/pull/2660) ([alchemycms-bot](https://github.com/alchemycms-bot))
|
data/alchemy_cms.gemspec
CHANGED
@@ -51,7 +51,7 @@ Gem::Specification.new do |gem|
|
|
51
51
|
gem.add_runtime_dependency "sassc-rails", ["~> 2.1"]
|
52
52
|
gem.add_runtime_dependency "simple_form", [">= 4.0", "< 6"]
|
53
53
|
gem.add_runtime_dependency "sprockets", [">= 3.0", "< 5"]
|
54
|
-
gem.add_runtime_dependency "turbo-rails", [">= 1.4"]
|
54
|
+
gem.add_runtime_dependency "turbo-rails", [">= 1.4", "< 2"]
|
55
55
|
gem.add_runtime_dependency "view_component", ["~> 3.0"]
|
56
56
|
|
57
57
|
gem.add_development_dependency "capybara", ["~> 3.0"]
|
@@ -38,7 +38,8 @@ module Alchemy
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def switch
|
41
|
-
set_alchemy_language(params[:language_id])
|
41
|
+
@language = set_alchemy_language(params[:language_id])
|
42
|
+
session[:alchemy_language_id] = @language.id
|
42
43
|
do_redirect_to request.referer || alchemy.admin_dashboard_path
|
43
44
|
end
|
44
45
|
|
@@ -12,7 +12,11 @@ module Alchemy
|
|
12
12
|
private
|
13
13
|
|
14
14
|
def load_current_language
|
15
|
-
@current_language =
|
15
|
+
@current_language = if session[:alchemy_language_id].present?
|
16
|
+
set_alchemy_language(session[:alchemy_language_id])
|
17
|
+
else
|
18
|
+
Alchemy::Language.current
|
19
|
+
end
|
16
20
|
if @current_language.nil?
|
17
21
|
flash[:warning] = Alchemy.t("Please create a language first.")
|
18
22
|
redirect_to admin_languages_path
|
@@ -37,11 +37,20 @@ module Alchemy
|
|
37
37
|
#
|
38
38
|
def copy_elements(source, target)
|
39
39
|
repository = source.draft_version.element_repository
|
40
|
+
elements = repository.not_nested
|
41
|
+
page_version = target.draft_version
|
42
|
+
duplicate_elements(elements.unfixed, repository, page_version) +
|
43
|
+
duplicate_elements(elements.fixed, repository, page_version)
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def duplicate_elements(elements, repository, page_version)
|
40
49
|
transaction do
|
41
50
|
Element.acts_as_list_no_update do
|
42
|
-
|
51
|
+
elements.each.with_index(1) do |element, position|
|
43
52
|
Alchemy::DuplicateElement.new(element, repository: repository).call(
|
44
|
-
page_version_id:
|
53
|
+
page_version_id: page_version.id,
|
45
54
|
position: position
|
46
55
|
)
|
47
56
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<%= select_tag(
|
4
4
|
filter.name,
|
5
5
|
options_for_select(
|
6
|
-
filter.options_for_select,
|
6
|
+
filter.options_for_select, search_filter_params.dig(:filter, filter.name)
|
7
7
|
),
|
8
8
|
include_blank: Alchemy.t(:all, scope: ['resources', resource_name, 'filters']),
|
9
9
|
data: { remote: !!request.xhr? },
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= form_tag url_for, method: :get, class: 'per-page-select-form' do |f| %>
|
2
2
|
<% search_filter_params.reject { |k, _| k == 'page' || k == 'per_page' }.each do |key, value| %>
|
3
|
-
<% if value.is_a?
|
3
|
+
<% if value.is_a? ActionController::Parameters %>
|
4
4
|
<% value.each do |k, v| %>
|
5
5
|
<%= hidden_field_tag "#{key}[#{k}]", v, id: nil %>
|
6
6
|
<% end %>
|
@@ -1,8 +1,12 @@
|
|
1
1
|
<tr class="<%= cycle('even', 'odd') %>">
|
2
2
|
<td class="icon"><%= render_icon :tag %></td>
|
3
3
|
<td class="name"><%= tag.name %></td>
|
4
|
-
<td
|
5
|
-
|
4
|
+
<td>
|
5
|
+
<% tag.taggings.collect(&:taggable).compact.uniq.each do |taggable| %>
|
6
|
+
<span class="label">
|
7
|
+
<%= taggable.class.model_name.human %>
|
8
|
+
</span>
|
9
|
+
<% end %>
|
6
10
|
</td>
|
7
11
|
<td class="count"><%= tag.taggings.count %></td>
|
8
12
|
<td class="tools">
|
@@ -59,17 +59,15 @@ module Alchemy
|
|
59
59
|
Site.current = current_alchemy_site
|
60
60
|
end
|
61
61
|
|
62
|
-
#
|
62
|
+
# Sets the current language for Alchemy.
|
63
63
|
#
|
64
64
|
def set_alchemy_language(lang = nil)
|
65
65
|
@language = if lang
|
66
66
|
lang.is_a?(Language) ? lang : load_alchemy_language_from_id_or_code(lang)
|
67
67
|
else
|
68
|
-
|
69
|
-
load_alchemy_language_from_params ||
|
70
|
-
load_alchemy_language_from_session ||
|
71
|
-
Language.default
|
68
|
+
load_alchemy_language_from_params || Language.default
|
72
69
|
end
|
70
|
+
|
73
71
|
store_current_alchemy_language(@language)
|
74
72
|
end
|
75
73
|
|
@@ -80,26 +78,15 @@ module Alchemy
|
|
80
78
|
end
|
81
79
|
end
|
82
80
|
|
83
|
-
# Load language from session if it's present on current site.
|
84
|
-
# Otherwise return nil so we can load the default language from current site.
|
85
|
-
def load_alchemy_language_from_session
|
86
|
-
if session[:alchemy_language_id].present? && Site.current
|
87
|
-
Site.current.languages.find_by(id: session[:alchemy_language_id])
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
81
|
def load_alchemy_language_from_id_or_code(id_or_code)
|
92
82
|
Language.find_by(id: id_or_code) ||
|
93
83
|
Language.find_by_code(id_or_code)
|
94
84
|
end
|
95
85
|
|
96
|
-
# Stores language
|
97
|
-
#
|
98
|
-
# Also stores language in +Language.current+
|
86
|
+
# Stores language in +Language.current+
|
99
87
|
#
|
100
88
|
def store_current_alchemy_language(language)
|
101
89
|
if language&.id
|
102
|
-
session[:alchemy_language_id] = language.id
|
103
90
|
Language.current = language
|
104
91
|
end
|
105
92
|
end
|
data/lib/alchemy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date:
|
16
|
+
date: 2024-02-27 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: actionmailer
|
@@ -508,6 +508,9 @@ dependencies:
|
|
508
508
|
- - ">="
|
509
509
|
- !ruby/object:Gem::Version
|
510
510
|
version: '1.4'
|
511
|
+
- - "<"
|
512
|
+
- !ruby/object:Gem::Version
|
513
|
+
version: '2'
|
511
514
|
type: :runtime
|
512
515
|
prerelease: false
|
513
516
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -515,6 +518,9 @@ dependencies:
|
|
515
518
|
- - ">="
|
516
519
|
- !ruby/object:Gem::Version
|
517
520
|
version: '1.4'
|
521
|
+
- - "<"
|
522
|
+
- !ruby/object:Gem::Version
|
523
|
+
version: '2'
|
518
524
|
- !ruby/object:Gem::Dependency
|
519
525
|
name: view_component
|
520
526
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1449,7 +1455,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1449
1455
|
version: '0'
|
1450
1456
|
requirements:
|
1451
1457
|
- ImageMagick (libmagick), v6.6 or greater.
|
1452
|
-
rubygems_version: 3.
|
1458
|
+
rubygems_version: 3.4.19
|
1453
1459
|
signing_key:
|
1454
1460
|
specification_version: 4
|
1455
1461
|
summary: A powerful, userfriendly and flexible CMS for Rails
|