alchemy_cms 5.0.10 → 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/.travis.yml +48 -0
- data/CHANGELOG.md +50 -40
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +2 -2
- data/README.md +2 -2
- data/alchemy_cms.gemspec +4 -4
- 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/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +3 -3
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +7 -7
- data/app/controllers/alchemy/admin/base_controller.rb +3 -9
- 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/helpers/alchemy/pages_helper.rb +1 -1
- data/app/models/alchemy/attachment/url.rb +40 -0
- data/app/models/alchemy/attachment.rb +21 -4
- data/app/models/alchemy/element.rb +1 -1
- data/app/models/alchemy/essence_picture.rb +3 -3
- data/app/models/alchemy/essence_picture_view.rb +5 -3
- data/app/models/alchemy/node.rb +1 -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/page.rb +17 -2
- data/app/models/alchemy/picture/calculations.rb +55 -0
- data/app/models/alchemy/picture/transformations.rb +8 -52
- data/app/models/alchemy/picture/url.rb +28 -77
- data/app/models/alchemy/picture.rb +59 -3
- 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_thumb.rb +57 -0
- data/app/models/alchemy/picture_variant.rb +114 -0
- data/app/serializers/alchemy/page_tree_serializer.rb +4 -4
- 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/elements/_element_toolbar.html.erb +1 -1
- 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/app/views/alchemy/essences/_essence_picture_view.html.erb +3 -3
- data/config/alchemy/config.yml +15 -11
- data/config/alchemy/modules.yml +12 -12
- data/config/initializers/dragonfly.rb +0 -8
- 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 +6 -8
- data/lib/alchemy/modules.rb +11 -1
- data/lib/alchemy/resource.rb +3 -5
- 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/upgrader/five_point_zero.rb +0 -32
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +0 -1
- data/lib/generators/alchemy/install/files/alchemy.en.yml +2 -2
- data/lib/generators/alchemy/install/install_generator.rb +1 -2
- data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +5 -5
- data/lib/tasks/alchemy/thumbnails.rake +37 -0
- data/lib/tasks/alchemy/upgrade.rake +0 -20
- data/package/admin.js +0 -2
- data/package/src/__tests__/i18n.spec.js +0 -23
- data/package/src/i18n.js +3 -1
- data/package.json +1 -1
- metadata +34 -23
- data/.github/workflows/ci.yml +0 -126
- 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/dragonfly/processors/crop_resize.rb +0 -35
- data/lib/alchemy/error_tracking/airbrake_handler.rb +0 -13
- data/lib/alchemy/error_tracking.rb +0 -14
- data/lib/alchemy/userstamp.rb +0 -12
@@ -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
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="zoomed-picture-background">
|
2
|
-
<%= image_tag @picture.url %>
|
2
|
+
<%= image_tag @picture.url || "alchemy/missing-image.svg" %>
|
3
3
|
</div>
|
4
4
|
|
5
5
|
<div class="picture-overlay-navigation">
|
@@ -9,7 +9,7 @@
|
|
9
9
|
q: search_filter_params[:q],
|
10
10
|
page: params[:page],
|
11
11
|
tagged_with: search_filter_params[:tagged_with],
|
12
|
-
size:
|
12
|
+
size: @size,
|
13
13
|
filter: search_filter_params[:filter]
|
14
14
|
),
|
15
15
|
class: "previous-picture",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
q: search_filter_params[:q],
|
24
24
|
page: params[:page],
|
25
25
|
tagged_with: search_filter_params[:tagged_with],
|
26
|
-
size:
|
26
|
+
size: @size,
|
27
27
|
filter: search_filter_params[:filter]
|
28
28
|
),
|
29
29
|
class: "next-picture",
|
@@ -2,10 +2,10 @@
|
|
2
2
|
<% search_filter_params.reject { |k, _| k == 'page' || k == 'per_page' }.each do |key, value| %>
|
3
3
|
<% if value.is_a? Hash %>
|
4
4
|
<% value.each do |k, v| %>
|
5
|
-
<%= hidden_field_tag "#{key}[#{k}]", v %>
|
5
|
+
<%= hidden_field_tag "#{key}[#{k}]", v, id: nil %>
|
6
6
|
<% end %>
|
7
7
|
<% else %>
|
8
|
-
<%= hidden_field_tag key, value %>
|
8
|
+
<%= hidden_field_tag key, value, id: nil %>
|
9
9
|
<% end %>
|
10
10
|
<% end %>
|
11
11
|
<label>
|
@@ -17,4 +17,4 @@
|
|
17
17
|
),
|
18
18
|
onchange: 'this.form.submit()' %>
|
19
19
|
</label>
|
20
|
-
<% end %>
|
20
|
+
<% end %>
|
@@ -21,7 +21,10 @@
|
|
21
21
|
dialog: false,
|
22
22
|
if_permitted_to: [:index, resource_model]
|
23
23
|
) %>
|
24
|
-
<%= render 'alchemy/admin/partials/search_form'
|
24
|
+
<%= render 'alchemy/admin/partials/search_form', additional_params: [
|
25
|
+
resource_has_filters ? :filter : nil,
|
26
|
+
resource_has_tags ? :tagged_with : nil
|
27
|
+
].compact %>
|
25
28
|
<% end %>
|
26
29
|
|
27
30
|
<div id="archive_all" class="resources-table-wrapper<%= ' with_tag_filter' if resource_has_tags || resource_has_filters %>">
|
@@ -1,19 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<% content_for :toolbar do %>
|
2
|
+
<%= toolbar_button(
|
3
|
+
icon: :plus,
|
4
|
+
label: Alchemy.t('New Tag'),
|
5
|
+
url: alchemy.new_admin_tag_path,
|
6
|
+
title: Alchemy.t('New Tag'),
|
7
|
+
hotkey: 'alt+n',
|
8
|
+
dialog_options: {
|
7
9
|
title: Alchemy.t('New Tag'),
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
}
|
15
|
-
]
|
16
|
-
) %>
|
10
|
+
size: '310x180'
|
11
|
+
},
|
12
|
+
if_permitted_to: [:create, Alchemy::Tag]
|
13
|
+
) %>
|
14
|
+
<%= render 'alchemy/admin/partials/search_form' %>
|
15
|
+
<% end %>
|
17
16
|
|
18
17
|
<div id="archive_all" class="resources-table-wrapper">
|
19
18
|
<%= render 'alchemy/admin/resources/table_header' %>
|
@@ -1,16 +1,14 @@
|
|
1
|
-
<%= toolbar
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
], search: false
|
13
|
-
) %>
|
1
|
+
<%= content_for :toolbar do %>
|
2
|
+
<%= toolbar_button(
|
3
|
+
icon: 'angle-double-left',
|
4
|
+
url: request.referer || alchemy.admin_dashboard_path,
|
5
|
+
label: Alchemy.t(:back),
|
6
|
+
title: Alchemy.t(:back),
|
7
|
+
hotkey: 'alt+z',
|
8
|
+
dialog: false,
|
9
|
+
skip_permission_check: true
|
10
|
+
) %>
|
11
|
+
<% end %>
|
14
12
|
|
15
13
|
<% content_for(:alchemy_body_class) { 'error' } %>
|
16
14
|
|
@@ -5,8 +5,8 @@
|
|
5
5
|
content.essence.link_text.presence ||
|
6
6
|
content.settings_value(:link_text, local_assigns.fetch(:options, {})) ||
|
7
7
|
attachment.name,
|
8
|
-
|
9
|
-
|
8
|
+
attachment.url(
|
9
|
+
download: true,
|
10
10
|
name: attachment.slug,
|
11
11
|
format: attachment.suffix
|
12
12
|
),
|
@@ -15,4 +15,4 @@
|
|
15
15
|
title: content.essence.title.presence
|
16
16
|
}.merge(html_options)
|
17
17
|
) -%>
|
18
|
-
<%- end -%>
|
18
|
+
<%- end -%>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% content = local_assigns[:content] || local_assigns[:essence_picture_view] %>
|
2
2
|
<%= Alchemy::EssencePictureView.new(
|
3
3
|
content,
|
4
|
-
local_assigns[:options]
|
5
|
-
local_assigns[:html_options]
|
6
|
-
).render %>
|
4
|
+
local_assigns[:options],
|
5
|
+
local_assigns[:html_options]
|
6
|
+
).render %>
|
data/config/alchemy/config.yml
CHANGED
@@ -9,12 +9,6 @@
|
|
9
9
|
#
|
10
10
|
auto_logout_time: 30
|
11
11
|
|
12
|
-
# === Redirect Options
|
13
|
-
#
|
14
|
-
# redirect_to_public_child [Boolean] # Alchemy redirects to the first public child page found, if a page is not public.
|
15
|
-
#
|
16
|
-
redirect_to_public_child: true
|
17
|
-
|
18
12
|
# === Page caching
|
19
13
|
#
|
20
14
|
# Enable/Disable page caching globally.
|
@@ -68,17 +62,27 @@ items_per_page: 15
|
|
68
62
|
|
69
63
|
# === Picture rendering settings
|
70
64
|
#
|
71
|
-
# Alchemy uses Dragonfly to render images.
|
65
|
+
# Alchemy uses Dragonfly to render images. Settings for image rendering are specific to elements and are defined in elements.yml
|
72
66
|
#
|
73
|
-
#
|
67
|
+
# Example:
|
68
|
+
# - name: some_element
|
69
|
+
# contents:
|
70
|
+
# - name: some_picture
|
71
|
+
# type: EssencePicture
|
72
|
+
# settings:
|
73
|
+
# hint: true
|
74
|
+
# crop: true # turns on image cropping
|
75
|
+
# size: '500x500' # image will be cropped to this size
|
74
76
|
#
|
75
|
-
#
|
77
|
+
# See http://markevans.github.com/dragonfly for further info.
|
78
|
+
#
|
79
|
+
# ==== Global Options:
|
76
80
|
#
|
77
81
|
# output_image_jpg_quality [Integer] # If image gets rendered as JPG this is the quality setting for it. (Default 85)
|
78
|
-
# preprocess_image_resize [String] # Use this option to resize images to
|
82
|
+
# preprocess_image_resize [String] # Use this option to resize images to the given size when they are uploaded to the image library. Downsizing example: '1000x1000>' (Default nil)
|
79
83
|
# image_output_format [String] # The global image output format setting. (Default +original+)
|
80
84
|
#
|
81
|
-
# NOTE: You can always override the output format in the
|
85
|
+
# NOTE: You can always override the output format in the settings of your Essence in elements.yml, I.E. {format: 'gif'}
|
82
86
|
#
|
83
87
|
output_image_jpg_quality: 85
|
84
88
|
preprocess_image_resize:
|
data/config/alchemy/modules.yml
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
position: 1
|
6
6
|
navigation:
|
7
7
|
name: 'modules.dashboard'
|
8
|
-
controller: 'alchemy/admin/dashboard'
|
8
|
+
controller: '/alchemy/admin/dashboard'
|
9
9
|
action: index
|
10
10
|
inline_image: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 -6 32 32" class="svg-inline--fa fa-lg fa-fw"><path fill="currentColor" d="M15.7 7.9L9.9 2.2 2.1 4.3 0 12.1l5.7 5.8 7.8-2.1 2.2-7.9zm-5.3 10.3l-1.2 4.4 3.2 3.2 4.4-1.2 1.2-4.4-3.2-3.2-4.4 1.2zM23.5 7.3L17.2 9l-1.7 6.2 4.5 4.6 6.2-1.7 1.7-6.2-4.4-4.6z"/></svg>'
|
11
11
|
|
@@ -14,18 +14,18 @@
|
|
14
14
|
position: 2
|
15
15
|
navigation:
|
16
16
|
name: 'modules.pages'
|
17
|
-
controller: 'alchemy/admin/pages'
|
17
|
+
controller: '/alchemy/admin/pages'
|
18
18
|
action: index
|
19
19
|
icon: file-alt
|
20
20
|
sub_navigation:
|
21
21
|
- name: 'modules.pages'
|
22
|
-
controller: 'alchemy/admin/pages'
|
22
|
+
controller: '/alchemy/admin/pages'
|
23
23
|
action: index
|
24
24
|
- name: 'modules.layoutpages'
|
25
|
-
controller: 'alchemy/admin/layoutpages'
|
25
|
+
controller: '/alchemy/admin/layoutpages'
|
26
26
|
action: index
|
27
27
|
nested:
|
28
|
-
- controller: 'alchemy/admin/pages'
|
28
|
+
- controller: '/alchemy/admin/pages'
|
29
29
|
action: edit
|
30
30
|
|
31
31
|
- name: menus
|
@@ -33,7 +33,7 @@
|
|
33
33
|
position: 3
|
34
34
|
navigation:
|
35
35
|
name: 'modules.menus'
|
36
|
-
controller: 'alchemy/admin/nodes'
|
36
|
+
controller: '/alchemy/admin/nodes'
|
37
37
|
action: index
|
38
38
|
icon: list-ul
|
39
39
|
|
@@ -42,7 +42,7 @@
|
|
42
42
|
position: 4
|
43
43
|
navigation:
|
44
44
|
name: 'modules.languages'
|
45
|
-
controller: 'alchemy/admin/languages'
|
45
|
+
controller: '/alchemy/admin/languages'
|
46
46
|
action: index
|
47
47
|
icon: flag
|
48
48
|
|
@@ -51,7 +51,7 @@
|
|
51
51
|
position: 5
|
52
52
|
navigation:
|
53
53
|
name: 'modules.sites'
|
54
|
-
controller: 'alchemy/admin/sites'
|
54
|
+
controller: '/alchemy/admin/sites'
|
55
55
|
action: index
|
56
56
|
icon: bullseye
|
57
57
|
|
@@ -60,7 +60,7 @@
|
|
60
60
|
position: 6
|
61
61
|
navigation:
|
62
62
|
name: 'modules.tags'
|
63
|
-
controller: 'alchemy/admin/tags'
|
63
|
+
controller: '/alchemy/admin/tags'
|
64
64
|
action: index
|
65
65
|
icon: tags
|
66
66
|
|
@@ -68,14 +68,14 @@
|
|
68
68
|
engine_name: alchemy
|
69
69
|
position: 7
|
70
70
|
navigation:
|
71
|
-
controller: 'alchemy/admin/pictures'
|
71
|
+
controller: '/alchemy/admin/pictures'
|
72
72
|
action: index
|
73
73
|
name: 'modules.library'
|
74
74
|
icon: archive
|
75
75
|
sub_navigation:
|
76
76
|
- name: 'modules.pictures'
|
77
|
-
controller: 'alchemy/admin/pictures'
|
77
|
+
controller: '/alchemy/admin/pictures'
|
78
78
|
action: index
|
79
79
|
- name: 'modules.attachments'
|
80
|
-
controller: 'alchemy/admin/attachments'
|
80
|
+
controller: '/alchemy/admin/attachments'
|
81
81
|
action: index
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require "dragonfly_svg"
|
3
|
-
require "alchemy/dragonfly/processors/crop_resize"
|
4
3
|
|
5
4
|
# Logger
|
6
5
|
Dragonfly.logger = Rails.logger
|
@@ -10,10 +9,3 @@ if defined?(ActiveRecord::Base)
|
|
10
9
|
ActiveRecord::Base.extend Dragonfly::Model
|
11
10
|
ActiveRecord::Base.extend Dragonfly::Model::Validations
|
12
11
|
end
|
13
|
-
|
14
|
-
# Dragonfly 1.4.0 only allows `quality` as argument to `encode`
|
15
|
-
Dragonfly::ImageMagick::Processors::Encode::WHITELISTED_ARGS << "flatten"
|
16
|
-
|
17
|
-
Rails.application.config.after_initialize do
|
18
|
-
Dragonfly.app(:alchemy_pictures).add_processor(:crop_resize, Alchemy::Dragonfly::Processors::CropResize.new)
|
19
|
-
end
|
data/config/routes.rb
CHANGED
@@ -124,7 +124,7 @@ Alchemy::Engine.routes.draw do
|
|
124
124
|
|
125
125
|
get "/attachment/:id/download(/:name)" => "attachments#download",
|
126
126
|
as: :download_attachment
|
127
|
-
get "/attachment/:id/show" => "attachments#show",
|
127
|
+
get "/attachment/:id/show(/:name)" => "attachments#show",
|
128
128
|
as: :show_attachment
|
129
129
|
|
130
130
|
resources :messages, only: [:index, :new, :create]
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateAlchemyPictureThumbs < ActiveRecord::Migration[5.2]
|
4
|
+
def up
|
5
|
+
return if table_exists?(:alchemy_picture_thumbs)
|
6
|
+
|
7
|
+
create_table :alchemy_picture_thumbs do |t|
|
8
|
+
t.references :picture, foreign_key: { to_table: :alchemy_pictures }, null: false
|
9
|
+
t.string :signature, null: false
|
10
|
+
t.text :uid, null: false
|
11
|
+
end
|
12
|
+
add_index :alchemy_picture_thumbs, :signature, unique: true
|
13
|
+
end
|
14
|
+
|
15
|
+
def down
|
16
|
+
return unless table_exists?(:alchemy_picture_thumbs)
|
17
|
+
|
18
|
+
remove_foreign_key :alchemy_picture_thumbs, :alchemy_pictures, column: :picture_id
|
19
|
+
remove_index :alchemy_picture_thumbs, :signature
|
20
|
+
drop_table :alchemy_picture_thumbs
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class RemoveTriStateBooleans < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
change_column_null :alchemy_elements, :public, false, false
|
6
|
+
change_column_default :alchemy_elements, :public, true
|
7
|
+
|
8
|
+
change_column_null :alchemy_elements, :folded, false
|
9
|
+
change_column_null :alchemy_elements, :unique, false
|
10
|
+
|
11
|
+
change_column_null :alchemy_essence_richtexts, :public, false, false
|
12
|
+
change_column_default :alchemy_essence_richtexts, :public, false
|
13
|
+
|
14
|
+
change_column_null :alchemy_essence_texts, :public, false
|
15
|
+
|
16
|
+
change_column_null :alchemy_folded_pages, :folded, false
|
17
|
+
|
18
|
+
change_column_null :alchemy_languages, :public, false
|
19
|
+
change_column_null :alchemy_languages, :default, false
|
20
|
+
|
21
|
+
change_column_null :alchemy_pages, :language_root, false, false
|
22
|
+
change_column_default :alchemy_pages, :language_root, false
|
23
|
+
|
24
|
+
change_column_null :alchemy_pages, :restricted, false
|
25
|
+
change_column_null :alchemy_pages, :robot_index, false
|
26
|
+
change_column_null :alchemy_pages, :robot_follow, false
|
27
|
+
change_column_null :alchemy_pages, :sitemap, false
|
28
|
+
|
29
|
+
change_column_null :alchemy_sites, :public, false
|
30
|
+
change_column_null :alchemy_sites, :redirect_to_primary_host, false, false
|
31
|
+
change_column_default :alchemy_sites, :redirect_to_primary_host, false
|
32
|
+
end
|
33
|
+
end
|