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.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +42 -4
  4. data/README.md +7 -3
  5. data/alchemy_cms.gemspec +1 -0
  6. data/app/assets/javascripts/alchemy/{alchemy.js → admin.js} +1 -2
  7. data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +28 -25
  8. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +1 -0
  9. data/app/assets/javascripts/alchemy/alchemy.i18n.js.coffee +7 -1
  10. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +1 -1
  11. data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +26 -0
  12. data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +56 -1
  13. data/app/assets/stylesheets/alchemy/_variables.scss +1 -0
  14. data/app/assets/stylesheets/alchemy/admin.scss +2 -1
  15. data/app/assets/stylesheets/alchemy/archive.scss +7 -0
  16. data/app/assets/stylesheets/alchemy/base.scss +0 -42
  17. data/app/assets/stylesheets/alchemy/buttons.scss +2 -1
  18. data/app/assets/stylesheets/alchemy/form_fields.scss +9 -0
  19. data/app/assets/stylesheets/alchemy/forms.scss +36 -10
  20. data/app/assets/stylesheets/alchemy/frame.scss +12 -1
  21. data/app/assets/stylesheets/alchemy/icons.scss +1 -1
  22. data/app/assets/stylesheets/alchemy/jquery-ui.scss +0 -260
  23. data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +507 -0
  24. data/app/assets/stylesheets/alchemy/lists.scss +62 -0
  25. data/app/assets/stylesheets/alchemy/selects.scss +9 -2
  26. data/app/assets/stylesheets/alchemy/sitemap.scss +28 -51
  27. data/app/assets/stylesheets/alchemy/toolbar.scss +0 -2
  28. data/app/controllers/alchemy/admin/attachments_controller.rb +4 -6
  29. data/app/controllers/alchemy/admin/base_controller.rb +2 -2
  30. data/app/controllers/alchemy/admin/dashboard_controller.rb +2 -2
  31. data/app/controllers/alchemy/admin/languages_controller.rb +5 -0
  32. data/app/controllers/alchemy/admin/pages_controller.rb +14 -5
  33. data/app/controllers/alchemy/admin/resources_controller.rb +17 -1
  34. data/app/controllers/alchemy/base_controller.rb +1 -0
  35. data/app/controllers/alchemy/messages_controller.rb +1 -1
  36. data/app/controllers/alchemy/pages_controller.rb +16 -26
  37. data/app/controllers/alchemy/pictures_controller.rb +23 -10
  38. data/app/controllers/concerns/alchemy/page_redirects.rb +7 -7
  39. data/app/helpers/alchemy/admin/base_helper.rb +22 -19
  40. data/app/helpers/alchemy/admin/essences_helper.rb +26 -11
  41. data/app/helpers/alchemy/admin/pages_helper.rb +2 -1
  42. data/app/helpers/alchemy/essences_helper.rb +0 -35
  43. data/app/helpers/alchemy/url_helper.rb +1 -1
  44. data/app/mailers/alchemy/base_mailer.rb +18 -0
  45. data/app/mailers/alchemy/{messages.rb → messages_mailer.rb} +1 -1
  46. data/app/models/alchemy/attachment.rb +9 -0
  47. data/app/models/alchemy/cell.rb +1 -1
  48. data/app/models/alchemy/essence_picture.rb +4 -1
  49. data/app/models/alchemy/essence_picture_view.rb +68 -0
  50. data/app/models/alchemy/language.rb +8 -10
  51. data/app/models/alchemy/language/code.rb +4 -1
  52. data/app/models/alchemy/page.rb +69 -26
  53. data/app/models/alchemy/page/page_natures.rb +22 -0
  54. data/app/models/alchemy/page/page_scopes.rb +20 -6
  55. data/app/models/alchemy/picture.rb +37 -4
  56. data/app/models/alchemy/site.rb +8 -0
  57. data/app/serializers/alchemy/page_tree_serializer.rb +1 -1
  58. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +9 -6
  59. data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +11 -9
  60. data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +32 -0
  61. data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +14 -2
  62. data/app/views/alchemy/admin/attachments/index.html.erb +10 -9
  63. data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +20 -9
  64. data/app/views/alchemy/admin/dashboard/_recent_pages.html.erb +11 -1
  65. data/app/views/alchemy/admin/languages/_form.html.erb +1 -0
  66. data/app/views/alchemy/admin/languages/index.html.erb +7 -8
  67. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -1
  68. data/app/views/alchemy/admin/layoutpages/index.html.erb +2 -2
  69. data/app/views/alchemy/admin/pages/_current_page.html.erb +4 -0
  70. data/app/views/alchemy/admin/pages/_form.html.erb +16 -1
  71. data/app/views/alchemy/admin/pages/_locked_page.html.erb +2 -12
  72. data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
  73. data/app/views/alchemy/admin/pages/_page_for_links.html.erb +2 -2
  74. data/app/views/alchemy/admin/pages/_page_status.html.erb +23 -11
  75. data/app/views/alchemy/admin/pages/edit.html.erb +2 -1
  76. data/app/views/alchemy/admin/pages/index.html.erb +2 -2
  77. data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +3 -0
  78. data/app/views/alchemy/admin/partials/_site_select.html.erb +9 -0
  79. data/app/views/alchemy/admin/pictures/_picture.html.erb +6 -1
  80. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +2 -1
  81. data/app/views/alchemy/admin/pictures/show.html.erb +1 -1
  82. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +31 -0
  83. data/app/views/alchemy/admin/resources/_form.html.erb +6 -0
  84. data/app/views/alchemy/admin/resources/_tag_list.html.erb +16 -0
  85. data/app/views/alchemy/admin/resources/index.html.erb +13 -1
  86. data/app/views/alchemy/essences/_essence_file_view.html.erb +2 -5
  87. data/app/views/alchemy/essences/_essence_picture_view.html.erb +5 -3
  88. data/app/views/alchemy/{messages → messages_mailer}/contact_form_mail.de.text.erb +0 -0
  89. data/app/views/alchemy/{messages → messages_mailer}/contact_form_mail.en.text.erb +0 -0
  90. data/app/views/alchemy/{messages → messages_mailer}/contact_form_mail.es.text.erb +0 -0
  91. data/app/views/alchemy/{messages → messages_mailer}/new.html.erb +0 -0
  92. data/app/views/layouts/alchemy/admin.html.erb +3 -8
  93. data/config/alchemy/config.yml +4 -3
  94. data/config/initializers/assets.rb +2 -2
  95. data/config/initializers/dragonfly.rb +3 -0
  96. data/config/initializers/mime_types.rb +1 -0
  97. data/config/locales/alchemy.de.yml +10 -2
  98. data/config/locales/alchemy.en.yml +6 -2
  99. data/config/locales/alchemy.es.yml +6 -3
  100. data/config/locales/alchemy.fr.yml +6 -2
  101. data/config/locales/alchemy.it.yml +937 -0
  102. data/config/locales/alchemy.nl.yml +6 -2
  103. data/config/locales/alchemy.ru.yml +3 -2
  104. data/config/locales/simple_form.it.yml +25 -0
  105. data/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb +32 -0
  106. data/db/migrate/20160422195310_add_image_file_format_to_alchemy_pictures.rb +21 -0
  107. data/db/migrate/20160617224938_change_alchemy_pages_locked_to_locked_at.rb +22 -0
  108. data/lib/alchemy/ability_helper.rb +23 -0
  109. data/lib/alchemy/configuration_methods.rb +2 -2
  110. data/lib/alchemy/controller_actions.rb +4 -33
  111. data/lib/alchemy/engine.rb +1 -0
  112. data/lib/alchemy/resource.rb +30 -13
  113. data/lib/alchemy/resources_helper.rb +17 -0
  114. data/lib/alchemy/test_support/factories/page_factory.rb +7 -2
  115. data/lib/alchemy/upgrader.rb +1 -0
  116. data/lib/alchemy/upgrader/tasks/install_asset_manifests.rb +15 -0
  117. data/lib/alchemy/upgrader/three_point_four.rb +16 -0
  118. data/lib/alchemy/version.rb +1 -1
  119. data/lib/rails/generators/alchemy/elements/elements_generator.rb +8 -7
  120. data/lib/rails/generators/alchemy/essence/essence_generator.rb +2 -6
  121. data/lib/rails/generators/alchemy/install/files/all.css +11 -0
  122. data/lib/rails/generators/alchemy/install/files/all.js +11 -0
  123. data/lib/rails/generators/alchemy/install/files/{alchemy.elements.css.scss → article.scss} +0 -0
  124. data/lib/rails/generators/alchemy/install/install_generator.rb +20 -19
  125. data/lib/rails/generators/alchemy/module/module_generator.rb +3 -5
  126. data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +7 -6
  127. data/lib/rails/generators/alchemy/site_layouts/site_layouts_generator.rb +7 -6
  128. data/vendor/assets/javascripts/date-formatter.js +161 -0
  129. data/vendor/assets/javascripts/jquery_plugins/jquery.datetimepicker.full.min.js +2 -0
  130. data/vendor/assets/javascripts/tinymce/langs/it.js +219 -0
  131. metadata +48 -13
  132. data/app/assets/javascripts/alchemy/alchemy.custom.js +0 -1
  133. data/app/assets/stylesheets/alchemy/custom.scss +0 -1
