Skip to content

Commit

Permalink
Fix subject in rb occurrence emails
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster committed May 30, 2023
1 parent 9e98187 commit aadcb07
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Bugfixes
^^^^^^^^

- Fix width of time column in PDF timetable when using 12-hour time format (:pr:`5788`)
- Fix wrong date in email subject for room booking occurrence cancellations (:pr:`5790`)

Internal Changes
^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% extends 'rb/emails/reservations/base_email_to_manager.txt' %}
{% block subject_prefix %}{% endblock %}
{% block subject -%}{% trans room=reservation.room.full_name, start=reservation.start_dt|format_datetime('dd/MM/yyyy HH:mm', locale='en_GB') -%}
[{{ room }}] Booking cancelled on ({{ start }}) (SINGLE OCCURRENCE)
{% block subject -%}{% trans room=reservation.room.full_name, start=occurrence.start_dt|format_datetime('dd/MM/yyyy HH:mm', locale='en_GB') -%}
[{{ room }}] Booking cancelled ({{ start }}) (SINGLE OCCURRENCE)
{%- endtrans %}{%- endblock %}

{% block email_body -%}
{% trans date=reservation.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') -%}
{% trans date=occurrence.start_dt | format_date('EEEE dd/MM/yyyy', locale='en_GB') -%}
The date {{ date }} from a booking that concerns one of your rooms has been CANCELLED by the user.
{%- endtrans %}
{%- endblock %}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends 'rb/emails/reservations/base_email_to_user.txt' %}
{% block subject_prefix %}{% endblock %}
{% block subject -%}{% trans room=reservation.room.full_name, start=reservation.start_dt|format_datetime('dd/MM/yyyy HH:mm', locale='en_GB') -%}
{% block subject -%}{% trans room=reservation.room.full_name, start=occurrence.start_dt|format_datetime('dd/MM/yyyy HH:mm', locale='en_GB') -%}
[{{ room }}] Booking cancelled ({{ start }}) (SINGLE OCCURRENCE)
{%- endtrans %}{%- endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends 'rb/emails/reservations/base_email_to_manager.txt' %}
{% block subject_prefix %}{% endblock %}
{% block subject -%}{% trans room=reservation.room.full_name, start=reservation.start_dt|format_datetime('dd/MM/yyyy HH:mm', locale='en_GB') -%}
[{{ room }}] Booking rejected on ({{ start }}) (SINGLE OCCURRENCE)
{% block subject -%}{% trans room=reservation.room.full_name, start=occurrence.start_dt|format_datetime('dd/MM/yyyy HH:mm', locale='en_GB') -%}
[{{ room }}] Booking rejected ({{ start }}) (SINGLE OCCURRENCE)
{%- endtrans %}{%- endblock %}

{% block email_body -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends 'rb/emails/reservations/base_email_to_user.txt' %}
{% block subject_prefix %}{% endblock %}
{% block subject -%}{% trans room=reservation.room.full_name, start=reservation.start_dt|format_datetime('dd/MM/yyyy HH:mm', locale='en_GB') -%}
[{{ room }}] Booking rejected on ({{ start }}) (SINGLE OCCURRENCE)
{% block subject -%}{% trans room=reservation.room.full_name, start=occurrence.start_dt|format_datetime('dd/MM/yyyy HH:mm', locale='en_GB') -%}
[{{ room }}] Booking rejected ({{ start }}) (SINGLE OCCURRENCE)
{%- endtrans %}{%- endblock %}

{% block email_body -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[1/2-3] Booking cancelled on (11/11/2022 13:37) (SINGLE OCCURRENCE)
[1/2-3] Booking cancelled (11/11/2022 13:37) (SINGLE OCCURRENCE)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[1/2-3] Booking rejected on (11/11/2022 13:37) (SINGLE OCCURRENCE)
[1/2-3] Booking rejected (11/11/2022 13:37) (SINGLE OCCURRENCE)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[1/2-3] Booking rejected on (11/11/2022 13:37) (SINGLE OCCURRENCE)
[1/2-3] Booking rejected (11/11/2022 13:37) (SINGLE OCCURRENCE)

0 comments on commit aadcb07

Please sign in to comment.