{% extends "base.html" %} {% from "components/ui.html" import confirm_dialog %} {% block title %}{{ event.title }} - {{ app_name }}{% endblock %} {% block content %}

{{ event.title }}

{% if event.event_type %} {{ event.event_type|title }} {% endif %} {% if event.is_private %} Private {% endif %}
{{ _('Edit') }}

{{ _('Date & Time') }}

{% if event.all_day %} {{ event.start_time|user_datetime('%A, %B %d, %Y') }} {% if event.start_time.date() != event.end_time.date() %} - {{ event.end_time|user_datetime('%A, %B %d, %Y') }} {% endif %} All Day {% else %} {{ event.start_time|user_datetime('%A, %B %d, %Y at %I:%M %p') }} - {{ event.end_time|user_time('%I:%M %p') }} {% if event.start_time.date() != event.end_time.date() %} ({{ event.end_time|user_datetime('%B %d, %Y') }}) {% endif %} {% endif %}

{{ _('Duration') }}: {{ '%.2f'|format(event.duration_hours()) }} hours

{% if event.description %}

{{ _('Description') }}

{{ event.description }}

{% endif %} {% if event.location %}

{{ _('Location') }}

{{ event.location }}

{% endif %} {% if event.project %}

{{ _('Project') }}

{{ event.project.name }}

{% endif %} {% if event.task %}

{{ _('Task') }}

{{ event.task.name }}

{% endif %} {% if event.client %}

{{ _('Client') }}

{{ event.client.name }}

{% endif %} {% if event.reminder_minutes %}

{{ _('Reminder') }}

{% if event.reminder_minutes < 60 %} {{ event.reminder_minutes }} {{ _('minutes before') }} {% elif event.reminder_minutes < 1440 %} {{ (event.reminder_minutes / 60)|int }} {{ _('hours before') }} {% else %} {{ (event.reminder_minutes / 1440)|int }} {{ _('days before') }} {% endif %}

{% endif %} {% if event.is_recurring %}

{{ _('Recurring') }}

{% if event.recurrence_rule %}{{ event.recurrence_rule }}{% else %}Yes{% endif %} {% if event.recurrence_end_date %}
{{ _('Until') }}: {{ event.recurrence_end_date.strftime('%B %d, %Y') }} {% endif %}

{% endif %}

{{ _('Information') }}

{{ _('Created') }}: {{ event.created_at|user_datetime('%B %d, %Y at %I:%M %p') }}
{{ _('Last Updated') }}: {{ event.updated_at|user_datetime('%B %d, %Y at %I:%M %p') }}

{{ confirm_dialog( 'confirmDeleteEvent-' ~ event.id, _('Delete Event'), _('Are you sure you want to delete this event? This action cannot be undone.'), _('Delete'), _('Cancel'), 'danger' ) }} {% endblock %}