<%= sitemapFolderLink(page) unless page.children.blank? || @sorting %>
<%- unless @sorting -%>
<%- permitted_to?(:configure, :alchemy_admin_pages) do -%>
<%= link_to_overlay_window(
render_icon('configure_page'),
alchemy.configure_admin_page_path(page),
{
:title => _t(:edit_page_properties),
:size => page.redirects_to_external? ? '410x270' : '410x655'
},
:class => '',
:title => _t(:edit_page_properties)
) -%>
<%- end -%>
<%- permitted_to?([:new, :destroy, :copy], :alchemy_admin_pages) do -%>
<%- permitted_to?(:copy, :alchemy_admin_pages) do -%>
<%= link_to(
render_icon("copy_page"),
alchemy.insert_admin_clipboard_path(
:remarkable_type => page.class.name.demodulize.underscore.pluralize,
:remarkable_id => page.id
),
:remote => true,
:method => :post,
:class => "",
:title => _t(:copy_page)
) %>
<%- end -%>
<%- permitted_to?(:destroy, :alchemy_admin_pages) do -%>
<%= link_to_confirmation_window(
render_icon('delete_page'),
_t(:confirm_to_delete_page),
url_for(
:controller => 'pages',
:action => 'destroy',
:id => page.id
),
{
:class => "",
:title => _t(:delete_page)
}
) -%>
<%- end -%>
<%- permitted_to?(:new, :alchemy_admin_pages) do -%>
<%= link_to_overlay_window(
render_icon('add_page'),
alchemy.new_admin_page_path(:parent_id => page.id),
{
:title => _t(:create_page),
:size => '340x150',
:overflow => true
},
:class => '',
:title => _t(:create_page)
) -%>
<%- end -%>
<%- end -%>
<%- end -%>
<%= render :partial => 'page_infos', :locals => {:page => page} %>
<%- if page.redirects_to_external? -%>
<%= page.name %>
» <%= _t('Redirects to') %>:
<%= h page.urlname %>
<%- else -%>
<%- cycle_class = cycle('even', 'odd') -%>
<%= link_to_unless(
@sorting,
page.name,
alchemy.edit_admin_page_path(page),
:title => _t(:edit_page),
:class => "sitemap_pagename_link #{cycle_class}"
) { content_tag('span', page.name, :class => "sitemap_pagename_link #{cycle_class}") } -%>
<%- end -%>
<%- if @sorting || (!page.folded?(current_user) && !page.children.empty?) -%>