- if current_user.try(:admin?) or current_user.try(:teacher?)
  ul.nav.navbar-nav
    li.nav-item.dropdown
      a.nav-link.dropdown-toggle.mx-3 data-bs-toggle='dropdown' href='#'
        = t('shared.administration')
        span.caret
      ul.dropdown-menu.p-0.mt-1 role='menu'
        - if current_user.admin?
          li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path, class: 'dropdown-item', 'data-turbolinks' => "false") if policy([:admin, :dashboard]).show?
          li = link_to(t('breadcrumbs.rails_admin.show'), rails_admin.dashboard_path, class: 'dropdown-item', 'data-turbolinks' => "false") if policy([:admin, :dashboard]).show?
          li = link_to(t('breadcrumbs.statistics.show'), statistics_path, class: 'dropdown-item') if policy(:statistics).show?
          li.dropdown-divider role='separator'
        = render('navigation_submenu', title: t('activerecord.models.exercise.other'),
                models: [Exercise, ExerciseCollection, ProxyExercise, Tag, Tip, Submission], link: exercises_path, cached: true)
        = render('navigation_submenu', title: t('navigation.sections.users'), models: [InternalUser, ExternalUser],
                cached: true)
        = render('navigation_collection_link', model: StudyGroup, cached: true)
        = render('navigation_collection_link', model: ExecutionEnvironment, cached: true)
        = render('navigation_submenu', title: t('navigation.sections.errors'),
                models: [ErrorTemplate, ErrorTemplateAttribute], cached: true)
        = render('navigation_submenu', title: t('navigation.sections.files'), models: [FileType, FileTemplate],
                cached: true)
        = render('navigation_submenu', title: t('navigation.sections.integrations'), models: [Consumer],
                cached: true)
