{% set topMenu = _args.topMenu|default(false) %}
{% embed '@ui2022/schoolnow/side__menu--alt.html.twig' with {
header: not topMenu ? 'Settings' : null,
items: [
topMenu ? ({
header: null,
items: [
cms.impersonatedAccount is empty ? {
title: 'Logout',
link: path('app.platform.security.logout'),
} : {
title: 'Stop Impersonation',
link: path('app.schoolnow.dashboard.default.main', { _switch_user: '_exit' }),
},
is_granted('campussuite.cms.me.sites') ? {
title: 'Teacher Websites',
link: path('cms.container.dashboard.container.index_personal'),
} : null,
],
}) : null,
{
header: 'Account set-up',
permission: 'app.schools.admin',
items: [
{
title: 'Schools',
link: path('app.app.dashboard.settings.schools.list'),
active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.schools.'),
},
{
title: 'Branding',
link: path('app.app.dashboard.settings.branding.list'),
active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.branding.'),
},
{
title: 'Mobile App',
link: path('app.app.dashboard.settings.mobile.list'),
active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.mobile.'),
},
{
title: 'Accessibility',
link: path('products.ada.dashboard.default.main'),
active: (app.request.attributes.get('_route') starts with 'products.ada.'),
permission: null,
},
],
},
{
header: 'Users and groups',
permission: 'app.security.admin',
items: [
{
title: 'User accounts',
link: path('app.app.dashboard.settings.accounts.main'),
active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.accounts.'),
},
{
title: 'Groups',
link: path('app.app.dashboard.settings.groups.main'),
active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.groups.'),
},
{
title: 'Roles',
link: path('app.app.dashboard.settings.roles.main'),
active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.roles.'),
},
],
},
{
header: 'Messages',
permission: 'app.notifications.automations.admin',
items: [
{
title: 'Auto Notices',
link: path('app.app.dashboard.settings.automations.main'),
active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.automations.'),
},
],
},
{
header: 'Social media',
permission: 'app.social.admin',
items: [
{
title: 'Connections',
link: path('cms.tenant.dashboard.social.main'),
active: (app.request.attributes.get('_route') starts with 'cms.tenant.dashboard.social'),
},
],
},
],
} %}
{% block header %}
{% if not topMenu and is_granted('campussuite.root') and cms is defined and cms.tenant %}
<a href="{{ path('platform.control_panel.dashboard.tenant.index') }}" style="width: 100%;">
<div class="aside__user py-3 mb-4 mt-0 bg-lighter">
<img class="rounded-circle" src="/ui2022/cs-logo-square.png" width="50" height="50"/>
<span class="aside__userdetails">
<span class="aside__username text-headstyle">{{ cms.tenant.name }}</span>
<span class="aside__usertitle font-weight-bold text-{{- first_of({
'muted': app.environment is same as('prod'),
'info': app.environment is same as('test'),
'orange': app.environment is same as('dev'),
}) -}}">{{ app.environment|upper }}</span>
</span>
</div>
</a>
{% endif %}
{{ parent() }}
{% endblock %}
{% endembed %}