src/Products/SchoolNowBundle/Resources/views/base.html.twig line 1

Open in your IDE?
  1. {% extends '@ui2022/schoolnow/page.html.twig' %}
  2. {# TODO: REMOVE - style for basic hc header #}
  3. {% do dom_html_attr_set_class('hc-header') %}
  4. {% do dom_styles([
  5.     'https://honeycomb.style/css/honeycomb.css',
  6.     '/hc/css/custom.css',
  7. ]) %}
  8. {% do include('@ProductsSchoolNow/_assets.html.twig') %}
  9. {% do include('@ProductsSchoolNow/_assets_tracking.html.twig') %}
  10. {% block topbar %}
  11.     {% include 'topbar.html.twig' with {
  12.         avatar: (app.user.systemProfile.hasAvatar)
  13.         ? s3_entity(app.user, '/avatar/thumb')
  14.         : null,
  15.         displayName: app.user.displayName
  16.     } %}
  17. {% endblock %}
  18. {% block navbar %}
  19.     {% include '@ui2022/schoolnow/side__menu.html.twig' with {
  20.         avatar: (app.user.systemProfile.hasAvatar)
  21.             ? s3_entity(app.user, '/avatar/thumb')
  22.             : '/ui2022/images/avatar.png',
  23.         name: app.user.displayName,
  24.         items: [
  25.             {
  26.                 title: 'My Feed',
  27.                 icon: 'icon-feed',
  28.                 link: path('app.schoolnow.dashboard.default.main'),
  29.                 active: (app.request.attributes.get('_route') is same as('app.schoolnow.dashboard.default.main')),
  30.             },
  31.             {
  32.                 title: 'Important',
  33.                 icon: 'icon-inbox',
  34.                 link: path('app.schoolnow.dashboard.default.feeds.notifications'),
  35.                 active: (app.request.attributes.get('_route') is same as('app.schoolnow.dashboard.default.feeds.notifications')),
  36.             },
  37.             maybe_granted('@app.cms.modules.access') ? {
  38.                 title: 'My Drafts',
  39.                 icon: 'icon-myposts',
  40.                 link: path('app.schoolnow.dashboard.default.drafts.list'),
  41.                 active: (app.request.attributes.get('_route') is same as('app.schoolnow.dashboard.default.drafts.list')),
  42.             } : null,
  43.             {
  44.                 title: 'Calendar',
  45.                 icon: 'icon-calendaricon',
  46.                 link: path('app.schoolnow.dashboard.default.feeds.calendar'),
  47.                 active: (app.request.attributes.get('_route') is same as('app.schoolnow.dashboard.default.feeds.calendar')),
  48.             },
  49.             {
  50.                 title: 'Photos',
  51.                 icon: 'icon-photos',
  52.                 link: path('app.schoolnow.dashboard.default.feeds.photos'),
  53.                 active: (app.request.attributes.get('_route') is same as('app.schoolnow.dashboard.default.feeds.photos')),
  54.             }
  55.         ],
  56.     } %}
  57. {% endblock %}
  58. {% block modals %}
  59.     {{ parent() }}
  60.     {% embed '@ui2022/schoolnow/modal--sidepanel.html.twig' with {
  61.         attr: {
  62.             id: 'topbar-help',
  63.             class: 'sidepanel--help',
  64.         },
  65.     } %}
  66.         {% block header %}
  67.             <div class="sidepanel__head-left">
  68.                 <h2 class="text-an-demibold">Help Center</h2>
  69.             </div>
  70.             <div class="sidepanel__head--right">
  71.                 <img class="schoolnow-logo" src="/ui2022/images/logo_app_stack_white.svg" width="101" height="15.25" alt="" />
  72.             </div>
  73.         {% endblock %}
  74.     {% endembed %}
  75.     {% embed '@ui2022/schoolnow/modal--sidepanel.html.twig' with {
  76.         attr: {
  77.             id: 'sidepanel-setting',
  78.             class: 'setting-sidepanel',
  79.         },
  80.     } %}
  81.         {% block header %}
  82.             {% include '@ui2022/schoolnow/topbar__menu_user_header.html.twig' with { account: app.user } %}
  83.         {% endblock %}
  84.         {% block content %}
  85.             {% include '@App/dashboard/settings/navbar.html.twig'  with { topMenu: true } %}
  86.         {% endblock %}
  87.     {% endembed %}
  88.     <script type="text/javascript">
  89.         (function (window, document, $, undefined) {
  90.             $(function () {
  91.                 $('#topbar-help').on('show.cs.sidepanel', function (e) {
  92.                     $('#topbar-help .sidepanel__content')
  93.                         .html('<iframe width="100%" src="https://www-schoolnow-com.sandbox.hs-sites.com/schoolnew-home-page-2022?email={{- app.user.email -}}&slug={{- cms.tenant.slug -}}"></iframe>')
  94.                     ;
  95.                 });
  96.             });
  97.         })(window, document, jQuery);
  98.     </script>
  99. {% endblock %}