ui/twig/dashboards/default/sidebar/content.html.twig line 1

Open in your IDE?
  1. {% embed '@ui/common/dashboard/sidebar/content.html.twig' %}
  2.     {% block content %}
  3.         {% embed '@ui/common/dashboard/sidebar/menu.html.twig' %}
  4.             {% block items %}
  5.                 {# everyone gets the dashboard, elements on the dashboard will be hidden as needed #}
  6.                 {% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
  7.                     text: 'Dashboard',
  8.                     path: 'cms.container.dashboard.dashboard.index',
  9.                     icon: 'dashboard'
  10.                 } %}
  11.                 {# process screen, only show to those with access #}
  12.                 {% if is_granted('campussuite.cms.process.manage') and cms.tenant.stage is not same as(constant('STAGE__LIVE', cms.tenant)) %}
  13.                     {% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
  14.                         text: 'Process Checklist',
  15.                         path: [
  16.                             'campussuite.cms.tenant.dashboard.process.index',
  17.                             'campussuite.cms.tenant.dashboard.process.*',
  18.                         ],
  19.                         icon: 'check-square'
  20.                     } %}
  21.                 {% endif %}
  22.                 {# show link for drafts #}
  23.                 {% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
  24.                     text: 'Drafts',
  25.                     path: [
  26.                         'cms.workflows.dashboard.drafts.index',
  27.                         'cms.workflows.dashboard.drafts.*',
  28.                         'cms.workflows.dashboard.review.*',
  29.                     ],
  30.                     icon: 'files-o'
  31.                 } %}
  32.                 {# sitebuilder, only show to those with access #}
  33.                 {% if is_granted('campussuite.cms.sitebuilder.manage') %}
  34.                     {% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
  35.                         text: 'Site Builder',
  36.                         path: [
  37.                             'cms.sitebuilder.default.index',
  38.                             'cms.sitebuilder.default.*',
  39.                         ],
  40.                         icon: 'sitemap'
  41.                     } %}
  42.                 {% endif %}
  43.                 {# show link for sites and departments #}
  44.                 {% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
  45.                     text: 'Websites',
  46.                     path: [
  47.                         'cms.container.dashboard.container.index',
  48.                         'cms.container.dashboard.domain.favicon',
  49.                         'cms.container.dashboard.domain.robots',
  50.                         'cms.container.dashboard.domain.sitemap',
  51.                         (current is defined and ui_container_type(current) is same as('generic')) ? 'cms.container.dashboard.container.*' : '',
  52.                         (container is defined and ui_container_type(container) is same as('generic')) ? 'cms.file.dashboard.*' : '',
  53.                         (container is defined and ui_container_type(container) is same as('generic')) ? 'campussuite.cms.module.dashboard.content.*' : '',
  54.                         (container is defined and ui_container_type(container) is same as('generic')) ? 'cms.navigation.default.*' : '',
  55.                     ],
  56.                     icon: 'globe'
  57.                 } %}
  58.                 {# show link for intranets #}
  59.                 {% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
  60.                     text: 'Intranets',
  61.                     path: [
  62.                         'cms.container.dashboard.container.index_intranet',
  63.                         (current is defined and ui_container_type(current) is same as('intranet')) ? 'cms.container.dashboard.container.*' : '',
  64.                         (container is defined and ui_container_type(container) is same as('intranet')) ? 'cms.file.dashboard.*' : '',
  65.                         (container is defined and ui_container_type(container) is same as('intranet')) ? 'campussuite.cms.module.dashboard.content.*' : '',
  66.                         (container is defined and ui_container_type(container) is same as('intranet')) ? 'cms.navigation.default.*' : '',
  67.                     ],
  68.                     icon: 'server'
  69.                 } %}
  70.                 {# show link for sites and departments #}
  71.                 {% include '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
  72.                     text: 'Teacher Websites',
  73.                     path: [
  74.                         'cms.container.dashboard.personal_container.view',
  75.                         'cms.container.dashboard.container.index_personal',
  76.                         (current is defined and ui_container_type(current) is same as('personal')) ? 'cms.container.dashboard.container.*' : '',
  77.                         (container is defined and ui_container_type(container) is same as('personal')) ? 'cms.file.dashboard.*' : '',
  78.                         (container is defined and ui_container_type(container) is same as('personal')) ? 'campussuite.cms.module.dashboard.content.*' : '',
  79.                         (container is defined and ui_container_type(container) is same as('personal')) ? 'cms.navigation.default.*' : '',
  80.                     ],
  81.                     icon: 'users'
  82.                 } %}
  83.                 {# show site settings if any permissions match, this is a bit more involved than usual #}
  84.                 {% if is_granted(
  85.                     attributes_expression([
  86.                         'campussuite.cms.theme.manage',
  87.                         'campussuite.cms.workflows.manage',
  88.                         'campussuite.cms.tags.manage',
  89.                         'campussuite.cms.redirects.manage',
  90.                         'campussuite.cms.locks.manage',
  91.                 ])) %}
  92.                     {% embed '@ui/common/dashboard/sidebar/menuitem.html.twig' with {
  93.                         text: 'Site Management',
  94.                         icon: 'gears',
  95.                         submenu: true,
  96.                         path: [
  97.                             'cms.tag.dashboard.tag.index',
  98.                             'cms.tag.dashboard.tag.*',
  99.                             'cms.redirect.dashboard.redirect.*',
  100.                             'campussuite.cms.lock.*',
  101.                             'cms.theme.dashboard.template.*',
  102.                             'cms.theme.dashboard.outer_layout.*',
  103.                             'cms.theme.dashboard.inner_layout.*',
  104.                             'cms.theme.dashboard.source.*',
  105.                             'cms.theme.dashboard.page_template.*',
  106.                             'cms.workflows.dashboard.workflow.*',
  107.                         ],
  108.                     } %}
  109.                         {% block items %}
  110.                             {% if is_granted('campussuite.cms.theme.manage') %}
  111.                                 {% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
  112.                                     text: 'Design & Layouts',
  113.                                     path: [
  114.                                         'cms.theme.dashboard.template.index',
  115.                                         'cms.theme.dashboard.template.*',
  116.                                         'cms.theme.dashboard.outer_layout.*',
  117.                                         'cms.theme.dashboard.inner_layout.*',
  118.                                         'cms.theme.dashboard.source.*',
  119.                                     ]
  120.                                 } %}
  121.                                 {% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
  122.                                     text: 'Content Templates',
  123.                                     path: [
  124.                                         'cms.theme.dashboard.page_template.default',
  125.                                         'cms.theme.dashboard.page_template.*'
  126.                                     ]
  127.                                 } %}
  128.                             {% endif %}
  129.                             {% if is_granted('campussuite.cms.workflows.manage') %}
  130.                                 {% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
  131.                                     text: 'Workflows',
  132.                                     path: [
  133.                                         'cms.workflows.dashboard.workflow.list',
  134.                                         'cms.workflows.dashboard.workflow.*',
  135.                                     ]
  136.                                 } %}
  137.                             {% endif %}
  138.                             {% if is_granted('campussuite.cms.tags.manage') %}
  139.                                 {% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
  140.                                     text: 'Tags',
  141.                                     path: 'cms.tag.dashboard.tag.index'
  142.                                 } %}
  143.                             {% endif %}
  144.                             {% if is_granted('campussuite.cms.redirects.manage') %}
  145.                                 {% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
  146.                                     text: 'Redirects',
  147.                                     path: 'cms.redirect.dashboard.redirect.index'
  148.                                 } %}
  149.                             {% endif %}
  150.                             {% if is_granted('campussuite.cms.locks.manage') %}
  151.                                 {% include '@ui/common/dashboard/sidebar/submenuitem.html.twig' with {
  152.                                     text: 'Content Locks',
  153.                                     path: 'campussuite.cms.lock.index'
  154.                                 } %}
  155.                             {% endif %}
  156.                         {% endblock %}
  157.                     {% endembed %}
  158.                 {% endif %}
  159.             {% endblock %}
  160.         {% endembed %}
  161.     {% endblock %}
  162. {% endembed %}