diff --git a/ht_booking/assets/i18n/en/main.ftl b/ht_booking/assets/i18n/en/main.ftl index f50c45b..27ec4e4 100644 --- a/ht_booking/assets/i18n/en/main.ftl +++ b/ht_booking/assets/i18n/en/main.ftl @@ -52,3 +52,4 @@ theme-dark = Dark settings = Settings settings-language = Language settings-theme = Theme +view-details = Details diff --git a/ht_booking/assets/i18n/sk/main.ftl b/ht_booking/assets/i18n/sk/main.ftl index 63b4fde..d888fff 100644 --- a/ht_booking/assets/i18n/sk/main.ftl +++ b/ht_booking/assets/i18n/sk/main.ftl @@ -52,3 +52,4 @@ theme-dark = Tmavý settings = Nastavenia settings-language = Jazyk settings-theme = Téma +view-details = Detaily diff --git a/ht_booking/assets/views/calendar/week.html b/ht_booking/assets/views/calendar/week.html index 4b4b844..5138881 100644 --- a/ht_booking/assets/views/calendar/week.html +++ b/ht_booking/assets/views/calendar/week.html @@ -2,6 +2,37 @@ {% block title %}{{ t(key="calendar-title", lang=lang) }}{% endblock title %} +{% block head %} +{% if is_admin %} + +{% endif %} +{% endblock head %} + {% block content %}

@@ -22,19 +53,32 @@ {% if has_courts %}
-
- +
@@ -55,9 +99,16 @@ {% if cell.booked %} {% if is_admin %} - {{ cell.name }} + {{ cell.name }} + {% if cell.title or cell.contact or cell.note %} + + {%- if cell.title %}{{ cell.title }}{% endif -%} + {%- if cell.contact %}{{ cell.contact }}{% endif -%} + {%- if cell.note %}{{ cell.note }}{% endif -%} + + {% endif %} {% else %}
{% endif %} {% endblock content %} + +{% block js %} +{% if is_admin %} + +{% endif %} +{% endblock js %} diff --git a/ht_booking/src/controllers/calendar.rs b/ht_booking/src/controllers/calendar.rs index ccfc456..c9ae2b4 100644 --- a/ht_booking/src/controllers/calendar.rs +++ b/ht_booking/src/controllers/calendar.rs @@ -54,6 +54,10 @@ pub struct Cell { pub name: String, /// Public-facing label shown on the calendar when set. pub title: String, + /// Private — admin only. Shown in the dashboard's detailed view. + pub contact: String, + /// Private — admin only. Shown in the dashboard's detailed view. + pub note: String, } #[derive(Debug, Serialize)] @@ -177,6 +181,8 @@ pub async fn build_calendar( booking_id: b.id, name: b.name.clone(), title: b.title.clone().unwrap_or_default(), + contact: b.contact.clone().unwrap_or_default(), + note: b.note.clone().unwrap_or_default(), }, None => Cell { date: iso, @@ -186,6 +192,8 @@ pub async fn build_calendar( booking_id: 0, name: String::new(), title: String::new(), + contact: String::new(), + note: String::new(), }, } })