@@ -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
- <div class="tag-list">
20
- <%= render 'tag_list' %>
21
- </div>
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
- <% end %>
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
- title: file_to_assign.name
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
- <%= Alchemy.t(:no_files_in_archive) %>
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="<%= any_tags ? 'with_tag_filter ' : nil %>resources-table-wrapper">
13
+ <div id="archive_all" class="with_tag_filter resources-table-wrapper">
16
14
  <%= resources_header %>
17
- <%= render partial: 'files_list' %>
18
- <% if any_tags %>
15
+ <%= render 'files_list' %>
16
+
19
17
  <div id="library_sidebar">
20
- <div class="<%= params[:tagged_with].present? ? 'tag-list filtered' : 'tag-list' %>">
21
- <%= render partial: 'tag_list' %>
22
- </div>
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><%= l(page.updated_at) %></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 %>
@@ -19,5 +19,6 @@
19
19
  input_html: {class: 'alchemy_selectbox'} %>
20
20
  <%= f.input :public %>
21
21
  <%= f.input :default %>
22
+ <%= f.hidden_field :site_id, value: Alchemy::Site.current.id %>
22
23
  <%= f.submit Alchemy.t(:save) %>
23
24
  <% end %>
@@ -1,9 +1,9 @@
1
1
  <% label_title = Alchemy.t("Create #{resource_name}", default: Alchemy.t('Create')) %>
