alchemy_cms 5.0.0.rc2 → 5.0.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.
Potentially problematic release.
This version of alchemy_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +1 -1
- data/app/helpers/alchemy/admin/base_helper.rb +2 -0
- data/app/helpers/alchemy/url_helper.rb +2 -2
- data/app/models/alchemy/attachment.rb +4 -1
- data/app/models/alchemy/essence_file.rb +1 -1
- data/app/models/alchemy/essence_picture.rb +1 -1
- data/app/models/alchemy/picture/url.rb +4 -2
- data/app/views/alchemy/admin/pictures/show.html.erb +1 -1
- data/app/views/alchemy/admin/resources/index.html.erb +21 -22
- data/app/views/alchemy/essences/_essence_file_view.html.erb +1 -1
- data/lib/alchemy/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16f4ae2bce440faa0777082d737d275f21bc1b5dcd13c52143369a4db9e2b5cf
|
4
|
+
data.tar.gz: 305a0964902cae1ff220c3b20e77c8da0f0ffef33e1022baa1283b97d8a8dc72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee11b0843264ecc2feeb7317e2caae8a27d2a2416abbd990b1fef3d8a662ce4781f4b586b68bd920fc25f9c1ac5c09fd2139bf45c4cb29bb2fbcff318e40fac3
|
7
|
+
data.tar.gz: f34a6757641128e2815e2b50baa2a5628020880e2af272ad5f5df01f9b8ec9a4f98d9b8b9e696d845d3c70a27254ba09988066d0892bb0b8c23311ceb7c39069
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
|
-
## 5.0.0 (
|
1
|
+
## 5.0.0 (2020-07-17)
|
2
2
|
|
3
|
+
- Do not convert JPEG images into JPG [#1904](https://github.com/AlchemyCMS/alchemy_cms/pull/1904) ([tvdeyen](https://github.com/tvdeyen))
|
4
|
+
- Do not enable image cropper if file is missing [#1903](https://github.com/AlchemyCMS/alchemy_cms/pull/1903) ([tvdeyen](https://github.com/tvdeyen))
|
5
|
+
- Always show original image as zoomed image [#1902](https://github.com/AlchemyCMS/alchemy_cms/pull/1902) ([tvdeyen](https://github.com/tvdeyen))
|
6
|
+
- Rename Attachment#urlname into slug [#1848](https://github.com/AlchemyCMS/alchemy_cms/pull/1848) ([tvdeyen](https://github.com/tvdeyen))
|
7
|
+
- Deprecate toolbar helper ([tvdeyen](https://github.com/tvdeyen))
|
3
8
|
- Deprecate redirect_to_public_child ([tvdeyen](https://github.com/tvdeyen))
|
4
9
|
- Add --auto-accept option to installer ([tvdeyen](https://github.com/tvdeyen))
|
5
10
|
- Move all installer code into install generator ([tvdeyen](https://github.com/tvdeyen))
|
@@ -314,6 +314,8 @@ module Alchemy
|
|
314
314
|
end
|
315
315
|
end
|
316
316
|
|
317
|
+
deprecate toolbar: "Please use `content_for(:toolbar)` instead", deprecator: Alchemy::Deprecation
|
318
|
+
|
317
319
|
# (internal) Used by upload form
|
318
320
|
def new_asset_path_with_session_information(asset_type)
|
319
321
|
session_key = Rails.application.config.session_options[:key]
|
@@ -26,12 +26,12 @@ module Alchemy
|
|
26
26
|
|
27
27
|
# Returns the path for downloading an alchemy attachment
|
28
28
|
def download_alchemy_attachment_path(attachment)
|
29
|
-
alchemy.download_attachment_path(attachment, attachment.
|
29
|
+
alchemy.download_attachment_path(attachment, attachment.slug)
|
30
30
|
end
|
31
31
|
|
32
32
|
# Returns the url for downloading an alchemy attachment
|
33
33
|
def download_alchemy_attachment_url(attachment)
|
34
|
-
alchemy.download_attachment_url(attachment, attachment.
|
34
|
+
alchemy.download_attachment_url(attachment, attachment.slug)
|
35
35
|
end
|
36
36
|
|
37
37
|
# Returns the full url containing host, page and anchor for the given element
|
@@ -77,10 +77,13 @@ module Alchemy
|
|
77
77
|
end
|
78
78
|
|
79
79
|
# An url save filename without format suffix
|
80
|
-
def
|
80
|
+
def slug
|
81
81
|
CGI.escape(file_name.gsub(/\.#{extension}$/, "").tr(".", " "))
|
82
82
|
end
|
83
83
|
|
84
|
+
alias_method :urlname, :slug
|
85
|
+
deprecate urlname: :slug, deprecator: Alchemy::Deprecation
|
86
|
+
|
84
87
|
# Checks if the attachment is restricted, because it is attached on restricted pages only
|
85
88
|
def restricted?
|
86
89
|
pages.any? && pages.not_restricted.blank?
|
@@ -71,7 +71,9 @@ module Alchemy
|
|
71
71
|
|
72
72
|
encoding_options = []
|
73
73
|
|
74
|
-
|
74
|
+
convert_format = target_format != image_file_format.sub("jpeg", "jpg")
|
75
|
+
|
76
|
+
if target_format =~ /jpe?g/ && convert_format
|
75
77
|
quality = options[:quality] || Config.get(:output_image_jpg_quality)
|
76
78
|
encoding_options << "-quality #{quality}"
|
77
79
|
end
|
@@ -80,7 +82,7 @@ module Alchemy
|
|
80
82
|
encoding_options << "-flatten"
|
81
83
|
end
|
82
84
|
|
83
|
-
convertion_needed =
|
85
|
+
convertion_needed = convert_format || encoding_options.present?
|
84
86
|
|
85
87
|
if has_convertible_format? && convertion_needed
|
86
88
|
image = image.encode(target_format, encoding_options.join(" "))
|
@@ -1,29 +1,28 @@
|
|
1
1
|
<% label_title = Alchemy.t("Create #{resource_name}", default: Alchemy.t('Create')) %>
|
2
2
|
|
3
|
-
<% toolbar
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
<% content_for(:toolbar) do %>
|
4
|
+
<%= toolbar_button(
|
5
|
+
icon: :plus,
|
6
|
+
label: label_title,
|
7
|
+
url: new_resource_path,
|
8
|
+
title: label_title,
|
9
|
+
hotkey: 'alt+n',
|
10
|
+
dialog_options: {
|
9
11
|
title: label_title,
|
10
|
-
|
11
|
-
dialog_options: {
|
12
|
-
title: label_title,
|
13
|
-
size: resource_window_size
|
14
|
-
},
|
15
|
-
if_permitted_to: [:create, resource_model]
|
12
|
+
size: resource_window_size
|
16
13
|
},
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
) %>
|
14
|
+
if_permitted_to: [:create, resource_model]
|
15
|
+
) %>
|
16
|
+
<%= toolbar_button(
|
17
|
+
icon: :download,
|
18
|
+
url: resource_url_proxy.url_for(action: 'index', format: 'csv', q: search_filter_params[:q], sort: params[:sort]),
|
19
|
+
label: Alchemy.t(:download_csv),
|
20
|
+
title: Alchemy.t(:download_csv),
|
21
|
+
dialog: false,
|
22
|
+
if_permitted_to: [:index, resource_model]
|
23
|
+
) %>
|
24
|
+
<%= render 'alchemy/admin/partials/search_form' %>
|
25
|
+
<% end %>
|
27
26
|
|
28
27
|
<div id="archive_all" class="resources-table-wrapper<%= ' with_tag_filter' if resource_has_tags || resource_has_filters %>">
|
29
28
|
<%= render 'alchemy/admin/resources/table_header' %>
|
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: 5.0.0
|
4
|
+
version: 5.0.0
|
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: 2020-07-
|
16
|
+
date: 2020-07-17 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: active_model_serializers
|
@@ -1263,9 +1263,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1263
1263
|
version: 2.3.0
|
1264
1264
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1265
1265
|
requirements:
|
1266
|
-
- - "
|
1266
|
+
- - ">="
|
1267
1267
|
- !ruby/object:Gem::Version
|
1268
|
-
version:
|
1268
|
+
version: '0'
|
1269
1269
|
requirements:
|
1270
1270
|
- ImageMagick (libmagick), v6.6 or greater.
|
1271
1271
|
rubygems_version: 3.0.3
|