<#if !item.supportsContent()>
<#include "commons/messages.html" />
#if>
<#if item.type.code == "space">
#if>
<#assign itemNoun = i18n("wiki.access.this." + item.type.code)>
<#assign boxTag = ancestors?has_content?then("details", "div")>
<#assign summaryTag = ancestors?has_content?then("summary", "div")>
<${boxTag} class="wiki-access mt-2" id="wikiAccess"
data-noun="${itemNoun}"
data-label-and="#i18n{wiki.access.and}"
data-label-public="#i18n{wiki.access.hint.public}"
data-label-inherited="#i18n{wiki.access.hint.inherited}"
data-label-restricted="<#if item.type.code != 'page'>#i18n{wiki.access.hint.restrictedContainer}<#else>#i18n{wiki.access.hint.restricted}#if>"
data-label-both="#i18n{wiki.access.hint.both}"
data-label-unpublished-parent="#i18n{wiki.access.hint.unpublishedParent}"
data-label-unpublished="#i18n{wiki.access.hint.unpublished}">
<${summaryTag} class="wiki-access-summary">
${i18n("wiki.access.title", itemNoun)}
<#if ancestors?has_content>
#if>
${summaryTag}>
<#if ancestors?has_content>
<#list ancestors as ancestor>
<#assign ancestorId = ancestor.id?c>
<#assign ancestorRole = (ancestor.viewRole?has_content)?then(ancestor.viewRole, 'none')>
<#assign ancestorTitle = (ancestor.currentRevision.title)!ancestor.code>
<#assign ancestorPeople = ancestor_people[ancestorId]!0>
<#assign ancestorPopulations = ancestor_populations[ancestorId]!0>
-
<@accessAncestorLink ancestor ancestorTitle />
<#if ancestorRole != 'none'>
<#assign grantLabels = accessGrantLabels(ancestorPeople, ancestorPopulations)>
${role_labels[ancestorRole]!ancestorRole}<#if grantLabels?has_content> · ${grantLabels?join(", ")}#if>
<#else>
${role_labels[ancestorRole]!ancestorRole}
#if>
<#if !ancestor.published>· #i18n{wiki.access.unpublished}#if>
#list>
-
${itemNoun?cap_first}
#if>
${boxTag}>
<#assign parentEditors = []>
<#list ancestors![] as ancestor>
<#assign ancestorEditRole = (ancestor.editRole?has_content)?then(ancestor.editRole, 'private')>
<#if ancestorEditRole != 'private' || (ancestor_editors[ancestor.id?c]!0) gt 0 || (ancestor_editor_populations[ancestor.id?c]!0) gt 0>
<#assign parentEditors = parentEditors + ['«\xA0' + ((ancestor.currentRevision.title)!ancestor.code) + '\xA0»']>
#if>
#list>
<#if parentEditors?has_content>
<#assign editorNames = (parentEditors?size gt 1)?then(parentEditors[0..parentEditors?size - 2]?join(", ") + " " + i18n("wiki.access.and") + " " + parentEditors?last, parentEditors?first)>
<#assign editHint = i18n("wiki.access.hint.edit", editorNames, itemNoun)>
<#else>
<#assign editHint = i18n("wiki.access.hint.editOnly", itemNoun)>
#if>
<${boxTag} class="wiki-access mt-2">
<${summaryTag} class="wiki-access-summary">
${i18n("wiki.access.editTitle", itemNoun)}
${editHint}
<#if ancestors?has_content>
#if>
${summaryTag}>
<#if ancestors?has_content>
<#list ancestors as ancestor>
<#assign ancestorId = ancestor.id?c>
<#assign ancestorEditRole = (ancestor.editRole?has_content)?then(ancestor.editRole, 'private')>
<#assign ancestorTitle = (ancestor.currentRevision.title)!ancestor.code>
<#assign ancestorEditors = ancestor_editors[ancestorId]!0>
<#assign ancestorEditorPopulations = ancestor_editor_populations[ancestorId]!0>
<#assign editLabels = accessGrantLabels(ancestorEditors, ancestorEditorPopulations)>
<#assign grantsEdit = ancestorEditRole != 'private' || editLabels?has_content>
-
<@accessAncestorLink ancestor ancestorTitle />
${role_labels[ancestorEditRole]!ancestorEditRole}<#if editLabels?has_content> · ${editLabels?join(", ")}#if>
#list>
-
${itemNoun?cap_first}
#if>
${boxTag}>