2
2
 
3
- <% toolbar(
4
- buttons: [
5
- {
6
- icon: 'create',
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, resource_model]
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 partial: 'alchemy/admin/partials/language_tree_select' %>
4
- <div class="toolbar_spacer"></div>
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),
@@ -0,0 +1,4 @@
1
+ <div class="page_status_and_name" id="page_<%= current_page.id %>_status">
2
+ <%= render 'alchemy/admin/pages/page_status', page: current_page %>
3
+ <%= render 'alchemy/admin/pages/page_infos', page: current_page %>
4
+ </div>
@@ -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
- <%= f.check_box :public %>
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 'page_status', page: @page %>
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
- <% if locked_page.definition.blank? %>
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' : '450x720'
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
- <div class="page_status_and_name" id="page_<%= page.id %>_status">
2
- <% if page.definition.blank? %>
3
- <span class="inline warning icon" title="<%= Alchemy.t(:page_definition_missing) %>"></span>
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
- <span class="page_name"><%= page.name %></span>
6
- <%- if multi_language? -%>
7
- <span class="page_language" title="<%= page.language.name %>">
8
- <%= page.language_code %>
9
- </span>
10
- <%- end -%>
11
- <%= render 'alchemy/admin/pages/page_infos', page: page %>
12
- </div>
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: '450x720'
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 :partial => 'alchemy/admin/partials/language_tree_select' %>
4
- <div class="toolbar_spacer"></div>
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 %>