{# Partial: pojedynczy element listy spotkania Zmienne: meeting (MeetingModel), isPast (bool, opcjonalnie) #} {% set isPast = isPast is defined and isPast %} {% set cancelled = meeting.isCancelled() %} {% set isGroup = meeting.isGroup() %} {% set daysUntil = meeting.getDaysUntil() %} {% if cancelled %} {% set accentColor = '#adb5bd' %} {% set accentClass = 'bg-secondary' %} {% set dateTextClass = 'text-white' %} {% elseif isPast %} {% set accentColor = '#dee2e6' %} {% set accentClass = 'bg-secondary bg-opacity-25' %} {% set dateTextClass = 'text-secondary' %} {% elseif daysUntil is not null and daysUntil <= 3 %} {% set accentColor = '#ffc107' %} {% set accentClass = 'bg-warning' %} {% set dateTextClass = 'text-dark' %} {% else %} {% set accentColor = '#0d6efd' %} {% set accentClass = 'bg-primary' %} {% set dateTextClass = 'text-white' %} {% endif %} {% set consultants = meeting.getConsultants() %} {% set owners = meeting.getOwners() %}
{# ==== WIERSZ 1 - naglowek ==== #}
{{ meeting.getTitle() }} {% if isGroup %} {{ translations.type_group }} {% else %} {{ translations.type_individual }} {% endif %} {% if cancelled %} {{ translations.status_cancelled }} {% endif %}
{{ meeting.getMeetingDate()|date('d') }}
{{ meeting.getPolishMonth() }}
{# ==== WIERSZ 2 - meta ==== #}
{{ meeting.getDayOfWeek() }}, {{ meeting.getMeetingDate()|date('d') }} {{ meeting.getPolishMonthFull() }} {{ meeting.getMeetingDate()|date('Y') }} {{ meeting.getMeetingTime()|slice(0, 5) }} {% if meeting.getDurationMinutes() %} · {{ meeting.getDurationMinutes() }} {{ translations.minutes }} {% endif %} {% if isGroup %} {{ translations.all_locations }} {% elseif meeting.getShopName() %} {{ meeting.getShopName() }} {% endif %}
{# ==== Miejsce spotkania ==== #} {% if meeting.getFormattedLocation() %}
{{ meeting.getFormattedLocation() }} {% if meeting.getLocationComment() %} {{ meeting.getLocationComment() }} {% endif %}
{% endif %} {# ==== Agenda ==== #} {% if meeting.getAgenda() %}

{{ meeting.getAgenda() }}

{% endif %} {# ==== Uczestnicy ==== #} {% if owners is not empty or consultants is not empty %}
{% for p in owners %} {{ p.display_name }} {% endfor %} {% for p in consultants %} {{ p.display_name }} {% endfor %}
{% endif %} {# ==== WIERSZ DOLNY - odliczanie + akcje ==== #} {% set showCountdown = not cancelled and not isPast and daysUntil is not null %} {% if showCountdown or meeting.getExternalLink() or (meeting.getGoogleCalendarLink() and not cancelled) %}
{% if showCountdown %} {% if daysUntil == 0 %} {{ translations.day_today }} {% elseif daysUntil == 1 %} {{ translations.day_tomorrow }} {% elseif daysUntil <= 7 %} {{ translations.in_days_prefix }} {{ daysUntil }} {{ translations.in_days_suffix }} {% else %} {{ translations.in_days_prefix }} {{ daysUntil }} {{ translations.in_days_suffix }} {% endif %} {% endif %}
{% if meeting.getExternalLink() %} {{ translations.open_link }} {% endif %} {% if meeting.getGoogleCalendarLink() and not cancelled %} {{ translations.add_to_google_calendar }} {% endif %}
{% endif %}