alchemy_cms 3.4.2 → 3.5.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +9 -3
- data/.teatro.yml +1 -0
- data/.travis.yml +14 -17
- data/CHANGELOG.md +44 -6
- data/Gemfile +7 -4
- data/README.md +60 -10
- data/Rakefile +1 -1
- data/alchemy_cms.gemspec +5 -8
- data/app/assets/javascripts/alchemy/admin.js +2 -0
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +1 -0
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +1 -0
- data/app/assets/javascripts/alchemy/alchemy.hotkeys.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +9 -7
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +1 -0
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +11 -7
- data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee +8 -3
- data/app/assets/javascripts/alchemy/alchemy.tooltips.coffee +10 -0
- data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +104 -73
- data/app/assets/stylesheets/alchemy/_defaults.scss +1 -4
- data/app/assets/stylesheets/alchemy/_extends.scss +13 -35
- data/app/assets/stylesheets/alchemy/_mixins.scss +82 -18
- data/app/assets/stylesheets/alchemy/_variables.scss +21 -8
- data/app/assets/stylesheets/alchemy/admin.scss +4 -0
- data/app/assets/stylesheets/alchemy/archive.scss +8 -12
- data/app/assets/stylesheets/alchemy/attachments.scss +39 -0
- data/app/assets/stylesheets/alchemy/base.scss +26 -15
- data/app/assets/stylesheets/alchemy/buttons.scss +59 -31
- data/app/assets/stylesheets/alchemy/dashboard.scss +3 -3
- data/app/assets/stylesheets/alchemy/dialogs.scss +10 -8
- data/app/assets/stylesheets/alchemy/elements.scss +65 -41
- data/app/assets/stylesheets/alchemy/errors.scss +7 -0
- data/app/assets/stylesheets/alchemy/flash.scss +1 -1
- data/app/assets/stylesheets/alchemy/form_fields.scss +0 -37
- data/app/assets/stylesheets/alchemy/forms.scss +18 -27
- data/app/assets/stylesheets/alchemy/frame.scss +104 -204
- data/app/assets/stylesheets/alchemy/hints.scss +62 -0
- data/app/assets/stylesheets/alchemy/icon-font.scss +2 -1
- data/app/assets/stylesheets/alchemy/icons.scss +9 -4
- data/app/assets/stylesheets/alchemy/image_library.scss +6 -6
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +6 -4
- data/app/assets/stylesheets/alchemy/lists.scss +0 -1
- data/app/assets/stylesheets/alchemy/menubar.scss +3 -4
- data/app/assets/stylesheets/alchemy/modules.scss +0 -6
- data/app/assets/stylesheets/alchemy/navigation.scss +242 -0
- data/app/assets/stylesheets/alchemy/pagination.scss +3 -3
- data/app/assets/stylesheets/alchemy/print.scss +1 -0
- data/app/assets/stylesheets/alchemy/resource_info.scss +45 -0
- data/app/assets/stylesheets/alchemy/search.scss +72 -1
- data/app/assets/stylesheets/alchemy/selects.scss +38 -44
- data/app/assets/stylesheets/alchemy/sitemap.scss +89 -79
- data/app/assets/stylesheets/alchemy/tables.scss +6 -10
- data/app/assets/stylesheets/alchemy/toolbar.scss +7 -36
- data/app/assets/stylesheets/alchemy/upload.scss +12 -3
- data/app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +6 -3
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.svg +58 -170
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.svg +124 -148
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +426 -144
- data/app/controllers/alchemy/admin/attachments_controller.rb +24 -16
- data/app/controllers/alchemy/admin/clipboard_controller.rb +1 -1
- data/app/controllers/alchemy/admin/essence_files_controller.rb +1 -1
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +9 -8
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +1 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +2 -2
- data/app/controllers/alchemy/admin/resources_controller.rb +2 -2
- data/app/controllers/alchemy/admin/tags_controller.rb +1 -1
- data/app/controllers/alchemy/api/pages_controller.rb +16 -0
- data/app/controllers/alchemy/messages_controller.rb +1 -1
- data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +2 -2
- data/app/helpers/alchemy/admin/attachments_helper.rb +11 -0
- data/app/helpers/alchemy/admin/base_helper.rb +37 -4
- data/app/helpers/alchemy/admin/contents_helper.rb +11 -4
- data/app/helpers/alchemy/admin/elements_helper.rb +0 -19
- data/app/helpers/alchemy/admin/essences_helper.rb +7 -30
- data/app/helpers/alchemy/admin/navigation_helper.rb +13 -51
- data/app/helpers/alchemy/admin/pages_helper.rb +21 -16
- data/app/helpers/alchemy/admin/pictures_helper.rb +9 -0
- data/app/helpers/alchemy/deprecated_pages_helper.rb +54 -0
- data/app/helpers/alchemy/essences_helper.rb +1 -1
- data/app/helpers/alchemy/pages_helper.rb +8 -109
- data/app/helpers/alchemy/url_helper.rb +8 -13
- data/app/models/alchemy/attachment.rb +7 -4
- data/app/models/alchemy/cell.rb +2 -2
- data/app/models/alchemy/content.rb +2 -2
- data/app/models/alchemy/content/factory.rb +12 -9
- data/app/models/alchemy/element.rb +6 -3
- data/app/models/alchemy/essence_file.rb +1 -1
- data/app/models/alchemy/essence_picture.rb +37 -47
- data/app/models/alchemy/essence_picture_view.rb +8 -1
- data/app/models/alchemy/folded_page.rb +3 -2
- data/app/models/alchemy/legacy_page_url.rb +3 -3
- data/app/models/alchemy/page.rb +50 -5
- data/app/models/alchemy/page/fixed_attributes.rb +63 -0
- data/app/models/alchemy/page/page_elements.rb +10 -7
- data/app/models/alchemy/page/page_natures.rb +19 -0
- data/app/models/alchemy/picture.rb +1 -0
- data/app/models/alchemy/picture/transformations.rb +1 -1
- data/app/models/alchemy/picture/url.rb +82 -0
- data/app/serializers/alchemy/page_tree_serializer.rb +29 -8
- data/app/views/alchemy/_edit_mode.html.erb +2 -0
- data/app/views/alchemy/_menubar.html.erb +1 -1
- data/app/views/alchemy/_preview_mode_code.html.erb +6 -0
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +25 -5
- data/app/views/alchemy/admin/attachments/_replace_button.html.erb +26 -0
- data/app/views/alchemy/admin/attachments/index.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/show.html.erb +52 -0
- data/app/views/alchemy/admin/elements/_element_header.html.erb +6 -3
- data/app/views/alchemy/admin/elements/create.js.erb +0 -2
- data/app/views/alchemy/admin/elements/trash.js.erb +0 -1
- data/app/views/alchemy/admin/elements/update.js.erb +0 -2
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -4
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +1 -1
- data/app/views/alchemy/admin/languages/index.html.erb +1 -0
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +26 -27
- data/app/views/alchemy/admin/layoutpages/edit.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_form.html.erb +13 -40
- data/app/views/alchemy/admin/pages/_locked_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page.html.erb +119 -61
- data/app/views/alchemy/admin/pages/_page_for_links.html.erb +4 -2
- data/app/views/alchemy/admin/pages/_page_infos.html.erb +12 -12
- data/app/views/alchemy/admin/pages/_page_status.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_publication_fields.html.erb +35 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +13 -2
- data/app/views/alchemy/admin/pages/index.html.erb +3 -8
- data/app/views/alchemy/admin/pages/info.html.erb +15 -2
- data/app/views/alchemy/admin/pages/sort.js.erb +1 -1
- data/app/views/alchemy/admin/pages/update.js.erb +1 -14
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +12 -8
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +4 -4
- data/app/views/alchemy/admin/partials/_search_form.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_sub_navigation.html.erb +9 -6
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture.html.erb +1 -6
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -6
- data/app/views/alchemy/admin/pictures/index.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/show.html.erb +1 -6
- data/app/views/alchemy/admin/uploader/_button.html.erb +4 -4
- data/app/views/alchemy/base/500.html.erb +15 -1
- data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +13 -15
- data/app/views/alchemy/essences/_essence_boolean_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_date_editor.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_date_view.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +2 -7
- data/app/views/alchemy/essences/_essence_file_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_html_editor.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_html_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_link_editor.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_link_view.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +47 -49
- data/app/views/alchemy/essences/_essence_picture_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_richtext_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_select_editor.html.erb +27 -29
- data/app/views/alchemy/essences/_essence_select_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +17 -19
- data/app/views/alchemy/essences/_essence_text_view.html.erb +0 -2
- data/app/views/alchemy/pages/_meta_data.html.erb +9 -0
- data/app/views/layouts/alchemy/admin.html.erb +9 -11
- data/bin/alchemy +1 -2
- data/config/alchemy/config.yml +1 -1
- data/config/alchemy/modules.yml +0 -16
- data/config/initializers/dragonfly.rb +0 -18
- data/config/initializers/mini_profiler.rb +6 -0
- data/config/locales/alchemy.de.yml +9 -1
- data/config/locales/alchemy.en.yml +7 -1
- data/config/locales/alchemy.es.yml +6 -0
- data/config/locales/alchemy.fr.yml +2 -0
- data/config/locales/alchemy.it.yml +3 -1
- data/config/locales/alchemy.nl.yml +2 -0
- data/config/locales/alchemy.ru.yml +2 -0
- data/config/routes.rb +3 -8
- data/db/migrate/20160912223112_add_index_to_alchemy_pages_rgt.rb +9 -0
- data/db/migrate/20160927205604_add_foreign_key_indices_and_null_constraints.rb +20 -0
- data/db/migrate/20160928080104_add_foreign_keys.rb +27 -0
- data/lib/alchemy/admin/locale.rb +4 -3
- data/lib/alchemy/engine.rb +2 -4
- data/lib/alchemy/errors.rb +9 -2
- data/lib/alchemy/forms/builder.rb +8 -0
- data/lib/alchemy/modules.rb +20 -19
- data/lib/alchemy/permissions.rb +15 -4
- data/lib/alchemy/resources_helper.rb +4 -2
- data/lib/alchemy/sass_support.rb +9 -0
- data/lib/alchemy/seeder.rb +89 -1
- data/lib/alchemy/test_support/essence_shared_examples.rb +2 -0
- data/lib/alchemy/test_support/factories/attachment_factory.rb +1 -1
- data/lib/alchemy/test_support/factories/content_factory.rb +1 -0
- data/lib/alchemy/test_support/factories/element_factory.rb +1 -0
- data/lib/alchemy/test_support/factories/picture_factory.rb +1 -1
- data/lib/alchemy/test_support/fixtures/image.png +0 -0
- data/lib/alchemy/tinymce.rb +2 -6
- data/lib/alchemy/upgrader.rb +4 -55
- data/lib/alchemy/upgrader/tasks/install_dragonfly_config.rb +14 -0
- data/lib/alchemy/upgrader/three_point_five.rb +32 -0
- data/lib/alchemy/upgrader/three_point_four.rb +2 -8
- data/lib/alchemy/upgrader/three_point_one.rb +30 -30
- data/lib/alchemy/upgrader/three_point_three.rb +31 -31
- data/lib/alchemy/upgrader/three_point_two.rb +25 -25
- data/lib/alchemy/upgrader/three_point_zero.rb +59 -59
- data/lib/alchemy/version.rb +1 -1
- data/lib/rails/generators/alchemy/elements/templates/view.html.erb +1 -1
- data/lib/rails/generators/alchemy/elements/templates/view.html.haml +1 -1
- data/lib/rails/generators/alchemy/elements/templates/view.html.slim +1 -1
- data/lib/rails/generators/alchemy/essence/templates/editor.html.erb +1 -3
- data/lib/rails/generators/alchemy/install/files/_article_view.html.erb +1 -1
- data/lib/rails/generators/alchemy/install/files/application.html.erb +3 -4
- data/lib/rails/generators/alchemy/install/install_generator.rb +4 -0
- data/lib/rails/generators/alchemy/install/templates/dragonfly.rb.tt +35 -0
- data/lib/rails/generators/alchemy/module/module_generator.rb +1 -1
- data/lib/tasks/alchemy/db.rake +6 -0
- data/lib/tasks/alchemy/tidy.rake +85 -0
- data/lib/tasks/alchemy/upgrade.rake +165 -16
- data/vendor/assets/javascripts/clipboard.min.js +7 -0
- data/vendor/assets/javascripts/fileupload/jquery.fileupload-process.js +4 -4
- data/vendor/assets/javascripts/fileupload/jquery.fileupload-validate.js +2 -2
- data/vendor/assets/javascripts/fileupload/jquery.fileupload.js +29 -14
- data/vendor/assets/javascripts/fileupload/jquery.iframe-transport.js +2 -2
- data/vendor/assets/javascripts/tinymce/langs/es.js +2 -2
- data/vendor/assets/javascripts/tinymce/langs/fr.js +1 -1
- data/vendor/assets/javascripts/tinymce/langs/it.js +1 -1
- data/vendor/assets/javascripts/tinymce/langs/nl.js +3 -3
- data/vendor/assets/javascripts/tinymce/tinymce.min.js +15 -12
- metadata +44 -88
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/readme.md +0 -1
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/wline.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.ie7.min.css +0 -1
- data/app/controllers/alchemy/pictures_controller.rb +0 -97
- data/app/views/alchemy/admin/elements/_refresh_editor.js.erb +0 -8
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.min.js +0 -1
@@ -1,12 +1,16 @@
|
|
1
1
|
<% if can? *navigate_module(navigation) %>
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
<%= content_tag :div, class: main_navigation_css_classes(navigation) do %>
|
3
|
+
<%= link_to url_for_module(alchemy_module) do %>
|
4
|
+
<% if navigation["image"] %>
|
5
|
+
<%= image_tag(navigation["image"]) %>
|
6
|
+
<% elsif navigation["icon"] %>
|
7
|
+
<span class="module icon <%= navigation["icon"] %>"></span>
|
8
|
+
<% else %>
|
9
|
+
<span class="module icon"></span>
|
10
|
+
<% end %>
|
11
|
+
<label><%= Alchemy.t(navigation['name']) %></label>
|
9
12
|
<% end %>
|
10
|
-
|
13
|
+
<%= render 'alchemy/admin/partials/sub_navigation',
|
14
|
+
entries: navigation['sub_navigation'] %>
|
11
15
|
<% end %>
|
12
16
|
<% end %>
|
@@ -2,14 +2,15 @@
|
|
2
2
|
action: 'index',
|
3
3
|
options: @options.to_json,
|
4
4
|
size: @size
|
5
|
-
), remote: true, html: {class: '
|
5
|
+
), remote: true, html: {class: 'search_form', id: nil} do |f| %>
|
6
6
|
<%= hidden_field_tag("element_id", @element.blank? ? "" : @element.id) %>
|
7
7
|
<%= hidden_field_tag("content_id", @content.blank? ? "" : @content.id) %>
|
8
8
|
<div class="search_field">
|
9
9
|
<%= render_icon('search') %>
|
10
10
|
<%= f.search_field resource_handler.search_field_name,
|
11
|
-
|
12
|
-
|
11
|
+
placeholder: Alchemy.t(:search),
|
12
|
+
class: 'search_input_field',
|
13
|
+
id: nil %>
|
13
14
|
<%= link_to '', url_for(
|
14
15
|
action: 'index',
|
15
16
|
element_id: @element.blank? ? '' : @element.id,
|
@@ -20,7 +21,6 @@
|
|
20
21
|
),
|
21
22
|
remote: true,
|
22
23
|
class: 'search_field_clear',
|
23
|
-
id: 'search_field_clear',
|
24
24
|
title: Alchemy.t(:click_to_show_all),
|
25
25
|
style: params[:q].blank? ? 'display: none' : 'display: block' %>
|
26
26
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="search_field">
|
5
5
|
<%= render_icon('search') %>
|
6
6
|
<%= f.search_field resource_handler.search_field_name,
|
7
|
-
|
7
|
+
class: 'search_input_field',
|
8
8
|
placeholder: Alchemy.t(:search) %>
|
9
9
|
<% local_assigns.fetch(:additional_query_fields, []).each do |field| %>
|
10
10
|
<%= f.hidden_field field %>
|
@@ -1,8 +1,11 @@
|
|
1
|
-
<% entries.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<% if entries.present? %>
|
2
|
+
<div class="sub_navigation">
|
3
|
+
<% entries.each do |entry| %>
|
4
|
+
<% if can? *navigate_module(entry) %>
|
5
|
+
<div class="subnavi_tab<%= entry_active?(entry) ? ' active' : nil %>">
|
6
|
+
<%= link_to Alchemy.t(entry['name']), url_for_module_sub_navigation(entry) %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
6
10
|
</div>
|
7
|
-
<% end %>
|
8
11
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div id="image_assign_filter_and_image_sizing">
|
2
2
|
<% if can? :create, Alchemy::Picture %>
|
3
3
|
<%= render 'alchemy/admin/uploader/button',
|
4
|
-
|
4
|
+
object: Alchemy::Picture.new,
|
5
5
|
dropzone: '#assign_image_list',
|
6
6
|
file_attribute: 'image_file',
|
7
7
|
in_dialog: true,
|
@@ -22,12 +22,7 @@
|
|
22
22
|
</span>
|
23
23
|
<% end %>
|
24
24
|
<% image = image_tag(
|
25
|
-
|
26
|
-
id: picture,
|
27
|
-
size: @size,
|
28
|
-
sh: picture.security_token(size: @size),
|
29
|
-
format: picture.image_file_format
|
30
|
-
),
|
25
|
+
picture.url(size: preview_size(@size), flatten: true),
|
31
26
|
alt: picture.name,
|
32
27
|
title: Alchemy.t(:zoom_image)
|
33
28
|
) %>
|
@@ -2,12 +2,7 @@
|
|
2
2
|
<% action_url = create_or_assign_url(picture_to_assign, @options.to_json) %>
|
3
3
|
<%= link_to(
|
4
4
|
image_tag(
|
5
|
-
|
6
|
-
id: picture_to_assign,
|
7
|
-
size: size,
|
8
|
-
sh: picture_to_assign.security_token(size: size),
|
9
|
-
format: picture_to_assign.image_file_format
|
10
|
-
),
|
5
|
+
picture_to_assign.url(size: preview_size(size), flatten: true),
|
11
6
|
alt: picture_to_assign.name
|
12
7
|
),
|
13
8
|
action_url,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="toolbar_buttons">
|
3
3
|
<% if can? :create, Alchemy::Picture %>
|
4
4
|
<%= render 'alchemy/admin/uploader/button',
|
5
|
-
|
5
|
+
object: Alchemy::Picture.new,
|
6
6
|
file_attribute: 'image_file',
|
7
7
|
redirect_url: alchemy.admin_pictures_path(
|
8
8
|
size: params[:size],
|
@@ -1,10 +1,5 @@
|
|
1
1
|
<div class="zoomed-picture-background">
|
2
|
-
<%= image_tag
|
3
|
-
id: @picture.id,
|
4
|
-
name: @picture.urlname,
|
5
|
-
format: @picture.image_file_format,
|
6
|
-
sh: @picture.security_token
|
7
|
-
) %>
|
2
|
+
<%= image_tag @picture.url(format: @picture.image_file_format) %>
|
8
3
|
</div>
|
9
4
|
|
10
5
|
<div class="picture-overlay-navigation">
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%= form_for [:admin,
|
1
|
+
<%= form_for [:admin, object], html: {multipart: true, class: 'upload-button'} do |f| %>
|
2
2
|
<%= f.file_field file_attribute,
|
3
|
-
class: 'fileupload', multiple: true,
|
3
|
+
class: 'fileupload fileupload--field', multiple: true,
|
4
4
|
name: "#{f.object_name}[#{file_attribute}]" %>
|
5
5
|
<%= hidden_field_tag "#{f.object_name}[upload_hash]", Time.current.hash %>
|
6
6
|
<%= f.label file_attribute, data: {alchemy_hotkey: 'alt+n'} do %>
|
@@ -8,14 +8,14 @@
|
|
8
8
|
<span class="icon_button"><%= render_icon :upload %></span>
|
9
9
|
<label>
|
10
10
|
<%= local_assigns[:label] ||
|
11
|
-
Alchemy.t(:button_label, scope: [:uploader,
|
11
|
+
Alchemy.t(:button_label, scope: [:uploader, object.class.model_name.i18n_key]) %>
|
12
12
|
</label>
|
13
13
|
</div>
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
16
16
|
|
17
17
|
<% file_types = local_assigns[:file_types].presence ||
|
18
|
-
configuration(:uploader)['allowed_filetypes'][
|
18
|
+
configuration(:uploader)['allowed_filetypes'][object.class.model_name.collection] || ['*'] %>
|
19
19
|
|
20
20
|
<script type='text/javascript'>
|
21
21
|
$(function() {
|
@@ -12,15 +12,29 @@
|
|
12
12
|
], search: false
|
13
13
|
) %>
|
14
14
|
|
15
|
+
<% content_for(:alchemy_body_class) { 'error' } %>
|
16
|
+
|
15
17
|
<%= render_message(:error) do %>
|
16
18
|
<h1><%= Alchemy.t('An error happened') %></h1>
|
17
19
|
<h2>
|
18
20
|
<%= @error.class %>
|
19
21
|
<%= @notice %>
|
20
22
|
</h2>
|
21
|
-
<p>
|
23
|
+
<p class="hidden">
|
22
24
|
<% @trace.each do |line| %>
|
23
25
|
<%= line %><br>
|
24
26
|
<% end %>
|
25
27
|
</p>
|
28
|
+
<a href="#" class="error_details--toggle">
|
29
|
+
<%= Alchemy.t('Show error details') %>
|
30
|
+
</a>
|
26
31
|
<% end %>
|
32
|
+
|
33
|
+
<script>
|
34
|
+
$(function(){
|
35
|
+
$('.error_details--toggle').click(function(){
|
36
|
+
$('.error.message p').toggleClass('hidden');
|
37
|
+
return false;
|
38
|
+
});
|
39
|
+
});
|
40
|
+
</script>
|
@@ -1,15 +1,13 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</div>
|
15
|
-
<% end %>
|
1
|
+
<div class="content_editor essence_boolean" id="<%= content.dom_id %>" data-content-id="<%= content.id %>">
|
2
|
+
<input type="hidden" value="0" name="<%= content.form_field_name %>">
|
3
|
+
<%= check_box_tag content.form_field_name, 1,
|
4
|
+
content.ingredient.presence || content.settings_value(
|
5
|
+
:default_value, local_assigns.fetch(:options, {})
|
6
|
+
),
|
7
|
+
class: local_assigns.fetch(:html_options, {})[:class],
|
8
|
+
style: local_assigns.fetch(:html_options, {})[:style] %>
|
9
|
+
<label for="<%= content.form_field_id %>" style="display: inline">
|
10
|
+
<%= render_content_name(content) %>
|
11
|
+
</label>
|
12
|
+
<%= render_hint_for(content) %>
|
13
|
+
</div>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<% cache(content) do %>
|
2
1
|
<div class="content_editor essence_date" id="<%= content.dom_id %>" data-content-id="<%= content.id %>">
|
3
2
|
<%= content_label(content) %>
|
4
3
|
<%= alchemy_datepicker(
|
@@ -12,4 +11,3 @@
|
|
12
11
|
<span class="ui-icon ui-icon-calendar"></span>
|
13
12
|
</label>
|
14
13
|
</div>
|
15
|
-
<% end %>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<%- cache(content) do -%>
|
2
1
|
<%- date_format = content.settings_value(:date_format,
|
3
2
|
local_assigns.fetch(:options, {})) -%>
|
4
3
|
<%- if content.ingredient.present? -%>
|
@@ -7,5 +6,4 @@
|
|
7
6
|
<%- else -%>
|
8
7
|
<%= l(content.ingredient, format: date_format) %>
|
9
8
|
<%- end -%>
|
10
|
-
<%- end -%>
|
11
9
|
<%- end -%>
|
@@ -1,5 +1,3 @@
|
|
1
|
-
<% cache(content) do %>
|
2
|
-
|
3
1
|
<% dialog_link = link_to_dialog('',
|
4
2
|
alchemy.admin_attachments_path(
|
5
3
|
content_id: content.id,
|
@@ -46,10 +44,7 @@
|
|
46
44
|
class: 'edit_file',
|
47
45
|
title: Alchemy.t(:edit_file_properties) %>
|
48
46
|
</div>
|
49
|
-
|
50
|
-
|
51
|
-
content.ingredient.id %>
|
52
|
-
<% end %>
|
47
|
+
<%= hidden_field_tag content.form_field_name(:attachment_id),
|
48
|
+
content.ingredient && content.ingredient.id %>
|
53
49
|
</div>
|
54
50
|
</div>
|
55
|
-
<% end %>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<%- cache(content) do -%>
|
2
1
|
<%- if attachment = content.ingredient -%>
|
3
2
|
<%- html_options = local_assigns.fetch(:html_options, {}) -%>
|
4
3
|
<%= link_to(
|
@@ -15,5 +14,4 @@
|
|
15
14
|
title: content.essence.title.presence
|
16
15
|
}.merge(html_options)
|
17
16
|
) -%>
|
18
|
-
<%- end -%>
|
19
|
-
<%- end -%>
|
17
|
+
<%- end -%>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<% cache(content) do %>
|
2
1
|
<div class="content_editor essence_link" id="<%= content.dom_id %>" data-content-id="<%= content.id %>">
|
3
2
|
<%= content_label(content) %>
|
4
3
|
<%= text_field_tag '', content.ingredient,
|
@@ -22,4 +21,3 @@
|
|
22
21
|
$('#<%= content.dom_id %> input.text_with_icon').val($(this).val());
|
23
22
|
});
|
24
23
|
</script>
|
25
|
-
<% end %>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<%- cache(content) do -%>
|
2
1
|
<%- if content.ingredient.present? -%>
|
3
2
|
<%- html_options = {
|
4
3
|
target: content.essence.link_target == "blank" ? "_blank" : nil
|
@@ -7,5 +6,4 @@
|
|
7
6
|
<%= content.settings_value(:text, local_assigns.fetch(:options, {})) ||
|
8
7
|
content.ingredient -%>
|
9
8
|
<%- end -%>
|
10
|
-
<%- end -%>
|
11
9
|
<%- end -%>
|
@@ -1,54 +1,52 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
<%= content_tag :div, id: content.dom_id, data: {"content-id" => content.id}, class: [
|
2
|
+
"essence_picture_editor",
|
3
|
+
options[:dragable] ? "dragable_picture" : nil,
|
4
|
+
options[:grouped] ? nil : "content_editor"
|
5
|
+
].compact.join(" ") do %>
|
6
|
+
<% unless options[:grouped] %><%= content_label(content) %><% end %>
|
7
|
+
<div class="picture_thumbnail">
|
8
|
+
<span class="picture_tool delete">
|
9
|
+
<% if options[:grouped] %>
|
10
|
+
<%= link_to_confirm_dialog "", Alchemy.t(:confirm_to_delete_image),
|
11
|
+
alchemy.admin_essence_picture_path(
|
12
|
+
id: content,
|
13
|
+
options: options
|
14
|
+
), {title: Alchemy.t(:delete_image)} %>
|
15
|
+
<% else %>
|
16
|
+
<%= link_to '', '#',
|
17
|
+
onclick: "return Alchemy.removePicture('##{content.form_field_id(:picture_id)}');" %>
|
18
|
+
<% end %>
|
19
|
+
</span>
|
20
|
+
<%- if content.ingredient -%>
|
21
|
+
<div class="picture_handle" title="<%= Alchemy.t(:drag_to_sort) if options[:dragable] %>"></div>
|
22
|
+
<%- end -%>
|
23
|
+
<div class="picture_image">
|
24
|
+
<div class="thumbnail_background<%= ' missing' if content.ingredient.nil? %>">
|
25
|
+
<%- if content.ingredient -%>
|
26
|
+
<%= essence_picture_thumbnail(content, options) %>
|
27
|
+
<%= hidden_field_tag content.form_field_name(:picture_id), content.ingredient.id %>
|
19
28
|
<% end %>
|
20
|
-
</span>
|
21
|
-
<%- if content.ingredient -%>
|
22
|
-
<div class="picture_handle" title="<%= Alchemy.t(:drag_to_sort) if options[:dragable] %>"></div>
|
23
|
-
<%- end -%>
|
24
|
-
<div class="picture_image">
|
25
|
-
<div class="thumbnail_background<%= ' missing' if content.ingredient.nil? %>">
|
26
|
-
<%- if content.ingredient -%>
|
27
|
-
<%= essence_picture_thumbnail(content, options) %>
|
28
|
-
<%= hidden_field_tag content.form_field_name(:picture_id), content.ingredient.id %>
|
29
|
-
<% end %>
|
30
|
-
</div>
|
31
29
|
</div>
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
<%- end -%>
|
38
|
-
<div class="edit_images_bottom">
|
39
|
-
<%= render 'alchemy/essences/shared/essence_picture_tools', {
|
40
|
-
content: content,
|
41
|
-
options: options
|
42
|
-
} %>
|
30
|
+
</div>
|
31
|
+
<%- if content.essence.css_class.present? -%>
|
32
|
+
<div class="essence_picture_css_class">
|
33
|
+
<%= Alchemy.t("alchemy.essence_pictures.css_classes.#{content.essence.css_class}",
|
34
|
+
default: content.essence.css_class.camelcase) %>
|
43
35
|
</div>
|
36
|
+
<%- end -%>
|
37
|
+
<div class="edit_images_bottom">
|
38
|
+
<%= render 'alchemy/essences/shared/essence_picture_tools', {
|
39
|
+
content: content,
|
40
|
+
options: options
|
41
|
+
} %>
|
44
42
|
</div>
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
43
|
+
</div>
|
44
|
+
<%= hidden_field_tag content.form_field_name(:link),
|
45
|
+
content.essence.link %>
|
46
|
+
<%= hidden_field_tag content.form_field_name(:link_title),
|
47
|
+
content.essence.link_title %>
|
48
|
+
<%= hidden_field_tag content.form_field_name(:link_class_name),
|
49
|
+
content.essence.link_class_name %>
|
50
|
+
<%= hidden_field_tag content.form_field_name(:link_target),
|
51
|
+
content.essence.link_target %>
|
54
52
|
<% end %>
|