{##} {% extends "components/dataTable.twig.html" %} {% import _self as attendance %} {% block tableInner %}

{{ __('Summary') }}

{% if summary.total %} {% if summary.total != (summary.present + summary.partial + summary.absent) %}
{{ __('It appears that this student is missing attendance data for some school days:') }}
{% endif %}
{{ __('Total number of school days to date:') }} {{ summary.total }}
{{ __('Total number of school days attended:') }} {{ summary.present + summary.partial }}
{{ __('Total number of school days absent:') }} {{ summary.absent }}
{% endif %}
{% if not printView %}
{{ chart|raw }}
{% endif %}
{% for term in dataSet %}

{{ term.name }}

{% set daysOfWeek = term.daysOfWeek %} {% set blockWidth = "w-1/" ~ daysOfWeek|length %} {% set dayClass = "flex flex-col justify-center border-t border-b border-r py-2 px-1 -mt-px " %}
{##}
{% for dayNameShort, dayName in daysOfWeek %}
{{ __(dayNameShort) }}
{% endfor %} {% for dayNameShort, dayName in daysOfWeek %} {% endfor %}
{##} {% for weekNumber, week in term.weeks %}
{% for day in week %} {% if day.outsideTerm %}
{% elseif day.beforeStartDate %}
{{ day.dateDisplay }}
{{ __('Before Start Date') }}
{% elseif day.afterEndDate %}
{{ day.dateDisplay }}
{{ __('After End Date') }}
{% elseif day.specialDay %}
{{ day.specialDay }}
{% elseif day.logs is empty and day.classLogs is empty %}
{{ day.dateDisplay }}
{% else %} {{ attendance.badge(day) }} {{ day.dateDisplay }} {{ __(day.endOfDay.type) }} {% if printView %} {% for log in day.logs %} {{ log.code }} {{- not loop.last ? " : " -}} {% endfor %} {% endif %} {% endif %} {% endfor %}
{% endfor %}
{% endfor %}
{% endblock tableInner %} {##} {% macro tooltip(day) %}
{{ day.dateDisplay }}
{{ __(day.endOfDay.type) }}
{% if day.endOfDay.reason %} {{ __(day.endOfDay.reason) }}
{% endif %}
{% endmacro tooltip %} {##} {% macro badge(day) %} {% if (day.absentCount > 0 or day.partialCount > 0) and day.endOfDay.status == "present" %}
{{ day.absentCount + day.partialCount }}
{% elseif (day.presentCount > 0 or day.partialCount > 0) and day.endOfDay.status == "absent" %}
{{ day.presentCount + day.partialCount }}
{% elseif (day.presentCount > 0 or day.absentCount > 0) and day.endOfDay.status == "partial" %}
{{ day.presentCount + day.absentCount }}
{% endif %} {% endmacro badge %} {% block footer %} {##} {% endblock footer %}