alchemy_cms 3.3.3 → 3.4.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +42 -4
- data/README.md +7 -3
- data/alchemy_cms.gemspec +1 -0
- data/app/assets/javascripts/alchemy/{alchemy.js → admin.js} +1 -2
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +28 -25
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +1 -0
- data/app/assets/javascripts/alchemy/alchemy.i18n.js.coffee +7 -1
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +26 -0
- data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +56 -1
- data/app/assets/stylesheets/alchemy/_variables.scss +1 -0
- data/app/assets/stylesheets/alchemy/admin.scss +2 -1
- data/app/assets/stylesheets/alchemy/archive.scss +7 -0
- data/app/assets/stylesheets/alchemy/base.scss +0 -42
- data/app/assets/stylesheets/alchemy/buttons.scss +2 -1
- data/app/assets/stylesheets/alchemy/form_fields.scss +9 -0
- data/app/assets/stylesheets/alchemy/forms.scss +36 -10
- data/app/assets/stylesheets/alchemy/frame.scss +12 -1
- data/app/assets/stylesheets/alchemy/icons.scss +1 -1
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +0 -260
- data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +507 -0
- data/app/assets/stylesheets/alchemy/lists.scss +62 -0
- data/app/assets/stylesheets/alchemy/selects.scss +9 -2
- data/app/assets/stylesheets/alchemy/sitemap.scss +28 -51
- data/app/assets/stylesheets/alchemy/toolbar.scss +0 -2
- data/app/controllers/alchemy/admin/attachments_controller.rb +4 -6
- data/app/controllers/alchemy/admin/base_controller.rb +2 -2
- data/app/controllers/alchemy/admin/dashboard_controller.rb +2 -2
- data/app/controllers/alchemy/admin/languages_controller.rb +5 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +14 -5
- data/app/controllers/alchemy/admin/resources_controller.rb +17 -1
- data/app/controllers/alchemy/base_controller.rb +1 -0
- data/app/controllers/alchemy/messages_controller.rb +1 -1
- data/app/controllers/alchemy/pages_controller.rb +16 -26
- data/app/controllers/alchemy/pictures_controller.rb +23 -10
- data/app/controllers/concerns/alchemy/page_redirects.rb +7 -7
- data/app/helpers/alchemy/admin/base_helper.rb +22 -19
- data/app/helpers/alchemy/admin/essences_helper.rb +26 -11
- data/app/helpers/alchemy/admin/pages_helper.rb +2 -1
- data/app/helpers/alchemy/essences_helper.rb +0 -35
- data/app/helpers/alchemy/url_helper.rb +1 -1
- data/app/mailers/alchemy/base_mailer.rb +18 -0
- data/app/mailers/alchemy/{messages.rb → messages_mailer.rb} +1 -1
- data/app/models/alchemy/attachment.rb +9 -0
- data/app/models/alchemy/cell.rb +1 -1
- data/app/models/alchemy/essence_picture.rb +4 -1
- data/app/models/alchemy/essence_picture_view.rb +68 -0
- data/app/models/alchemy/language.rb +8 -10
- data/app/models/alchemy/language/code.rb +4 -1
- data/app/models/alchemy/page.rb +69 -26
- data/app/models/alchemy/page/page_natures.rb +22 -0
- data/app/models/alchemy/page/page_scopes.rb +20 -6
- data/app/models/alchemy/picture.rb +37 -4
- data/app/models/alchemy/site.rb +8 -0
- data/app/serializers/alchemy/page_tree_serializer.rb +1 -1
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +9 -6
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +11 -9
- data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +32 -0
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +14 -2
- data/app/views/alchemy/admin/attachments/index.html.erb +10 -9
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +20 -9
- data/app/views/alchemy/admin/dashboard/_recent_pages.html.erb +11 -1
- data/app/views/alchemy/admin/languages/_form.html.erb +1 -0
- data/app/views/alchemy/admin/languages/index.html.erb +7 -8
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -1
- data/app/views/alchemy/admin/layoutpages/index.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_current_page.html.erb +4 -0
- data/app/views/alchemy/admin/pages/_form.html.erb +16 -1
- data/app/views/alchemy/admin/pages/_locked_page.html.erb +2 -12
- data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page_for_links.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_page_status.html.erb +23 -11
- data/app/views/alchemy/admin/pages/edit.html.erb +2 -1
- data/app/views/alchemy/admin/pages/index.html.erb +2 -2
- data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +3 -0
- data/app/views/alchemy/admin/partials/_site_select.html.erb +9 -0
- data/app/views/alchemy/admin/pictures/_picture.html.erb +6 -1
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +2 -1
- data/app/views/alchemy/admin/pictures/show.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +31 -0
- data/app/views/alchemy/admin/resources/_form.html.erb +6 -0
- data/app/views/alchemy/admin/resources/_tag_list.html.erb +16 -0
- data/app/views/alchemy/admin/resources/index.html.erb +13 -1
- data/app/views/alchemy/essences/_essence_file_view.html.erb +2 -5
- data/app/views/alchemy/essences/_essence_picture_view.html.erb +5 -3
- data/app/views/alchemy/{messages → messages_mailer}/contact_form_mail.de.text.erb +0 -0
- data/app/views/alchemy/{messages → messages_mailer}/contact_form_mail.en.text.erb +0 -0
- data/app/views/alchemy/{messages → messages_mailer}/contact_form_mail.es.text.erb +0 -0
- data/app/views/alchemy/{messages → messages_mailer}/new.html.erb +0 -0
- data/app/views/layouts/alchemy/admin.html.erb +3 -8
- data/config/alchemy/config.yml +4 -3
- data/config/initializers/assets.rb +2 -2
- data/config/initializers/dragonfly.rb +3 -0
- data/config/initializers/mime_types.rb +1 -0
- data/config/locales/alchemy.de.yml +10 -2
- data/config/locales/alchemy.en.yml +6 -2
- data/config/locales/alchemy.es.yml +6 -3
- data/config/locales/alchemy.fr.yml +6 -2
- data/config/locales/alchemy.it.yml +937 -0
- data/config/locales/alchemy.nl.yml +6 -2
- data/config/locales/alchemy.ru.yml +3 -2
- data/config/locales/simple_form.it.yml +25 -0
- data/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb +32 -0
- data/db/migrate/20160422195310_add_image_file_format_to_alchemy_pictures.rb +21 -0
- data/db/migrate/20160617224938_change_alchemy_pages_locked_to_locked_at.rb +22 -0
- data/lib/alchemy/ability_helper.rb +23 -0
- data/lib/alchemy/configuration_methods.rb +2 -2
- data/lib/alchemy/controller_actions.rb +4 -33
- data/lib/alchemy/engine.rb +1 -0
- data/lib/alchemy/resource.rb +30 -13
- data/lib/alchemy/resources_helper.rb +17 -0
- data/lib/alchemy/test_support/factories/page_factory.rb +7 -2
- data/lib/alchemy/upgrader.rb +1 -0
- data/lib/alchemy/upgrader/tasks/install_asset_manifests.rb +15 -0
- data/lib/alchemy/upgrader/three_point_four.rb +16 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/rails/generators/alchemy/elements/elements_generator.rb +8 -7
- data/lib/rails/generators/alchemy/essence/essence_generator.rb +2 -6
- data/lib/rails/generators/alchemy/install/files/all.css +11 -0
- data/lib/rails/generators/alchemy/install/files/all.js +11 -0
- data/lib/rails/generators/alchemy/install/files/{alchemy.elements.css.scss → article.scss} +0 -0
- data/lib/rails/generators/alchemy/install/install_generator.rb +20 -19
- data/lib/rails/generators/alchemy/module/module_generator.rb +3 -5
- data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +7 -6
- data/lib/rails/generators/alchemy/site_layouts/site_layouts_generator.rb +7 -6
- data/vendor/assets/javascripts/date-formatter.js +161 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.datetimepicker.full.min.js +2 -0
- data/vendor/assets/javascripts/tinymce/langs/it.js +219 -0
- metadata +48 -13
- data/app/assets/javascripts/alchemy/alchemy.custom.js +0 -1
- data/app/assets/stylesheets/alchemy/custom.scss +0 -1
data/app/models/alchemy/site.rb
CHANGED
@@ -44,6 +44,14 @@ module Alchemy
|
|
44
44
|
"alchemy/site_layouts/#{partial_name}"
|
45
45
|
end
|
46
46
|
|
47
|
+
# The default language for this site
|
48
|
+
#
|
49
|
+
# There can only be one default language per site.
|
50
|
+
#
|
51
|
+
def default_language
|
52
|
+
languages.find_by(default: true)
|
53
|
+
end
|
54
|
+
|
47
55
|
class << self
|
48
56
|
def current=(v)
|
49
57
|
RequestStore.store[:alchemy_current_site] = v
|
@@ -57,7 +57,7 @@ module Alchemy
|
|
57
57
|
page_layout: page.page_layout,
|
58
58
|
slug: page.slug,
|
59
59
|
redirects_to_external: page.redirects_to_external?,
|
60
|
-
locked: page.locked
|
60
|
+
locked: page.locked?,
|
61
61
|
definition_missing: page.definition.blank?,
|
62
62
|
urlname: page.urlname,
|
63
63
|
external_urlname: page.external_urlname,
|
@@ -13,15 +13,18 @@
|
|
13
13
|
<% end %>
|
14
14
|
<%= render 'alchemy/admin/partials/remote_search_form' %>
|
15
15
|
</div>
|
16
|
+
|
16
17
|
<div id="assign_file_list" class="with_padding<%= params[:tagged_with].present? ? ' filtered' : '' %>">
|
17
|
-
<% if any_tags = Alchemy::Attachment.tag_counts.any? %>
|
18
18
|
<div id="library_sidebar">
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
<%= render 'filter_bar' %>
|
20
|
+
|
21
|
+
<% if Alchemy::Attachment.tag_counts.any? %>
|
22
|
+
<div class="tag-list">
|
23
|
+
<%= render 'tag_list' %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
22
26
|
</div>
|
23
|
-
|
24
|
-
<div id="overlay_file_list" class="<%= any_tags ? 'with_tag_list' : nil %>">
|
27
|
+
<div id="overlay_file_list" class="with_tag_list">
|
25
28
|
<%= render 'overlay_file_list' %>
|
26
29
|
</div>
|
27
30
|
</div>
|
@@ -1,15 +1,17 @@
|
|
1
1
|
<li class="assign_file_file <%= cycle('even', 'odd') %>">
|
2
|
-
<%= link_to(
|
3
|
-
render_icon(file_to_assign.icon_css_class) + file_to_assign.name,
|
4
|
-
{
|
5
|
-
controller: 'essence_files',
|
6
|
-
action: 'assign',
|
2
|
+
<%= link_to alchemy.assign_admin_essence_files_path(
|
7
3
|
attachment_id: file_to_assign.id,
|
8
4
|
content_id: @content.id,
|
9
5
|
options: @options.to_json
|
10
|
-
|
6
|
+
),
|
11
7
|
remote: true,
|
12
|
-
method: 'put'
|
13
|
-
|
14
|
-
|
8
|
+
method: 'put' do %>
|
9
|
+
<span class="list-primary">
|
10
|
+
<%= render_icon(file_to_assign.icon_css_class) %>
|
11
|
+
<%= file_to_assign.name %>
|
12
|
+
</span>
|
13
|
+
<span class="list-secondary">
|
14
|
+
<%= mime_to_human(file_to_assign.file_mime_type) %>
|
15
|
+
</span>
|
16
|
+
<% end %>
|
15
17
|
</li>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<% params_to_keep = [:tagged_with, :q, :content_id, :options] %>
|
2
|
+
|
3
|
+
<div id="filter_bar">
|
4
|
+
<h2><%= Alchemy.t('Filter') %></h2>
|
5
|
+
<%= select_tag(
|
6
|
+
'file_type_filter',
|
7
|
+
options_for_select(
|
8
|
+
Alchemy::Attachment.file_types_for_select,
|
9
|
+
params[:file_type]
|
10
|
+
),
|
11
|
+
include_blank: Alchemy.t('Show all files'),
|
12
|
+
data: { remote: !!request.xhr? },
|
13
|
+
class: 'alchemy_selectbox'
|
14
|
+
) %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
$(function() {
|
19
|
+
$('#file_type_filter').on('change', function(e) {
|
20
|
+
var $this = $(this);
|
21
|
+
var url = '<%= alchemy.admin_attachments_path(merge_params_only(params_to_keep)).html_safe %>';
|
22
|
+
if ($this.data('remote') === true) {
|
23
|
+
$.get(url, {file_type: $this.val()}, null, 'script');
|
24
|
+
} else {
|
25
|
+
Alchemy.pleaseWaitOverlay();
|
26
|
+
delimiter = url.match(/\?/) ? '&' : '?';
|
27
|
+
window.location = url + delimiter + 'file_type=' + encodeURIComponent($this.val());
|
28
|
+
}
|
29
|
+
return false;
|
30
|
+
});
|
31
|
+
});
|
32
|
+
</script>
|
@@ -1,10 +1,22 @@
|
|
1
1
|
<% if @attachments.empty? %>
|
2
2
|
<div class="info">
|
3
3
|
<%= render_icon('info') %>
|
4
|
-
|
4
|
+
<% if params[:q].present? %>
|
5
|
+
<%= Alchemy.t(:no_search_results) %>
|
6
|
+
<% else %>
|
7
|
+
<%= Alchemy.t(:no_files_in_archive) %>
|
8
|
+
<% end %>
|
5
9
|
</div>
|
6
10
|
<% else %>
|
7
|
-
<ul>
|
11
|
+
<ul class="list">
|
12
|
+
<li class="list-header">
|
13
|
+
<span class="list-primary">
|
14
|
+
<%= Alchemy::Attachment.human_attribute_name('name') %>
|
15
|
+
</span>
|
16
|
+
<span class="list-secondary">
|
17
|
+
<%= Alchemy::Attachment.human_attribute_name('file_mime_type') %>
|
18
|
+
</span>
|
19
|
+
</li>
|
8
20
|
<%= render partial: 'file_to_assign', collection: @attachments %>
|
9
21
|
</ul>
|
10
22
|
<%= paginate @attachments, theme: 'alchemy', remote: true %>
|
@@ -1,5 +1,3 @@
|
|
1
|
-
<% any_tags = Alchemy::Attachment.tag_counts.any? %>
|
2
|
-
|
3
1
|
<% content_for(:toolbar) do %>
|
4
2
|
<div class="toolbar_buttons">
|
5
3
|
<% if can? :create, Alchemy::Attachment %>
|
@@ -12,14 +10,17 @@
|
|
12
10
|
<%= render 'alchemy/admin/partials/search_form' %>
|
13
11
|
<% end %>
|
14
12
|
|
15
|
-
<div id="archive_all" class="
|
13
|
+
<div id="archive_all" class="with_tag_filter resources-table-wrapper">
|
16
14
|
<%= resources_header %>
|
17
|
-
<%= render
|
18
|
-
|
15
|
+
<%= render 'files_list' %>
|
16
|
+
|
19
17
|
<div id="library_sidebar">
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
<%= render 'filter_bar' %>
|
19
|
+
|
20
|
+
<% if Alchemy::Attachment.tag_counts.any? %>
|
21
|
+
<div class="<%= params[:tagged_with].present? ? 'tag-list filtered' : 'tag-list' %>">
|
22
|
+
<%= render 'tag_list' %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
23
25
|
</div>
|
24
|
-
<% end %>
|
25
26
|
</div>
|
@@ -8,28 +8,39 @@
|
|
8
8
|
<% else %>
|
9
9
|
<% @all_locked_pages.each do |page| %>
|
10
10
|
<tr class="<%= cycle('even', 'odd', :name => 'locked_pages') %>">
|
11
|
-
<% if current_alchemy_user.id == page.locked_by %>
|
12
11
|
<td>
|
12
|
+
<% if current_alchemy_user.id == page.locked_by %>
|
13
13
|
<%= link_to(page.name, alchemy.edit_admin_page_path(page)) %>
|
14
|
+
<% else %>
|
15
|
+
<%= page.name %>
|
16
|
+
<% end %>
|
17
|
+
</td>
|
18
|
+
<% if multi_site? %>
|
19
|
+
<td>
|
20
|
+
<small><%= page.site_name %></small>
|
14
21
|
</td>
|
22
|
+
<% end %>
|
15
23
|
<td>
|
24
|
+
<% if page.site_languages.many? %>
|
25
|
+
<small><%= page.language.code.upcase %></small>
|
26
|
+
<% end %>
|
27
|
+
</td>
|
28
|
+
<td>
|
29
|
+
<% if current_alchemy_user.id == page.locked_by %>
|
16
30
|
<small><%= Alchemy.t(:me) %></small>
|
31
|
+
<% else %>
|
32
|
+
<small><%= page.locker_name %></small>
|
33
|
+
<% end %>
|
17
34
|
</td>
|
18
35
|
<td>
|
36
|
+
<% if current_alchemy_user.id == page.locked_by %>
|
19
37
|
<%= form_tag(alchemy.unlock_admin_page_path(page, :redirect_to => alchemy.admin_dashboard_url)) do %>
|
20
38
|
<button class="icon_button small" title="<%= Alchemy.t(:explain_unlocking) %>">
|
21
39
|
<%= render_icon('close small') %>
|
22
40
|
</button>
|
23
41
|
<% end %>
|
42
|
+
<% end %>
|
24
43
|
</td>
|
25
|
-
<% else %>
|
26
|
-
<td>
|
27
|
-
<%= page.name %>
|
28
|
-
</td>
|
29
|
-
<td colspan="2">
|
30
|
-
<small><%= page.locker_name %></small>
|
31
|
-
</td>
|
32
|
-
<% end %>
|
33
44
|
</tr>
|
34
45
|
<% end %>
|
35
46
|
<% end %>
|
@@ -11,8 +11,18 @@
|
|
11
11
|
<td>
|
12
12
|
<%= link_to_if((page.locked_by.blank? || page.locked_by == current_alchemy_user.id), page.name, edit_admin_page_path(page)) %>
|
13
13
|
</td>
|
14
|
+
<% if multi_site? %>
|
14
15
|
<td>
|
15
|
-
<small><%=
|
16
|
+
<small><%= page.site_name %></small>
|
17
|
+
</td>
|
18
|
+
<% end %>
|
19
|
+
<td>
|
20
|
+
<% if page.site_languages.many? %>
|
21
|
+
<small><%= page.language.code.upcase %></small>
|
22
|
+
<% end %>
|
23
|
+
</td>
|
24
|
+
<td>
|
25
|
+
<small><%= l(page.updated_at, format: :short) %></small>
|
16
26
|
</td>
|
17
27
|
</tr>
|
18
28
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% label_title = Alchemy.t("Create #{resource_name}", default: Alchemy.t('Create')) %>
|
2
2
|
|
3
|
-
<% toolbar
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
<% content_for :toolbar do %>
|
4
|
+
<div class="toolbar_buttons">
|
5
|
+
<%= render 'alchemy/admin/partials/site_select' %>
|
6
|
+
<%= toolbar_button icon: 'create',
|
7
7
|
label: label_title,
|
8
8
|
url: new_resource_path,
|
9
9
|
title: label_title,
|
@@ -12,10 +12,9 @@
|
|
12
12
|
title: label_title,
|
13
13
|
size: "430x415"
|
14
14
|
},
|
15
|
-
if_permitted_to: [:create,
|
16
|
-
|
17
|
-
|
18
|
-
) %>
|
15
|
+
if_permitted_to: [:create, Alchemy::Language] %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
19
18
|
|
20
19
|
<div id="archive_all" class="resources-table-wrapper">
|
21
20
|
<%= resources_header %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<li class="page_level_<%= layoutpage.level %>" id="page_<%= layoutpage.id %>">
|
2
|
-
<div class="sitemap_page<%= layoutpage.locked ? ' locked' : '' %>">
|
2
|
+
<div class="sitemap_page<%= layoutpage.locked? ? ' locked' : '' %>">
|
3
3
|
<div class="sitemap_left_images">
|
4
4
|
<% if layoutpage.definition.blank? %>
|
5
5
|
<span class="inline warning icon" title="<%= Alchemy.t(:page_definition_missing) %>"></span>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% content_for :toolbar do %>
|
2
2
|
<div class="toolbar_buttons">
|
3
|
-
<%= render
|
4
|
-
|
3
|
+
<%= render 'alchemy/admin/partials/site_select' %>
|
4
|
+
<%= render 'alchemy/admin/partials/language_tree_select' %>
|
5
5
|
<%= toolbar_button(
|
6
6
|
icon: 'add_page',
|
7
7
|
url: alchemy.new_admin_page_path(parent_id: @layout_root.id, layoutpage: true),
|
@@ -8,9 +8,24 @@
|
|
8
8
|
<label class="control-label"><%= Alchemy.t(:page_status) %></label>
|
9
9
|
<div class="control_group">
|
10
10
|
<label class="checkbox">
|
11
|
-
<%=
|
11
|
+
<%= check_box_tag :page_public, nil, @page.public?, name: nil,
|
12
|
+
data: {date_format: I18n.t(:datetimepicker, scope: 'time.formats')} %>
|
12
13
|
<%= f.object.class.human_attribute_name :public %>
|
13
14
|
</label>
|
15
|
+
<%= content_tag :div, class: [
|
16
|
+
@page.public_on.present? || @page.public_until.present? ? nil : 'hidden',
|
17
|
+
'page-publication-date-fields',
|
18
|
+
'input-row'
|
19
|
+
] do %>
|
20
|
+
<div class="input-column">
|
21
|
+
<label><%= Alchemy.t(:from) %></label>
|
22
|
+
<%= alchemy_datepicker @page, :public_on, type: :datetime %>
|
23
|
+
</div>
|
24
|
+
<div class="input-column">
|
25
|
+
<label><%= Alchemy.t(:until) %></label>
|
26
|
+
<%= alchemy_datepicker @page, :public_until, type: :datetime %>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
14
29
|
<label class="checkbox">
|
15
30
|
<%= f.check_box :visible %>
|
16
31
|
<%= f.object.class.human_attribute_name :visible %>
|
@@ -1,19 +1,9 @@
|
|
1
1
|
<% if @page == locked_page %>
|
2
|
-
<%= render '
|
2
|
+
<%= render 'alchemy/admin/pages/current_page', current_page: @page %>
|
3
3
|
<% else %>
|
4
4
|
<div class="subnavi_tab wide" id="locked_page_<%= locked_page.id %>">
|
5
5
|
<%= link_to alchemy.edit_admin_page_path(locked_page) do %>
|
6
|
-
|
7
|
-
<span class="inline warning icon" title="<%= Alchemy.t(:page_definition_missing) %>"></span>
|
8
|
-
<% end %>
|
9
|
-
<span class="page_name" title="<%= locked_page.name %>">
|
10
|
-
<%= truncate locked_page.name, length: 15 %>
|
11
|
-
</span>
|
12
|
-
<%- if multi_language? -%>
|
13
|
-
<span class="page_language" title="<%= locked_page.language.name %>">
|
14
|
-
<%= locked_page.language_code %>
|
15
|
-
</span>
|
16
|
-
<%- end -%>
|
6
|
+
<%= render 'alchemy/admin/pages/page_status', page: locked_page, truncate: true %>
|
17
7
|
<% end %>
|
18
8
|
<%= form_tag(alchemy.unlock_admin_page_path(locked_page), remote: true) do %>
|
19
9
|
<button class="icon_button small" title="<%= Alchemy.t(:explain_unlocking) %>">
|
@@ -43,7 +43,7 @@
|
|
43
43
|
alchemy.configure_admin_page_path(page),
|
44
44
|
{
|
45
45
|
title: Alchemy.t(:edit_page_properties),
|
46
|
-
size: page.redirects_to_external? ? '450x330' : '
|
46
|
+
size: page.redirects_to_external? ? '450x330' : '450x680'
|
47
47
|
},
|
48
48
|
title: Alchemy.t(:edit_page_properties),
|
49
49
|
class: 'sitemap_tool'
|
@@ -5,14 +5,14 @@
|
|
5
5
|
</div>
|
6
6
|
<div class="sitemap_right_tools">
|
7
7
|
{{#unless redirects_to_external}}
|
8
|
-
<%= link_to
|
8
|
+
<%= link_to render_icon(:element_window),
|
9
9
|
alchemy.list_admin_elements_path(page_id: '__ID__').gsub('__ID__', '{{id}}'),
|
10
10
|
remote: true,
|
11
11
|
data: {
|
12
12
|
'page-id' => '{{id}}',
|
13
13
|
url: @url_prefix + '{{urlname}}'
|
14
14
|
},
|
15
|
-
class: "show_elements_to_link",
|
15
|
+
class: "show_elements_to_link sitemap_tool",
|
16
16
|
title: Alchemy.t(:show_elements_from_page)
|
17
17
|
%>
|
18
18
|
{{/unless}}
|
@@ -1,12 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% if page.definition.blank? %>
|
2
|
+
<span class="inline warning icon" title="<%= Alchemy.t(:page_definition_missing) %>"></span>
|
3
|
+
<% end %>
|
4
|
+
<span class="page_name" title="<%= page.name %>">
|
5
|
+
<% if local_assigns[:truncate] %>
|
6
|
+
<%= truncate page.name, length: 15 %>
|
7
|
+
<% else %>
|
8
|
+
<%= page.name %>
|
4
9
|
<% end %>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
</span>
|
11
|
+
<%- if multi_site? -%>
|
12
|
+
<span class="page_site" title="<%= page.site_name %>">
|
13
|
+
<% if local_assigns[:truncate] %>
|
14
|
+
<%= truncate page.site_name, length: 15 %>
|
15
|
+
<% else %>
|
16
|
+
<%= page.site_name %>
|
17
|
+
<% end %>
|
18
|
+
</span>
|
19
|
+
<%- end -%>
|
20
|
+
<%- if page.site_languages.many? -%>
|
21
|
+
<span class="page_language" title="<%= page.language.name %>">
|
22
|
+
<%= page.language_code %>
|
23
|
+
</span>
|
24
|
+
<%- end -%>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
alchemy.configure_admin_page_path(@page),
|
57
57
|
{
|
58
58
|
title: Alchemy.t(:edit_page_properties),
|
59
|
-
size: '
|
59
|
+
size: '450x680'
|
60
60
|
},
|
61
61
|
class: :icon_button,
|
62
62
|
title: Alchemy.t(:edit_page_properties),
|
@@ -115,6 +115,7 @@
|
|
115
115
|
if (!not_dirty) Alchemy.pleaseWaitOverlay(false);
|
116
116
|
return not_dirty;
|
117
117
|
});
|
118
|
+
Alchemy.Sitemap.watchPagePublicationState();
|
118
119
|
Alchemy.PageLeaveObserver();
|
119
120
|
Alchemy.PreviewWindow.init('<%= admin_page_path(@page) %>');
|
120
121
|
Alchemy.ElementsWindow.init('<%= alchemy.admin_elements_path(page_id: @page.id) %>', {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% content_for :toolbar do %>
|
2
2
|
<div class="toolbar_buttons">
|
3
|
-
<%= render
|
4
|
-
|
3
|
+
<%= render 'alchemy/admin/partials/site_select' %>
|
4
|
+
<%= render 'alchemy/admin/partials/language_tree_select' %>
|
5
5
|
<% if can?(:flush, Alchemy::Page) %>
|
6
6
|
<div class="button_with_label">
|
7
7
|
<%= link_to(
|
@@ -1,3 +1,4 @@
|
|
1
|
+
<%- if multi_language? -%>
|
1
2
|
<div class="button_with_label">
|
2
3
|
<%= form_tag switch_language_admin_pages_path, method: 'get' do %>
|
3
4
|
<%= select_tag(
|
@@ -9,3 +10,5 @@
|
|
9
10
|
<% end %>
|
10
11
|
<label><%= Alchemy.t("Language tree") %></label>
|
11
12
|
</div>
|
13
|
+
<div class="toolbar_spacer"></div>
|
14
|
+
<% end %>
|