%- content_for(:subnav_additions) do -%>
<%- unless @locked_pages.blank? -%>
<%- @locked_pages.each do |page| -%>
<%= link_to alchemy.edit_admin_page_path(page) do %>
<%= truncate page.name, :length => 15 %>
<% end %>
<%= form_tag(alchemy.unlock_admin_page_path(page), :remote => true) do %>
<% end %>
<%- end -%>
<%- end -%>
<%- end -%>
<%- content_for :toolbar do -%>
<%= select_tag(
'language',
options_for_select(@languages.map { |l| [l.name, l.id] }, session[:language_id]),
:onchange => %(
Alchemy.pleaseWaitOverlay();
jQuery.get('/admin/pages/switch_language', {
language_id: this.value
});
),
:class => 'short'
) %>
<%- permitted_to?(:flush, :alchemy_admin_pages) do -%>
<%= link_to(
render_icon('flush'),
alchemy.flush_admin_pages_path,
:remote => true,
:method => :post,
:class => 'icon_button please_wait',
:title => t('Flush page cache')
) -%>
<%- end -%>
<%- permitted_to?(:sort, :alchemy_admin_pages) do -%>
<%= link_to(
render_icon('sort'),
alchemy.sort_admin_pages_path,
:complete => '',
:method => :get,
:remote => true,
:class => 'icon_button please_wait',
:title => t('Sort pages')
) -%>
<%- end -%>
<%= link_to_overlay_window(
render_icon("clipboard#{clipboard_empty?('pages') ? '' : ' full'}"),
alchemy.admin_clipboard_path(:remarkable_type => 'pages'),
{
:title => t('Clipboard'),
:size => '380x270'
},
:class => 'icon_button',
:title => t('Show clipboard')
) -%>
<%- end -%>
<%- if @page_root -%>
<%= t('Name') %>
<%= t('Status') %>
<%= render_icon('info') %>
<%= t('Explain|Sitemap|Dragndrop sorting') %>
<%= link_to( t('cancel'), alchemy.admin_pages_path, :class => 'button' ) %>
<%= submit_tag( t('save order'), :id => 'save_page_order', :class => 'button' ) %>
<%= render :partial => 'sitemap' %>
<%- else -%>
<%= render :partial => 'create_language_form' %>
<%- end -%>