alchemy_cms 6.0.8 → 6.0.9
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -9
- data/app/controllers/alchemy/admin/essence_videos_controller.rb +1 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +2 -0
- data/app/models/alchemy/eager_loading.rb +1 -0
- data/app/models/alchemy/ingredients/video.rb +1 -0
- data/app/models/alchemy/page.rb +5 -0
- data/app/models/alchemy/picture/transformations.rb +2 -2
- data/app/services/alchemy/delete_elements.rb +1 -0
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
- data/app/views/alchemy/admin/essence_videos/edit.html.erb +1 -0
- data/app/views/alchemy/admin/ingredients/_video_fields.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_video_view.html.erb +1 -0
- data/app/views/alchemy/ingredients/_video_view.html.erb +1 -0
- data/config/locales/alchemy.en.yml +4 -0
- data/db/migrate/20220514072456_restrict_on_delete_page_id_foreign_key_from_alchemy_nodes.rb +13 -0
- data/db/migrate/20220622130905_add_playsinline_to_alchemy_essence_videos.rb +9 -0
- data/lib/alchemy/version.rb +1 -1
- data/package.json +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 23531a0233f0633efb7c6c17b3bb79eb6a0fd5536e34766aa76840a43c594c9b
|
|
4
|
+
data.tar.gz: 3d8a8f2a8266b3fa5982de4009b9703d3ef3b585e1cb35ed2381daedfd110395
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ceb3ac0a3f6f833f5c15bfe3bc91d1e42970a03f32c373941d57574405395906fcfa16e373f2cc6db71648a93cfa6e7d37f479dc230f716270aba6539dcc62d
|
|
7
|
+
data.tar.gz: 02d7428a535cef3b642edec8cdfb2cc7ed77360ea5033de128c2da899d28a24819cbe3026b2dd21a98f280faf505caa76745a103800a0401c5d96f42ae31fcd4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 6.0.9 (2022-07-25)
|
|
2
|
+
|
|
3
|
+
- Allow Site managers to remove page locks [#2360](https://github.com/AlchemyCMS/alchemy_cms/pull/2360) ([mamhoff](https://github.com/mamhoff))
|
|
4
|
+
- Add tags to Alchemy::EagerLoading [#2359](https://github.com/AlchemyCMS/alchemy_cms/pull/2359) ([mamhoff](https://github.com/mamhoff))
|
|
5
|
+
- Delete Gutentag Taggings in Alchemy::DeleteElements [#2358](https://github.com/AlchemyCMS/alchemy_cms/pull/2358) ([mamhoff](https://github.com/mamhoff))
|
|
6
|
+
- Fix PictureTransformations#inferred_sizes_from_string [#2356](https://github.com/AlchemyCMS/alchemy_cms/pull/2356) ([mamhoff](https://github.com/mamhoff))
|
|
7
|
+
- add playsinline attribute to ingredient and essence [#2351](https://github.com/AlchemyCMS/alchemy_cms/pull/2351) ([pascalbetz](https://github.com/pascalbetz))
|
|
8
|
+
|
|
1
9
|
## 6.0.8 (2022-06-10)
|
|
2
10
|
|
|
3
11
|
- Fix admin page tree links after update [#2348](https://github.com/AlchemyCMS/alchemy_cms/pull/2348) ([tvdeyen](https://github.com/tvdeyen))
|
data/Gemfile
CHANGED
|
@@ -4,15 +4,7 @@ source "https://rubygems.org"
|
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
6
|
rails_version = ENV.fetch("RAILS_VERSION", 7.0).to_f
|
|
7
|
-
|
|
8
|
-
# https://github.com/rails/rails/pull/44691
|
|
9
|
-
if rails_version.to_s.match?(/6.1/)
|
|
10
|
-
gem "rails", git: "https://github.com/rails/rails", branch: "6-1-stable"
|
|
11
|
-
elsif rails_version.to_s.match?(/7.0/)
|
|
12
|
-
gem "rails", git: "https://github.com/rails/rails", branch: "7-0-stable"
|
|
13
|
-
else
|
|
14
|
-
gem "rails", "~> #{rails_version}.0"
|
|
15
|
-
end
|
|
7
|
+
gem "rails", "~> #{rails_version}.0"
|
|
16
8
|
|
|
17
9
|
if ENV["DB"].nil? || ENV["DB"] == "sqlite"
|
|
18
10
|
gem "sqlite3", "~> 1.4.1"
|
|
@@ -145,6 +145,8 @@ module Alchemy
|
|
|
145
145
|
# Remove page from clipboard
|
|
146
146
|
clipboard = get_clipboard("pages")
|
|
147
147
|
clipboard.delete_if { |item| item["id"] == @page.id.to_s }
|
|
148
|
+
else
|
|
149
|
+
flash[:warning] = @page.errors.full_messages.to_sentence
|
|
148
150
|
end
|
|
149
151
|
|
|
150
152
|
respond_to do |format|
|
data/app/models/alchemy/page.rb
CHANGED
|
@@ -129,6 +129,11 @@ module Alchemy
|
|
|
129
129
|
before_create -> { versions.build },
|
|
130
130
|
if: -> { versions.none? }
|
|
131
131
|
|
|
132
|
+
before_destroy if: -> { nodes.any? } do
|
|
133
|
+
errors.add(:nodes, :still_present)
|
|
134
|
+
throw(:abort)
|
|
135
|
+
end
|
|
136
|
+
|
|
132
137
|
before_save :set_language_code,
|
|
133
138
|
if: -> { language.present? }
|
|
134
139
|
|
|
@@ -98,10 +98,10 @@ module Alchemy
|
|
|
98
98
|
ratio = image_file_width.to_f / image_file_height
|
|
99
99
|
|
|
100
100
|
if sizes[:width].zero?
|
|
101
|
-
sizes[:width] =
|
|
101
|
+
sizes[:width] = (sizes[:height] * ratio).round.to_i
|
|
102
102
|
end
|
|
103
103
|
if sizes[:height].zero?
|
|
104
|
-
sizes[:height] =
|
|
104
|
+
sizes[:height] = (sizes[:width] / ratio).round.to_i
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
sizes
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<% end %>
|
|
37
37
|
</td>
|
|
38
38
|
<td>
|
|
39
|
-
<% if current_alchemy_user.id == page.locked_by %>
|
|
39
|
+
<% if (current_alchemy_user.id == page.locked_by) || can?(:manage, Alchemy::Site.current) %>
|
|
40
40
|
<%= form_tag(alchemy.unlock_admin_page_path(page, :redirect_to => alchemy.admin_dashboard_url)) do %>
|
|
41
41
|
<button class="icon_button small" title="<%= Alchemy.t(:explain_unlocking) %>">
|
|
42
42
|
<%= render_icon(:times, size: 'xs') %>
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
<%= f.input :controls, as: :boolean %>
|
|
5
5
|
<%= f.input :loop, as: :boolean %>
|
|
6
6
|
<%= f.input :muted, as: :boolean %>
|
|
7
|
+
<%= f.input :playsinline, as: :boolean %>
|
|
7
8
|
<%= f.input :preload, collection: %w(auto none metadata),
|
|
8
9
|
include_blank: false, input_html: {class: 'alchemy_selectbox'} %>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
autoplay: content.essence.autoplay,
|
|
6
6
|
loop: content.essence.loop,
|
|
7
7
|
muted: content.essence.muted,
|
|
8
|
+
playsinline: content.essence.playsinline,
|
|
8
9
|
preload: content.essence.preload.presence,
|
|
9
10
|
width: content.essence.width.presence,
|
|
10
11
|
height: content.essence.height.presence do %>
|
|
@@ -777,6 +777,10 @@ en:
|
|
|
777
777
|
attributes:
|
|
778
778
|
pages:
|
|
779
779
|
still_present: "are still attached to this language. Please remove them first."
|
|
780
|
+
alchemy/page:
|
|
781
|
+
attributes:
|
|
782
|
+
nodes:
|
|
783
|
+
still_present: "are still attached to this page. Please remove them first."
|
|
780
784
|
models:
|
|
781
785
|
gutentag/tag:
|
|
782
786
|
one: Tag
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class RestrictOnDeletePageIdForeignKeyFromAlchemyNodes < ActiveRecord::Migration[6.0]
|
|
4
|
+
def up
|
|
5
|
+
remove_foreign_key :alchemy_nodes, :alchemy_pages
|
|
6
|
+
add_foreign_key :alchemy_nodes, :alchemy_pages, column: :page_id, on_delete: :restrict
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def down
|
|
10
|
+
remove_foreign_key :alchemy_nodes, :alchemy_pages
|
|
11
|
+
add_foreign_key :alchemy_nodes, :alchemy_pages, column: :page_id, on_delete: :cascade
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class AddPlaysinlineToAlchemyEssenceVideos < ActiveRecord::Migration[6.0]
|
|
4
|
+
def change
|
|
5
|
+
return if column_exists?(:alchemy_essence_videos, :playsinline)
|
|
6
|
+
|
|
7
|
+
add_column :alchemy_essence_videos, :playsinline, :boolean, default: false, null: false
|
|
8
|
+
end
|
|
9
|
+
end
|
data/lib/alchemy/version.rb
CHANGED
data/package.json
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: 6.0.
|
|
4
|
+
version: 6.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: 2022-
|
|
16
|
+
date: 2022-07-25 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: actionmailer
|
|
@@ -1293,6 +1293,8 @@ files:
|
|
|
1293
1293
|
- db/migrate/20210506135919_create_essence_audios.rb
|
|
1294
1294
|
- db/migrate/20210506140258_create_essence_videos.rb
|
|
1295
1295
|
- db/migrate/20210508091432_create_alchemy_ingredients.rb
|
|
1296
|
+
- db/migrate/20220514072456_restrict_on_delete_page_id_foreign_key_from_alchemy_nodes.rb
|
|
1297
|
+
- db/migrate/20220622130905_add_playsinline_to_alchemy_essence_videos.rb
|
|
1296
1298
|
- lib/alchemy.rb
|
|
1297
1299
|
- lib/alchemy/ability_helper.rb
|
|
1298
1300
|
- lib/alchemy/admin/locale.rb
|