<#-- The workspace of a page of the site: the tree of the site on the left, the page and its preview in the middle, the inspector on the right (properties, portlets, adding a portlet, child page). The properties and the child page are the blocks of AdminPageJspBean, loaded in their tab on first display (param_block=2 and 5); a link to AdminSite.jsp?param_block=2 or 5 opens the page with that tab open. --> <#assign rootPageId = 1 /> <#assign pagesById = {} /> <#list site_pages![] as item><#assign pagesById = pagesById + { item.pageId?c: item } /> <#assign pagePath = [] /> <#assign pathItem = pagesById[ page.id?c ]! /> <#list 1..64 as guard><#if !pathItem?has_content><#break><#assign pagePath = [ pathItem ] + pagePath /><#assign pathItem = pagesById[ pathItem.parentId?c ]! /> <#assign pathIds = pagePath?map( pathPage -> pathPage.pageId?c ) /> <#-- The properties and the child page tabs, and the button adding a child page, only for the users who may manage the page (AdminPageJspBean) --> <#assign canManagePage = can_manage_page!false /> <#-- The portlets tab for the users who may manage a type of portlet, the add tab for those who may create one (RBAC, AdminPageJspBean); without any tab, the sidebar is left out --> <#assign canManagePortlets = can_manage_portlets!false /> <#assign canAddPortlet = ( portlet_types_list![] )?filter( type -> type.name != '' )?has_content /> <#-- The extensions tab when plugin extend gives the page actions (ExtendableResourcePluginActionManager, extendable_resource_actions_list.html) --> <#assign extendActions = ( extendableResourceActionsHtml!'' )?trim /> <#assign hasExtend = extendActions?has_content /> <#assign hasInspector = canManagePage || canManagePortlets || canAddPortlet || hasExtend /> <#assign activeTab><#if canManagePage><#switch param_block!0><#case 2>properties<#break><#case 5>childpage<#break><#default> <@pageContainer class='lutece-admin-site'> <@pageColumn>
<#-- Tree of the site --> <#-- The page and its preview -->

${page.name} - #i18n{portal.site.adminFeature.admin_site.name}

<#if page_template_info??> #i18n{portal.site.admin_page.labelPageTemplateList} : ${page_template_info.description} <#if page_update_date_info?has_content> #i18n{portal.site.admin_page.labelUpdated} ${page_update_date_info} <#if page.role?? && page.role != 'none'> #i18n{portal.site.admin_page.tabAdminMapRoleReserved} ${page.role} #${page.id}

<@div id='lutece-admin-page-preview' class='d-flex flex-column align-items-center'> <@p class='text-center' params='hidden'><@button id='btn-minimize' buttonIcon='minimize' title='#i18n{portal.site.admin_page.minimize}' params='style="height: 2rem;margin-top: 1rem "' /> <@div id='lutece-admin-site-preview-wrapper' class='d-flex justify-content-center w-100'> <#-- The preview in a browser window (Tabler mockup browser), its address bar giving the public address of the page -->
jsp/site/Portal.jsp?page_id=${page.id} <@button id='iframe-reload' color='action' buttonIcon='reload' title='#i18n{portal.site.admin_page.buttonReloadPreview}' hideTitle=['all'] size='sm' /> <#if page.id != rootPageId> <@aButton id='parent-page' href='jsp/admin/site/AdminSite.jsp?page_id=${page.parentPageId}' color='action' buttonIcon='arrow-up' title='#i18n{portal.site.admin_page.buttonUpToParentPage}' hideTitle=['all'] size='sm' />
<@button id='display-desktop' title='#i18n{portal.site.admin_page.buttonXLargeScreen}' buttonIcon='device-desktop' color='action' class='btn-preview active' hideTitle=['all'] size='sm' /> <@button id='display-laptop' title='#i18n{portal.site.admin_page.buttonLargeScreen}' buttonIcon='device-laptop' color='action' class='btn-preview' hideTitle=['all'] size='sm' /> <@button id='display-tablet' title='#i18n{portal.site.admin_page.buttonTablet}' buttonIcon='device-tablet' color='action' class='btn-preview' hideTitle=['all'] size='sm' /> <@button id='display-phone' title='#i18n{portal.site.admin_page.buttonSmartphone}' buttonIcon='device-mobile' color='action' class='btn-preview' hideTitle=['all'] size='sm' />
<@button id='iframe-fullscreen' color='action' buttonIcon='maximize' title='#i18n{portal.site.admin_page.buttonFullscreen}' hideTitle=['all'] size='sm' />
<#-- Over the preview while it reloads: see luteceSitePreviewBusy -->
<#-- Inspector --> <#if hasInspector>
<#-- The other blocks (search, portlets) stay in the page for the code that reads them --> <#if activeTab == '' && page_block?has_content && ( canManagePage || ![ 2, 5 ]?seq_contains( param_block!0 ) )> <#if page_message !=""> <@initToast> <@addToast content=page_message class='text-bg-warning border-0' /> <#else> <@initToast showAll=false > <@addToast content='#i18n{portal.site.message.pageIdInvalid}' class='text-bg-warning border-0' id='invalid-page-id' />