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,7 +1,7 @@
|
|
1
1
|
<% if @page == locked_page %>
|
2
2
|
<%= render 'alchemy/admin/pages/current_page', current_page: @page %>
|
3
3
|
<% else %>
|
4
|
-
<div class="
|
4
|
+
<div class="locked_page wide" id="locked_page_<%= locked_page.id %>">
|
5
5
|
<%= link_to alchemy.edit_admin_page_path(locked_page) do %>
|
6
6
|
<%= render 'alchemy/admin/pages/page_status', page: locked_page, truncate: true %>
|
7
7
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<li id="page_{{id}}" class="page_level_{{level}} {{page_layout}}" data-slug="{{slug}}" data-restricted="{{restricted}}" data-visible="{{visible}}" data-external="{{redirects_to_external}}">
|
2
2
|
<div class="sitemap_page{{#if locked}} locked{{/if}}" name="{{name}}">
|
3
|
-
<div class="sitemap_left_images">
|
3
|
+
<div class="sitemap_left_images<% if @sorting %>{{#unless root}} handle{{/unless}}<% end %>">
|
4
4
|
<% unless @sorting %>
|
5
5
|
{{#unless root_or_leaf}}
|
6
6
|
<%= link_to(
|
@@ -16,104 +16,162 @@
|
|
16
16
|
{{/unless}}
|
17
17
|
<% end %>
|
18
18
|
{{#if definition_missing}}
|
19
|
-
|
19
|
+
<%= page_layout_missing_warning %>
|
20
20
|
{{else}}
|
21
|
-
|
21
|
+
{{#if permissions.edit_content}}
|
22
|
+
<div class="page icon{{#if locked}} with-hint{{/if}}">
|
23
|
+
{{#if locked}}
|
24
|
+
<span class="hint-bubble">
|
25
|
+
{{locked_notice}}
|
26
|
+
</span>
|
27
|
+
{{/if}}
|
28
|
+
</div>
|
29
|
+
{{else}}
|
30
|
+
<div class="page icon with-hint not-allowed">
|
31
|
+
<span class="hint-bubble">
|
32
|
+
<%= Alchemy.t('Your user role does not allow you to edit this page') %>
|
33
|
+
</span>
|
34
|
+
</div>
|
35
|
+
{{/if}}
|
22
36
|
{{/if}}
|
23
37
|
</div>
|
24
38
|
<div class="sitemap_right_tools">
|
25
39
|
<%- unless @sorting -%>
|
26
40
|
{{#if permissions.info}}
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
title: Alchemy.t(:page_infos),
|
36
|
-
class: 'sitemap_tool'
|
37
|
-
}
|
41
|
+
<div class="button_with_label sitemap_tool">
|
42
|
+
<%= link_to_dialog(
|
43
|
+
render_icon(:info),
|
44
|
+
alchemy.info_admin_page_path(page),
|
45
|
+
{
|
46
|
+
title: Alchemy.t(:page_infos),
|
47
|
+
size: '520x290'
|
48
|
+
}
|
38
49
|
) %>
|
50
|
+
<label class="center"><%= Alchemy.t(:page_infos) %></label>
|
51
|
+
{{else}}
|
52
|
+
<div class="sitemap_tool disabled with-hint">
|
53
|
+
<%= render_icon(:info) %>
|
54
|
+
<span class="hint-bubble">
|
55
|
+
<%= Alchemy.t('Your user role does not allow you to edit this page') %>
|
56
|
+
</span>
|
39
57
|
{{/if}}
|
58
|
+
</div>
|
40
59
|
{{#if permissions.configure}}
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
60
|
+
<div class="button_with_label sitemap_tool">
|
61
|
+
<%= link_to_dialog(
|
62
|
+
render_icon(:configure_page),
|
63
|
+
alchemy.configure_admin_page_path(page),
|
64
|
+
{
|
65
|
+
title: Alchemy.t(:edit_page_properties),
|
66
|
+
size: page.redirects_to_external? ? '450x330' : '450x680'
|
67
|
+
}
|
68
|
+
) -%>
|
69
|
+
<label class="center"><%= Alchemy.t(:edit_page_properties) %></label>
|
70
|
+
{{else}}
|
71
|
+
<div class="sitemap_tool disabled with-hint">
|
72
|
+
<%= render_icon(:configure_page) %>
|
73
|
+
<span class="hint-bubble">
|
74
|
+
<%= Alchemy.t('Your user role does not allow you to edit this page') %>
|
75
|
+
</span>
|
51
76
|
{{/if}}
|
52
|
-
|
53
|
-
|
77
|
+
</div>
|
78
|
+
{{#if permissions.copy}}
|
79
|
+
<div class="button_with_label sitemap_tool">
|
54
80
|
<%= link_to(
|
55
|
-
render_icon(
|
81
|
+
render_icon(:copy_page),
|
56
82
|
alchemy.insert_admin_clipboard_path(
|
57
83
|
remarkable_type: page.class.name.demodulize.underscore.pluralize,
|
58
84
|
remarkable_id: '__ID__',
|
59
85
|
).gsub('__ID__', '{{id}}'),
|
60
86
|
remote: true,
|
61
|
-
method: 'post'
|
62
|
-
title: Alchemy.t(:copy_page),
|
63
|
-
class: 'sitemap_tool'
|
87
|
+
method: 'post'
|
64
88
|
) %>
|
65
|
-
|
66
|
-
|
89
|
+
<label class="center"><%= Alchemy.t(:copy_page) %></label>
|
90
|
+
{{else}}
|
91
|
+
<div class="sitemap_tool disabled with-hint">
|
92
|
+
<%= render_icon(:copy_page) %>
|
93
|
+
<span class="hint-bubble">
|
94
|
+
<%= Alchemy.t('Your user role does not allow you to edit this page') %>
|
95
|
+
</span>
|
96
|
+
{{/if}}
|
97
|
+
</div>
|
98
|
+
{{#if permissions.destroy}}
|
99
|
+
<div class="button_with_label sitemap_tool">
|
67
100
|
<%= link_to_confirm_dialog(
|
68
|
-
render_icon(
|
101
|
+
render_icon(:delete_page),
|
69
102
|
Alchemy.t(:confirm_to_delete_page),
|
70
103
|
url_for(
|
71
104
|
controller: 'pages',
|
72
105
|
action: 'destroy',
|
73
106
|
id: '__ID__'
|
74
|
-
).gsub('__ID__', '{{id}}')
|
75
|
-
{
|
76
|
-
title: Alchemy.t(:delete_page),
|
77
|
-
class: 'sitemap_tool'
|
78
|
-
}
|
107
|
+
).gsub('__ID__', '{{id}}')
|
79
108
|
) -%>
|
80
|
-
|
81
|
-
|
109
|
+
<label class="center"><%= Alchemy.t(:delete_page) %></label>
|
110
|
+
{{else}}
|
111
|
+
<div class="sitemap_tool disabled with-hint">
|
112
|
+
<%= render_icon(:delete_page) %>
|
113
|
+
<span class="hint-bubble">
|
114
|
+
<%= Alchemy.t('Your user role does not allow you to edit this page') %>
|
115
|
+
</span>
|
116
|
+
{{/if}}
|
117
|
+
</div>
|
118
|
+
{{#if permissions.create}}
|
119
|
+
<div class="button_with_label sitemap_tool">
|
82
120
|
<%= link_to_dialog(
|
83
|
-
render_icon(
|
121
|
+
render_icon(:add_page),
|
84
122
|
alchemy.new_admin_page_path(parent_id: '__ID__').gsub('__ID__', '{{id}}'),
|
85
123
|
{
|
86
124
|
title: Alchemy.t(:create_page),
|
87
125
|
size: '340x165',
|
88
126
|
overflow: true
|
89
|
-
}
|
90
|
-
title: Alchemy.t(:create_page),
|
91
|
-
class: 'sitemap_tool'
|
127
|
+
}
|
92
128
|
) -%>
|
93
|
-
|
94
|
-
|
129
|
+
<label class="left"><%= Alchemy.t(:create_page) %></label>
|
130
|
+
{{else}}
|
131
|
+
<div class="sitemap_tool disabled with-hint">
|
132
|
+
<%= render_icon(:add_page) %>
|
133
|
+
<span class="hint-bubble">
|
134
|
+
<%= Alchemy.t('Your user role does not allow you to edit this page') %>
|
135
|
+
</span>
|
136
|
+
{{/if}}
|
137
|
+
</div>
|
95
138
|
<%- end -%>
|
96
139
|
</div>
|
97
140
|
<div class="page_infos" id="page_<%= page.id %>_infos">
|
98
|
-
<span class="page_status
|
99
|
-
|
100
|
-
|
141
|
+
<span class="page_status with-hint">
|
142
|
+
<span class="icon {{#unless public}}not_{{/unless}}public"></span>
|
143
|
+
<span class="hint-bubble">{{status_titles.public}}</span>
|
144
|
+
</span>
|
145
|
+
<span class="page_status with-hint">
|
146
|
+
<span class="icon {{#unless visible}}not_{{/unless}}visible"></span>
|
147
|
+
<span class="hint-bubble">{{status_titles.visible}}</span>
|
148
|
+
</span>
|
149
|
+
<span class="page_status with-hint">
|
150
|
+
<span class="icon {{#unless restricted}}not_{{/unless}}restricted"></span>
|
151
|
+
<span class="hint-bubble">{{status_titles.restricted}}</span>
|
152
|
+
</span>
|
101
153
|
</div>
|
102
|
-
|
103
|
-
{{
|
104
|
-
<span class="sitemap_pagename_link inactive">{{ name }}</span>
|
105
|
-
<span class="redirect_url" title="{{urlname}}">
|
154
|
+
{{#if redirects_to_external}}
|
155
|
+
<div class="redirect_url" title="{{urlname}}">
|
106
156
|
» <%= Alchemy.t('Redirects to') %>:
|
107
157
|
{{ external_urlname }}
|
108
|
-
</
|
158
|
+
</div>
|
159
|
+
{{/if}}
|
160
|
+
<div class="sitemap_sitename">
|
161
|
+
{{#if redirects_to_external}}
|
162
|
+
<span class="sitemap_pagename_link inactive">{{ name }}</span>
|
109
163
|
{{else}}
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
164
|
+
{{#if permissions.edit_content}}
|
165
|
+
<%= link_to_unless(
|
166
|
+
@sorting,
|
167
|
+
'{{name}}',
|
168
|
+
alchemy.edit_admin_page_path(page),
|
169
|
+
title: Alchemy.t(:edit_page),
|
170
|
+
class: "sitemap_pagename_link"
|
171
|
+
) { content_tag('span', '{{name}}', class: "sitemap_pagename_link") } -%>
|
172
|
+
{{else}}
|
173
|
+
<%= content_tag('span', '{{name}}', class: "sitemap_pagename_link") %>
|
174
|
+
{{/if}}
|
117
175
|
{{/if}}
|
118
176
|
</div>
|
119
177
|
</div>
|
@@ -5,6 +5,7 @@
|
|
5
5
|
</div>
|
6
6
|
<div class="sitemap_right_tools">
|
7
7
|
{{#unless redirects_to_external}}
|
8
|
+
<div class="button_with_label sitemap_tool">
|
8
9
|
<%= link_to render_icon(:element_window),
|
9
10
|
alchemy.list_admin_elements_path(page_id: '__ID__').gsub('__ID__', '{{id}}'),
|
10
11
|
remote: true,
|
@@ -12,9 +13,10 @@
|
|
12
13
|
'page-id' => '{{id}}',
|
13
14
|
url: @url_prefix + '{{urlname}}'
|
14
15
|
},
|
15
|
-
class: "show_elements_to_link
|
16
|
-
title: Alchemy.t(:show_elements_from_page)
|
16
|
+
class: "show_elements_to_link"
|
17
17
|
%>
|
18
|
+
<label class="left"><%= Alchemy.t(:show_elements_from_page) %></label>
|
19
|
+
</div>
|
18
20
|
{{/unless}}
|
19
21
|
</div>
|
20
22
|
<div class="page_infos">
|
@@ -1,12 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
page.public
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
page.visible
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
page.restricted
|
12
|
-
|
1
|
+
<span class="page_status with-hint">
|
2
|
+
<%= render_icon page.public? ? :public : :not_public %>
|
3
|
+
<span class="hint-bubble"><%= page.status_title(:public) %></span>
|
4
|
+
</span>
|
5
|
+
<span class="page_status with-hint">
|
6
|
+
<%= render_icon page.visible? ? :visible : :not_visible %>
|
7
|
+
<span class="hint-bubble"><%= page.status_title(:visible) %></span>
|
8
|
+
</span>
|
9
|
+
<span class="page_status with-hint">
|
10
|
+
<%= render_icon page.restricted? ? :restricted : :not_restricted %>
|
11
|
+
<span class="hint-bubble"><%= page.status_title(:restricted) %></span>
|
12
|
+
</span>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<% checkbox = check_box_tag :page_public, nil, @page.public?, name: nil,
|
2
|
+
data: {date_format: I18n.t(:datetimepicker, scope: 'time.formats')},
|
3
|
+
disabled: @page.attribute_fixed?(:public_on) %>
|
4
|
+
|
5
|
+
<label class="checkbox">
|
6
|
+
<% if @page.attribute_fixed?(:public_on) || @page.attribute_fixed?(:public_until) %>
|
7
|
+
<span class="with-hint">
|
8
|
+
<%= checkbox %>
|
9
|
+
<%= Alchemy::Page.human_attribute_name :public %>
|
10
|
+
<span class="hint-bubble">
|
11
|
+
<%= Alchemy.t(:attribute_fixed) %>
|
12
|
+
</span>
|
13
|
+
</span>
|
14
|
+
<% else %>
|
15
|
+
<%= checkbox %>
|
16
|
+
<%= Alchemy::Page.human_attribute_name :public %>
|
17
|
+
<% end %>
|
18
|
+
</label>
|
19
|
+
|
20
|
+
<%= content_tag :div, class: [
|
21
|
+
@page.public_on.present? || @page.public_until.present? ? nil : 'hidden',
|
22
|
+
'page-publication-date-fields',
|
23
|
+
'input-row'
|
24
|
+
] do %>
|
25
|
+
<div class="input-column">
|
26
|
+
<label><%= Alchemy.t(:from) %></label>
|
27
|
+
<%= alchemy_datepicker @page, :public_on, type: :datetime,
|
28
|
+
disabled: @page.attribute_fixed?(:public_on) %>
|
29
|
+
</div>
|
30
|
+
<div class="input-column">
|
31
|
+
<label><%= Alchemy.t(:until) %></label>
|
32
|
+
<%= alchemy_datepicker @page, :public_until, type: :datetime,
|
33
|
+
disabled: @page.attribute_fixed?(:public_until) %>
|
34
|
+
</div>
|
35
|
+
<% end %>
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<% content_for(:title) { @page.name } %>
|
2
2
|
|
3
|
+
<% content_for(:main_menu_style) { 'collapsed-menu' } %>
|
4
|
+
|
3
5
|
<% content_for(:toolbar) do %>
|
4
6
|
<div class="toolbar_buttons">
|
5
7
|
<div class="button_with_label">
|
@@ -31,7 +33,6 @@
|
|
31
33
|
},
|
32
34
|
{
|
33
35
|
class: 'icon_button',
|
34
|
-
title: Alchemy.t(:page_infos),
|
35
36
|
'data-alchemy-hotkey' => 'alt+i'
|
36
37
|
}
|
37
38
|
) %>
|
@@ -75,6 +76,10 @@
|
|
75
76
|
<% end %>
|
76
77
|
</div>
|
77
78
|
<% end %>
|
79
|
+
<% if @page.has_hint? %>
|
80
|
+
<div class="toolbar_spacer"></div>
|
81
|
+
<%= render_hint_for(@page) %>
|
82
|
+
<% end %>
|
78
83
|
<div class="toolbar_spacer"></div>
|
79
84
|
<div class="select_with_label">
|
80
85
|
<label><%= Alchemy.t(:preview_size) %></label>
|
@@ -107,6 +112,11 @@
|
|
107
112
|
<% if Alchemy::Tinymce.custom_config_contents(@page).present? %>
|
108
113
|
<%= render 'tinymce_custom_config' %>
|
109
114
|
<% end %>
|
115
|
+
|
116
|
+
<% content_for :javascript_includes do %>
|
117
|
+
<meta name="turbolinks-cache-control" content="no-cache">
|
118
|
+
<% end %>
|
119
|
+
|
110
120
|
<script type="text/javascript" charset="utf-8">
|
111
121
|
|
112
122
|
$(function() {
|
@@ -117,7 +127,6 @@
|
|
117
127
|
});
|
118
128
|
Alchemy.Sitemap.watchPagePublicationState();
|
119
129
|
Alchemy.PageLeaveObserver();
|
120
|
-
Alchemy.PreviewWindow.init('<%= admin_page_path(@page) %>');
|
121
130
|
Alchemy.ElementsWindow.init('<%= alchemy.admin_elements_path(page_id: @page.id) %>', {
|
122
131
|
texts: {
|
123
132
|
title: '<%= Alchemy.t("Elements") %>',
|
@@ -176,6 +185,8 @@
|
|
176
185
|
}
|
177
186
|
});
|
178
187
|
|
188
|
+
Alchemy.PreviewWindow.init('<%= admin_page_path(@page) %>');
|
189
|
+
|
179
190
|
$('#preview_size').bind('open.selectBoxIt', function (e) {
|
180
191
|
$('#top_menu').css('z-index', 5000);
|
181
192
|
});
|
@@ -45,9 +45,9 @@
|
|
45
45
|
</div>
|
46
46
|
<div class="js_filter_field_box">
|
47
47
|
<%= text_field_tag 'filter', '',
|
48
|
-
class: 'thin_border js_filter_field',
|
49
|
-
|
50
|
-
|
48
|
+
class: 'thin_border js_filter_field search_input_field',
|
49
|
+
placeholder: Alchemy.t(:search),
|
50
|
+
id: nil %>
|
51
51
|
<%= render_icon :search %>
|
52
52
|
<%= link_to('', '#', {
|
53
53
|
class: "js_filter_field_clear",
|
@@ -72,11 +72,6 @@
|
|
72
72
|
|
73
73
|
<h1 id="page_filter_result"></h1>
|
74
74
|
|
75
|
-
<h2 id="sitemap_heading">
|
76
|
-
<span class="page_name"><%= Alchemy.t('Name') %></span>
|
77
|
-
<span class="page_infos"><%= Alchemy.t('Status') %></span>
|
78
|
-
</h2>
|
79
|
-
|
80
75
|
<%= render 'sitemap', page_partial: 'page', full: !!@sorting %>
|
81
76
|
|
82
77
|
<% elsif can?(:create, Alchemy::Page) %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<div class="value">
|
8
8
|
<label>
|
9
9
|
<% if @page.definition.blank? %>
|
10
|
-
|
10
|
+
<%= page_layout_missing_warning %>
|
11
11
|
<% end %>
|
12
12
|
<%= Alchemy::Page.human_attribute_name(:page_layout) %>
|
13
13
|
</label>
|
@@ -24,7 +24,20 @@
|
|
24
24
|
</div>
|
25
25
|
<div class="value">
|
26
26
|
<label><%= Alchemy.t(:page_status) %></label>
|
27
|
-
<p
|
27
|
+
<p>
|
28
|
+
<span class="page_status">
|
29
|
+
<%= render_icon @page.public? ? :public : :not_public %>
|
30
|
+
<%= @page.status_title(:public) %>
|
31
|
+
</span>
|
32
|
+
<span class="page_status">
|
33
|
+
<%= render_icon @page.visible? ? :visible : :not_visible %>
|
34
|
+
<%= @page.status_title(:visible) %>
|
35
|
+
</span>
|
36
|
+
<span class="page_status">
|
37
|
+
<%= render_icon @page.restricted? ? :restricted : :not_restricted %>
|
38
|
+
<%= @page.status_title(:restricted) %>
|
39
|
+
</span>
|
40
|
+
</p>
|
28
41
|
</div>
|
29
42
|
<div class="value">
|
30
43
|
<label><%= Alchemy.t(:page_was_created) %></label>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
$('#sitemap').replaceWith('<%= j render('sitemap', page_partial: 'page', full: true) %>');
|
1
|
+
$('#sitemap-wrapper').replaceWith('<%= j render('sitemap', page_partial: 'page', full: true) %>');
|
2
2
|
$('#sort_panel').show();
|
3
3
|
$('#sitemap_heading').css({'padding-top': 102});
|
4
4
|
Alchemy.pleaseWaitOverlay(false);
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<% if @while_page_edit -%>
|
10
10
|
|
11
11
|
Alchemy.reloadPreview();
|
12
|
-
$('#page_<%= @page.id %>_status').replaceWith('<%= j render("
|
12
|
+
$('#page_<%= @page.id %>_status').replaceWith('<%= j render("current_page", current_page: @page) %>');
|
13
13
|
|
14
14
|
<% else -%>
|
15
15
|
|
@@ -18,19 +18,6 @@
|
|
18
18
|
var tree = JSON.parse('<%== @tree.to_json %>');
|
19
19
|
var html = compiler(tree.pages[0]);
|
20
20
|
$('#page_<%= @page.id %>').replaceWith(html);
|
21
|
-
$page = $('#page_<%= @page.id %>');
|
22
|
-
|
23
|
-
<% if @page.locked? && @page.locker == current_alchemy_user -%>
|
24
|
-
$('#locked_page_<%= @page.id %> > a').html('<%= @page.name %>');
|
25
|
-
<% end -%>
|
26
|
-
|
27
|
-
<% if @page.restricted? -%>
|
28
|
-
$('.page_status:nth-child(3)', $page).addClass('restricted', 'not_restricted').removeClass('not_restricted');
|
29
|
-
<% elsif @page.redirects_to_external? -%>
|
30
|
-
$('span.redirect_url', $page).html('» <%= Alchemy.t("Redirects to") %>: <%= h @page.external_urlname %>');
|
31
|
-
<% else -%>
|
32
|
-
$('.page_status:nth-child(3)', $page).addClass('not_restricted').removeClass('restricted');
|
33
|
-
<% end -%>
|
34
21
|
|
35
22
|
<% end -%>
|
36
23
|
|