src/Products/NotificationsBundle/Resources/views/dashboard/profiles/includes/_view.html.twig line 1

Open in your IDE?
  1. {% set __content__ = (block('content') is defined) ? block('content') : null %}
  2. {% embed '@ui2022/schoolnow/modal--sidepanel__content.html.twig' with {} %}
  3.     {% block header %}
  4.         <div class="sidepanel__head-user">
  5.             <div class="d-inline-flex align-items-center">
  6.                 <h2 class="sidepanel__head--username">{{ profile.fullName }}</h2>
  7.             </div>
  8.             <h3 class="sidepanel__head--role">
  9.                 {{- (profile.role ?: '—')|capitalize }}
  10.                 <span class="sidepanel__head--rolelang">({{ profile.effectiveLanguage }})</span>
  11.             </h3>
  12.         </div>
  13.         <div class="sidepanel__head-status">
  14.             <span class="status-button status-button--{{- first_of({
  15.                 'reachable': (profile.reachable or profile.optimistic),
  16.                 'unreachable': (profile.unreachable),
  17.             }, 'unreachable') -}}">
  18.                 <span class="status status--{{- first_of({
  19.                     'sent': (profile.reachable or profile.optimistic),
  20.                     'sending': (profile.unreachable),
  21.                 }, 'red') -}}"></span>
  22.                 {{- 'app.notifications.reachability.%s'|format(profile.reachabilityIndex)|trans -}}
  23.             </span>
  24.         </div>
  25.     {% endblock %}
  26.     {% block body %}
  27.         <div class="contacts">
  28.             <div class="row justify-content-between">
  29.                 <h3 class="font-14 col-auto">Children</h3>
  30.                 <span class="font-13 text-medium mb-3 col-auto">
  31.                     Last modified: {{ profile.timestampedAt|ui_datetime }}
  32.                 </span>
  33.             </div>
  34.             <div class="contacts__list whitespace-nowrap mt-sm-0">
  35.                 {% for student in profile.students %}
  36.                     <div class="contacts__item d-flex">
  37.                         <a target="_modal" href="{{ path('app.notifications.dashboard.students.view', {
  38.                             student: student.id,
  39.                         }) }}">
  40.                             <img src="/ui2022/images/icon-user.svg" width="34" height="34" />
  41.                         </a>
  42.                         <div class="contacts__item--detail">
  43.                             <h4 class="font-13 mb-0">
  44.                                 <a target="_modal" href="{{ path('app.notifications.dashboard.students.view', {
  45.                                     student: student.id,
  46.                                 }) }}">
  47.                                     {{- student.fullName -}}
  48.                                 </a>
  49.                             </h4>
  50.                             {% if student.metadataPrimarySchool and schools[student.metadataPrimarySchool] is defined and schools[student.metadataPrimarySchool] %}
  51.                                 <span class="text-medium font-12">
  52.                                     {{- schools[student.metadataPrimarySchool].name -}}
  53.                                 </span>
  54.                             {% endif %}
  55.                             {% if student.metadataPrimaryGrade %}
  56.                                 <span class="d-block text-medium font-12">
  57.                                     {{- student.metadataPrimaryGrade -}}
  58.                                 </span>
  59.                             {% endif %}
  60.                         </div>
  61.                     </div>
  62.                 {% endfor %}
  63.             </div>
  64.             <div class="sidepanel__content--body">
  65.                 {% embed '@ui2022/tabs--static.html.twig' with {
  66.                     items: [
  67.                         {
  68.                             text: 'Preferences',
  69.                             link: path('app.notifications.dashboard.profiles.view', {
  70.                                 profile: profile.id,
  71.                             }),
  72.                             target: '_modal',
  73.                             active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.profiles.view')),
  74.                         },
  75.                         {
  76.                             text: 'Activity',
  77.                             link: path('app.notifications.dashboard.profiles.activity', {
  78.                             profile: profile.id,
  79.                         }),
  80.                             target: '_modal',
  81.                             active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.profiles.activity')),
  82.                         },
  83.                         {
  84.                             text: 'Details',
  85.                             link: path('app.notifications.dashboard.profiles.details', {
  86.                                 profile: profile.id,
  87.                             }),
  88.                             target: '_modal',
  89.                             active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.profiles.details')),
  90.                         },
  91.                     ],
  92.                 } %}
  93.                     {% block tab %}
  94.                         {% if __content__ %}
  95.                             {{ __content__|raw }}
  96.                         {% endif %}
  97.                     {% endblock %}
  98.                 {% endembed %}
  99.             </div>
  100.         </div>
  101.     {% endblock %}
  102. {% endembed %}