{% embed '@ui/common/dashboard/sidebar/content.html.twig' %}
{% block content %}
{% embed '@ui/common/dashboard/sidebar/menu.html.twig' %}
{% block items %}
{# everyone gets the dashboard, elements on the dashboard will be hidden as needed #}
{% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
text: 'Dashboard',
path: 'cms.container.dashboard.dashboard.index',
icon: 'dashboard'
} %}
{# process screen, only show to those with access #}
{% if is_granted('campussuite.cms.process.manage') and cms.tenant.stage is not same as(constant('STAGE__LIVE', cms.tenant)) %}
{% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
text: 'Process Checklist',
path: [
'campussuite.cms.tenant.dashboard.process.index',
'campussuite.cms.tenant.dashboard.process.*',
],
icon: 'check-square'
} %}
{% endif %}
{# show link for drafts #}
{% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
text: 'Drafts',
path: [
'cms.workflows.dashboard.drafts.index',
'cms.workflows.dashboard.drafts.*',
'cms.workflows.dashboard.review.*',
],
icon: 'files-o'
} %}
{# sitebuilder, only show to those with access #}
{% if is_granted('campussuite.cms.sitebuilder.manage') %}
{% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
text: 'Site Builder',
path: [
'cms.sitebuilder.default.index',
'cms.sitebuilder.default.*',
],
icon: 'sitemap'
} %}
{% endif %}
{# show link for sites and departments #}
{% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
text: 'Websites',
path: [
'cms.container.dashboard.container.index',
'cms.container.dashboard.domain.favicon',
'cms.container.dashboard.domain.robots',
'cms.container.dashboard.domain.sitemap',
(current is defined and ui_container_type(current) is same as('generic')) ? 'cms.container.dashboard.container.*' : '',
(container is defined and ui_container_type(container) is same as('generic')) ? 'cms.file.dashboard.*' : '',
(container is defined and ui_container_type(container) is same as('generic')) ? 'campussuite.cms.module.dashboard.content.*' : '',
(container is defined and ui_container_type(container) is same as('generic')) ? 'cms.navigation.default.*' : '',
],
icon: 'globe'
} %}
{# show link for intranets #}
{% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
text: 'Intranets',
path: [
'cms.container.dashboard.container.index_intranet',
(current is defined and ui_container_type(current) is same as('intranet')) ? 'cms.container.dashboard.container.*' : '',
(container is defined and ui_container_type(container) is same as('intranet')) ? 'cms.file.dashboard.*' : '',
(container is defined and ui_container_type(container) is same as('intranet')) ? 'campussuite.cms.module.dashboard.content.*' : '',
(container is defined and ui_container_type(container) is same as('intranet')) ? 'cms.navigation.default.*' : '',
],
icon: 'server'
} %}
{# show link for sites and departments #}
{% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
text: 'Teacher Websites',
path: [
'cms.container.dashboard.personal_container.view',
'cms.container.dashboard.container.index_personal',
(current is defined and ui_container_type(current) is same as('personal')) ? 'cms.container.dashboard.container.*' : '',
(container is defined and ui_container_type(container) is same as('personal')) ? 'cms.file.dashboard.*' : '',
(container is defined and ui_container_type(container) is same as('personal')) ? 'campussuite.cms.module.dashboard.content.*' : '',
(container is defined and ui_container_type(container) is same as('personal')) ? 'cms.navigation.default.*' : '',
],
icon: 'users'
} %}
{# show site settings if any permissions match, this is a bit more involved than usual #}
{% if is_granted(
attributes_expression([
'campussuite.cms.theme.manage',
'campussuite.cms.workflows.manage',
'campussuite.cms.tags.manage',
'campussuite.cms.redirects.manage',
'campussuite.cms.locks.manage',
])) %}
{% embed '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
text: 'Site Management',
icon: 'gears',
submenu: true,
path: [
'cms.tag.dashboard.tag.index',
'cms.tag.dashboard.tag.*',
'cms.redirect.dashboard.redirect.*',
'campussuite.cms.lock.*',
'cms.theme.dashboard.template.*',
'cms.theme.dashboard.outer_layout.*',
'cms.theme.dashboard.inner_layout.*',
'cms.theme.dashboard.source.*',
'cms.theme.dashboard.page_template.*',
'cms.workflows.dashboard.workflow.*',
],
} %}
{% block items %}
{% if is_granted('campussuite.cms.theme.manage') %}
{% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
text: 'Design & Layouts',
path: [
'cms.theme.dashboard.template.index',
'cms.theme.dashboard.template.*',
'cms.theme.dashboard.outer_layout.*',
'cms.theme.dashboard.inner_layout.*',
'cms.theme.dashboard.source.*',
]
} %}
{% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
text: 'Content Templates',
path: [
'cms.theme.dashboard.page_template.default',
'cms.theme.dashboard.page_template.*'
]
} %}
{% endif %}
{% if is_granted('campussuite.cms.workflows.manage') %}
{% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
text: 'Workflows',
path: [
'cms.workflows.dashboard.workflow.list',
'cms.workflows.dashboard.workflow.*',
]
} %}
{% endif %}
{% if is_granted('campussuite.cms.tags.manage') %}
{% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
text: 'Tags',
path: 'cms.tag.dashboard.tag.index'
} %}
{% endif %}
{% if is_granted('campussuite.cms.redirects.manage') %}
{% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
text: 'Redirects',
path: 'cms.redirect.dashboard.redirect.index'
} %}
{% endif %}
{% if is_granted('campussuite.cms.locks.manage') %}
{% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
text: 'Content Locks',
path: 'campussuite.cms.lock.index'
} %}
{% endif %}
{% endblock %}
{% endembed %}
{% endif %}
{% endblock %}
{% endembed %}
{% endblock %}
{% endembed %}