alchemy_cms 5.0.1 → 5.1.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- data/.github/workflows/stale.yml +1 -1
- data/.gitignore +1 -0
- data/CHANGELOG.md +51 -2
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +1 -1
- data/README.md +2 -2
- data/alchemy_cms.gemspec +2 -2
- data/app/assets/images/alchemy/missing-image.svg +1 -0
- data/app/assets/stylesheets/alchemy/_variables.scss +1 -0
- data/app/assets/stylesheets/alchemy/archive.scss +23 -17
- data/app/assets/stylesheets/alchemy/errors.scss +1 -1
- data/app/assets/stylesheets/alchemy/navigation.scss +7 -10
- data/app/assets/stylesheets/alchemy/pagination.scss +1 -1
- data/app/assets/stylesheets/alchemy/search.scss +12 -2
- data/app/assets/stylesheets/alchemy/tags.scss +19 -31
- data/app/controllers/alchemy/admin/pictures_controller.rb +13 -6
- data/app/controllers/alchemy/admin/resources_controller.rb +3 -3
- data/app/controllers/alchemy/pages_controller.rb +49 -14
- data/app/helpers/alchemy/admin/base_helper.rb +0 -44
- data/app/helpers/alchemy/admin/navigation_helper.rb +2 -1
- data/app/models/alchemy/attachment.rb +20 -3
- data/app/models/alchemy/attachment/url.rb +40 -0
- data/app/models/alchemy/essence_picture.rb +3 -3
- data/app/models/alchemy/essence_picture_view.rb +5 -3
- data/app/models/alchemy/page.rb +16 -1
- data/app/models/alchemy/page/page_natures.rb +2 -0
- data/app/models/alchemy/page/url_path.rb +8 -6
- data/app/models/alchemy/picture.rb +58 -2
- data/app/models/alchemy/picture/calculations.rb +55 -0
- data/app/models/alchemy/picture/transformations.rb +5 -49
- data/app/models/alchemy/picture/url.rb +28 -77
- data/app/models/alchemy/picture_thumb.rb +57 -0
- data/app/models/alchemy/picture_thumb/create.rb +39 -0
- data/app/models/alchemy/picture_thumb/signature.rb +23 -0
- data/app/models/alchemy/picture_thumb/uid.rb +22 -0
- data/app/models/alchemy/picture_variant.rb +114 -0
- data/app/views/alchemy/admin/attachments/show.html.erb +8 -8
- data/app/views/alchemy/admin/dashboard/index.html.erb +13 -16
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +2 -2
- data/app/views/alchemy/admin/layoutpages/edit.html.erb +4 -6
- data/app/views/alchemy/admin/pages/_form.html.erb +4 -6
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +2 -1
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +14 -13
- data/app/views/alchemy/admin/partials/_search_form.html.erb +8 -8
- data/app/views/alchemy/admin/pictures/_archive.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_form.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture.html.erb +3 -3
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/index.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/show.html.erb +3 -3
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +3 -3
- data/app/views/alchemy/admin/resources/index.html.erb +4 -1
- data/app/views/alchemy/admin/tags/index.html.erb +14 -15
- data/app/views/alchemy/base/500.html.erb +11 -13
- data/app/views/alchemy/essences/_essence_file_view.html.erb +3 -3
- data/config/alchemy/config.yml +15 -11
- data/config/alchemy/modules.yml +12 -12
- data/config/routes.rb +1 -1
- data/db/migrate/20200617110713_create_alchemy_picture_thumbs.rb +22 -0
- data/db/migrate/20200907111332_remove_tri_state_booleans.rb +33 -0
- data/lib/alchemy/auth_accessors.rb +12 -5
- data/lib/alchemy/config.rb +1 -3
- data/lib/alchemy/engine.rb +7 -2
- data/lib/alchemy/modules.rb +11 -1
- data/lib/alchemy/test_support/factories/picture_factory.rb +0 -1
- data/lib/alchemy/test_support/factories/picture_thumb_factory.rb +12 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/generators/alchemy/install/files/alchemy.en.yml +2 -2
- data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +5 -5
- data/lib/tasks/alchemy/thumbnails.rake +37 -0
- metadata +22 -14
- data/.github/workflows/greetings.yml +0 -13
- data/app/controllers/concerns/alchemy/locale_redirects.rb +0 -40
- data/app/controllers/concerns/alchemy/page_redirects.rb +0 -68
- data/lib/alchemy/userstamp.rb +0 -12
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
class PictureThumb < BaseRecord
|
5
|
+
class Signature
|
6
|
+
# Returns a unique image process signature
|
7
|
+
#
|
8
|
+
# @param [Alchemy::PictureVariant]
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
def self.call(variant)
|
12
|
+
steps_without_fetch = variant.image.steps.reject do |step|
|
13
|
+
step.is_a?(::Dragonfly::Job::Fetch)
|
14
|
+
end
|
15
|
+
|
16
|
+
steps_with_id = [[variant.picture.id]] + steps_without_fetch
|
17
|
+
job_string = steps_with_id.map(&:to_a).to_dragonfly_unique_s
|
18
|
+
|
19
|
+
Digest::SHA1.hexdigest(job_string)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
class PictureThumb < BaseRecord
|
5
|
+
class Uid
|
6
|
+
# Returns a image variant uid for storage
|
7
|
+
#
|
8
|
+
# @param [String]
|
9
|
+
# @param [Alchemy::PictureVariant]
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
def self.call(signature, variant)
|
13
|
+
picture = variant.picture
|
14
|
+
filename = variant.image_file_name || "image"
|
15
|
+
name = File.basename(filename, ".*").gsub(/[^\w.]+/, "_")
|
16
|
+
ext = variant.render_format
|
17
|
+
|
18
|
+
"pictures/#{picture.id}/#{signature}/#{name}.#{ext}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "forwardable"
|
4
|
+
|
5
|
+
module Alchemy
|
6
|
+
# Represents a rendered picture
|
7
|
+
#
|
8
|
+
# Resizes, crops and encodes the image with imagemagick
|
9
|
+
#
|
10
|
+
class PictureVariant
|
11
|
+
extend Forwardable
|
12
|
+
|
13
|
+
include Alchemy::Logger
|
14
|
+
include Alchemy::Picture::Transformations
|
15
|
+
|
16
|
+
attr_reader :picture, :render_format
|
17
|
+
|
18
|
+
def_delegators :@picture,
|
19
|
+
:image_file,
|
20
|
+
:image_file_width,
|
21
|
+
:image_file_height,
|
22
|
+
:image_file_name,
|
23
|
+
:image_file_size
|
24
|
+
|
25
|
+
# @param [Alchemy::Picture]
|
26
|
+
#
|
27
|
+
# @param [Hash] options passed to the image processor
|
28
|
+
# @option options [Boolean] :crop Pass true to enable cropping
|
29
|
+
# @option options [String] :crop_from Coordinates to start cropping from
|
30
|
+
# @option options [String] :crop_size Size of the cropping area
|
31
|
+
# @option options [Boolean] :flatten Pass true to flatten GIFs
|
32
|
+
# @option options [String|Symbol] :format Image format to encode the image in
|
33
|
+
# @option options [Integer] :quality JPEG compress quality
|
34
|
+
# @option options [String] :size Size of resulting image in WxH
|
35
|
+
# @option options [Boolean] :upsample Pass true to upsample (grow) an image if the original size is lower than the resulting size
|
36
|
+
#
|
37
|
+
def initialize(picture, options = {})
|
38
|
+
raise ArgumentError, "Picture missing!" if picture.nil?
|
39
|
+
|
40
|
+
@picture = picture
|
41
|
+
@options = options
|
42
|
+
@render_format = options[:format] || picture.default_render_format
|
43
|
+
end
|
44
|
+
|
45
|
+
# Process a variant of picture
|
46
|
+
#
|
47
|
+
# @return [Dragonfly::Attachment|Dragonfly::Job] The processed image variant
|
48
|
+
#
|
49
|
+
def image
|
50
|
+
image = image_file
|
51
|
+
|
52
|
+
raise MissingImageFileError, "Missing image file for #{picture.inspect}" if image.nil?
|
53
|
+
|
54
|
+
image = processed_image(image, @options)
|
55
|
+
image = encoded_image(image, @options)
|
56
|
+
image
|
57
|
+
rescue MissingImageFileError, WrongImageFormatError => e
|
58
|
+
log_warning(e.message)
|
59
|
+
nil
|
60
|
+
end
|
61
|
+
|
62
|
+
private
|
63
|
+
|
64
|
+
# Returns the processed image dependent of size and cropping parameters
|
65
|
+
def processed_image(image, options = {})
|
66
|
+
size = options[:size]
|
67
|
+
upsample = !!options[:upsample]
|
68
|
+
|
69
|
+
return image unless size.present? && picture.has_convertible_format?
|
70
|
+
|
71
|
+
if options[:crop]
|
72
|
+
crop(size, options[:crop_from], options[:crop_size], upsample)
|
73
|
+
else
|
74
|
+
resize(size, upsample)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Returns the encoded image
|
79
|
+
#
|
80
|
+
# Flatten animated gifs, only if converting to a different format.
|
81
|
+
# Can be overwritten via +options[:flatten]+.
|
82
|
+
#
|
83
|
+
def encoded_image(image, options = {})
|
84
|
+
unless render_format.in?(Alchemy::Picture.allowed_filetypes)
|
85
|
+
raise WrongImageFormatError.new(picture, @render_format)
|
86
|
+
end
|
87
|
+
|
88
|
+
options = {
|
89
|
+
flatten: render_format != "gif" && picture.image_file_format == "gif",
|
90
|
+
}.with_indifferent_access.merge(options)
|
91
|
+
|
92
|
+
encoding_options = []
|
93
|
+
|
94
|
+
convert_format = render_format.sub("jpeg", "jpg") != picture.image_file_format.sub("jpeg", "jpg")
|
95
|
+
|
96
|
+
if render_format =~ /jpe?g/ && convert_format
|
97
|
+
quality = options[:quality] || Config.get(:output_image_jpg_quality)
|
98
|
+
encoding_options << "-quality #{quality}"
|
99
|
+
end
|
100
|
+
|
101
|
+
if options[:flatten]
|
102
|
+
encoding_options << "-flatten"
|
103
|
+
end
|
104
|
+
|
105
|
+
convertion_needed = convert_format || encoding_options.present?
|
106
|
+
|
107
|
+
if picture.has_convertible_format? && convertion_needed
|
108
|
+
image = image.encode(render_format, encoding_options.join(" "))
|
109
|
+
end
|
110
|
+
|
111
|
+
image
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
@@ -7,15 +7,15 @@
|
|
7
7
|
</div>
|
8
8
|
<div class="value with-icon">
|
9
9
|
<label><%= Alchemy::Attachment.human_attribute_name(:url) %></label>
|
10
|
-
<p><%=
|
11
|
-
<a data-clipboard-text="<%=
|
10
|
+
<p><%= @attachment.url %></p>
|
11
|
+
<a data-clipboard-text="<%= @attachment.url %>" class="icon_button--right">
|
12
12
|
<%= render_icon(:clipboard, style: 'regular') %>
|
13
13
|
</a>
|
14
14
|
</div>
|
15
15
|
<div class="value with-icon">
|
16
16
|
<label><%= Alchemy::Attachment.human_attribute_name(:download_url) %></label>
|
17
|
-
<p><%=
|
18
|
-
<a data-clipboard-text="<%=
|
17
|
+
<p><%= @attachment.url(download: true) %></p>
|
18
|
+
<a data-clipboard-text="<%= @attachment.url(download: true) %>" class="icon_button--right">
|
19
19
|
<%= render_icon(:clipboard, style: 'regular') %>
|
20
20
|
</a>
|
21
21
|
</div>
|
@@ -24,18 +24,18 @@
|
|
24
24
|
<% case @attachment.icon_css_class %>
|
25
25
|
<% when "file-image" %>
|
26
26
|
<div class="attachment_preview_container image-preview">
|
27
|
-
<%= image_tag(
|
27
|
+
<%= image_tag(@attachment.url, class: "full_width") %>
|
28
28
|
</div>
|
29
29
|
<% when "file-audio" %>
|
30
30
|
<div class="attachment_preview_container player-preview">
|
31
|
-
<%= audio_tag(
|
31
|
+
<%= audio_tag(@attachment.url, preload: "none", controls: true, class: "full_width") %>
|
32
32
|
</div>
|
33
33
|
<% when "file-video" %>
|
34
34
|
<div class="attachment_preview_container player-preview">
|
35
|
-
<%= video_tag(
|
35
|
+
<%= video_tag(@attachment.url, preload: "metadata", controls: true, class: "full_width") %>
|
36
36
|
</div>
|
37
37
|
<% when "file-pdf" %>
|
38
|
-
<iframe src="<%=
|
38
|
+
<iframe src="<%= @attachment.url %>" frameborder=0 class="full-iframe">
|
39
39
|
Your browser does not support frames.
|
40
40
|
</iframe>
|
41
41
|
<% end %>
|
@@ -1,20 +1,17 @@
|
|
1
|
-
<%= toolbar
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<%= content_for :toolbar do %>
|
2
|
+
<%= toolbar_button(
|
3
|
+
icon: 'info-circle',
|
4
|
+
label: Alchemy.t(:info),
|
5
|
+
url: alchemy.dashboard_info_path,
|
6
|
+
title: Alchemy.t(:info),
|
7
|
+
dialog_options: {
|
7
8
|
title: Alchemy.t(:info),
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
}
|
15
|
-
],
|
16
|
-
search: false
|
17
|
-
) %>
|
9
|
+
size: "420x435"
|
10
|
+
},
|
11
|
+
if_permitted_to: [:info, :alchemy_admin_dashboard],
|
12
|
+
hotkey: 'alt+i'
|
13
|
+
) %>
|
14
|
+
<% end %>
|
18
15
|
|
19
16
|
<div id="dashboard">
|
20
17
|
<h1>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
$('#imageToCrop').load(function() {
|
35
35
|
Alchemy.ImageCropper.init(
|
36
36
|
<%= @initial_box.values.to_json %>,
|
37
|
-
<% if @
|
37
|
+
<% if @picture.can_be_cropped_to?("#{@min_size[:width]}x#{@min_size[:height]}") %>
|
38
38
|
<%= @min_size.values.to_json %>,
|
39
39
|
<% else %>
|
40
40
|
<%= false %>,
|
@@ -4,10 +4,10 @@
|
|
4
4
|
<%= f.input :caption, as: @content.settings[:caption_as_textarea] ? 'text' : 'string' %>
|
5
5
|
<%= f.input :title %>
|
6
6
|
<%= f.input :alt_tag %>
|
7
|
-
<%- if @content.settings[:sizes].present? -%>
|
7
|
+
<%- if @content.settings[:sizes].present? && @content.settings[:srcset].blank? -%>
|
8
8
|
<%= f.input :render_size,
|
9
9
|
collection: [
|
10
|
-
[Alchemy.t('Layout default'),
|
10
|
+
[Alchemy.t('Layout default'), ""]
|
11
11
|
] + @content.settings[:sizes].to_a,
|
12
12
|
include_blank: false,
|
13
13
|
input_html: {class: 'alchemy_selectbox'} %>
|
@@ -5,11 +5,9 @@
|
|
5
5
|
include_blank: Alchemy.t('Please choose'),
|
6
6
|
input_html: {class: 'alchemy_selectbox'} %>
|
7
7
|
<%= f.input :name, autofocus: true %>
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
</div>
|
13
|
-
<% end %>
|
8
|
+
<div class="input string">
|
9
|
+
<%= f.label :tag_list %>
|
10
|
+
<%= render 'alchemy/admin/partials/autocomplete_tag_list', f: f %>
|
11
|
+
</div>
|
14
12
|
<%= f.submit Alchemy.t(:save) %>
|
15
13
|
<% end %>
|
@@ -36,12 +36,10 @@
|
|
36
36
|
as: 'text',
|
37
37
|
hint: Alchemy.t('pages.update.comma_seperated') %>
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
</div>
|
44
|
-
<% end %>
|
39
|
+
<div class="input string autocomplete_tag_list">
|
40
|
+
<%= f.label :tag_list %>
|
41
|
+
<%= render 'alchemy/admin/partials/autocomplete_tag_list', f: f %>
|
42
|
+
</div>
|
45
43
|
|
46
44
|
<%= f.submit Alchemy.t(:save) %>
|
47
45
|
<% end %>
|
@@ -5,8 +5,9 @@
|
|
5
5
|
<%= f.input :page_layout,
|
6
6
|
collection: @page_layouts,
|
7
7
|
label: Alchemy.t(:page_type),
|
8
|
-
include_blank: Alchemy.t('Please choose'),
|
8
|
+
include_blank: @page_layouts.length == 1 ? nil : Alchemy.t('Please choose'),
|
9
9
|
required: true,
|
10
|
+
selected: @page_layouts.length == 1 ? @page_layouts.first : nil,
|
10
11
|
input_html: {class: 'alchemy_selectbox'} %>
|
11
12
|
<%= f.input :name %>
|
12
13
|
<%= f.submit Alchemy.t(:create) %>
|
@@ -1,24 +1,25 @@
|
|
1
|
-
<%= search_form_for @query, url: url_for(
|
2
|
-
|
3
|
-
|
1
|
+
<%= search_form_for @query, url: url_for({
|
2
|
+
action: 'index',
|
3
|
+
size: @size,
|
4
|
+
}.merge(search_filter_params.except(:q))
|
4
5
|
), remote: true, html: {class: 'search_form', id: nil} do |f| %>
|
5
|
-
<%= hidden_field_tag("element_id", @element.blank? ? "" : @element.id) %>
|
6
|
-
<%= hidden_field_tag("content_id", @content.blank? ? "" : @content.id) %>
|
6
|
+
<%= hidden_field_tag("element_id", @element.blank? ? "" : @element.id, id: nil) %>
|
7
|
+
<%= hidden_field_tag("content_id", @content.blank? ? "" : @content.id, id: nil) %>
|
7
8
|
<div class="search_field">
|
8
|
-
<
|
9
|
+
<button type="submit">
|
9
10
|
<%= render_icon('search') %>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<%= link_to render_icon(:times, size: 'xs'), url_for(
|
11
|
+
</button>
|
12
|
+
<%= f.search_field resource_handler.search_field_name,
|
13
|
+
placeholder: Alchemy.t(:search),
|
14
|
+
class: 'search_input_field',
|
15
|
+
id: nil %>
|
16
|
+
<%= link_to render_icon(:times, size: 'xs'), url_for({
|
16
17
|
action: 'index',
|
17
18
|
element_id: @element.blank? ? '' : @element.id,
|
18
19
|
content_id: @content.blank? ? '' : @content.id,
|
19
20
|
size: @size,
|
20
21
|
overlay: true
|
21
|
-
),
|
22
|
+
}.merge(search_filter_params.except(:q))),
|
22
23
|
remote: true,
|
23
24
|
class: 'search_field_clear',
|
24
25
|
title: Alchemy.t(:click_to_show_all),
|
@@ -1,15 +1,15 @@
|
|
1
|
-
<%- url ||= resource_url_proxy.url_for(action: 'index') -%>
|
1
|
+
<%- url ||= resource_url_proxy.url_for({ action: 'index' }.merge(search_filter_params.except(:q, :page))) -%>
|
2
2
|
|
3
3
|
<%= search_form_for @query, url: url, class: 'search_form' do |f| %>
|
4
4
|
<div class="search_field">
|
5
|
-
<
|
5
|
+
<button type="submit">
|
6
6
|
<%= render_icon('search') %>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
</button>
|
8
|
+
<%= f.search_field resource_handler.search_field_name,
|
9
|
+
class: 'search_input_field',
|
10
|
+
placeholder: Alchemy.t(:search) %>
|
11
11
|
<% local_assigns.fetch(:additional_query_fields, []).each do |field| %>
|
12
|
-
<%= f.hidden_field field %>
|
12
|
+
<%= f.hidden_field field, id: nil %>
|
13
13
|
<% end %>
|
14
14
|
<%= link_to render_icon(:times, size: 'xs'), url,
|
15
15
|
class: 'search_field_clear',
|
@@ -17,7 +17,7 @@
|
|
17
17
|
title: Alchemy.t(:click_to_show_all),
|
18
18
|
style: search_filter_params.fetch(:q, {}).fetch(resource_handler.search_field_name, '').present? ? 'display: block' : 'display: none' %>
|
19
19
|
<% local_assigns.fetch(:additional_params, []).each do |additional_param| %>
|
20
|
-
<%= hidden_field_tag additional_param, search_filter_params[additional_param] %>
|
20
|
+
<%= hidden_field_tag additional_param, search_filter_params[additional_param], id: nil %>
|
21
21
|
<% end %>
|
22
22
|
</div>
|
23
23
|
<% end %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<small class="hint"><%= Alchemy.t('Please seperate the tags with commata') %></small>
|
7
7
|
</div>
|
8
8
|
<%= hidden_field_tag :q, search_filter_params[:q] %>
|
9
|
-
<%= hidden_field_tag :size,
|
9
|
+
<%= hidden_field_tag :size, @size %>
|
10
10
|
<%= hidden_field_tag :tagged_with, search_filter_params[:tagged_with] %>
|
11
11
|
<%= hidden_field_tag :filter, search_filter_params[:filter] %>
|
12
12
|
<%= f.submit Alchemy.t(:save) %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
q: search_filter_params[:q],
|
13
13
|
page: params[:page],
|
14
14
|
tagged_with: search_filter_params[:tagged_with],
|
15
|
-
size:
|
15
|
+
size: @size,
|
16
16
|
filter: search_filter_params[:filter]
|
17
17
|
),
|
18
18
|
{
|
@@ -22,7 +22,7 @@
|
|
22
22
|
</span>
|
23
23
|
<% end %>
|
24
24
|
<% image = image_tag(
|
25
|
-
picture.url(size: preview_size(@size), flatten: true),
|
25
|
+
picture.url(size: preview_size(@size), flatten: true) || "alchemy/missing-image.svg",
|
26
26
|
alt: picture.name,
|
27
27
|
title: Alchemy.t(:zoom_image)
|
28
28
|
) %>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
q: search_filter_params[:q],
|
35
35
|
page: params[:page],
|
36
36
|
tagged_with: search_filter_params[:tagged_with],
|
37
|
-
size:
|
37
|
+
size: @size,
|
38
38
|
filter: search_filter_params[:filter]
|
39
39
|
),
|
40
40
|
class: 'thumbnail_background'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="picture_thumbnail assign_image_list_detail <%= size.blank? ? 'medium' : size %>" name="<%= picture_to_assign.name %>" id="picture_to_assign_<%= picture_to_assign.id %>">
|
2
2
|
<%= link_to(
|
3
3
|
image_tag(
|
4
|
-
picture_to_assign.url(size: preview_size(size), flatten: true),
|
4
|
+
picture_to_assign.url(size: preview_size(size), flatten: true) || "alchemy/missing-image.svg",
|
5
5
|
alt: picture_to_assign.name
|
6
6
|
),
|
7
7
|
alchemy.assign_admin_essence_pictures_path(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= form_tag update_multiple_admin_pictures_path do %>
|
2
2
|
<%= hidden_field_tag :q, search_filter_params[:q] %>
|
3
|
-
<%= hidden_field_tag :size,
|
3
|
+
<%= hidden_field_tag :size, @size %>
|
4
4
|
<%= hidden_field_tag :tagged_with, search_filter_params[:tagged_with] %>
|
5
5
|
<%= hidden_field_tag :filter, search_filter_params[:filter] %>
|
6
6
|
|