{% set __content__ = (block('content') is defined) ? block('content') : null %}
{% embed '@ui2022/schoolnow/modal--sidepanel__content.html.twig' with {} %}
{% block header %}
<div class="sidepanel__head-user">
<div class="d-inline-flex align-items-center">
<h2 class="sidepanel__head--username">{{ profile.fullName }}</h2>
</div>
<h3 class="sidepanel__head--role">
{{- (profile.role ?: '—')|capitalize }}
<span class="sidepanel__head--rolelang">({{ profile.effectiveLanguage }})</span>
</h3>
</div>
<div class="sidepanel__head-status">
<span class="status-button status-button--{{- first_of({
'reachable': (profile.reachable or profile.optimistic),
'unreachable': (profile.unreachable),
}, 'unreachable') -}}">
<span class="status status--{{- first_of({
'sent': (profile.reachable or profile.optimistic),
'sending': (profile.unreachable),
}, 'red') -}}"></span>
{{- 'app.notifications.reachability.%s'|format(profile.reachabilityIndex)|trans -}}
</span>
</div>
{% endblock %}
{% block body %}
<div class="contacts">
<div class="row justify-content-between">
<h3 class="font-14 col-auto">Children</h3>
<span class="font-13 text-medium mb-3 col-auto">
Last modified: {{ profile.timestampedAt|ui_datetime }}
</span>
</div>
<div class="contacts__list whitespace-nowrap mt-sm-0">
{% for student in profile.students %}
<div class="contacts__item d-flex">
<a target="_modal" href="{{ path('app.notifications.dashboard.students.view', {
student: student.id,
}) }}">
<img src="/ui2022/images/icon-user.svg" width="34" height="34" />
</a>
<div class="contacts__item--detail">
<h4 class="font-13 mb-0">
<a target="_modal" href="{{ path('app.notifications.dashboard.students.view', {
student: student.id,
}) }}">
{{- student.fullName -}}
</a>
</h4>
{% if student.metadataPrimarySchool and schools[student.metadataPrimarySchool] is defined and schools[student.metadataPrimarySchool] %}
<span class="text-medium font-12">
{{- schools[student.metadataPrimarySchool].name -}}
</span>
{% endif %}
{% if student.metadataPrimaryGrade %}
<span class="d-block text-medium font-12">
{{- student.metadataPrimaryGrade -}}
</span>
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class="sidepanel__content--body">
{% embed '@ui2022/tabs--static.html.twig' with {
items: [
{
text: 'Preferences',
link: path('app.notifications.dashboard.profiles.view', {
profile: profile.id,
}),
target: '_modal',
active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.profiles.view')),
},
{
text: 'Activity',
link: path('app.notifications.dashboard.profiles.activity', {
profile: profile.id,
}),
target: '_modal',
active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.profiles.activity')),
},
{
text: 'Details',
link: path('app.notifications.dashboard.profiles.details', {
profile: profile.id,
}),
target: '_modal',
active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.profiles.details')),
},
],
} %}
{% block tab %}
{% if __content__ %}
{{ __content__|raw }}
{% endif %}
{% endblock %}
{% endembed %}
</div>
</div>
{% endblock %}
{% endembed %}