src/App/Resources/views/dashboard/settings/navbar.html.twig line 1

Open in your IDE?
  1. {% set topMenu = _args.topMenu|default(false) %}
  2. {% embed '@ui2022/schoolnow/side__menu--alt.html.twig' with {
  3.     header: not topMenu ? 'Settings' : null,
  4.     items: [
  5.         topMenu ? ({
  6.             header: null,
  7.             items: [
  8.                 cms.impersonatedAccount is empty ? {
  9.                     title: 'Logout',
  10.                     link: path('app.platform.security.logout'),
  11.                 } : {
  12.                     title: 'Stop Impersonation',
  13.                     link: path('app.schoolnow.dashboard.default.main', { _switch_user: '_exit' }),
  14.                 },
  15.                 is_granted('campussuite.cms.me.sites') ? {
  16.                     title: 'Teacher Websites',
  17.                     link: path('cms.container.dashboard.container.index_personal'),
  18.                 } : null,
  19.             ],
  20.         }) : null,
  21.         {
  22.             header: 'Account set-up',
  23.             permission: 'app.schools.admin',
  24.             items: [
  25.             {
  26.                 title: 'Schools',
  27.                 link: path('app.app.dashboard.settings.schools.list'),
  28.                 active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.schools.'),
  29.             },
  30.             {
  31.                 title: 'Branding',
  32.                 link: path('app.app.dashboard.settings.branding.list'),
  33.                 active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.branding.'),
  34.             },
  35.             {
  36.                 title: 'Mobile App',
  37.                 link: path('app.app.dashboard.settings.mobile.list'),
  38.                 active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.mobile.'),
  39.             },
  40.             {
  41.                 title: 'Accessibility',
  42.                 link: path('products.ada.dashboard.default.main'),
  43.                 active: (app.request.attributes.get('_route') starts with 'products.ada.'),
  44.                 permission: null,
  45.             },
  46.         ],
  47.         },
  48.         {
  49.             header: 'Users and groups',
  50.             permission: 'app.security.admin',
  51.             items: [
  52.             {
  53.                 title: 'User accounts',
  54.                 link: path('app.app.dashboard.settings.accounts.main'),
  55.                 active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.accounts.'),
  56.             },
  57.             {
  58.                 title: 'Groups',
  59.                 link: path('app.app.dashboard.settings.groups.main'),
  60.                 active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.groups.'),
  61.             },
  62.             {
  63.                 title: 'Roles',
  64.                 link: path('app.app.dashboard.settings.roles.main'),
  65.                 active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.roles.'),
  66.             },
  67.         ],
  68.         },
  69.         {
  70.             header: 'Messages',
  71.             permission: 'app.notifications.automations.admin',
  72.             items: [
  73.             {
  74.                 title: 'Auto Notices',
  75.                 link: path('app.app.dashboard.settings.automations.main'),
  76.                 active: (app.request.attributes.get('_route') starts with 'app.app.dashboard.settings.automations.'),
  77.             },
  78.         ],
  79.         },
  80.         {
  81.             header: 'Social media',
  82.             permission: 'app.social.admin',
  83.             items: [
  84.             {
  85.                 title: 'Connections',
  86.                 link: path('cms.tenant.dashboard.social.main'),
  87.                 active: (app.request.attributes.get('_route') starts with 'cms.tenant.dashboard.social'),
  88.             },
  89.         ],
  90.         },
  91.     ],
  92. } %}
  93.     {% block header %}
  94.         {% if not topMenu and is_granted('campussuite.root') and cms is defined and cms.tenant %}
  95.             <a href="{{ path('platform.control_panel.dashboard.tenant.index') }}" style="width: 100%;">
  96.                 <div class="aside__user py-3 mb-4 mt-0 bg-lighter">
  97.                     <img class="rounded-circle" src="/ui2022/cs-logo-square.png" width="50" height="50"/>
  98.                     <span class="aside__userdetails">
  99.                 <span class="aside__username text-headstyle">{{ cms.tenant.name }}</span>
  100.                 <span class="aside__usertitle font-weight-bold text-{{- first_of({
  101.                     'muted': app.environment is same as('prod'),
  102.                     'info': app.environment is same as('test'),
  103.                     'orange': app.environment is same as('dev'),
  104.                 }) -}}">{{ app.environment|upper }}</span>
  105.             </span>
  106.                 </div>
  107.             </a>
  108.         {% endif %}
  109.         {{ parent() }}
  110.     {% endblock %}
  111. {% endembed %}