app/views/alchemy/admin/pages/_sitemap.html.erb in alchemy_cms-5.3.8 vs app/views/alchemy/admin/pages/_sitemap.html.erb in alchemy_cms-6.0.0.b1
- old
+ new
@@ -1,16 +1,17 @@
-<h4 id="sitemap_heading">
- <span class="page_name"><%= Alchemy::Page.human_attribute_name(:name) %></span>
- <span class="page_urlname"><%= Alchemy::Page.human_attribute_name(:urlname) %></span>
- <span class="page_status"><%= Alchemy.t(:page_status) %></span>
-</h4>
-
<div id="sitemap-wrapper">
+ <h4 id="sitemap_heading">
+ <span class="page_name"><%= Alchemy::Page.human_attribute_name(:name) %></span>
+ <span class="page_urlname"><%= Alchemy::Page.human_attribute_name(:urlname) %></span>
+ <span class="page_status"><%= Alchemy.t(:page_status) %></span>
+ </h4>
+
+ <p class="loading"></p>
</div>
<script id="sitemap-template" type="text/x-handlebars-template">
- <ul id="sitemap" class="list">
+ <ul id="sitemap" class="list<%= @sorting ? ' sorting' : nil %>">
{{> list}}
</ul>
</script>
<script id="sitemap-list" type="text/x-handlebars-template">
@@ -19,12 +20,17 @@
{{/each}}
</script>
<script type="text/javascript">
$(function() {
- Alchemy.currentSitemap = new Alchemy.Sitemap({
+ Alchemy.Sitemap.init({
url: '<%= alchemy.tree_admin_pages_path %>',
- page_root_id: <%= @page_root.id %>
+ page_root_id: <%= @page_root.id %>,
+ full: <%= full %>
+ <% if @sorting %>
+ ,ready: function () {
+ Alchemy.PageSorter();
+ }
+ <% end %>
});
- Alchemy.PagePublicationFields();
});
</script>