{# ┌────────────────────────────────────────────────────────────────────────────────────┐ │ #global-container │ │ ┌─────┐ ┌──────────────────────────────────────────────────────────────────┐ │ │ │ │ │ #page-container │ │ │ │ │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ │ │ │ │ #global-header │ │ │ │ │ │ │ └──────────────────────────────────────────────────────────┘ │ │ │ │ │ │ │ │ │ │ │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ │ │ │ │ #main │ │ │ │ │ # │ │ │ ┌──────────────────────────────────────────────────┐ │ │ │ │ │ g │ │ │ │ #header-container │ │ │ │ │ │ l │ │ │ └──────────────────────────────────────────────────┘ │ │ │ │ │ o │ │ │ │ │ │ │ │ b │ │ │ ┌──────────────────────────────────────────────────┐ │ │ │ │ │ a │ │ │ │ #main-content │ │ │ │ │ │ l │ │ │ │ ┌─────┐ ┌──────────────────────┐ ┌─────┐ │ │ │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │ # │ │ │ │ # │ │ │ │ │ │ │ i │ │ │ │ │ s │ │ │ │ d │ │ │ │ │ │ │ d │ │ │ │ │ i │ │ │ │ e │ │ │ │ │ │ │ e │ │ │ │ │ d │ │ #content │ │ t │ │ │ │ │ │ │ b │ │ │ │ │ e │ │ │ │ a │ │ │ │ │ │ │ a │ │ │ │ │ b │ │ │ │ i │ │ │ │ │ │ │ r │ │ │ │ │ a │ │ │ │ l │ │ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ s │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └─────┘ └──────────────────────┘ └─────┘ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └──────────────────────────────────────────────────┘ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └──────────────────────────────────────────────────────────┘ │ │ │ │ │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ │ │ │ │ #global-footer │ │ │ │ │ │ │ └──────────────────────────────────────────────────────────┘ │ │ │ └─────┘ └──────────────────────────────────────────────────────────────────┘ │ │ │ └────────────────────────────────────────────────────────────────────────────────────┘ #} {% extends "_layouts/basecp" %} {# The CP only supports queue components that implement QueueInterface #} {% set queue = craft.app.queue %} {% js %} {% if queue is instance of("craft\\queue\\QueueInterface") %} Craft.cp.setJobInfo({{ queue.getJobInfo(100)|json_encode|raw }}, false); {% if queue.getHasReservedJobs() %} Craft.cp.trackJobProgress(true); {% elseif queue.getHasWaitingJobs() %} Craft.cp.runQueue(); {% endif %} {% else %} Craft.cp.enableQueue = false; {% endif %} {% endjs %} {% set hasSystemIcon = CraftEdition == CraftPro and craft.rebrand.isIconUploaded %} {% set fullPageForm = (fullPageForm is defined and fullPageForm) %} {% set editionName = craft.app.getEditionName() %} {% set canUpgradeEdition = craft.app.getCanUpgradeEdition() %} {% set licensedEdition = craft.app.getLicensedEdition() %} {% set isTrial = licensedEdition is not same as(null) and licensedEdition is not same as(CraftEdition) %} {% set sidebar = (sidebar ?? block('sidebar') ?? '')|trim %} {% set toolbar = (toolbar ?? block('toolbar') ?? '')|trim %} {% set actionButton = (block('actionButton') ?? '')|trim %} {% set details = (details ?? block('details') ?? '')|trim %} {% set footer = (footer ?? block('footer') ?? '')|trim %} {% set crumbs = crumbs ?? null %} {% set tabs = tabs is defined and tabs|length != 1 ? tabs : null %} {% set mainContentClasses = [ sidebar ? 'has-sidebar', details ? 'has-details', ]|filter %} {% set showHeader = showHeader ?? true %} {% if not showHeader %} {% set bodyClass = (bodyClass ?? [])|explodeClass|push('no-header') -%} {% endif %} {% set mainAttributes = { id: 'main', role: 'main', }|merge(mainAttributes ?? []) %} {% set formActions = craft.cp.prepFormActions(formActions ?? null) %} {% set mainFormAttributes = { id: 'main-form', method: 'post', 'accept-charset': 'UTF-8', novalidate: true, data: { saveshortcut: saveShortcut ?? true, 'saveshortcut-redirect': (saveShortcutRedirect ?? false) ? saveShortcutRedirect|hash : false, 'saveshortcut-scroll': retainScrollOnSaveShortcut ?? false, actions: formActions ?? false, 'confirm-unload': true, delta: view.getIsDeltaRegistrationActive(), }, }|merge(mainFormAttributes ?? [], recursive=true) %} {% set userPhoto %}
{{ tag('img', { width: 30, height: 30, sizes: '30px', srcset: "#{currentUser.getThumbUrl(30)} 30w, #{currentUser.getThumbUrl(60)} 60w", alt: currentUser.getName(), }) }}
{% endset %} {% js at head %} // Remove the hash so the browser doesn't scroll to it window.LOCATION_HASH = document.location.hash ? decodeURIComponent(document.location.hash.substr(1)) : null; history.replaceState(undefined, undefined, window.location.href.match(/^[^#]*/)[0]); {% endjs %} {% block body %}
{% include '_layouts/components/global-sidebar' %}
{% include '_layouts/components/alerts' %} {% include '_layouts/components/notifications' %}
{% if fullPageForm -%}
{{- csrfInput() }} {%- endif %} {% if showHeader %}
{% endif %}
{# sidebar #} {% if sidebar %} {% endif %} {# content-container #}
{% block main %}
{% block tabs %} {% if tabs %}
{% include "_includes/tabs" with { containerAttributes: { id: 'tabs', }, } %}
{% endif %} {% endblock %} {% block content %} {{ content is defined ? content }} {% endblock %} {# footer #} {% if footer %} {% endif %}
{% endblock %}
{% if details is not empty %}
{{ details|raw }}
{% endif %}
{% if fullPageForm -%}
{%- endif %}
{% set fullEditionName = '{edition} edition'|t('app', {edition: editionName}) ~ (isTrial ? ' ' ~ '(trial)'|t('app')) %}
{% endblock %} {% block actionButton %} {% if fullPageForm %}
{% block submitButton %} {% endblock %} {% if formActions ?? false %} {% include '_layouts/components/form-action-menu' %} {% endif %}
{% endif %} {% endblock %} {% if currentUser.can('performUpdates') and not craft.app.updates.getIsUpdateInfoCached() %} {% js %} Craft.cp.checkForUpdates(); {% endjs %} {% endif %}