• <% unless @sorting %> {{#unless root_or_leaf}} <%= link_to( alchemy.fold_admin_page_path(page), remote: true, method: :post, class: "page_folder", title: "{{#if folded}}#{Alchemy.t('Show childpages')}{{else}}#{Alchemy.t('Hide childpages')}{{/if}}", id: "fold_button_{{id}}" ) do %> {{#if folded}} {{else}} {{/if}} <% end %> {{/unless}} <% end %> {{#if definition_missing}} <%= page_layout_missing_warning %> {{else}} {{#if permissions.edit_content}} {{#if locked}} {{locked_notice}} {{else}} {{/if}} {{else}} <%= Alchemy.t('Your user role does not allow you to edit this page') %> {{/if}} {{/if}}
    <%- unless @sorting -%> {{#if permissions.info}}
    <%= link_to_dialog( render_icon('info-circle'), alchemy.info_admin_page_path(page), { title: Alchemy.t(:page_infos), size: '520x290' } ) %> {{else}}
    <%= render_icon('info-circle') %> <%= Alchemy.t('Your user role does not allow you to edit this page') %> {{/if}}
    {{#if permissions.configure}}
    <%= link_to_dialog( render_icon(:cog), alchemy.configure_admin_page_path(page), { title: Alchemy.t(:edit_page_properties), size: page.definition['redirects_to_external'] ? '450x330' : '450x680' } ) -%> {{else}}
    <%= render_icon(:cog) %> <%= Alchemy.t('Your user role does not allow you to edit this page') %> {{/if}}
    {{#if permissions.copy}}
    <%= link_to( render_icon(:copy), alchemy.insert_admin_clipboard_path( remarkable_type: page.class.name.demodulize.underscore.pluralize, remarkable_id: '__ID__', ).gsub('__ID__', '{{id}}'), remote: true, method: 'post' ) %> {{else}}
    <%= render_icon(:copy) %> <%= Alchemy.t('Your user role does not allow you to edit this page') %> {{/if}}
    {{#if permissions.destroy}}
    <%= link_to_confirm_dialog( render_icon(:minus), Alchemy.t(:confirm_to_delete_page), url_for( controller: 'pages', action: 'destroy', id: '__ID__' ).gsub('__ID__', '{{id}}') ) -%> {{else}}
    <%= render_icon(:minus) %> <%= Alchemy.t('Your user role does not allow you to edit this page') %> {{/if}}
    {{#if permissions.create}}
    <%= link_to_dialog( render_icon(:plus), alchemy.new_admin_page_path(parent_id: '__ID__').gsub('__ID__', '{{id}}'), { title: Alchemy.t(:create_page), size: '340x165', overflow: true } ) -%> {{else}}
    <%= render_icon(:plus) %> <%= Alchemy.t('Your user role does not allow you to edit this page') %> {{/if}}
    <%- end -%>
    {{status_titles.public}} {{status_titles.visible}} {{status_titles.restricted}}
    {{#if redirects_to_external}}
    » <%= Alchemy.t('Redirects to') %>: {{ external_urlname }}
    {{/if}}
    {{#if redirects_to_external}} {{ name }} {{else}} {{#if permissions.edit_content}} <%= link_to_unless( @sorting, '{{name}}', alchemy.edit_admin_page_path(page), title: Alchemy.t(:edit_page), class: "sitemap_pagename_link" ) { content_tag('span', '{{name}}', class: "sitemap_pagename_link") } -%> {{else}} <%= content_tag('span', '{{name}}', class: "sitemap_pagename_link") %> {{/if}} {{/if}}
    {{#if children}} <% unless @sorting %>{{#unless folded}}<% end %>
      {{> list}}
    <% unless @sorting %>{{/unless}}<% end %> {{/if}}