alchemy_cms 3.0.0.rc5 → 3.0.0.rc6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -5
- data/README.md +32 -5
- data/alchemy_cms.gemspec +1 -1
- data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +3 -3
- data/app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee +19 -0
- data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +5 -0
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +3 -2
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +2 -0
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +2 -26
- data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +2 -0
- data/app/assets/javascripts/alchemy/alchemy.i18n.js.coffee +12 -7
- data/app/assets/javascripts/alchemy/alchemy.js +1 -1
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +33 -4
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +2 -13
- data/app/assets/javascripts/alchemy/{alchemy.tinymce.js.coffee.erb → alchemy.tinymce.js.coffee} +1 -25
- data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +63 -105
- data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +3 -3
- data/app/assets/stylesheets/alchemy/_extends.scss +2 -8
- data/app/assets/stylesheets/alchemy/_mixins.scss +4 -9
- data/app/assets/stylesheets/alchemy/base.scss +6 -6
- data/app/assets/stylesheets/alchemy/buttons.scss +56 -29
- data/app/assets/stylesheets/alchemy/elements.scss +66 -14
- data/app/assets/stylesheets/alchemy/form_fields.scss +39 -6
- data/app/assets/stylesheets/alchemy/forms.scss +32 -0
- data/app/assets/stylesheets/alchemy/frame.scss +44 -44
- data/app/assets/stylesheets/alchemy/icons.scss +2 -2
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +2 -0
- data/app/assets/stylesheets/alchemy/notices.scss +6 -0
- data/app/assets/stylesheets/alchemy/selects.scss +10 -0
- data/app/assets/stylesheets/alchemy/sitemap.scss +8 -10
- data/app/assets/stylesheets/alchemy/toolbar.scss +40 -31
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +11 -22
- data/app/controllers/alchemy/admin/base_controller.rb +14 -1
- data/app/controllers/alchemy/admin/elements_controller.rb +4 -2
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +5 -0
- data/app/controllers/alchemy/admin/legacy_page_urls_controller.rb +39 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +0 -3
- data/app/controllers/alchemy/base_controller.rb +7 -4
- data/app/helpers/alchemy/admin/base_helper.rb +33 -3
- data/app/helpers/alchemy/pages_helper.rb +1 -1
- data/app/models/alchemy/element.rb +6 -4
- data/app/models/alchemy/legacy_page_url.rb +5 -1
- data/app/models/alchemy/message.rb +2 -2
- data/app/models/alchemy/page.rb +8 -9
- data/app/models/alchemy/page/{cells.rb → page_cells.rb} +1 -1
- data/app/models/alchemy/page/{elements.rb → page_elements.rb} +1 -1
- data/app/models/alchemy/page/{naming.rb → page_naming.rb} +33 -18
- data/app/models/alchemy/page/{natures.rb → page_natures.rb} +1 -1
- data/app/models/alchemy/page/{scopes.rb → page_scopes.rb} +1 -1
- data/app/models/alchemy/page/{users.rb → page_users.rb} +13 -1
- data/app/views/alchemy/admin/elements/_add_element_button.html.erb +18 -0
- data/app/views/alchemy/admin/elements/_add_picture.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element.html.erb +12 -11
- data/app/views/alchemy/admin/elements/_new_element_form.html.erb +3 -0
- data/app/views/alchemy/admin/elements/create.js.erb +3 -3
- data/app/views/alchemy/admin/elements/index.html.erb +19 -4
- data/app/views/alchemy/admin/elements/new.html.erb +3 -0
- data/app/views/alchemy/admin/elements/trash.js.erb +16 -12
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -1
- data/app/views/alchemy/admin/layoutpages/edit.html.erb +11 -0
- data/app/views/alchemy/admin/layoutpages/index.html.erb +4 -16
- data/app/views/alchemy/admin/legacy_page_urls/_form.html.erb +5 -0
- data/app/views/alchemy/admin/legacy_page_urls/_label.html.erb +1 -0
- data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +13 -0
- data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +20 -0
- data/app/views/alchemy/admin/legacy_page_urls/create.js.erb +10 -0
- data/app/views/alchemy/admin/legacy_page_urls/destroy.js.erb +6 -0
- data/app/views/alchemy/admin/legacy_page_urls/update.js.erb +2 -0
- data/app/views/alchemy/admin/pages/_form.html.erb +58 -0
- data/app/views/alchemy/admin/pages/_internal_link.html.erb +9 -4
- data/app/views/alchemy/admin/pages/_legacy_urls.html.erb +23 -0
- data/app/views/alchemy/admin/pages/_locked_page.html.erb +21 -0
- data/app/views/alchemy/admin/pages/_page.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_page_status.html.erb +11 -9
- data/app/views/alchemy/admin/pages/_tinymce_custom_config.html.erb +13 -0
- data/app/views/alchemy/admin/pages/configure.html.erb +16 -57
- data/app/views/alchemy/admin/pages/edit.html.erb +64 -66
- data/app/views/alchemy/admin/pages/index.html.erb +9 -19
- data/app/views/alchemy/admin/pages/update.js.erb +1 -1
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +7 -12
- data/app/views/alchemy/admin/partials/_routes.html.erb +25 -0
- data/app/views/alchemy/admin/partials/_search_form.html.erb +10 -12
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +53 -47
- data/app/views/alchemy/admin/pictures/index.html.erb +34 -29
- data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +1 -1
- data/app/views/alchemy/navigation/_link.html.erb +9 -9
- data/app/views/alchemy/pages/show.rss.builder +2 -2
- data/app/views/layouts/alchemy/admin.html.erb +20 -9
- data/bin/alchemy +1 -1
- data/config/alchemy/config.yml +1 -0
- data/config/locales/alchemy.de.yml +15 -1
- data/config/locales/alchemy.en.yml +29 -19
- data/config/locales/alchemy.nl.yml +11 -1
- data/config/routes.rb +2 -1
- data/lib/alchemy/errors.rb +2 -2
- data/lib/alchemy/permissions.rb +2 -0
- data/lib/alchemy/resource.rb +22 -9
- data/lib/alchemy/tinymce.rb +13 -7
- data/lib/alchemy/version.rb +1 -1
- data/spec/controllers/admin/base_controller_spec.rb +39 -0
- data/spec/controllers/admin/elements_controller_spec.rb +17 -14
- data/spec/controllers/admin/pages_controller_spec.rb +1 -2
- data/spec/controllers/pages_controller_spec.rb +7 -3
- data/spec/dummy/app/models/dummy_user.rb +12 -2
- data/spec/features/admin/dashboard_spec.rb +45 -0
- data/spec/features/admin/legacy_page_url_management_spec.rb +62 -0
- data/spec/features/admin/page_editing_feature_spec.rb +66 -6
- data/spec/features/page_feature_spec.rb +13 -0
- data/spec/helpers/admin/base_helper_spec.rb +36 -0
- data/spec/libraries/resource_spec.rb +168 -84
- data/spec/libraries/tinymce_spec.rb +10 -0
- data/spec/models/element_spec.rb +16 -0
- data/spec/models/legacy_page_url_spec.rb +21 -0
- data/spec/models/message_spec.rb +23 -7
- data/spec/models/page_spec.rb +89 -12
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.min.js +1 -0
- metadata +96 -75
- data/app/assets/javascripts/alchemy/alchemy.routes.js.erb +0 -38
- data/spec/models/resource_spec.rb +0 -159
@@ -1,26 +1,14 @@
|
|
1
|
-
<%
|
2
|
-
<%
|
1
|
+
<% if @locked_pages.present? %>
|
2
|
+
<% content_for(:subnav_additions) do %>
|
3
3
|
<label><%= _t('Active Pages') %> »</label>
|
4
|
-
|
5
|
-
<div class="subnavi_tab wide" id="locked_page_<%= page.id %>">
|
6
|
-
<%= link_to alchemy.edit_admin_page_path(page) do %>
|
7
|
-
<span class="page_name" title="<%= page.name %>">
|
8
|
-
<%= truncate page.name, length: 15 %>
|
9
|
-
</span>
|
10
|
-
<% end %>
|
11
|
-
<%= form_tag(alchemy.unlock_admin_page_path(page), remote: true) do %>
|
12
|
-
<button class="icon_button small" title="<%= _t(:explain_unlocking) %>">
|
13
|
-
<%= render_icon('close small') %>
|
14
|
-
</button>
|
15
|
-
<% end %>
|
16
|
-
</div>
|
17
|
-
<% end %>
|
4
|
+
<%= render partial: 'alchemy/admin/pages/locked_page', collection: @locked_pages %>
|
18
5
|
<% end %>
|
19
6
|
<% end %>
|
20
7
|
|
21
8
|
<% content_for :toolbar do %>
|
22
9
|
<div class="toolbar_buttons">
|
23
10
|
<%= render partial: 'alchemy/admin/partials/language_tree_select' %>
|
11
|
+
<div class="toolbar_spacer"></div>
|
24
12
|
<%= toolbar_button(
|
25
13
|
icon: 'add_page',
|
26
14
|
url: alchemy.new_admin_page_path(parent_id: @layout_root.id, layoutpage: true),
|
@@ -0,0 +1 @@
|
|
1
|
+
(<%= count %>) <%= Alchemy::LegacyPageUrl.model_name.human(count: count) %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<tr class="even" id="<%= dom_id(legacy_page_url) %>">
|
2
|
+
<td class="name"><%= legacy_page_url.urlname %></td>
|
3
|
+
<td class="tools">
|
4
|
+
<%= link_to_dialog render_icon(:edit),
|
5
|
+
edit_admin_legacy_page_url_path(legacy_page_url, page_id: @page.id),
|
6
|
+
{size: '400x125', title: _t('Edit link')},
|
7
|
+
{title: _t(:edit)} %>
|
8
|
+
<%= link_to_confirm_dialog render_icon(:destroy),
|
9
|
+
_t('Are you sure?'),
|
10
|
+
admin_legacy_page_url_path(legacy_page_url, page_id: @page.id),
|
11
|
+
{title: _t(:remove)} %>
|
12
|
+
</td>
|
13
|
+
</tr>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%= alchemy_form_for [:admin, @legacy_page_url ||= @page.legacy_urls.build],
|
2
|
+
id: 'new_legacy_page_url' do |f| %>
|
3
|
+
<% if @legacy_page_url.errors.any? %>
|
4
|
+
<%= render_message :error do %>
|
5
|
+
<%= @legacy_page_url.errors.full_messages.join %>
|
6
|
+
<% end %>
|
7
|
+
<% end %>
|
8
|
+
<%= hidden_field_tag :page_id, @page.id %>
|
9
|
+
<div class="inline-input">
|
10
|
+
<div class="left-column">
|
11
|
+
<%= f.text_field :urlname, placeholder: Alchemy::LegacyPageUrl.human_attribute_name(:urlname) %>
|
12
|
+
</div>
|
13
|
+
<div class="right-column">
|
14
|
+
<button class="with_icon">
|
15
|
+
<%= render_icon(:create) %>
|
16
|
+
<%= _t(:add) %>
|
17
|
+
</button>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if @legacy_page_url.valid? %>
|
2
|
+
$('.error.message', '#new_legacy_page_url').remove();
|
3
|
+
$('#legacy_urls_label').text('<%=j render("label", count: @page.legacy_urls.size) %>');
|
4
|
+
$('#legacy_page_url_urlname').val('');
|
5
|
+
$('#no_page_links_notice').hide();
|
6
|
+
$('#legacy_page_urls').append('<%=j render "legacy_page_url", legacy_page_url: @legacy_page_url %>');
|
7
|
+
Alchemy.watchForDialogs('#<%= dom_id(@legacy_page_url) %>');
|
8
|
+
<% else %>
|
9
|
+
$('#new_legacy_page_url').replaceWith('<%=j render("new") %>');
|
10
|
+
<% end %>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<%= alchemy_form_for [:admin, @page], class: 'edit_page' do |f| %>
|
2
|
+
<%= f.input :page_layout, collection: @page_layouts, label: _t(:page_type), include_blank: false, input_html: {class: 'alchemy_selectbox'} %>
|
3
|
+
<div class="input check_boxes">
|
4
|
+
<label class="control-label"><%= _t(:page_status) %></label>
|
5
|
+
<div class="control_group">
|
6
|
+
<label class="checkbox">
|
7
|
+
<%= f.check_box :public %>
|
8
|
+
<%= f.object.class.human_attribute_name :public %>
|
9
|
+
</label>
|
10
|
+
<label class="checkbox">
|
11
|
+
<%= f.check_box :visible %>
|
12
|
+
<%= f.object.class.human_attribute_name :visible %>
|
13
|
+
</label>
|
14
|
+
<label class="checkbox">
|
15
|
+
<%= f.check_box :restricted %>
|
16
|
+
<%= f.object.class.human_attribute_name :restricted %>
|
17
|
+
</label>
|
18
|
+
<% if configuration(:sitemap)['show_flag'] %>
|
19
|
+
<label class="checkbox">
|
20
|
+
<%= f.check_box :sitemap %>
|
21
|
+
<%= f.object.class.human_attribute_name :sitemap %>
|
22
|
+
</label>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
<h2><%= _t(:names) %></h2>
|
27
|
+
<%= f.input :name, autofocus: true %>
|
28
|
+
<%= f.input :urlname, as: 'string', input_html: {value: @page.slug} %>
|
29
|
+
<%= f.input :title,
|
30
|
+
input_html: {'data-alchemy-char-counter' => 60} %>
|
31
|
+
<h2><%= _t(:meta_data) %></h2>
|
32
|
+
<div class="input check_boxes">
|
33
|
+
<label class="control-label"><%= _t(:search_engines) %></label>
|
34
|
+
<div class="control_group">
|
35
|
+
<label class="checkbox">
|
36
|
+
<%= f.check_box :robot_index %>
|
37
|
+
<%= f.object.class.human_attribute_name :robot_index %>
|
38
|
+
</label>
|
39
|
+
<label class="checkbox">
|
40
|
+
<%= f.check_box :robot_follow %>
|
41
|
+
<%= f.object.class.human_attribute_name :robot_follow %>
|
42
|
+
</label>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<%= f.input :meta_description,
|
46
|
+
as: 'text',
|
47
|
+
input_html: {'data-alchemy-char-counter' => 160} %>
|
48
|
+
<%= f.input :meta_keywords,
|
49
|
+
as: 'text',
|
50
|
+
hint: _t('pages.update.comma_seperated') %>
|
51
|
+
<% if @page.taggable? %>
|
52
|
+
<div class="input string">
|
53
|
+
<%= f.label :tag_list %>
|
54
|
+
<%= render 'alchemy/admin/partials/autocomplete_tag_list', f: f %>
|
55
|
+
</div>
|
56
|
+
<% end %>
|
57
|
+
<%= f.submit _t(:save) %>
|
58
|
+
<% end %>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%= form_tag do %>
|
2
2
|
<%= render_message do %>
|
3
3
|
<h2><%= _t(:internal_link_headline) %></h2>
|
4
|
+
<p><%= _t(:internal_link_page_elements_explanation) %></p>
|
5
|
+
<p><%= _t(:internal_link_page_anchors_explanation) %></p>
|
4
6
|
<% end %>
|
5
7
|
<div id="page_selector_container">
|
6
8
|
<% if @page_root %>
|
@@ -9,11 +11,13 @@
|
|
9
11
|
</ul>
|
10
12
|
<% end %>
|
11
13
|
</div>
|
12
|
-
<div class="input
|
13
|
-
<label for="
|
14
|
-
<%= _t(:
|
14
|
+
<div class="input select">
|
15
|
+
<label for="internal_anchor" class="control-label">
|
16
|
+
<%= _t(:anchor) %>
|
15
17
|
</label>
|
16
|
-
<%=
|
18
|
+
<%= select_tag(:internal_anchor,
|
19
|
+
options_for_select([[_t('Please choose'), '']]),
|
20
|
+
class: 'alchemy_selectbox') %>
|
17
21
|
</div>
|
18
22
|
<div class="input text">
|
19
23
|
<label for="internal_link_title" class="control-label">
|
@@ -30,6 +34,7 @@
|
|
30
34
|
class: 'alchemy_selectbox link_target' %>
|
31
35
|
</div>
|
32
36
|
<div class="submit">
|
37
|
+
<%= hidden_field_tag(:internal_urlname) %>
|
33
38
|
<%= hidden_field_tag(:page_anchor) %>
|
34
39
|
<%= link_to _t(:apply), '', class: 'create-link button', 'data-link-type' => 'internal' %>
|
35
40
|
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%= render_message do %>
|
2
|
+
<p><%== _t(:legacy_url_info_text) %></p>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<table class="list" id="legacy_page_urls">
|
6
|
+
<tr>
|
7
|
+
<th class="name">
|
8
|
+
<%= Alchemy::LegacyPageUrl.human_attribute_name(:urlname) %>
|
9
|
+
</th>
|
10
|
+
<th class="tools"></th>
|
11
|
+
</tr>
|
12
|
+
<%= render partial: 'alchemy/admin/legacy_page_urls/legacy_page_url',
|
13
|
+
collection: @page.legacy_urls %>
|
14
|
+
<tr class="even" id="no_page_links_notice" style="display: <%= @page.legacy_urls.any? ? 'none' : 'table-row' %>">
|
15
|
+
<td><%= _t('No page links for this page found') %></td>
|
16
|
+
<td class="tools"></td>
|
17
|
+
</tr>
|
18
|
+
</table>
|
19
|
+
|
20
|
+
<fieldset>
|
21
|
+
<legend><%= _t('Add page link') %></legend>
|
22
|
+
<%= render 'alchemy/admin/legacy_page_urls/new' %>
|
23
|
+
</fieldset>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% if @page == locked_page %>
|
2
|
+
<%= render 'page_status' %>
|
3
|
+
<% else %>
|
4
|
+
<div class="subnavi_tab wide" id="locked_page_<%= locked_page.id %>">
|
5
|
+
<%= link_to alchemy.edit_admin_page_path(locked_page) do %>
|
6
|
+
<span class="page_name" title="<%= locked_page.name %>">
|
7
|
+
<%= truncate locked_page.name, length: 15 %>
|
8
|
+
</span>
|
9
|
+
<%- if multi_language? -%>
|
10
|
+
<span class="page_language" title="<%= locked_page.language.name %>">
|
11
|
+
<%= locked_page.language_code %>
|
12
|
+
</span>
|
13
|
+
<%- end -%>
|
14
|
+
<% end %>
|
15
|
+
<%= form_tag(alchemy.unlock_admin_page_path(locked_page), remote: true) do %>
|
16
|
+
<button class="icon_button small" title="<%= _t(:explain_unlocking) %>">
|
17
|
+
<%= render_icon('close small') %>
|
18
|
+
</button>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
alchemy.configure_admin_page_path(page),
|
27
27
|
{
|
28
28
|
title: _t(:edit_page_properties),
|
29
|
-
size: page.redirects_to_external? ? '
|
29
|
+
size: page.redirects_to_external? ? '450x330' : '450x720'
|
30
30
|
},
|
31
31
|
title: _t(:edit_page_properties),
|
32
32
|
class: 'sitemap_tool'
|
@@ -87,7 +87,7 @@
|
|
87
87
|
<span class="sitemap_pagename_link inactive"><%= page.name %></span>
|
88
88
|
<span class="redirect_url" title="<%= h page.urlname %>">
|
89
89
|
» <%= _t('Redirects to') %>:
|
90
|
-
<%= h page.
|
90
|
+
<%= h page.external_urlname %>
|
91
91
|
</span>
|
92
92
|
<%- else -%>
|
93
93
|
<%= link_to_unless(
|
@@ -1,9 +1,11 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
<span class="page_language"
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
<div class="page_status_and_name" id="page_<%= @page.id %>_status">
|
2
|
+
<span class="page_name"><%= @page.name %></span>
|
3
|
+
<%- if multi_language? -%>
|
4
|
+
<span class="page_language" title="<%= @page.language.name %>">
|
5
|
+
<%= @page.language_code %>
|
6
|
+
</span>
|
7
|
+
<%- end -%>
|
8
|
+
<span class="page_status <%= @page.public ? 'public' : 'not_public' %>" title="<%= @page.status_title(:public) %>"></span>
|
9
|
+
<span class="page_status <%= @page.visible ? 'visible' : 'not_visible' %>" title="<%= @page.status_title(:visible) %>"></span>
|
10
|
+
<span class="page_status <%= @page.restricted ? 'restricted' : 'not_restricted' %>" title="<%= @page.status_title(:restricted) %>"></span>
|
11
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<script>
|
2
|
+
// Holds custom tinymce configurations
|
3
|
+
Alchemy.Tinymce.customConfigs = {};
|
4
|
+
|
5
|
+
// Populate custom tinymce configurations
|
6
|
+
<% Alchemy::Tinymce.custom_config_contents(@page).each do |content| %>
|
7
|
+
Alchemy.Tinymce.customConfigs["<%= content['element'] %>_<%= content['name'] %>"] = {
|
8
|
+
<% content.fetch('settings', {}).fetch('tinymce', {}).each do |k, v| %>
|
9
|
+
<%= k %>: <%== v.to_json %>,
|
10
|
+
<% end %>
|
11
|
+
};
|
12
|
+
<% end %>
|
13
|
+
</script>
|
@@ -1,57 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<%= f.object.class.human_attribute_name :restricted %>
|
18
|
-
</label>
|
19
|
-
<% if configuration(:sitemap)['show_flag'] %>
|
20
|
-
<label class="checkbox">
|
21
|
-
<%= f.check_box :sitemap %>
|
22
|
-
<%= f.object.class.human_attribute_name :sitemap %>
|
23
|
-
</label>
|
24
|
-
<% end %>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
<h2><%= _t(:names) %></h2>
|
28
|
-
<% end %>
|
29
|
-
<%= f.input :name, autofocus: true %>
|
30
|
-
<% unless @page.layoutpage %>
|
31
|
-
<%= f.input :urlname, as: 'string', input_html: {value: @page.slug} %>
|
32
|
-
<%= f.input :title %>
|
33
|
-
<h2><%= _t(:meta_data) %></h2>
|
34
|
-
<div class="input check_boxes">
|
35
|
-
<label class="control-label"><%= _t(:search_engines) %></label>
|
36
|
-
<div class="control_group">
|
37
|
-
<label class="checkbox">
|
38
|
-
<%= f.check_box :robot_index %>
|
39
|
-
<%= f.object.class.human_attribute_name :robot_index %>
|
40
|
-
</label>
|
41
|
-
<label class="checkbox">
|
42
|
-
<%= f.check_box :robot_follow %>
|
43
|
-
<%= f.object.class.human_attribute_name :robot_follow %>
|
44
|
-
</label>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
<%= f.input :meta_description, as: 'text' %>
|
48
|
-
<%= f.input :meta_keywords, as: 'text', hint: _t('pages.update.comma_seperated') %>
|
49
|
-
<% end %>
|
50
|
-
<% if @page.taggable? %>
|
51
|
-
<div class="input string">
|
52
|
-
<%= f.label :tag_list %>
|
53
|
-
<%= render 'alchemy/admin/partials/autocomplete_tag_list', f: f %>
|
54
|
-
</div>
|
55
|
-
<% end %>
|
56
|
-
<%= f.submit _t(:save) %>
|
57
|
-
<% end %>
|
1
|
+
<div id="overlay_tabs">
|
2
|
+
<ul>
|
3
|
+
<li><a href="#page_properties"><%= _t('Properties') %></a></li>
|
4
|
+
<li>
|
5
|
+
<a href="#legacy_urls" id="legacy_urls_label">
|
6
|
+
<%= render 'alchemy/admin/legacy_page_urls/label', count: @page.legacy_urls.size %>
|
7
|
+
</a>
|
8
|
+
</li>
|
9
|
+
</ul>
|
10
|
+
<div id="page_properties">
|
11
|
+
<%= render 'form' %>
|
12
|
+
</div>
|
13
|
+
<div id="legacy_urls">
|
14
|
+
<%= render 'legacy_urls' %>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -2,24 +2,7 @@
|
|
2
2
|
|
3
3
|
<% content_for(:subnav_additions) do %>
|
4
4
|
<label><%= _t('Active Pages') %> »</label>
|
5
|
-
|
6
|
-
<% if @page == page %>
|
7
|
-
<%= render partial: 'page_status' %>
|
8
|
-
<% else %>
|
9
|
-
<div class="subnavi_tab wide" id="locked_page_<%= page.id %>">
|
10
|
-
<%= link_to alchemy.edit_admin_page_path(page) do %>
|
11
|
-
<span class="page_name" title="<%= page.name %>">
|
12
|
-
<%= truncate page.name, length: 15 %>
|
13
|
-
</span>
|
14
|
-
<% end %>
|
15
|
-
<%= form_tag(alchemy.unlock_admin_page_path(page), remote: true) do %>
|
16
|
-
<button class="icon_button small" title="<%= _t(:explain_unlocking) %>">
|
17
|
-
<%= render_icon('close small') %>
|
18
|
-
</button>
|
19
|
-
<% end %>
|
20
|
-
</div>
|
21
|
-
<% end %>
|
22
|
-
<% end %>
|
5
|
+
<%= render partial: 'locked_page', collection: @locked_pages %>
|
23
6
|
<% end %>
|
24
7
|
|
25
8
|
<% content_for(:toolbar) do %>
|
@@ -32,6 +15,7 @@
|
|
32
15
|
<label><%= _t(:unlock_page) %></label>
|
33
16
|
<% end %>
|
34
17
|
</div>
|
18
|
+
<div class="toolbar_spacer"></div>
|
35
19
|
<% unless @page.layoutpage? %>
|
36
20
|
<div class="button_with_label">
|
37
21
|
<%= form_tag alchemy.visit_admin_page_path(@page), id: 'visit_page_form' do %>
|
@@ -59,17 +43,31 @@
|
|
59
43
|
<label><%= _t(:page_infos) %></label>
|
60
44
|
</div>
|
61
45
|
<div class="button_with_label">
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
46
|
+
<% if @page.layoutpage? %>
|
47
|
+
<%= link_to_dialog(
|
48
|
+
render_icon('settings'),
|
49
|
+
alchemy.edit_admin_layoutpage_path(@page),
|
50
|
+
{
|
51
|
+
title: _t(:edit_page_properties),
|
52
|
+
size: '450x170'
|
53
|
+
},
|
54
|
+
class: :icon_button,
|
66
55
|
title: _t(:edit_page_properties),
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
56
|
+
'data-alchemy-hotkey' => 'alt+e'
|
57
|
+
) %>
|
58
|
+
<% else %>
|
59
|
+
<%= link_to_dialog(
|
60
|
+
render_icon('settings'),
|
61
|
+
alchemy.configure_admin_page_path(@page),
|
62
|
+
{
|
63
|
+
title: _t(:edit_page_properties),
|
64
|
+
size: '450x720'
|
65
|
+
},
|
66
|
+
class: :icon_button,
|
67
|
+
title: _t(:edit_page_properties),
|
68
|
+
'data-alchemy-hotkey' => 'alt+e'
|
69
|
+
) %>
|
70
|
+
<% end %>
|
73
71
|
<label><%= _t(:page_properties) %></label>
|
74
72
|
</div>
|
75
73
|
<% if configuration(:cache_pages) && !@page.layoutpage? %>
|
@@ -83,10 +81,13 @@
|
|
83
81
|
</div>
|
84
82
|
<% end %>
|
85
83
|
<div class="toolbar_spacer"></div>
|
86
|
-
<div class="
|
87
|
-
<%= select_tag('preview_size', preview_sizes_for_select, class: 'alchemy_selectbox medium') %>
|
84
|
+
<div class="select_with_label">
|
88
85
|
<label><%= _t(:preview_size) %></label>
|
86
|
+
<%= select_tag 'preview_size',
|
87
|
+
preview_sizes_for_select,
|
88
|
+
class: 'alchemy_selectbox medium' %>
|
89
89
|
</div>
|
90
|
+
<div class="toolbar_spacer"></div>
|
90
91
|
<div class="button_with_label">
|
91
92
|
<%= link_to render_icon(:reload), '#', {
|
92
93
|
title: _t('Reload Preview'),
|
@@ -97,6 +98,35 @@
|
|
97
98
|
</div>
|
98
99
|
</div>
|
99
100
|
<div class="toolbar_buttons right">
|
101
|
+
<% if can?(:create, Alchemy::Element) %>
|
102
|
+
<div class="button_with_label" id="clipboard_button">
|
103
|
+
<%= link_to_dialog(
|
104
|
+
render_icon("clipboard#{clipboard_empty?('elements') ? '' : ' full'}"),
|
105
|
+
alchemy.admin_clipboard_path(remarkable_type: "elements"),
|
106
|
+
{
|
107
|
+
title: _t('Clipboard'),
|
108
|
+
size: '380x305'
|
109
|
+
},
|
110
|
+
{
|
111
|
+
title: _t('Show clipboard'),
|
112
|
+
class: 'icon_button'
|
113
|
+
}
|
114
|
+
) %>
|
115
|
+
<label><%= _t('Show clipboard') %></label>
|
116
|
+
</div>
|
117
|
+
<% end %>
|
118
|
+
<div class="button_with_label" id="element_trash_button">
|
119
|
+
<%= link_to(
|
120
|
+
render_icon("trash#{trash_empty?('elements') ? '' : ' full'}"),
|
121
|
+
'',
|
122
|
+
{
|
123
|
+
title: _t('Show trash'),
|
124
|
+
onclick: "Alchemy.TrashWindow.open(#{@page.id}, '#{_t('Trash')}'); return false",
|
125
|
+
class: 'icon_button'
|
126
|
+
}
|
127
|
+
) %>
|
128
|
+
<label><%= _t('Show trash') %></label>
|
129
|
+
</div>
|
100
130
|
<div class="button_with_label" id="element_window_button">
|
101
131
|
<%= link_to render_icon(:element_window), '', {
|
102
132
|
title: _t('Hide Elements'),
|
@@ -108,6 +138,9 @@
|
|
108
138
|
<% end %>
|
109
139
|
|
110
140
|
<% content_for :javascripts do %>
|
141
|
+
<% if Alchemy::Tinymce.custom_config_contents(@page).any? %>
|
142
|
+
<%= render 'tinymce_custom_config' %>
|
143
|
+
<% end %>
|
111
144
|
<script type="text/javascript" charset="utf-8">
|
112
145
|
|
113
146
|
$(function() {
|
@@ -127,42 +160,7 @@
|
|
127
160
|
cancel_label: '<%= _t("No") %>',
|
128
161
|
hideElements: '<%= _t("Hide Elements") %>',
|
129
162
|
showElements: '<%= _t("Show Elements") %>'
|
130
|
-
}
|
131
|
-
toolbarButtons: [
|
132
|
-
{
|
133
|
-
title: '<%= _t("New Element") %>',
|
134
|
-
label: '<%= _t("New Element") %>',
|
135
|
-
hotkey: 'alt+n',
|
136
|
-
iconClass: 'new_element',
|
137
|
-
onClick: function() {
|
138
|
-
Alchemy.openDialog('<%= alchemy.new_admin_element_path(page_id: @page.id) %>', {
|
139
|
-
title: '<%= _t("New Element") %>',
|
140
|
-
size: '320x125'
|
141
|
-
});
|
142
|
-
}
|
143
|
-
},
|
144
|
-
{
|
145
|
-
title: '<%= _t("Clipboard") %>',
|
146
|
-
label: '<%= _t("Show clipboard") %>',
|
147
|
-
iconClass: 'clipboard<%= clipboard_empty?("elements") ? "" : " full" %>',
|
148
|
-
buttonId: 'clipboard_button',
|
149
|
-
onClick: function() {
|
150
|
-
Alchemy.openDialog('<%= alchemy.admin_clipboard_path(remarkable_type: "elements") %>', {
|
151
|
-
title :'<%= _t("Clipboard") %>',
|
152
|
-
size: '380x305'
|
153
|
-
});
|
154
|
-
}
|
155
|
-
},
|
156
|
-
{
|
157
|
-
title: '<%= _t("Show trash") %>',
|
158
|
-
label: '<%= _t("Show trash") %>',
|
159
|
-
iconClass: 'trash<%= trash_empty?("elements") ? "" : " full" %>',
|
160
|
-
buttonId: 'element_trash_button',
|
161
|
-
onClick: function() {
|
162
|
-
Alchemy.TrashWindow.open(<%= @page.id %>, '<%= _t("Trash") %>');
|
163
|
-
}
|
164
|
-
}
|
165
|
-
]
|
163
|
+
}
|
166
164
|
}, function() {
|
167
165
|
Alchemy.ImageLoader('#element_area');
|
168
166
|
Alchemy.SortableElements(<%= @page.id %>, '<%= form_authenticity_token %>');
|