Projet

Général

Profil

0001-misc-apply-djhtml-69404.patch

Valentin Deniaud, 21 septembre 2022 17:38

Télécharger (246 ko)

Voir les différences:

Subject: [PATCH 1/2] misc: apply djhtml (#69404)

 .../agendas/event_notification_body.html      |  18 +-
 .../agendas/events_reminder_body.html         |  50 ++--
 .../agendas/meetings_reminder_body.html       |  40 +--
 .../agendas/templates/emails/body_base.html   |  22 +-
 .../templates/chrono/agendas_export.html      |  22 +-
 .../templates/chrono/agendas_import.html      |  22 +-
 .../chrono/booking_color_legend.html          |   8 +-
 .../chrono/manager_agenda_add_form.html       |  18 +-
 .../chrono/manager_agenda_day_view.html       |  46 ++--
 .../chrono/manager_agenda_duplicate_form.html |  22 +-
 .../chrono/manager_agenda_event_fragment.html |  70 +++---
 .../templates/chrono/manager_agenda_form.html |  24 +-
 .../chrono/manager_agenda_month_view.html     |  44 ++--
 .../manager_agenda_notifications_form.html    |  46 ++--
 .../chrono/manager_agenda_open_events.html    |  64 ++---
 .../manager_agenda_reminder_preview.html      |  30 +--
 .../chrono/manager_agenda_resource_form.html  |  22 +-
 .../chrono/manager_agenda_settings.html       | 180 ++++++-------
 ...r_agenda_unavailability_calendar_form.html |  22 +-
 .../templates/chrono/manager_agenda_view.html |  18 +-
 .../templates/chrono/manager_base.html        |   8 +-
 .../chrono/manager_category_form.html         |  26 +-
 .../chrono/manager_category_list.html         |  50 ++--
 .../manager_confirm_booking_cancellation.html |  60 ++---
 .../chrono/manager_confirm_delete.html        |  30 +--
 .../manager_confirm_event_cancellation.html   |  68 ++---
 .../chrono/manager_confirm_event_delete.html  |  32 +--
 .../manager_confirm_exception_delete.html     |  22 +-
 .../chrono/manager_confirm_source_delete.html |  22 +-
 ...manager_confirm_virtual_member_delete.html |  22 +-
 .../templates/chrono/manager_desk_form.html   |  48 ++--
 .../manager_event_cancellation_report.html    |  26 +-
 ...ager_event_cancellation_report_notice.html |  12 +-
 .../manager_event_cancellation_reports.html   |  28 +--
 .../templates/chrono/manager_event_check.html | 206 +++++++--------
 .../manager_event_check_booking_fragment.html |  52 ++--
 .../chrono/manager_event_detail.html          |  90 +++----
 .../chrono/manager_event_detail_fragment.html |  86 +++----
 .../chrono/manager_event_duplicate_form.html  |  24 +-
 .../templates/chrono/manager_event_form.html  |  76 +++---
 .../chrono/manager_event_timesheet.html       |   4 +-
 .../manager_events_agenda_day_view.html       |  56 ++---
 .../manager_events_agenda_month_view.html     |  68 ++---
 .../manager_events_agenda_settings.html       | 158 ++++++------
 .../chrono/manager_events_timesheet.html      |   4 +-
 ...anager_events_timesheet_form_fragment.html |  40 +--
 .../manager_events_timesheet_fragment.html    | 118 ++++-----
 .../chrono/manager_events_timesheet_pdf.html  |  36 +--
 .../chrono/manager_events_type_form.html      |  90 +++----
 .../chrono/manager_events_type_list.html      |  56 ++---
 .../templates/chrono/manager_home.html        |  84 +++----
 .../chrono/manager_import_events.html         |  32 +--
 .../chrono/manager_import_exceptions.html     |  80 +++---
 .../chrono/manager_meeting_type_form.html     |  44 ++--
 .../manager_meetings_agenda_day_view.html     |  98 ++++----
 .../manager_meetings_agenda_month_view.html   | 100 ++++----
 .../manager_meetings_agenda_settings.html     | 236 +++++++++---------
 .../templates/chrono/manager_no_access.html   |  10 +-
 .../chrono/manager_replace_exceptions.html    |  24 +-
 .../chrono/manager_resource_day_view.html     |  74 +++---
 .../chrono/manager_resource_detail.html       |  86 +++----
 .../chrono/manager_resource_form.html         |  26 +-
 .../chrono/manager_resource_list.html         |  48 ++--
 .../chrono/manager_resource_month_view.html   |  88 +++----
 .../chrono/manager_send_reminder_form.html    |  24 +-
 ...ager_shared_custody_agenda_month_view.html |  56 ++---
 ...anager_shared_custody_agenda_settings.html | 196 +++++++--------
 .../manager_time_period_exception_form.html   | 108 ++++----
 .../manager_time_period_exception_list.html   |  32 +--
 .../chrono/manager_time_period_form.html      |  68 ++---
 ...anager_unavailability_calendar_detail.html |  70 +++---
 .../manager_unavailability_calendar_form.html |  42 ++--
 .../manager_unavailability_calendar_list.html |  52 ++--
 ...ager_unavailability_calendar_settings.html |  82 +++---
 .../manager_virtual_agenda_settings.html      |  94 +++----
 .../chrono/manager_virtual_member_form.html   |  26 +-
 .../templates/chrono/splitdatetime.html       |  10 +-
 .../templates/chrono/widgets/weekdays.html    |  16 +-
 .../manager/templates/registration/login.html |  10 +-
 79 files changed, 2161 insertions(+), 2161 deletions(-)
chrono/agendas/templates/agendas/event_notification_body.html
2 2
{% load i18n %}
3 3

  
4 4
{% block content %}
5
<p>{% trans "Hi," %}</p>
5
  <p>{% trans "Hi," %}</p>
6 6

  
7
<p>
8
{% blocktrans %}
9
You have been notified because the status of event "{{ event }}" has changed.
10
{% endblocktrans %}
11
</p>
7
  <p>
8
    {% blocktrans %}
9
      You have been notified because the status of event "{{ event }}" has changed.
10
    {% endblocktrans %}
11
  </p>
12 12

  
13
{% with _("View event") as button_label %}
14
{% include "emails/button-link.html" with url=event_url label=button_label %}
15
{% endwith %}
13
  {% with _("View event") as button_label %}
14
    {% include "emails/button-link.html" with url=event_url label=button_label %}
15
  {% endwith %}
16 16
{% endblock %}
chrono/agendas/templates/agendas/events_reminder_body.html
2 2
{% load i18n %}
3 3

  
4 4
{% block content %}
5
<p>{% trans "Hi," %}</p>
5
  <p>{% trans "Hi," %}</p>
6 6

  
7
<p>
8
{% blocktrans trimmed with event=booking.event date=date|date:"l j F" time=date|time %}
9
You have a booking for event "{{ event }}", on {{ date }} at {{ time }}.
10
{% endblocktrans %}
11
</p>
7
  <p>
8
    {% blocktrans trimmed with event=booking.event date=date|date:"l j F" time=date|time %}
9
      You have a booking for event "{{ event }}", on {{ date }} at {{ time }}.
10
    {% endblocktrans %}
11
  </p>
12 12

  
13
{% if email_extra_info %}
14
<p>{{ email_extra_info|force_escape|linebreaks }}</p>
15
{% endif %}
13
  {% if email_extra_info %}
14
    <p>{{ email_extra_info|force_escape|linebreaks }}</p>
15
  {% endif %}
16 16

  
17
{% if booking.event.description %}
18
<p>{% trans "Additional information:" %}</p>
19
{{ booking.event.description|linebreaks }}
20
{% endif %}
17
  {% if booking.event.description %}
18
    <p>{% trans "Additional information:" %}</p>
19
    {{ booking.event.description|linebreaks }}
20
  {% endif %}
21 21

  
22
{% if booking.event.pricing %}
23
<p>{% trans "Pricing:" %} {{ booking.event.pricing }}</p>
24
{% endif %}
22
  {% if booking.event.pricing %}
23
    <p>{% trans "Pricing:" %} {{ booking.event.pricing }}</p>
24
  {% endif %}
25 25

  
26
{% if booking.event.url %}
27
{% firstof event_url_button_label _("More information") as button_label %}
28
{% include "emails/button-link.html" with url=booking.event.url label=button_label %}
29
{% endif %}
26
  {% if booking.event.url %}
27
    {% firstof event_url_button_label _("More information") as button_label %}
28
    {% include "emails/button-link.html" with url=booking.event.url label=button_label %}
29
  {% endif %}
30 30

  
31
{% if booking.form_url %}
32
{% with _("Edit or cancel booking") as button_label %}
33
{% include "emails/button-link.html" with url=booking.get_form_url label=button_label %}
34
{% endwith %}
35
{% endif %}
31
  {% if booking.form_url %}
32
    {% with _("Edit or cancel booking") as button_label %}
33
      {% include "emails/button-link.html" with url=booking.get_form_url label=button_label %}
34
    {% endwith %}
35
  {% endif %}
36 36
{% endblock %}
chrono/agendas/templates/agendas/meetings_reminder_body.html
2 2
{% load i18n %}
3 3

  
4 4
{% block content %}
5
<p>{% trans "Hi," %}</p>
5
  <p>{% trans "Hi," %}</p>
6 6

  
7
<p>
8
{% with date=date|date:"l j F" time=date|time %}
9
{% if booking.user_display_label %}
10
{% blocktrans trimmed with meeting=booking.user_display_label %}
11
Your meeting "{{ meeting }}" is scheduled on {{ date }} at {{ time }}.
12
{% endblocktrans %}
13
{% else %}
14
{% blocktrans %}You have a meeting scheduled on {{ date }} at {{ time }}.{% endblocktrans %}
15
{% endif %}
16
{% endwith %}
17
</p>
7
  <p>
8
    {% with date=date|date:"l j F" time=date|time %}
9
      {% if booking.user_display_label %}
10
        {% blocktrans trimmed with meeting=booking.user_display_label %}
11
          Your meeting "{{ meeting }}" is scheduled on {{ date }} at {{ time }}.
12
        {% endblocktrans %}
13
      {% else %}
14
        {% blocktrans %}You have a meeting scheduled on {{ date }} at {{ time }}.{% endblocktrans %}
15
      {% endif %}
16
    {% endwith %}
17
  </p>
18 18

  
19
{% if email_extra_info %}
20
<p>{{ email_extra_info|force_escape|linebreaks }}</p>
21
{% endif %}
19
  {% if email_extra_info %}
20
    <p>{{ email_extra_info|force_escape|linebreaks }}</p>
21
  {% endif %}
22 22

  
23
{% if booking.form_url %}
24
{% with _("Edit or cancel meeting") as button_label %}
25
{% include "emails/button-link.html" with url=booking.get_form_url label=button_label %}
26
{% endwith %}
27
{% endif %}
23
  {% if booking.form_url %}
24
    {% with _("Edit or cancel meeting") as button_label %}
25
      {% include "emails/button-link.html" with url=booking.get_form_url label=button_label %}
26
    {% endwith %}
27
  {% endif %}
28 28
{% endblock %}
chrono/agendas/templates/emails/body_base.html
1 1
<!DOCTYPE html>
2 2
<html>
3
<head>
4
  <meta charset="utf-8">
5
</head>
6
<body>
7
  <div style="max-width: 60ex;">
8
    <div class="content">
9
      {% block content %}
10
      {{ content }}
11
      {% endblock %}
3
  <head>
4
    <meta charset="utf-8">
5
  </head>
6
  <body>
7
    <div style="max-width: 60ex;">
8
      <div class="content">
9
        {% block content %}
10
          {{ content }}
11
        {% endblock %}
12
      </div>
12 13
    </div>
13
  </div>
14
</body>
14
  </body>
15 15
</html>
chrono/manager/templates/chrono/agendas_export.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Export' %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Export' %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans "Export" %}</h2>
10
  <h2>{% trans "Export" %}</h2>
11 11
{% endblock %}
12 12

  
13 13
{% block content %}
14
<form method="post" enctype="multipart/form-data">
15
  {% csrf_token %}
16
  {{ form.as_p }}
17
  <div class="buttons">
18
    <button class="submit-button">{% trans "Export" %}</button>
19
    <a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
20
  </div>
21
</form>
14
  <form method="post" enctype="multipart/form-data">
15
    {% csrf_token %}
16
    {{ form.as_p }}
17
    <div class="buttons">
18
      <button class="submit-button">{% trans "Export" %}</button>
19
      <a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
20
    </div>
21
  </form>
22 22
{% endblock %}
chrono/manager/templates/chrono/agendas_import.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Import' %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Import' %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans "Import" %}</h2>
10
  <h2>{% trans "Import" %}</h2>
11 11
{% endblock %}
12 12

  
13 13
{% block content %}
14
<form method="post" enctype="multipart/form-data">
15
  {% csrf_token %}
16
  {{ form.as_p }}
17
  <div class="buttons">
18
    <button class="submit-button">{% trans "Import" %}</button>
19
    <a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
20
  </div>
21
</form>
14
  <form method="post" enctype="multipart/form-data">
15
    {% csrf_token %}
16
    {{ form.as_p }}
17
    <div class="buttons">
18
      <button class="submit-button">{% trans "Import" %}</button>
19
      <a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
20
    </div>
21
  </form>
22 22
{% endblock %}
chrono/manager/templates/chrono/booking_color_legend.html
1 1
{% load i18n %}
2 2

  
3 3
<div class="booking-colors">
4
<strong>{% trans "Booking colors:" %}</strong>
5
{% for color in colors %}
6
<span class="booking-color-label booking-bg-color-{{ color.index }}">{{ color }}</span>
7
{% endfor %}
4
  <strong>{% trans "Booking colors:" %}</strong>
5
  {% for color in colors %}
6
    <span class="booking-color-label booking-bg-color-{{ color.index }}">{{ color }}</span>
7
  {% endfor %}
8 8
</div>
chrono/manager/templates/chrono/manager_agenda_add_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "New Agenda" %}</h2>
5
  <h2>{% trans "New Agenda" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" enctype="multipart/form-data">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button class="submit-button">{% trans "Save" %}</button>
15
    <a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
16
  </div>
17
</form>
10
  <form method="post" enctype="multipart/form-data">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button class="submit-button">{% trans "Save" %}</button>
15
      <a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
16
    </div>
17
  </form>
18 18
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_day_view.html
4 4
{% block bodyargs %}class="dayview"{% endblock %}
5 5

  
6 6
{% block breadcrumb %}
7
{{ block.super }}
8
<a>{{ day|date:"SHORT_DATE_FORMAT" }}</a>
7
  {{ block.super }}
8
  <a>{{ day|date:"SHORT_DATE_FORMAT" }}</a>
9 9
{% endblock %}
10 10

  
11 11
{% block appbar %}
12
<h2>
13
  <a href="{{ view.get_previous_day_url }}">←</a>
14
  <span class="date-title">{{ view.date|date:"l j F Y" }}</span>
15
  {% with selected_day=view.date|date:"j" selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
16
    <div class="date-picker" style="display: none">
17
    <select name="day">{% for day in view.get_days %}<option value="{{ day }}" {% if selected_day == day %}selected{% endif %}>{{day}}</option>{% endfor %}</select>
18
    <select name="month">{% for month, month_label in view.get_months %}<option value="{{ month }}" {% if selected_month == month %}selected{% endif %}>{{ month_label }}</option>{% endfor %}</select>
19
    <select name="year">{% for year in view.get_years %}<option value="{{ year }}" {% if selected_year == year %}selected{% endif %}>{{year}}</option>{% endfor %}</select>
20
    <button>{% trans 'Set Date' %}</button>
21
    </div>
22
  {% endwith %}
23
  <a href="{{ view.get_next_day_url }}">→</a>
24
</h2>
25
<span class="actions">
26
{% block actions %}
27
{% if user_can_manage %}
28
  <a href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Settings' %}</a>
29
{% endif %}
30
<a href="" onclick="window.print()">{% trans 'Print' %}</a>
31
{% endblock %}
32
</span>
12
  <h2>
13
    <a href="{{ view.get_previous_day_url }}">←</a>
14
    <span class="date-title">{{ view.date|date:"l j F Y" }}</span>
15
    {% with selected_day=view.date|date:"j" selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
16
      <div class="date-picker" style="display: none">
17
        <select name="day">{% for day in view.get_days %}<option value="{{ day }}" {% if selected_day == day %}selected{% endif %}>{{day}}</option>{% endfor %}</select>
18
        <select name="month">{% for month, month_label in view.get_months %}<option value="{{ month }}" {% if selected_month == month %}selected{% endif %}>{{ month_label }}</option>{% endfor %}</select>
19
        <select name="year">{% for year in view.get_years %}<option value="{{ year }}" {% if selected_year == year %}selected{% endif %}>{{year}}</option>{% endfor %}</select>
20
        <button>{% trans 'Set Date' %}</button>
21
      </div>
22
    {% endwith %}
23
    <a href="{{ view.get_next_day_url }}">→</a>
24
  </h2>
25
  <span class="actions">
26
    {% block actions %}
27
      {% if user_can_manage %}
28
        <a href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Settings' %}</a>
29
      {% endif %}
30
      <a href="" onclick="window.print()">{% trans 'Print' %}</a>
31
    {% endblock %}
32
  </span>
33 33
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_duplicate_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="">{% trans "Duplicate Agenda" %}</a>
5
  {{ block.super }}
6
  <a href="">{% trans "Duplicate Agenda" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans "Duplicate Agenda" %}</h2>
10
  <h2>{% trans "Duplicate Agenda" %}</h2>
11 11
{% endblock %}
12 12

  
13 13
{% block content %}
14
<form method="post" enctype="multipart/form-data">
15
  {% csrf_token %}
16
  {{ form.as_p }}
17
  <div class="buttons">
18
    <button class="submit-button">{% trans "Duplicate" %}</button>
19
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
20
  </div>
21
</form>
14
  <form method="post" enctype="multipart/form-data">
15
    {% csrf_token %}
16
    {{ form.as_p }}
17
    <div class="buttons">
18
      <button class="submit-button">{% trans "Duplicate" %}</button>
19
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
20
    </div>
21
  </form>
22 22
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_event_fragment.html
1 1
{% load i18n %}
2 2
<li class="{% if event.booked_places > event.places %}overbooking{% endif %}
3
           {% if event.main_list_full %}full{% endif %}
4
             {% if event.cancellation_status %}cancelled{% endif %}
5
           {% if not event.in_bookable_period %}not-{% endif %}bookable"
6
    {% if event.places %}
7
      data-total="{{ event.places }}" data-booked="{{ event.booked_places }}"
8
    {% elif event.waiting_list_places %}
9
      data-total="{{ event.waiting_list_places }}" data-booked="{{ event.booked_waiting_list_places }}"
10
    {% endif %}
11
    ><a href="{% if view_mode == 'settings_view' %}{% url 'chrono-manager-event-edit' pk=agenda.pk event_pk=event.pk %}?next=settings{% elif event.pk %}{% url 'chrono-manager-event-view' pk=agenda.pk event_pk=event.pk %}{% else %}{% url 'chrono-manager-event-create-recurrence' pk=agenda.pk event_identifier=event.slug %}{% endif %}">
12
    {% if event.cancellation_status %}
3
  {% if event.main_list_full %}full{% endif %}
4
  {% if event.cancellation_status %}cancelled{% endif %}
5
  {% if not event.in_bookable_period %}not-{% endif %}bookable"
6
  {% if event.places %}
7
    data-total="{{ event.places }}" data-booked="{{ event.booked_places }}"
8
  {% elif event.waiting_list_places %}
9
    data-total="{{ event.waiting_list_places }}" data-booked="{{ event.booked_waiting_list_places }}"
10
  {% endif %}
11
><a href="{% if view_mode == 'settings_view' %}{% url 'chrono-manager-event-edit' pk=agenda.pk event_pk=event.pk %}?next=settings{% elif event.pk %}{% url 'chrono-manager-event-view' pk=agenda.pk event_pk=event.pk %}{% else %}{% url 'chrono-manager-event-create-recurrence' pk=agenda.pk event_identifier=event.slug %}{% endif %}">
12
  {% if event.cancellation_status %}
13 13
    <span class="tag">{{ event.cancellation_status }}</span>
14
    {% else %}
15
      {% if event.main_list_full %}
14
  {% else %}
15
    {% if event.main_list_full %}
16 16
      <span class="full tag">{% trans "Full" %}</span>
17
      {% endif %}
18
      {% if event.checked %}
17
    {% endif %}
18
    {% if event.checked %}
19 19
      <span class="checked tag">{% trans "Checked" %}</span>
20
      {% endif %}
21 20
    {% endif %}
22
    <span class="event-info">
21
  {% endif %}
22
  <span class="event-info">
23 23
    {% if view_mode == 'settings_view' %}
24 24
      {% if event.label %}{{ event.label }} {% endif %}[{% trans "identifier:" %} {{ event.slug }}]
25 25
    {% else %}
......
31 31
      {{ event.get_recurrence_display }}
32 32
    {% endif %}
33 33
    {% if view_mode != 'settings_view' %}
34
    {% if event.places or event.waiting_list_places %}-{% endif %}
35
    {% if event.places %}
36
      {% blocktrans count remaining_places=event.remaining_places %}{{ remaining_places }} remaining place{% plural %}{{ remaining_places }} remaining places{% endblocktrans %}
37
      ({% blocktrans with places=event.places count booked_places=event.booked_places %}{{ booked_places }}/{{ places }} booking{% plural %}{{ booked_places }}/{{ places }} bookings{% endblocktrans %})
38
    {% endif %}
39
    {% if event.waiting_list_places %}
40
      ({% trans "Waiting list:" %}
41
      {% blocktrans count remaining_places=event.remaining_waiting_list_places %}{{ remaining_places }} remaining place{% plural %}{{ remaining_places }} remaining places{% endblocktrans %}
42
      -
43
      {% blocktrans with places=event.waiting_list_places count booked_places=event.booked_waiting_list_places %}{{ booked_places }}/{{ places }} booking{% plural %}{{ booked_places }}/{{ places }} bookings{% endblocktrans %})
44
    {% endif %}
34
      {% if event.places or event.waiting_list_places %}-{% endif %}
35
      {% if event.places %}
36
        {% blocktrans count remaining_places=event.remaining_places %}{{ remaining_places }} remaining place{% plural %}{{ remaining_places }} remaining places{% endblocktrans %}
37
        ({% blocktrans with places=event.places count booked_places=event.booked_places %}{{ booked_places }}/{{ places }} booking{% plural %}{{ booked_places }}/{{ places }} bookings{% endblocktrans %})
38
      {% endif %}
39
      {% if event.waiting_list_places %}
40
        ({% trans "Waiting list:" %}
41
        {% blocktrans count remaining_places=event.remaining_waiting_list_places %}{{ remaining_places }} remaining place{% plural %}{{ remaining_places }} remaining places{% endblocktrans %}
42
        -
43
        {% blocktrans with places=event.waiting_list_places count booked_places=event.booked_waiting_list_places %}{{ booked_places }}/{{ places }} booking{% plural %}{{ booked_places }}/{{ places }} bookings{% endblocktrans %})
44
      {% endif %}
45 45
    {% endif %}
46 46
    {% if view_mode == 'settings_view' and event.publication_datetime %}
47
    ({% trans "publication date:" %} {{ event.publication_datetime }})
47
      ({% trans "publication date:" %} {{ event.publication_datetime }})
48 48
    {% endif %}
49 49
    {% if not event.in_bookable_period %}
50
    ({% trans "out of bookable period" %})
50
      ({% trans "out of bookable period" %})
51 51
    {% endif %}
52
    </span>
53
        </a>
54
    {% if view_mode == 'settings_view' %}
52
  </span>
53
</a>
54
  {% if view_mode == 'settings_view' %}
55 55
    <a rel="popup" class="link-action-icon duplicate" href="{% url 'chrono-manager-event-duplicate' pk=agenda.pk event_pk=event.pk %}">{% trans 'Duplicate' %}</a>
56 56
    <a rel="popup" class="delete" href="{% url 'chrono-manager-event-delete' pk=agenda.pk event_pk=event.pk %}?next=settings">{% trans "remove" %}</a>
57
    {% elif agenda.booking_form_url %}
57
  {% elif agenda.booking_form_url %}
58 58
    <a class="link-action-text" href="{{ event.get_booking_form_url }}&ReturnURL={{ request.build_absolute_uri }}">{% trans "Booking form" %}</a>
59
    {% endif %}
60
    <span class="occupation-bar"></span>
59
  {% endif %}
60
  <span class="occupation-bar"></span>
61 61
</li>
chrono/manager/templates/chrono/manager_agenda_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
7
<a href="">{% firstof title view.title %}</a>
5
  {{ block.super }}
6
  <a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
7
  <a href="">{% firstof title view.title %}</a>
8 8
{% endblock %}
9 9

  
10 10
{% block appbar %}
11
<h2>{% firstof title view.title %}</h2>
11
  <h2>{% firstof title view.title %}</h2>
12 12
{% endblock %}
13 13

  
14 14
{% block content %}
15
<form method="post" enctype="multipart/form-data">
16
  {% csrf_token %}
17
  {{ form.as_p }}
18
  <div class="buttons">
19
    <button class="submit-button">{% trans "Save" %}</button>
20
    <a class="cancel" href="{{ agenda.get_settings_url }}">{% trans 'Cancel' %}</a>
21
  </div>
22
</form>
15
  <form method="post" enctype="multipart/form-data">
16
    {% csrf_token %}
17
    {{ form.as_p }}
18
    <div class="buttons">
19
      <button class="submit-button">{% trans "Save" %}</button>
20
      <a class="cancel" href="{{ agenda.get_settings_url }}">{% trans 'Cancel' %}</a>
21
    </div>
22
  </form>
23 23
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_month_view.html
4 4
{% block bodyargs %}class="monthview"{% endblock %}
5 5

  
6 6
{% block breadcrumb %}
7
{{ block.super }}
8
<a>{{ view.date|date:"F Y" }}</a>
7
  {{ block.super }}
8
  <a>{{ view.date|date:"F Y" }}</a>
9 9
{% endblock %}
10 10

  
11 11
{% block appbar %}
12
<h2>
13
  <a href="{{ view.get_previous_month_url }}">←</a>
14
  <span class="date-title">{{ view.date|date:"F Y" }}</span>
15
  {% with selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
16
    <div class="date-picker" style="display: none">
17
    <select name="month">{% for month, month_label in view.get_months %}<option value="{{ month }}" {% if selected_month == month %}selected{% endif %}>{{ month_label }}</option>{% endfor %}</select>
18
    <select name="year">{% for year in view.get_years %}<option value="{{ year }}" {% if selected_year == year %}selected{% endif %}>{{year}}</option>{% endfor %}</select>
19
    <button>{% trans 'Set Date' %}</button>
20
    </div>
21
  {% endwith %}
22
  <a href="{{ view.get_next_month_url }}">→</a>
23
</h2>
24
<span class="actions">
25
{% block actions %}
26
{% if user_can_manage %}
27
  <a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
28
{% endif %}
29
<a href="" onclick="window.print()">{% trans 'Print' %}</a>
30
{% endblock %}
31
</span>
12
  <h2>
13
    <a href="{{ view.get_previous_month_url }}">←</a>
14
    <span class="date-title">{{ view.date|date:"F Y" }}</span>
15
    {% with selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
16
      <div class="date-picker" style="display: none">
17
        <select name="month">{% for month, month_label in view.get_months %}<option value="{{ month }}" {% if selected_month == month %}selected{% endif %}>{{ month_label }}</option>{% endfor %}</select>
18
        <select name="year">{% for year in view.get_years %}<option value="{{ year }}" {% if selected_year == year %}selected{% endif %}>{{year}}</option>{% endfor %}</select>
19
        <button>{% trans 'Set Date' %}</button>
20
      </div>
21
    {% endwith %}
22
    <a href="{{ view.get_next_month_url }}">→</a>
23
  </h2>
24
  <span class="actions">
25
    {% block actions %}
26
      {% if user_can_manage %}
27
        <a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
28
      {% endif %}
29
      <a href="" onclick="window.print()">{% trans 'Print' %}</a>
30
    {% endblock %}
31
  </span>
32 32
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_notifications_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Settings' %}</a>
7
<a href="">{% trans "Notification settings" %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Settings' %}</a>
7
  <a href="">{% trans "Notification settings" %}</a>
8 8
{% endblock %}
9 9

  
10 10
{% block appbar %}
11
<h2>{% trans "Notification settings" %}</h2>
11
  <h2>{% trans "Notification settings" %}</h2>
12 12
{% endblock %}
13 13

  
14 14
{% block content %}
15
<form method="post" enctype="multipart/form-data">
16
  {% csrf_token %}
17
  {{ form.as_p }}
18
  <div class="buttons">
19
    <button class="submit-button">{% trans "Save" %}</button>
20
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
21
  </div>
15
  <form method="post" enctype="multipart/form-data">
16
    {% csrf_token %}
17
    {{ form.as_p }}
18
    <div class="buttons">
19
      <button class="submit-button">{% trans "Save" %}</button>
20
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
21
    </div>
22 22

  
23
  <script>
24
  $('select').change(function(){
25
    role_field_id = $(this).attr('id')
26
    email_field_id = '#' + role_field_id + '_emails'
27
    if ($(this).val() == 'use-email-field')
28
      $(email_field_id).parent('p').show();
29
    else
30
      $(email_field_id).parent('p').hide();
31
  });
32
  $('select').trigger('change');
33
  </script>
34
</form>
23
    <script>
24
      $('select').change(function(){
25
        role_field_id = $(this).attr('id')
26
        email_field_id = '#' + role_field_id + '_emails'
27
        if ($(this).val() == 'use-email-field')
28
        $(email_field_id).parent('p').show();
29
        else
30
        $(email_field_id).parent('p').hide();
31
      });
32
      $('select').trigger('change');
33
    </script>
34
  </form>
35 35
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_open_events.html
4 4
{% block bodyargs %}class="openevents"{% endblock %}
5 5

  
6 6
{% block breadcrumb %}
7
{{ block.super }}
8
<a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans "Open events" %}</a>
7
  {{ block.super }}
8
  <a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans "Open events" %}</a>
9 9
{% endblock %}
10 10

  
11 11
{% block actions %}
12
{% if agenda.subscriptions.exists %}
13
<a class="extra-actions-menu-opener"></a>
14
<ul class="extra-actions-menu">
15
  <li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
16
</ul>
17
{% endif %}
18
{{ block.super }}
19
<a href="{% url 'chrono-manager-agenda-month-redirect-view' pk=agenda.pk %}">{% trans 'Month view' %}</a>
12
  {% if agenda.subscriptions.exists %}
13
    <a class="extra-actions-menu-opener"></a>
14
    <ul class="extra-actions-menu">
15
      <li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
16
    </ul>
17
  {% endif %}
18
  {{ block.super }}
19
  <a href="{% url 'chrono-manager-agenda-month-redirect-view' pk=agenda.pk %}">{% trans 'Month view' %}</a>
20 20
{% endblock %}
21 21

  
22 22
{% block content %}
23
<div class="section">
24
<h3>{% trans "Open events" %}</h3>
25
<div>
26
{% if open_events %}
27
  {% for event in open_events %}
28
    {% ifchanged event.start_datetime|date:'n' event.start_datetime|date:'y' %}
29
      {% if not forloop.first %}</ul>{% endif %}
30
      <h4>{{ event.start_datetime|date:'YEAR_MONTH_FORMAT'|capfirst }}</h4>
31
      <ul class="objects-list single-links">
32
    {% endifchanged %}
33
    {% include 'chrono/manager_agenda_event_fragment.html' %}
34
    {% if forloop.last %}</ul>{% endif %}
35
  {% endfor %}
36
{% else %}
37
<div class="big-msg-info">
38
  {% blocktrans %}
39
  This agenda doesn't have any open event configured.
40
  {% endblocktrans %}
41
</div>
42
{% endif %}
43
</div>
44
</div>
23
  <div class="section">
24
    <h3>{% trans "Open events" %}</h3>
25
    <div>
26
      {% if open_events %}
27
        {% for event in open_events %}
28
          {% ifchanged event.start_datetime|date:'n' event.start_datetime|date:'y' %}
29
            {% if not forloop.first %}</ul>{% endif %}
30
            <h4>{{ event.start_datetime|date:'YEAR_MONTH_FORMAT'|capfirst }}</h4>
31
            <ul class="objects-list single-links">
32
          {% endifchanged %}
33
          {% include 'chrono/manager_agenda_event_fragment.html' %}
34
          {% if forloop.last %}</ul>{% endif %}
35
        {% endfor %}
36
      {% else %}
37
        <div class="big-msg-info">
38
          {% blocktrans %}
39
            This agenda doesn't have any open event configured.
40
          {% endblocktrans %}
41
        </div>
42
      {% endif %}
43
    </div>
44
  </div>
45 45
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_reminder_preview.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="">{% trans "Reminder message preview" %}</a>
5
  {{ block.super }}
6
  <a href="">{% trans "Reminder message preview" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans "Reminder message preview" %}</h2>
10
  <h2>{% trans "Reminder message preview" %}</h2>
11 11
{% endblock %}
12 12

  
13 13
{% block content %}
14
<div id="message-preview">
15
{% if subject %}
16
<p>{% trans "Users will receive the following email:" %}</p>
17
<p class="email-subject"><strong>{% trans "Subject:" %}</strong> {{ subject }}</p>
18
{% else %}
19
<p>{% trans "Users will receive the following SMS:" %}</p>
20
{% endif %}
21
<p>{{ message }}</p>
14
  <div id="message-preview">
15
    {% if subject %}
16
      <p>{% trans "Users will receive the following email:" %}</p>
17
      <p class="email-subject"><strong>{% trans "Subject:" %}</strong> {{ subject }}</p>
18
    {% else %}
19
      <p>{% trans "Users will receive the following SMS:" %}</p>
20
    {% endif %}
21
    <p>{{ message }}</p>
22 22

  
23
<div class="buttons">
24
<a class="button" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Return to settings' %}</a>
25
</div>
26
</div>
23
    <div class="buttons">
24
      <a class="button" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Return to settings' %}</a>
25
    </div>
26
  </div>
27 27
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_resource_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="">{% trans "Add resource" %}</a>
5
  {{ block.super }}
6
  <a href="">{% trans "Add resource" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans "Add resource" %}</h2>
10
  <h2>{% trans "Add resource" %}</h2>
11 11
{% endblock %}
12 12

  
13 13
{% block content %}
14 14

  
15
<form method="post" enctype="multipart/form-data">
16
  {% csrf_token %}
17
  {{ form.as_p }}
18
  <div class="buttons">
19
    <button class="submit-button">{% trans "Save" %}</button>
20
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">{% trans 'Cancel' %}</a>
21
  </div>
22
</form>
15
  <form method="post" enctype="multipart/form-data">
16
    {% csrf_token %}
17
    {{ form.as_p }}
18
    <div class="buttons">
19
      <button class="submit-button">{% trans "Save" %}</button>
20
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">{% trans 'Cancel' %}</a>
21
    </div>
22
  </form>
23 23
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_settings.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
{% if desk %}
7
<a href="{% url 'chrono-manager-agenda-settings' desk.agenda_id %}">{% trans "Settings" %}</a>
8
{% else %}
9
<a href="{% url 'chrono-manager-agenda-settings' agenda.id|default:object.id %}">{% trans "Settings" %}</a>
10
{% endif %}
5
  {{ block.super }}
6
  {% if desk %}
7
    <a href="{% url 'chrono-manager-agenda-settings' desk.agenda_id %}">{% trans "Settings" %}</a>
8
  {% else %}
9
    <a href="{% url 'chrono-manager-agenda-settings' agenda.id|default:object.id %}">{% trans "Settings" %}</a>
10
  {% endif %}
11 11
{% endblock %}
12 12

  
13 13
{% block appbar %}
14
<h2>{% trans "Settings" %}
14
  <h2>{% trans "Settings" %}
15 15
    <span class="identifier">[{% trans "identifier:" %} {{object.slug}}]</span>
16
</h2>
17
<span class="actions">
18
  <a class="extra-actions-menu-opener"></a>
19
  {% block agenda-extra-management-actions %}
20
  {% endblock %}
21
  <ul class="extra-actions-menu">
22
    <li><a rel="popup" href="{% url 'chrono-manager-agenda-edit' pk=object.id %}">{% trans 'Options' %}</a></li>
23
    {% block agenda-extra-menu-actions %}{% endblock %}
24
    <li><a rel="popup" class="action-duplicate" href="{% url 'chrono-manager-agenda-duplicate' pk=object.pk %}">{% trans 'Duplicate' %}</a></li>
25
    <li><a download href="{% url 'chrono-manager-agenda-export' pk=object.id %}">{% trans 'Export Configuration (JSON)' %}</a></li>
26
    {% if object.kind == 'events' %}
27
      <li><a download href="{% url 'chrono-manager-agenda-export-events' pk=object.pk %}">{% trans 'Export Events (CSV)' %}</a></li>
28
    {% endif %}
29
    {% if user.is_staff %}
30
      <li><a rel="popup" href="{% url 'chrono-manager-agenda-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
31
    {% endif %}
32
  </ul>
33
</span>
16
  </h2>
17
  <span class="actions">
18
    <a class="extra-actions-menu-opener"></a>
19
    {% block agenda-extra-management-actions %}
20
    {% endblock %}
21
    <ul class="extra-actions-menu">
22
      <li><a rel="popup" href="{% url 'chrono-manager-agenda-edit' pk=object.id %}">{% trans 'Options' %}</a></li>
23
      {% block agenda-extra-menu-actions %}{% endblock %}
24
      <li><a rel="popup" class="action-duplicate" href="{% url 'chrono-manager-agenda-duplicate' pk=object.pk %}">{% trans 'Duplicate' %}</a></li>
25
      <li><a download href="{% url 'chrono-manager-agenda-export' pk=object.id %}">{% trans 'Export Configuration (JSON)' %}</a></li>
26
      {% if object.kind == 'events' %}
27
        <li><a download href="{% url 'chrono-manager-agenda-export-events' pk=object.pk %}">{% trans 'Export Events (CSV)' %}</a></li>
28
      {% endif %}
29
      {% if user.is_staff %}
30
        <li><a rel="popup" href="{% url 'chrono-manager-agenda-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
31
      {% endif %}
32
    </ul>
33
  </span>
34 34
{% endblock %}
35 35

  
36 36
{% block content %}
37 37

  
38
<div class="section agenda-settings">
39
<div class="pk-tabs">
40
  <div class="pk-tabs--tab-list" role="tablist">
41
    {% block agenda-settings-extra-tab-buttons %}{% endblock %}
42
    {% if object.kind != 'virtual' %}
43
    <button aria-controls="panel-reminders" aria-selected="false" id="tab-reminders" role="tab" tabindex="-1">{% trans "Booking reminders" %}</button>
44
    {% endif %}
45
    <button aria-controls="panel-delays" aria-selected="false" id="tab-delays" role="tab" tabindex="-1">{% trans "Booking Delays" %}</button>
46
    <button aria-controls="panel-permissions" aria-selected="false" id="tab-permissions" role="tab" tabindex="-1">{% trans "Permissions" %}</button>
47
  </div>
48
  <div class="pk-tabs--container">
49

  
50
    {% block agenda-settings-extra-tab-list %}{% endblock %}
51

  
52
    {% if object.kind != 'virtual' %}
53
    <div aria-labelledby="tab-reminders" id="panel-reminders" role="tabpanel" tabindex="0" hidden="">
54
      {% for info in agenda.reminder_settings.display_info %}
55
      <p>{{ info }}</p>
56
      {% empty %}
57
      <p>{% trans "Reminders are disabled for this agenda." %}</p>
58
      {% endfor %}
59
      <p>
60
        {% if agenda.reminder_settings.days_before_email %}
61
        <a rel="popup" data-selector="#message-preview" href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='email' %}">{% trans "Preview email" %}</a>
62
        {% endif %}
63
        {% if agenda.reminder_settings.days_before_sms %}
64
        <a rel="popup" data-selector="#message-preview"  href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='sms' %}">{% trans "Preview SMS" %}</a>
38
  <div class="section agenda-settings">
39
    <div class="pk-tabs">
40
      <div class="pk-tabs--tab-list" role="tablist">
41
        {% block agenda-settings-extra-tab-buttons %}{% endblock %}
42
        {% if object.kind != 'virtual' %}
43
          <button aria-controls="panel-reminders" aria-selected="false" id="tab-reminders" role="tab" tabindex="-1">{% trans "Booking reminders" %}</button>
65 44
        {% endif %}
66
      </p>
67
      {% if agenda.reminder_settings.days_before_email or agenda.reminder_settings.days_before_sms %}
68
      <p>
69
        <a rel="popup" href="{% url 'chrono-manager-agenda-reminder-test' pk=object.pk %}">{% trans "Test reminder sending" %}</a>
70
      </p>
71
      {% endif %}
72
      <div class="panel--buttons">
73
        <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-reminder-settings' pk=object.id %}">{% trans "Configure" %}</a>
45
        <button aria-controls="panel-delays" aria-selected="false" id="tab-delays" role="tab" tabindex="-1">{% trans "Booking Delays" %}</button>
46
        <button aria-controls="panel-permissions" aria-selected="false" id="tab-permissions" role="tab" tabindex="-1">{% trans "Permissions" %}</button>
74 47
      </div>
75
    </div>
76
    {% endif %}
48
      <div class="pk-tabs--container">
77 49

  
78
    <div aria-labelledby="tab-delays" hidden="" id="panel-delays" role="tabpanel" tabindex="0">
79
      <ul>
80
        <li>{% trans "Minimal booking delay:" %}
81
            {% if agenda.minimal_booking_delay is not None %}
82
              {% if agenda.minimal_booking_delay_in_working_days %}
83
              {% blocktrans count count=agenda.minimal_booking_delay %}{{ count }} working day{% plural %}{{ count }} working days{% endblocktrans %}
84
              {% else %}
85
              {% blocktrans count count=agenda.minimal_booking_delay %}{{ count }} day{% plural %}{{ count }} days{% endblocktrans %}
50
        {% block agenda-settings-extra-tab-list %}{% endblock %}
51

  
52
        {% if object.kind != 'virtual' %}
53
          <div aria-labelledby="tab-reminders" id="panel-reminders" role="tabpanel" tabindex="0" hidden="">
54
            {% for info in agenda.reminder_settings.display_info %}
55
              <p>{{ info }}</p>
56
            {% empty %}
57
              <p>{% trans "Reminders are disabled for this agenda." %}</p>
58
            {% endfor %}
59
            <p>
60
              {% if agenda.reminder_settings.days_before_email %}
61
                <a rel="popup" data-selector="#message-preview" href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='email' %}">{% trans "Preview email" %}</a>
86 62
              {% endif %}
87
            {% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
88
        <li>{% trans "Maximal booking delay:" %}
89
            {% if agenda.maximal_booking_delay is not None %}
90
              {% blocktrans count count=agenda.maximal_booking_delay %}{{ count }} day{% plural %}{{ count }} days{% endblocktrans %}
91
            {% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
92
      </ul>
93
      <div class="panel--buttons">
94
        <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-booking-delays' pk=object.id %}">{% trans 'Configure' %}</a>
95
      </div>
96
    </div>
63
              {% if agenda.reminder_settings.days_before_sms %}
64
                <a rel="popup" data-selector="#message-preview"  href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='sms' %}">{% trans "Preview SMS" %}</a>
65
              {% endif %}
66
            </p>
67
            {% if agenda.reminder_settings.days_before_email or agenda.reminder_settings.days_before_sms %}
68
              <p>
69
                <a rel="popup" href="{% url 'chrono-manager-agenda-reminder-test' pk=object.pk %}">{% trans "Test reminder sending" %}</a>
70
              </p>
71
            {% endif %}
72
            <div class="panel--buttons">
73
              <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-reminder-settings' pk=object.id %}">{% trans "Configure" %}</a>
74
            </div>
75
          </div>
76
        {% endif %}
77

  
78
        <div aria-labelledby="tab-delays" hidden="" id="panel-delays" role="tabpanel" tabindex="0">
79
          <ul>
80
            <li>{% trans "Minimal booking delay:" %}
81
              {% if agenda.minimal_booking_delay is not None %}
82
                {% if agenda.minimal_booking_delay_in_working_days %}
83
                  {% blocktrans count count=agenda.minimal_booking_delay %}{{ count }} working day{% plural %}{{ count }} working days{% endblocktrans %}
84
                {% else %}
85
                  {% blocktrans count count=agenda.minimal_booking_delay %}{{ count }} day{% plural %}{{ count }} days{% endblocktrans %}
86
                {% endif %}
87
              {% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
88
            <li>{% trans "Maximal booking delay:" %}
89
              {% if agenda.maximal_booking_delay is not None %}
90
                {% blocktrans count count=agenda.maximal_booking_delay %}{{ count }} day{% plural %}{{ count }} days{% endblocktrans %}
91
              {% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
92
          </ul>
93
          <div class="panel--buttons">
94
            <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-booking-delays' pk=object.id %}">{% trans 'Configure' %}</a>
95
          </div>
96
        </div>
97

  
98
        <div aria-labelledby="tab-permissions" hidden="" id="panel-permissions" role="tabpanel" tabindex="0">
99
          <ul>
100
            <li>{% trans "Edit Role:" %} {% if agenda.edit_role %}{{ agenda.edit_role }}{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
101
            <li>{% trans "View Role:" %} {% if agenda.view_role %}{{ agenda.view_role }}{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
102
          </ul>
103
          <div class="panel--buttons">
104
            <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-roles' pk=object.id %}">{% trans 'Configure' %}</a>
105
          </div>
106
        </div>
97 107

  
98
    <div aria-labelledby="tab-permissions" hidden="" id="panel-permissions" role="tabpanel" tabindex="0">
99
      <ul>
100
        <li>{% trans "Edit Role:" %} {% if agenda.edit_role %}{{ agenda.edit_role }}{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
101
        <li>{% trans "View Role:" %} {% if agenda.view_role %}{{ agenda.view_role }}{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
102
      </ul>
103
      <div class="panel--buttons">
104
        <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-roles' pk=object.id %}">{% trans 'Configure' %}</a>
105 108
      </div>
106 109
    </div>
107

  
108 110
  </div>
109
</div>
110
</div>
111 111
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_unavailability_calendar_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="">{% trans "Add unavailability calendar" %}</a>
5
  {{ block.super }}
6
  <a href="">{% trans "Add unavailability calendar" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans "Add unavailability calendar" %}</h2>
10
  <h2>{% trans "Add unavailability calendar" %}</h2>
11 11
{% endblock %}
12 12

  
13 13
{% block content %}
14 14

  
15
<form method="post" enctype="multipart/form-data">
16
  {% csrf_token %}
17
  {{ form.as_p }}
18
  <div class="buttons">
19
    <button class="submit-button">{% trans "Save" %}</button>
20
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">{% trans 'Cancel' %}</a>
21
  </div>
22
</form>
15
  <form method="post" enctype="multipart/form-data">
16
    {% csrf_token %}
17
    {{ form.as_p }}
18
    <div class="buttons">
19
      <button class="submit-button">{% trans "Save" %}</button>
20
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">{% trans 'Cancel' %}</a>
21
    </div>
22
  </form>
23 23
{% endblock %}
chrono/manager/templates/chrono/manager_agenda_view.html
2 2
{% load i18n %}
3 3

  
4 4
{% block page-title-extra-label %}
5
- {% firstof agenda.label object.label %}
5
  - {% firstof agenda.label object.label %}
6 6
{% endblock %}
7 7

  
8 8
{% block appbar %}
9
<h2>{{ object.label }}</h2>
9
  <h2>{{ object.label }}</h2>
10 10
  <span class="actions">
11 11
    {% block actions %}
12 12
      {% if user_can_manage %}
13
      <a href="{{ object.get_settings_url }}">{% trans 'Settings' %}</a>
13
        <a href="{{ object.get_settings_url }}">{% trans 'Settings' %}</a>
14 14
      {% endif %}
15 15
    {% endblock %}
16 16
  </span>
17 17
{% endblock %}
18 18

  
19 19
{% block breadcrumb %}
20
{{ block.super }}
21
{% if agenda %}
22
<a href="{{ agenda.get_absolute_url }}">{{agenda.label}}</a>
23
{% elif object %}
24
<a href="{{ object.get_absolute_url }}">{{object.label}}</a>
25
{% endif %}
20
  {{ block.super }}
21
  {% if agenda %}
22
    <a href="{{ agenda.get_absolute_url }}">{{agenda.label}}</a>
23
  {% elif object %}
24
    <a href="{{ object.get_absolute_url }}">{{object.label}}</a>
25
  {% endif %}
26 26
{% endblock %}
27 27

  
28 28
{% block content %}
chrono/manager/templates/chrono/manager_base.html
2 2
{% load static i18n %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
<script src="{% static 'js/chrono.manager.js' %}"></script>
5
  {{ block.super }}
6
  <script src="{% static 'js/chrono.manager.js' %}"></script>
7 7
{% endblock %}
8 8

  
9 9
{% block page-title %}
......
22 22
{% block homepage-title %}{{portal_agent_title}}{% endblock %}
23 23

  
24 24
{% block breadcrumb %}
25
 {% if portal_agent_url %}{{ block.super }}{% endif %}
26
 <a href="{% url 'chrono-manager-homepage' %}">{% trans 'Agendas' %}</a>
25
  {% if portal_agent_url %}{{ block.super }}{% endif %}
26
  <a href="{% url 'chrono-manager-homepage' %}">{% trans 'Agendas' %}</a>
27 27
{% endblock %}
28 28

  
29 29
{% block logout-url %}{% url 'auth_logout' %}{% endblock %}
chrono/manager/templates/chrono/manager_category_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
{% if object.id %}
6
<h2>{% trans "Edit Category" %}</h2>
7
{% else %}
8
<h2>{% trans "New Category" %}</h2>
9
{% endif %}
5
  {% if object.id %}
6
    <h2>{% trans "Edit Category" %}</h2>
7
  {% else %}
8
    <h2>{% trans "New Category" %}</h2>
9
  {% endif %}
10 10
{% endblock %}
11 11

  
12 12
{% block content %}
13 13

  
14
<form method="post" enctype="multipart/form-data">
15
  {% csrf_token %}
16
  {{ form.as_p }}
17
  <div class="buttons">
18
    <button class="submit-button">{% trans "Save" %}</button>
19
    <a class="cancel" href="{% url 'chrono-manager-category-list' %}">{% trans 'Cancel' %}</a>
20
  </div>
21
</form>
14
  <form method="post" enctype="multipart/form-data">
15
    {% csrf_token %}
16
    {{ form.as_p }}
17
    <div class="buttons">
18
      <button class="submit-button">{% trans "Save" %}</button>
19
      <a class="cancel" href="{% url 'chrono-manager-category-list' %}">{% trans 'Cancel' %}</a>
20
    </div>
21
  </form>
22 22
{% endblock %}
chrono/manager/templates/chrono/manager_category_list.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-category-list' %}">{% trans "Categories" %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-category-list' %}">{% trans "Categories" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans 'Categories' %}</h2>
11
<span class="actions">
12
<a rel="popup" href="{% url 'chrono-manager-category-add' %}">{% trans 'New' %}</a>
13
</span>
10
  <h2>{% trans 'Categories' %}</h2>
11
  <span class="actions">
12
    <a rel="popup" href="{% url 'chrono-manager-category-add' %}">{% trans 'New' %}</a>
13
  </span>
14 14
{% endblock %}
15 15

  
16 16

  
17 17
{% block content %}
18
{% if object_list %}
19
<div>
20
  <ul class="objects-list single-links">
21
    {% for object in object_list %}
22
    <li>
23
        <a href="{% url 'chrono-manager-category-edit' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
24
        <a rel="popup" class="delete" href="{% url 'chrono-manager-category-delete' pk=object.id %}">{% trans "remove" %}</a>
25
    </li>
26
    {% endfor %}
27
  </ul>
28
</div>
29
{% else %}
30
<div class="big-msg-info">
31
  {% blocktrans %}
32
  This site doesn't have any category yet. Click on the "New" button in the top
33
  right of the page to add a first one.
34
  {% endblocktrans %}
35
</div>
36
{% endif %}
18
  {% if object_list %}
19
    <div>
20
      <ul class="objects-list single-links">
21
        {% for object in object_list %}
22
          <li>
23
            <a href="{% url 'chrono-manager-category-edit' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
24
            <a rel="popup" class="delete" href="{% url 'chrono-manager-category-delete' pk=object.id %}">{% trans "remove" %}</a>
25
          </li>
26
        {% endfor %}
27
      </ul>
28
    </div>
29
  {% else %}
30
    <div class="big-msg-info">
31
      {% blocktrans %}
32
        This site doesn't have any category yet. Click on the "New" button in the top
33
        right of the page to add a first one.
34
      {% endblocktrans %}
35
    </div>
36
  {% endif %}
37 37
{% endblock %}
chrono/manager/templates/chrono/manager_confirm_booking_cancellation.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Cancel booking" %}</h2>
5
  <h2>{% trans "Cancel booking" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% if object.get_backoffice_url and not object.cancel_callback_url %}
11
  {% if not user.is_staff %}
12
  <p>{% trans "This booking has no callback url configured, cancellation must be handled from corresponding form." %}</p>
13
  <p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
14
  {% else %}
15
  <div class="warningnotice">
16
  <p>{% trans "This booking has no callback url configured, cancellation should be handled from corresponding form in order to garantee a coherent situation." %}</p>
17
  </div>
18
  <p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
19
  <p>{% trans "However, since you are an administrator, you can choose to cancel it anyway." %}</p>
20
  {% endif %}
21
  {% else %}
22
  <p>
23
  {% blocktrans trimmed with booking=booking.events_display %}
24
  Are you sure you want to cancel booking "{{ booking }}"?
25
  {% endblocktrans %}
26
  </p>
27
  {% endif %}
9
  <form method="post">
10
    {% if object.get_backoffice_url and not object.cancel_callback_url %}
11
      {% if not user.is_staff %}
12
        <p>{% trans "This booking has no callback url configured, cancellation must be handled from corresponding form." %}</p>
13
        <p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
14
      {% else %}
15
        <div class="warningnotice">
16
          <p>{% trans "This booking has no callback url configured, cancellation should be handled from corresponding form in order to garantee a coherent situation." %}</p>
17
        </div>
18
        <p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
19
        <p>{% trans "However, since you are an administrator, you can choose to cancel it anyway." %}</p>
20
      {% endif %}
21
    {% else %}
22
      <p>
23
        {% blocktrans trimmed with booking=booking.events_display %}
24
          Are you sure you want to cancel booking "{{ booking }}"?
25
        {% endblocktrans %}
26
      </p>
27
    {% endif %}
28 28

  
29
  {% if not object.get_backoffice_url or object.cancel_callback_url or user.is_staff %}
30
  {% csrf_token %}
31
  <input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
32
  {{ form.as_p }}
33
  <div class="buttons">
34
    <button class="delete-button">{% trans "Proceed with cancellation" %}</button>
35
    <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Abort' %}</a>
36
  </div>
37
  {% endif %}
38
</form>
29
    {% if not object.get_backoffice_url or object.cancel_callback_url or user.is_staff %}
30
      {% csrf_token %}
31
      <input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
32
      {{ form.as_p }}
33
      <div class="buttons">
34
        <button class="delete-button">{% trans "Proceed with cancellation" %}</button>
35
        <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Abort' %}</a>
36
      </div>
37
    {% endif %}
38
  </form>
39 39
{% endblock %}
chrono/manager/templates/chrono/manager_confirm_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ view.model.get_verbose_name }}</h2>
5
  <h2>{{ view.model.get_verbose_name }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  <p>
12
  {% if cannot_delete %}
13
  {{ cannot_delete_msg }}
14
  {% else %}
15
  {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
16
  {% endif %}
17
  </p>
18
  <div class="buttons">
19
    <button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
20
    <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
21
  </div>
22
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    <p>
12
      {% if cannot_delete %}
13
        {{ cannot_delete_msg }}
14
      {% else %}
15
        {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
16
      {% endif %}
17
    </p>
18
    <div class="buttons">
19
      <button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
20
      <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
21
    </div>
22
  </form>
23 23
{% endblock %}
chrono/manager/templates/chrono/manager_confirm_event_cancellation.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ view.model.get_verbose_name }}</h2>
5
  <h2>{{ view.model.get_verbose_name }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post">
11
  {% if cancellation_forbidden %}
12
  <div class="warningnotice">
13
    {% blocktrans trimmed %}
14
    This event has bookings with no callback url configured. Their cancellation must be
15
    handled individually from the forms attached to them. Only then, cancelling this event
16
    will be allowed.
17
    {% endblocktrans %}
18
  </div>
19
  {% else %}
20
  {% csrf_token %}
21
  <p>
22
  {% trans "Are you sure you want to cancel this event?" %}
23
  {% if bookings_count %}
24
  {% if cancel_bookings %}
25
  {% blocktrans trimmed count count=bookings_count %}
26
  {{ count }} related booking will also be cancelled.
27
  {% plural %}
28
  {{ count }} related bookings will also be cancelled.
29
  {% endblocktrans %}
30
  {% else %}
31
  {% trans "Related bookings will have to be manually cancelled if needed." %}
32
  {% endif %}
33
  {% endif %}
34
  </p>
35
  <input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
36
  {{ form.as_p }}
37
  <div class="buttons">
38
    <button class="delete-button">{% trans "Proceed with cancellation" %}</button>
39
    <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Abort' %}</a>
40
  </div>
41
  {% endif %}
42
</form>
10
  <form method="post">
11
    {% if cancellation_forbidden %}
12
      <div class="warningnotice">
13
        {% blocktrans trimmed %}
14
          This event has bookings with no callback url configured. Their cancellation must be
15
          handled individually from the forms attached to them. Only then, cancelling this event
16
          will be allowed.
17
        {% endblocktrans %}
18
      </div>
19
    {% else %}
20
      {% csrf_token %}
21
      <p>
22
        {% trans "Are you sure you want to cancel this event?" %}
23
        {% if bookings_count %}
24
          {% if cancel_bookings %}
25
            {% blocktrans trimmed count count=bookings_count %}
26
              {{ count }} related booking will also be cancelled.
27
            {% plural %}
28
              {{ count }} related bookings will also be cancelled.
29
            {% endblocktrans %}
30
          {% else %}
31
            {% trans "Related bookings will have to be manually cancelled if needed." %}
32
          {% endif %}
33
        {% endif %}
34
      </p>
35
      <input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
36
      {{ form.as_p }}
37
      <div class="buttons">
38
        <button class="delete-button">{% trans "Proceed with cancellation" %}</button>
39
        <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Abort' %}</a>
40
      </div>
41
    {% endif %}
42
  </form>
43 43
{% endblock %}
chrono/manager/templates/chrono/manager_confirm_event_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ view.model.get_verbose_name }}</h2>
5
  <h2>{{ view.model.get_verbose_name }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  <input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
12
  <p>
13
  {% if cannot_delete %}
14
  {% blocktrans %}This cannot be removed as there are bookings.{% endblocktrans %}
15
  {% else %}
16
  {% blocktrans %}Are you sure you want to delete this event?{% endblocktrans %}
17
  {% endif %}
18
  </p>
19
  <div class="buttons">
20
    <button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
21
    <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
22
  </div>
23
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    <input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
12
    <p>
13
      {% if cannot_delete %}
14
        {% blocktrans %}This cannot be removed as there are bookings.{% endblocktrans %}
15
      {% else %}
16
        {% blocktrans %}Are you sure you want to delete this event?{% endblocktrans %}
17
      {% endif %}
18
    </p>
19
    <div class="buttons">
20
      <button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
21
      <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
22
    </div>
23
  </form>
24 24
{% endblock %}
chrono/manager/templates/chrono/manager_confirm_exception_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ object }}</h2>
5
  <h2>{{ object }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  <p>
12
  {% blocktrans %}Are you sure you want to delete this exception?{% endblocktrans %}
13
  </p>
14
  <div class="buttons">
15
    <button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
16
    <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
17
  </div>
18
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    <p>
12
      {% blocktrans %}Are you sure you want to delete this exception?{% endblocktrans %}
13
    </p>
14
    <div class="buttons">
15
      <button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
16
      <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
17
    </div>
18
  </form>
19 19
{% endblock %}
chrono/manager/templates/chrono/manager_confirm_source_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ object }}</h2>
5
  <h2>{{ object }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  <p>
12
  {% blocktrans %}Are you sure you want to delete this exception source?{% endblocktrans %}
13
  </p>
14
  <div class="buttons">
15
    <button class="delete-button">{% trans 'Delete' %}</button>
16
    <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
17
  </div>
18
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    <p>
12
      {% blocktrans %}Are you sure you want to delete this exception source?{% endblocktrans %}
13
    </p>
14
    <div class="buttons">
15
      <button class="delete-button">{% trans 'Delete' %}</button>
16
      <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
17
    </div>
18
  </form>
19 19
{% endblock %}
chrono/manager/templates/chrono/manager_confirm_virtual_member_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Exclude Agenda" %}</h2>
5
  <h2>{% trans "Exclude Agenda" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  <p>
12
  {% blocktrans %}Are you sure you want to exclude this agenda from the virtual agenda ?{% endblocktrans %}
13
  </p>
14
  <div class="buttons">
15
    <button class="delete-button">{% trans 'Exclude' %}</button>
16
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Cancel' %}</a>
17
  </div>
18
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    <p>
12
      {% blocktrans %}Are you sure you want to exclude this agenda from the virtual agenda ?{% endblocktrans %}
13
    </p>
14
    <div class="buttons">
15
      <button class="delete-button">{% trans 'Exclude' %}</button>
16
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Cancel' %}</a>
17
    </div>
18
  </form>
19 19
{% endblock %}
chrono/manager/templates/chrono/manager_desk_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
{{ form.media }}
5
  {{ block.super }}
6
  {{ form.media }}
7 7
{% endblock %}
8 8

  
9 9
{% block breadcrumb %}
10
{{ block.super }}
11
{% if object.id %}
12
<a href="">{{object.label}}</a>
13
{% else %}
14
<a href="">{% trans "New Desk" %}</a>
15
{% endif %}
10
  {{ block.super }}
11
  {% if object.id %}
12
    <a href="">{{object.label}}</a>
13
  {% else %}
14
    <a href="">{% trans "New Desk" %}</a>
15
  {% endif %}
16 16
{% endblock %}
17 17

  
18 18
{% block appbar %}
19
{% if object.id %}
20
<h2>{% trans "Edit Desk" %}</h2>
21
<span class="actions">
22
<a rel="popup" href="{% url 'chrono-manager-desk-delete' pk=object.id %}">{% trans 'Delete' %}</a>
23
</span>
24
{% else %}
25
<h2>{% trans "New Desk" %}</h2>
26
{% endif %}
19
  {% if object.id %}
20
    <h2>{% trans "Edit Desk" %}</h2>
21
    <span class="actions">
22
      <a rel="popup" href="{% url 'chrono-manager-desk-delete' pk=object.id %}">{% trans 'Delete' %}</a>
23
    </span>
24
  {% else %}
25
    <h2>{% trans "New Desk" %}</h2>
26
  {% endif %}
27 27
{% endblock %}
28 28

  
29 29
{% block content %}
30 30

  
31
<form method="post" enctype="multipart/form-data">
32
  {% csrf_token %}
33
  {{ form.as_p }}
34
  <div class="buttons">
35
    <button class="submit-button">{% trans "Save" %}</button>
36
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
37
  </div>
38
</form>
31
  <form method="post" enctype="multipart/form-data">
32
    {% csrf_token %}
33
    {{ form.as_p }}
34
    <div class="buttons">
35
      <button class="submit-button">{% trans "Save" %}</button>
36
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
37
    </div>
38
  </form>
39 39
{% endblock %}
chrono/manager/templates/chrono/manager_event_cancellation_report.html
2 2
{% load i18n %}
3 3

  
4 4
{% block page-title-extra-label %}
5
{{ block.super }} - {% trans "Cancellation error report" %}
5
  {{ block.super }} - {% trans "Cancellation error report" %}
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
9
{{ block.super }}
10
<a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.id %}">{% trans "Cancellation error reports" %}</a>
9
  {{ block.super }}
10
  <a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.id %}">{% trans "Cancellation error reports" %}</a>
11 11
{% endblock %}
12 12

  
13 13
{% block appbar %}
14
<h2>{% trans "Cancellation error report:" %} {{ report }}</h2>
15
{% block actions %}
16
<a rel="popup" href="{% url 'chrono-manager-event-cancel' pk=agenda.pk event_pk=report.event.pk %}?force_cancellation=True">{% trans "Force cancellation" %}</a>
17
{% endblock %}
14
  <h2>{% trans "Cancellation error report:" %} {{ report }}</h2>
15
  {% block actions %}
16
    <a rel="popup" href="{% url 'chrono-manager-event-cancel' pk=agenda.pk event_pk=report.event.pk %}?force_cancellation=True">{% trans "Force cancellation" %}</a>
17
  {% endblock %}
18 18
{% endblock %}
19 19

  
20 20
{% block content %}
21
<p>{% trans "Cancellation failed for the following bookings:" %}</p>
22
<ul>
23
{% for booking, error in errors.items %}
24
<li><a href="{{ booking.get_backoffice_url }}">{{ booking.events_display }}</a>: {{ error }}</li>
25
{% endfor %}
26
</ul>
21
  <p>{% trans "Cancellation failed for the following bookings:" %}</p>
22
  <ul>
23
    {% for booking, error in errors.items %}
24
      <li><a href="{{ booking.get_backoffice_url }}">{{ booking.events_display }}</a>: {{ error }}</li>
25
    {% endfor %}
26
  </ul>
27 27
{% endblock %}
chrono/manager/templates/chrono/manager_event_cancellation_report_notice.html
1 1
{% load i18n %}
2 2

  
3 3
{% for report in cancellation_reports %}
4
<div class="warningnotice">
5
<p>
6
{% blocktrans with event=report.event %}Errors occured during cancellation of event "{{ event }}".{% endblocktrans %}
7
<a href="{% url 'chrono-manager-event-cancellation-report' pk=agenda.pk report_pk=report.pk %}">{% trans "Details" %}</a>
8
</p>
9
</div>
4
  <div class="warningnotice">
5
    <p>
6
      {% blocktrans with event=report.event %}Errors occured during cancellation of event "{{ event }}".{% endblocktrans %}
7
      <a href="{% url 'chrono-manager-event-cancellation-report' pk=agenda.pk report_pk=report.pk %}">{% trans "Details" %}</a>
8
    </p>
9
  </div>
10 10
{% endfor %}
chrono/manager/templates/chrono/manager_event_cancellation_reports.html
2 2
{% load i18n %}
3 3

  
4 4
{% block page-title-extra-label %}
5
{{ block.super }} - {% trans "Cancellation error reports" %}
5
  {{ block.super }} - {% trans "Cancellation error reports" %}
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
9
{{ block.super }}
10
<a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans "Cancellation error reports" %}</a>
9
  {{ block.super }}
10
  <a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans "Cancellation error reports" %}</a>
11 11
{% endblock %}
12 12

  
13 13
{% block appbar %}
14
<h2>{% trans "Cancellation error reports" %}</h2>
14
  <h2>{% trans "Cancellation error reports" %}</h2>
15 15
{% endblock %}
16 16

  
17 17
{% block content %}
18
<ul>
19
{% for report in cancellation_reports %}
20
<li {% if not report.seen %}class="new-report"{% endif %}>
21
  <a href="{% url 'chrono-manager-event-cancellation-report' pk=agenda.pk report_pk=report.pk %}">{{ report }}</a>
22
  ({% blocktrans count count=report.bookings.count %}{{ count }} failure{% plural %}{{ count }} failures{% endblocktrans %})
23
</li>
24
{% empty %}
25
<li>{% trans "No error report to show." %}</li>
26
{% endfor %}
27
</ul>
18
  <ul>
19
    {% for report in cancellation_reports %}
20
      <li {% if not report.seen %}class="new-report"{% endif %}>
21
        <a href="{% url 'chrono-manager-event-cancellation-report' pk=agenda.pk report_pk=report.pk %}">{{ report }}</a>
22
        ({% blocktrans count count=report.bookings.count %}{{ count }} failure{% plural %}{{ count }} failures{% endblocktrans %})
23
      </li>
24
    {% empty %}
25
      <li>{% trans "No error report to show." %}</li>
26
    {% endfor %}
27
  </ul>
28 28
{% endblock %}
chrono/manager/templates/chrono/manager_event_check.html
2 2
{% load static i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-event-check' pk=agenda.pk event_pk=object.pk %}">{% trans "Check" %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-event-check' pk=agenda.pk event_pk=object.pk %}">{% trans "Check" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar_actions %}{% endblock %}
10 10

  
11 11
{% block content %}
12
<div class="section">
13
  <h3>
14
    {% blocktrans with booked_places=object.booked_places places=object.places %}Bookings ({{ booked_places }}/{{ places }}){% endblocktrans %}
15
  </h3>
16
  <div>
17
    <form class="check-bookings-filters">
18
      {{ filterset.form.as_p }}
19
      <script>
20
      $(function() {
21
          $('form.check-bookings-filters input').on('change',
12
  <div class="section">
13
    <h3>
14
      {% blocktrans with booked_places=object.booked_places places=object.places %}Bookings ({{ booked_places }}/{{ places }}){% endblocktrans %}
15
    </h3>
16
    <div>
17
      <form class="check-bookings-filters">
18
        {{ filterset.form.as_p }}
19
        <script>
20
          $(function() {
21
            $('form.check-bookings-filters input').on('change',
22 22
              function() {
23 23
                $(this).parents('form').submit();
24
          });
25
      });
26
      </script>
27
    </form>
28
    <table class="main check-bookings">
29
      <tbody>
30
      {% if results and not event.checked %}
31
        <tr class="booking">
32
          <td class="booking-actions">
33
            <form method="post" action="{% url 'chrono-manager-event-checked' pk=agenda.pk event_pk=object.pk %}">
34
              {% csrf_token %}
35
              <button class="submit-button">{% trans "Mark the event as checked" %}</button>
36
            </form>
37
          </td>
38
        </tr>
39
      {% endif %}
40
      {% if booked_without_status %}
41
        {% if not event.checked or not agenda.disable_check_update %}
42
        <tr class="booking all-bookings">
43
          <td colspan="2"><b>{% trans "Mark all bookings without status:" %}</b></td>
44
          <td class="booking-actions">
45
            <form method="post" action="{% url 'chrono-manager-event-presence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-presence">
46
              {% csrf_token %}
47
              <button class="submit-button">{% trans "Presence" %}</button>
48
              {% if presence_form.check_type.field.choices.1 %}{{ presence_form.check_type }}{% endif %}
49
              <script>
50
              $(function() {
51
                  $('#all-bookings-presence select').on('change',
52
                      function() {
53
                        $('#all-bookings-presence').submit();
54
                  });
55
              });
56
              </script>
57
            </form>
58
            <form method="post" action="{% url 'chrono-manager-event-absence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-absence">
59
              {% csrf_token %}
60
              <button class="submit-button">{% trans "Absence" %}</button>
61
              {% if absence_form.check_type.field.choices.1 %}{{ absence_form.check_type }}{% endif %}
62
              <script>
63
              $(function() {
64
                  $('#all-bookings-absence select').on('change',
65
                      function() {
66
                        $('#all-bookings-absence').submit();
67
                  });
68 24
              });
69
              </script>
70
            </form>
71
          </td>
72
        </tr>
73
        {% endif %}
74
      {% endif %}
75
      {% for result in results %}
76
        <tr class="booking">
77
        {% if result.kind == 'booking' %}
78
          {% if result.cancellation_datetime is None %}
79
            {% include "chrono/manager_event_check_booking_fragment.html" with booking=result %}
80
          {% else %}
81
              <td class="booking-username main-list">{{ result.get_user_block }}</td>
82
              <td class="booking-status">({% trans "Cancelled" %})</td>
83
              {% if not event.checked or not agenda.disable_check_update %}
84
              <td class="booking-actions"></td>
85
              {% endif %}
25
          });
26
        </script>
27
      </form>
28
      <table class="main check-bookings">
29
        <tbody>
30
          {% if results and not event.checked %}
31
            <tr class="booking">
32
              <td class="booking-actions">
33
                <form method="post" action="{% url 'chrono-manager-event-checked' pk=agenda.pk event_pk=object.pk %}">
34
                  {% csrf_token %}
35
                  <button class="submit-button">{% trans "Mark the event as checked" %}</button>
36
                </form>
37
              </td>
38
            </tr>
86 39
          {% endif %}
87
        {% elif result.kind == 'subscription' %}
88
          <td class="booking-username main-list">{{ result.get_user_block }}</td>
89
          <td class="booking-status">({% trans "Not booked" %})</td>
90
          {% if not event.checked or not agenda.disable_check_update %}
91
          <td class="booking-actions"></td>
40
          {% if booked_without_status %}
41
            {% if not event.checked or not agenda.disable_check_update %}
42
              <tr class="booking all-bookings">
43
                <td colspan="2"><b>{% trans "Mark all bookings without status:" %}</b></td>
44
                <td class="booking-actions">
45
                  <form method="post" action="{% url 'chrono-manager-event-presence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-presence">
46
                    {% csrf_token %}
47
                    <button class="submit-button">{% trans "Presence" %}</button>
48
                    {% if presence_form.check_type.field.choices.1 %}{{ presence_form.check_type }}{% endif %}
49
                    <script>
50
                      $(function() {
51
                        $('#all-bookings-presence select').on('change',
52
                          function() {
53
                            $('#all-bookings-presence').submit();
54
                          });
55
                      });
56
                    </script>
57
                  </form>
58
                  <form method="post" action="{% url 'chrono-manager-event-absence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-absence">
59
                    {% csrf_token %}
60
                    <button class="submit-button">{% trans "Absence" %}</button>
61
                    {% if absence_form.check_type.field.choices.1 %}{{ absence_form.check_type }}{% endif %}
62
                    <script>
63
                      $(function() {
64
                        $('#all-bookings-absence select').on('change',
65
                          function() {
66
                            $('#all-bookings-absence').submit();
67
                          });
68
                      });
69
                    </script>
70
                  </form>
71
                </td>
72
              </tr>
73
            {% endif %}
92 74
          {% endif %}
93
        {% endif %}
94
        </tr>
95
      {% endfor %}
96
      </tbody>
97
    </table>
75
          {% for result in results %}
76
            <tr class="booking">
77
              {% if result.kind == 'booking' %}
78
                {% if result.cancellation_datetime is None %}
79
                  {% include "chrono/manager_event_check_booking_fragment.html" with booking=result %}
80
                {% else %}
81
                  <td class="booking-username main-list">{{ result.get_user_block }}</td>
82
                  <td class="booking-status">({% trans "Cancelled" %})</td>
83
                  {% if not event.checked or not agenda.disable_check_update %}
84
                    <td class="booking-actions"></td>
85
                  {% endif %}
86
                {% endif %}
87
              {% elif result.kind == 'subscription' %}
88
                <td class="booking-username main-list">{{ result.get_user_block }}</td>
89
                <td class="booking-status">({% trans "Not booked" %})</td>
90
                {% if not event.checked or not agenda.disable_check_update %}
91
                  <td class="booking-actions"></td>
92
                {% endif %}
93
              {% endif %}
94
            </tr>
95
          {% endfor %}
96
        </tbody>
97
      </table>
98
    </div>
98 99
  </div>
99
</div>
100 100

  
101
{% if object.waiting_list_places %}
102
<div class="section">
103
  <h3>
104
    {% blocktrans with booked_places=object.booked_waiting_list_places places=object.waiting_list_places %}Waiting List ({{ booked_places }}/{{ places }}){% endblocktrans %}
105
  </h3>
106
  <div>
107
    <table class="main check-bookings">
108
      <tbody>
109
        {% for booking in waiting %}
110
        <tr>
111
          <td class="booking-username waiting">{{ booking.get_user_block }}{% if booking.places_count > 1 %} ({{ booking.places_count }} {% trans "places" %}){% endif %}</td>
112
          <td>{% if booking.cancellation_datetime %}({% trans "Cancelled" %}){% endif %}</td>
113
        </tr>
114
        {% endfor %}
115
      </tbody>
116
    </table>
117
  </div>
118
</div>
119
{% endif %}
101
  {% if object.waiting_list_places %}
102
    <div class="section">
103
      <h3>
104
        {% blocktrans with booked_places=object.booked_waiting_list_places places=object.waiting_list_places %}Waiting List ({{ booked_places }}/{{ places }}){% endblocktrans %}
105
      </h3>
106
      <div>
107
        <table class="main check-bookings">
108
          <tbody>
109
            {% for booking in waiting %}
110
              <tr>
111
                <td class="booking-username waiting">{{ booking.get_user_block }}{% if booking.places_count > 1 %} ({{ booking.places_count }} {% trans "places" %}){% endif %}</td>
112
                <td>{% if booking.cancellation_datetime %}({% trans "Cancelled" %}){% endif %}</td>
113
              </tr>
114
            {% endfor %}
115
          </tbody>
116
        </table>
117
      </div>
118
    </div>
119
  {% endif %}
120 120
{% endblock %}
chrono/manager/templates/chrono/manager_event_check_booking_fragment.html
8 8
  {% endif %}
9 9
</td>
10 10
{% if not event.checked or not agenda.disable_check_update %}
11
<td class="booking-actions" data-booking-id="{{ booking.id }}">
12
  <form method="post" action="{% url 'chrono-manager-booking-presence' pk=agenda.pk booking_pk=booking.pk %}" class="with-ajax presence">
13
    {% csrf_token %}
14
    <button class="submit-button"
15
            {% if booking.user_was_present is True %}disabled{% endif %}
16
            >{% trans "Presence" %}</button>
17
    {% if booking.presence_form.check_type.field.choices.1 %}{{ booking.presence_form.check_type }}{% endif %}
18
    <script>
19
    $(function() {
20
        $('td[data-booking-id="{{ booking.id }}"] form.presence select').on('change',
11
  <td class="booking-actions" data-booking-id="{{ booking.id }}">
12
    <form method="post" action="{% url 'chrono-manager-booking-presence' pk=agenda.pk booking_pk=booking.pk %}" class="with-ajax presence">
13
      {% csrf_token %}
14
      <button class="submit-button"
15
        {% if booking.user_was_present is True %}disabled{% endif %}
16
      >{% trans "Presence" %}</button>
17
      {% if booking.presence_form.check_type.field.choices.1 %}{{ booking.presence_form.check_type }}{% endif %}
18
      <script>
19
        $(function() {
20
          $('td[data-booking-id="{{ booking.id }}"] form.presence select').on('change',
21 21
            function() {
22 22
              $(this).parents('form.presence').submit();
23
            });
23 24
        });
24
    });
25
    </script>
26
  </form>
27
  <form method="post" action="{% url 'chrono-manager-booking-absence' pk=agenda.pk booking_pk=booking.pk %}" class="with-ajax absence">
28
    {% csrf_token %}
29
    <button class="submit-button"
30
            {% if booking.user_was_present is False %}disabled{% endif %}
31
            >{% trans "Absence" %}</button>
32
    {% if booking.absence_form.check_type.field.choices.1 %}{{ booking.absence_form.check_type }}{% endif %}
33
    <script>
34
    $(function() {
35
        $('td[data-booking-id="{{ booking.id }}"] form.absence select').on('change',
25
      </script>
26
    </form>
27
    <form method="post" action="{% url 'chrono-manager-booking-absence' pk=agenda.pk booking_pk=booking.pk %}" class="with-ajax absence">
28
      {% csrf_token %}
29
      <button class="submit-button"
30
        {% if booking.user_was_present is False %}disabled{% endif %}
31
      >{% trans "Absence" %}</button>
32
      {% if booking.absence_form.check_type.field.choices.1 %}{{ booking.absence_form.check_type }}{% endif %}
33
      <script>
34
        $(function() {
35
          $('td[data-booking-id="{{ booking.id }}"] form.absence select').on('change',
36 36
            function() {
37 37
              $(this).parents('form.absence').submit();
38
            });
38 39
        });
39
    });
40
    </script>
41
  </form>
42
</td>
40
      </script>
41
    </form>
42
  </td>
43 43
{% endif %}
chrono/manager/templates/chrono/manager_event_detail.html
2 2
{% load static i18n %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
<script src="{% static 'js/chrono_events.manager.js' %}"></script>
5
  {{ block.super }}
6
  <script src="{% static 'js/chrono_events.manager.js' %}"></script>
7 7
{% endblock %}
8 8

  
9 9
{% block page-title-extra-label %}
10
- {% firstof agenda.label event.label %}
10
  - {% firstof agenda.label event.label %}
11 11
{% endblock %}
12 12

  
13 13
{% block breadcrumb %}
14
{{ block.super }}
15
<a href="{% url 'chrono-manager-agenda-view' pk=agenda.id %}">{{agenda.label}}</a>
16
<a href="{% url 'chrono-manager-event-view' pk=agenda.id event_pk=event.id %}">{{event}}</a>
14
  {{ block.super }}
15
  <a href="{% url 'chrono-manager-agenda-view' pk=agenda.id %}">{{agenda.label}}</a>
16
  <a href="{% url 'chrono-manager-event-view' pk=agenda.id event_pk=event.id %}">{{event}}</a>
17 17
{% endblock %}
18 18

  
19 19
{% block appbar %}
20
<h2>
21
{% if event.label %}
22
{{ event.label }} — {{event.start_datetime|date:"DATETIME_FORMAT"}}
23
{% else %}
24
{{ event.start_datetime|date:"DATETIME_FORMAT"}}
25
{% endif %}
26
{% if event.cancellation_status %}<span class="tag">{{ event.cancellation_status }}</span>{% endif %}
27
{% if event.main_list_full %}<span class="tag">{% trans "Full" %}</span>{% endif %}
28
{% if event.checked %}<span class="tag">{% trans "Checked" %}</span>{% endif %}
29
</h2>
30
{% block appbar_actions %}
31
<span class="actions">
32
  {% if user_can_manage or event.agenda.booking_form_url %}
33
  <a class="extra-actions-menu-opener"></a>
34
  <ul class="extra-actions-menu">
35
    {% if user_can_manage %}
36
    {% if not event.primary_event %}
37
    <li><a rel="popup" href="{% url 'chrono-manager-event-delete' pk=event.agenda.id event_pk=event.id %}">{% trans 'Delete' %}</a></li>
20
  <h2>
21
    {% if event.label %}
22
      {{ event.label }} — {{event.start_datetime|date:"DATETIME_FORMAT"}}
23
    {% else %}
24
      {{ event.start_datetime|date:"DATETIME_FORMAT"}}
38 25
    {% endif %}
39
    {% if not event.cancellation_status %}
40
    <li><a rel="popup" href="{% url 'chrono-manager-event-cancel' pk=agenda.pk event_pk=event.pk %}?next={{ request.path }}">{% trans "Cancel" %}</a></li>
41
    {% endif %}
42
    <li><a href="{% url 'chrono-manager-event-edit' pk=agenda.id event_pk=event.id %}">{% trans "Options" %}</a></li>
43
    {% endif %}
44
    {% if event.agenda.booking_form_url %}
45
    <li><a href="{{ event.get_booking_form_url }}&ReturnURL={{ request.build_absolute_uri }}">{% trans "Booking form" %}</a></li>
46
    {% endif %}
47
    {% if not event.cancelled and agenda.subscriptions.exists %}
48
    <li><a href="{% url 'chrono-manager-event-timesheet' pk=agenda.pk event_pk=event.pk %}">{% trans "Timesheet" %}</a></li>
49
    {% endif %}
50
  </ul>
51
  {% endif %}
52
  {% if event.is_day_past and not event.cancelled %}
53
  <a href="{% url 'chrono-manager-event-check' pk=agenda.pk event_pk=event.pk %}">{% trans "Check" %}</a>
54
  {% endif %}
55
</span>
56
{% endblock %}
26
    {% if event.cancellation_status %}<span class="tag">{{ event.cancellation_status }}</span>{% endif %}
27
    {% if event.main_list_full %}<span class="tag">{% trans "Full" %}</span>{% endif %}
28
    {% if event.checked %}<span class="tag">{% trans "Checked" %}</span>{% endif %}
29
  </h2>
30
  {% block appbar_actions %}
31
    <span class="actions">
32
      {% if user_can_manage or event.agenda.booking_form_url %}
33
        <a class="extra-actions-menu-opener"></a>
34
        <ul class="extra-actions-menu">
35
          {% if user_can_manage %}
36
            {% if not event.primary_event %}
37
              <li><a rel="popup" href="{% url 'chrono-manager-event-delete' pk=event.agenda.id event_pk=event.id %}">{% trans 'Delete' %}</a></li>
38
            {% endif %}
39
            {% if not event.cancellation_status %}
40
              <li><a rel="popup" href="{% url 'chrono-manager-event-cancel' pk=agenda.pk event_pk=event.pk %}?next={{ request.path }}">{% trans "Cancel" %}</a></li>
41
            {% endif %}
42
            <li><a href="{% url 'chrono-manager-event-edit' pk=agenda.id event_pk=event.id %}">{% trans "Options" %}</a></li>
43
          {% endif %}
44
          {% if event.agenda.booking_form_url %}
45
            <li><a href="{{ event.get_booking_form_url }}&ReturnURL={{ request.build_absolute_uri }}">{% trans "Booking form" %}</a></li>
46
          {% endif %}
47
          {% if not event.cancelled and agenda.subscriptions.exists %}
48
            <li><a href="{% url 'chrono-manager-event-timesheet' pk=agenda.pk event_pk=event.pk %}">{% trans "Timesheet" %}</a></li>
49
          {% endif %}
50
        </ul>
51
      {% endif %}
52
      {% if event.is_day_past and not event.cancelled %}
53
        <a href="{% url 'chrono-manager-event-check' pk=agenda.pk event_pk=event.pk %}">{% trans "Check" %}</a>
54
      {% endif %}
55
    </span>
56
  {% endblock %}
57 57
{% endblock %}
58 58

  
59 59
{% block content %}
60
<div id="event_details">
61
  {% include "chrono/manager_event_detail_fragment.html" %}
62
</div>
60
  <div id="event_details">
61
    {% include "chrono/manager_event_detail_fragment.html" %}
62
  </div>
63 63

  
64 64
{% endblock %}
chrono/manager/templates/chrono/manager_event_detail_fragment.html
1 1
{% load i18n %}
2 2
{% if object.description or object.pricing or object.url %}
3
<div class="section">
4
<div>
5
 {% if object.description %}{{ object.description|linebreaks }}{% endif %}
6
 {% if object.pricing %}<p>{% trans "Pricing:" %} {{ object.pricing }}</p>{% endif %}
7
 {% if object.url %}<p><a href="{{ object.url }}">{{ object.url|truncatechars:100 }}</a></p>{% endif %}
8
 {% if object.publication_datetime %}<p>{% trans "Publication date:" %} {{ object.publication_datetime }}</p>{% endif %}
9
</div>
10
</div>
3
  <div class="section">
4
    <div>
5
      {% if object.description %}{{ object.description|linebreaks }}{% endif %}
6
      {% if object.pricing %}<p>{% trans "Pricing:" %} {{ object.pricing }}</p>{% endif %}
7
      {% if object.url %}<p><a href="{{ object.url }}">{{ object.url|truncatechars:100 }}</a></p>{% endif %}
8
      {% if object.publication_datetime %}<p>{% trans "Publication date:" %} {{ object.publication_datetime }}</p>{% endif %}
9
    </div>
10
  </div>
11 11
{% endif %}
12 12

  
13 13
<div class="section">
......
18 18
      Bookings ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining places
19 19
    {% endblocktrans %}
20 20
  </h3>
21
<div>
22

  
23
  {% if object.booked_places > event.places %}
24
    <div class="errornotice"><p>{% trans "This event is overbooked." %}</p></div>
25
  {% elif object.booked_places == event.places %}
26
    <div class="infonotice"><p>{% trans "This event is full." %}</p></div>
27
  {% endif %}
21
  <div>
28 22

  
29
  <ul class="objects-list single-links">
30
    {% for booking in booked %}
31
    <li>
32
    <a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}, {{ booking.creation_datetime|date:"DATETIME_FORMAT" }}</a>
33
    {% if not booking.primary_booking %}
34
    <a rel="popup" class="delete" href="{% url 'chrono-manager-booking-cancel' pk=agenda.id booking_pk=booking.id %}?next={{ request.path }}">{% trans "Cancel" %}</a>
35
    {% else %}
36
    <a class="delete disabled" title="{% trans "Can not cancel a secondary booking" %}" href="#">{% trans "Cancel" %}</a>
23
    {% if object.booked_places > event.places %}
24
      <div class="errornotice"><p>{% trans "This event is overbooked." %}</p></div>
25
    {% elif object.booked_places == event.places %}
26
      <div class="infonotice"><p>{% trans "This event is full." %}</p></div>
37 27
    {% endif %}
38
    </li>
39
    {% endfor %}
40
  </ul>
41
</div>
28

  
29
    <ul class="objects-list single-links">
30
      {% for booking in booked %}
31
        <li>
32
          <a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}, {{ booking.creation_datetime|date:"DATETIME_FORMAT" }}</a>
33
          {% if not booking.primary_booking %}
34
            <a rel="popup" class="delete" href="{% url 'chrono-manager-booking-cancel' pk=agenda.id booking_pk=booking.id %}?next={{ request.path }}">{% trans "Cancel" %}</a>
35
          {% else %}
36
            <a class="delete disabled" title="{% trans "Can not cancel a secondary booking" %}" href="#">{% trans "Cancel" %}</a>
37
          {% endif %}
38
        </li>
39
      {% endfor %}
40
    </ul>
41
  </div>
42 42
</div>
43 43

  
44 44
{% if object.waiting_list_places %}
45
<div class="section">
46
  <h3>
47
    {% blocktrans with places=object.waiting_list_places booked_places=object.booked_waiting_list_places count remaining_places=object.remaining_waiting_list_places %}
48
      Waiting List ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining place
49
    {% plural %}
50
      Waiting List ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining places
51
    {% endblocktrans %}
52
  </h3>
53
<div>
54
  <ul class="objects-list single-links">
55
    {% for booking in waiting %}
56
    <li><a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}, {{ booking.creation_datetime|date:"DATETIME_FORMAT" }}</a></li>
57
    {% endfor %}
58
  </ul>
59
</div>
60
</div>
45
  <div class="section">
46
    <h3>
47
      {% blocktrans with places=object.waiting_list_places booked_places=object.booked_waiting_list_places count remaining_places=object.remaining_waiting_list_places %}
48
        Waiting List ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining place
49
      {% plural %}
50
        Waiting List ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining places
51
      {% endblocktrans %}
52
    </h3>
53
    <div>
54
      <ul class="objects-list single-links">
55
        {% for booking in waiting %}
56
          <li><a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}, {{ booking.creation_datetime|date:"DATETIME_FORMAT" }}</a></li>
57
        {% endfor %}
58
      </ul>
59
    </div>
60
  </div>
61 61
{% endif %}
chrono/manager/templates/chrono/manager_event_duplicate_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
7
<a href="">{% trans "Duplicate Event" %}</a>
5
  {{ block.super }}
6
  <a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
7
  <a href="">{% trans "Duplicate Event" %}</a>
8 8
{% endblock %}
9 9

  
10 10
{% block appbar %}
11
<h2>{% trans "Duplicate Event" %}</h2>
11
  <h2>{% trans "Duplicate Event" %}</h2>
12 12
{% endblock %}
13 13

  
14 14
{% block content %}
15
<form method="post" enctype="multipart/form-data">
16
  {% csrf_token %}
17
  {{ form.as_p }}
18
  <div class="buttons">
19
    <button class="submit-button">{% trans "Duplicate" %}</button>
20
    <a class="cancel" href="{% url 'chrono-manager-event-edit' pk=agenda.id event_pk=object.pk %}">{% trans 'Cancel' %}</a>
21
  </div>
22
</form>
15
  <form method="post" enctype="multipart/form-data">
16
    {% csrf_token %}
17
    {{ form.as_p }}
18
    <div class="buttons">
19
      <button class="submit-button">{% trans "Duplicate" %}</button>
20
      <a class="cancel" href="{% url 'chrono-manager-event-edit' pk=agenda.id event_pk=object.pk %}">{% trans 'Cancel' %}</a>
21
    </div>
22
  </form>
23 23
{% endblock %}
chrono/manager/templates/chrono/manager_event_form.html
2 2
{% load i18n gadjo %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
{{ form.media }}
5
  {{ block.super }}
6
  {{ form.media }}
7 7
{% endblock %}
8 8

  
9 9
{% block breadcrumb %}
10
{{ block.super }}
11
{% if object.id %}
12
<a href="{% url 'chrono-manager-agenda-view' pk=object.agenda.id %}">{{object.agenda.label}}</a>
13
{% endif %}
10
  {{ block.super }}
11
  {% if object.id %}
12
    <a href="{% url 'chrono-manager-agenda-view' pk=object.agenda.id %}">{{object.agenda.label}}</a>
13
  {% endif %}
14 14
{% endblock %}
15 15

  
16 16
{% block appbar %}
17
{% if object.id %}
18
<h2>{% trans "Edit Event" %}</h2>
19
<span class="actions">
20
{% if not object.primary_event %}
21
<a rel="popup" href="{% url 'chrono-manager-event-delete' pk=object.agenda.id event_pk=object.id %}?next={{view.request.GET.next}}">{% trans 'Delete' %}</a>
22
{% endif %}
23
</span>
24
{% else %}
25
<h2>{% trans "New Event" %}</h2>
26
{% endif %}
17
  {% if object.id %}
18
    <h2>{% trans "Edit Event" %}</h2>
19
    <span class="actions">
20
      {% if not object.primary_event %}
21
        <a rel="popup" href="{% url 'chrono-manager-event-delete' pk=object.agenda.id event_pk=object.id %}?next={{view.request.GET.next}}">{% trans 'Delete' %}</a>
22
      {% endif %}
23
    </span>
24
  {% else %}
25
    <h2>{% trans "New Event" %}</h2>
26
  {% endif %}
27 27
{% endblock %}
28 28

  
29 29
{% block content %}
30 30

  
31
<form method="post" enctype="multipart/form-data">
32
  {% csrf_token %}
33
  <input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
34
  {{ form|with_template }}
35
  <div class="buttons">
36
    <button class="submit-button">{% trans "Save" %}</button>
37
    <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
38
  </div>
31
  <form method="post" enctype="multipart/form-data">
32
    {% csrf_token %}
33
    <input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
34
    {{ form|with_template }}
35
    <div class="buttons">
36
      <button class="submit-button">{% trans "Save" %}</button>
37
      <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
38
    </div>
39 39

  
40
  <script>
41
    $(function () {
42
      recurrence_fields = $('.widget[id^=id_recurrence]');
43
      $('input[type=radio][name=frequency]').change(function() {
44
        if(!this.checked)
40
    <script>
41
      $(function () {
42
        recurrence_fields = $('.widget[id^=id_recurrence]');
43
        $('input[type=radio][name=frequency]').change(function() {
44
          if(!this.checked)
45 45
          return;
46
        if(this.value == 'unique') {
47
          recurrence_fields.hide();
48
        } else {
49
          recurrence_fields.show();
50
        }
51
      }).change();
52
    });
53
  </script>
54
</form>
46
          if(this.value == 'unique') {
47
            recurrence_fields.hide();
48
          } else {
49
            recurrence_fields.show();
50
          }
51
        }).change();
52
      });
53
    </script>
54
  </form>
55 55
{% endblock %}
chrono/manager/templates/chrono/manager_event_timesheet.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-event-timesheet' pk=agenda.pk event_pk=event.pk %}">{% trans "Timesheet" %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-event-timesheet' pk=agenda.pk event_pk=event.pk %}">{% trans "Timesheet" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar_actions %}{% endblock %}
chrono/manager/templates/chrono/manager_events_agenda_day_view.html
2 2
{% load i18n %}
3 3

  
4 4
{% block actions %}
5
{% if agenda.subscriptions.exists %}
6
<a class="extra-actions-menu-opener"></a>
7
<ul class="extra-actions-menu">
8
  <li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
9
</ul>
10
{% endif %}
11
{{ block.super }}
12
<a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans 'Open events' %}</a>
13
<a href="{% url 'chrono-manager-agenda-month-view' pk=agenda.pk year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
5
  {% if agenda.subscriptions.exists %}
6
    <a class="extra-actions-menu-opener"></a>
7
    <ul class="extra-actions-menu">
8
      <li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
9
    </ul>
10
  {% endif %}
11
  {{ block.super }}
12
  <a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans 'Open events' %}</a>
13
  <a href="{% url 'chrono-manager-agenda-month-view' pk=agenda.pk year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
14 14
{% endblock %}
15 15

  
16 16
{% block content %}
17
<div class="section">
18
<h3>{% trans "Events" %}</h3>
19
<div>
20
{% if object_list %}
21
  <ul class="objects-list single-links">
22
  {% for event in object_list %}
23
    {% include 'chrono/manager_agenda_event_fragment.html' with view_mode='day_view' %}
24
  {% endfor %}
25
  </ul>
26
  {% include "gadjo/pagination.html" %}
27
{% else %}
28
<div class="big-msg-info">
29
  {% blocktrans %}
30
  This day doesn't have any event configured.
31
  {% endblocktrans %}
32
</div>
33
{% endif %}
34
</div>
35
</div>
17
  <div class="section">
18
    <h3>{% trans "Events" %}</h3>
19
    <div>
20
      {% if object_list %}
21
        <ul class="objects-list single-links">
22
          {% for event in object_list %}
23
            {% include 'chrono/manager_agenda_event_fragment.html' with view_mode='day_view' %}
24
          {% endfor %}
25
        </ul>
26
        {% include "gadjo/pagination.html" %}
27
      {% else %}
28
        <div class="big-msg-info">
29
          {% blocktrans %}
30
            This day doesn't have any event configured.
31
          {% endblocktrans %}
32
        </div>
33
      {% endif %}
34
    </div>
35
  </div>
36 36
{% endblock %}
chrono/manager/templates/chrono/manager_events_agenda_month_view.html
2 2
{% load i18n %}
3 3

  
4 4
{% block actions %}
5
<a class="extra-actions-menu-opener"></a>
6
<ul class="extra-actions-menu">
7
  <li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
8
  {% if agenda.subscriptions.exists %}
9
  <li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
10
  {% endif %}
11
</ul>
12
{{ block.super }}
13
<a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans 'Open events' %}</a>
14
<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.pk year=view.date|date:"Y" month=view.date|date:"m" day=view.date|date:"d" %}">{% trans 'Day view' %}</a>
5
  <a class="extra-actions-menu-opener"></a>
6
  <ul class="extra-actions-menu">
7
    <li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
8
    {% if agenda.subscriptions.exists %}
9
      <li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
10
    {% endif %}
11
  </ul>
12
  {{ block.super }}
13
  <a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans 'Open events' %}</a>
14
  <a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.pk year=view.date|date:"Y" month=view.date|date:"m" day=view.date|date:"d" %}">{% trans 'Day view' %}</a>
15 15
{% endblock %}
16 16

  
17 17
{% block content %}
18
<div class="section">
19
<h3>{% trans "Events" %}</h3>
20
{% include 'chrono/manager_event_cancellation_report_notice.html' %}
21
<div>
22
{% if object_list %}
23
  <ul class="objects-list single-links">
24
  {% for object in object_list %}
25
    {% if object.is_exception %}
26
      <li><a class="disabled">{% trans "Exception:"%} {{ object }}</a></li>
27
    {% else %}
28
      {% include 'chrono/manager_agenda_event_fragment.html' with event=object %}
29
    {% endif %}
30
  {% endfor %}
31
  </ul>
32
  {% include "gadjo/pagination.html" %}
33
{% else %}
34
<div class="big-msg-info">
35
  {% blocktrans %}
36
  This month doesn't have any event configured.
37
  {% endblocktrans %}
38
</div>
39
{% endif %}
40
</div>
41
</div>
18
  <div class="section">
19
    <h3>{% trans "Events" %}</h3>
20
    {% include 'chrono/manager_event_cancellation_report_notice.html' %}
21
    <div>
22
      {% if object_list %}
23
        <ul class="objects-list single-links">
24
          {% for object in object_list %}
25
            {% if object.is_exception %}
26
              <li><a class="disabled">{% trans "Exception:"%} {{ object }}</a></li>
27
            {% else %}
28
              {% include 'chrono/manager_agenda_event_fragment.html' with event=object %}
29
            {% endif %}
30
          {% endfor %}
31
        </ul>
32
        {% include "gadjo/pagination.html" %}
33
      {% else %}
34
        <div class="big-msg-info">
35
          {% blocktrans %}
36
            This month doesn't have any event configured.
37
          {% endblocktrans %}
38
        </div>
39
      {% endif %}
40
    </div>
41
  </div>
42 42

  
43 43
{% endblock %}
chrono/manager/templates/chrono/manager_events_agenda_settings.html
13 13
{% endblock %}
14 14

  
15 15
{% block agenda-settings-extra-tab-buttons %}
16
    <button aria-controls="panel-events" aria-selected="true" id="tab-events" role="tab" tabindex="0">{% trans "Events" %}</button>
17
    {% if has_recurring_events %}
16
  <button aria-controls="panel-events" aria-selected="true" id="tab-events" role="tab" tabindex="0">{% trans "Events" %}</button>
17
  {% if has_recurring_events %}
18 18
    <button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Recurrence exceptions" %}</button>
19
    {% endif %}
20
    <button aria-controls="panel-display-options" aria-selected="false" id="tab-display-options" role="tab" tabindex="-1">{% trans "Display options" %}</button>
21
    <button aria-controls="panel-booking-check-options" aria-selected="false" id="tab-booking-check-options" role="tab" tabindex="-1">{% trans "Booking check options" %}</button>
22
    <button aria-controls="panel-notifications" aria-selected="false" id="tab-notifications" role="tab" tabindex="-1">{% trans "Notifications" %}</button>
19
  {% endif %}
20
  <button aria-controls="panel-display-options" aria-selected="false" id="tab-display-options" role="tab" tabindex="-1">{% trans "Display options" %}</button>
21
  <button aria-controls="panel-booking-check-options" aria-selected="false" id="tab-booking-check-options" role="tab" tabindex="-1">{% trans "Booking check options" %}</button>
22
  <button aria-controls="panel-notifications" aria-selected="false" id="tab-notifications" role="tab" tabindex="-1">{% trans "Notifications" %}</button>
23 23
{% endblock %}
24 24

  
25 25
{% block agenda-settings-extra-tab-list %}
26 26

  
27
    <div aria-labelledby="tab-events" id="panel-events" role="tabpanel" tabindex="0">
28
      {% with view.get_events as events %}
27
  <div aria-labelledby="tab-events" id="panel-events" role="tabpanel" tabindex="0">
28
    {% with view.get_events as events %}
29 29
      {% if events %}
30 30
        <ul class="objects-list single-links">
31
        {% for event in events %}
32
          {% include 'chrono/manager_agenda_event_fragment.html' with view_mode='settings_view' %}
33
        {% endfor %}
31
          {% for event in events %}
32
            {% include 'chrono/manager_agenda_event_fragment.html' with view_mode='settings_view' %}
33
          {% endfor %}
34 34
        </ul>
35 35
      {% else %}
36
      <div class="big-msg-info">
37
        {% blocktrans %}
38
        This agenda doesn't have any event yet. Click on the "New Event" button in
39
        the top right of the page to add a first one.
40
        {% endblocktrans %}
41
      </div>
36
        <div class="big-msg-info">
37
          {% blocktrans %}
38
            This agenda doesn't have any event yet. Click on the "New Event" button in
39
            the top right of the page to add a first one.
40
          {% endblocktrans %}
41
        </div>
42 42
      {% endif %}
43
      {% endwith %}
44
    </div>
43
    {% endwith %}
44
  </div>
45 45

  
46
    {% if has_recurring_events %}
46
  {% if has_recurring_events %}
47 47
    <div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
48 48
      {% if object.recurrence_exceptions_report.events.exists %}
49
      <div class="warningnotice">
50
        <p>{% trans "The following events exist despite exceptions because they have active bookings:" %}</p>
51
        <ul>
52
          {% for event in object.recurrence_exceptions_report.events.all %}
53
          <li><a href="{{ event.get_absolute_view_url }}">{{ event }}{% if event.label %} - {{ event.start_datetime|date:"DATETIME_FORMAT" }}{% endif %}</a></li>
54
          {% endfor %}
55
        </ul>
56
        <p>{% trans "You can cancel them manually for this warning to go away, or wait until they are passed." %}</p>
57
      </div>
49
        <div class="warningnotice">
50
          <p>{% trans "The following events exist despite exceptions because they have active bookings:" %}</p>
51
          <ul>
52
            {% for event in object.recurrence_exceptions_report.events.all %}
53
              <li><a href="{{ event.get_absolute_view_url }}">{{ event }}{% if event.label %} - {{ event.start_datetime|date:"DATETIME_FORMAT" }}{% endif %}</a></li>
54
            {% endfor %}
55
          </ul>
56
          <p>{% trans "You can cancel them manually for this warning to go away, or wait until they are passed." %}</p>
57
        </div>
58 58
      {% endif %}
59 59
      <ul class="objects-list single-links">
60 60
        {% for exception in exceptions|slice:":5" %}
61
        <li>
62
          <a rel="popup" {% if not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.pk %}"{% endif %}>{{ exception }}</a>
63
          {% if not exception.read_only %}
64
          <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}">{% trans "remove" %}</a>
65
          {% endif %}
66
        </li>
61
          <li>
62
            <a rel="popup" {% if not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.pk %}"{% endif %}>{{ exception }}</a>
63
            {% if not exception.read_only %}
64
              <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}">{% trans "remove" %}</a>
65
            {% endif %}
66
          </li>
67 67
        {% endfor %}
68 68
        {% if exceptions|length > 5 %}
69
        <li><a class="timeperiod-exception-all desk-{{ desk.pk }}" rel="popup" data-selector="div.timeperiod" href="{% url 'chrono-manager-time-period-exception-extract-list' pk=desk.id %}">({% trans 'see all exceptions' %})</a></li>
69
          <li><a class="timeperiod-exception-all desk-{{ desk.pk }}" rel="popup" data-selector="div.timeperiod" href="{% url 'chrono-manager-time-period-exception-extract-list' pk=desk.id %}">({% trans 'see all exceptions' %})</a></li>
70 70
        {% endif %}
71 71
        <li><a class="add" rel="popup" href="{% url 'chrono-manager-agenda-add-time-period-exception' agenda_pk=object.pk pk=desk.pk %}">{% trans 'Add a time period exception' %}</a></li>
72 72
      </ul>
......
74 74
        <a rel="popup" class="button" href="{% url 'chrono-manager-desk-add-import-time-period-exceptions' pk=desk.pk %}">{% trans 'Configure' %}</a>
75 75
      </div>
76 76
    </div>
77
    {% endif %}
77
  {% endif %}
78 78

  
79
    <div aria-labelledby="tab-display-options" hidden="" id="panel-display-options" role="tabpanel" tabindex="0">
80
      <ul>
81
        <li>
82
          {% if agenda.event_display_template %}
83
            {% trans "Event display template:" %}
84
            <pre>{{ agenda.event_display_template }}</pre>
85
          {% else %}
79
  <div aria-labelledby="tab-display-options" hidden="" id="panel-display-options" role="tabpanel" tabindex="0">
80
    <ul>
81
      <li>
82
        {% if agenda.event_display_template %}
83
          {% trans "Event display template:" %}
84
          <pre>{{ agenda.event_display_template }}</pre>
85
        {% else %}
86 86
          {% trans "No event display template configured for this agenda." %}
87
          {% endif %}
88
        </li>
89
        <li>
90
          {% trans "Booking display template:" %}
91
          <pre>{{ agenda.get_booking_user_block_template }}</pre>
92
        </li>
93
      </ul>
94
      <div class="panel--buttons">
95
        <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-display-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
96
      </div>
87
        {% endif %}
88
      </li>
89
      <li>
90
        {% trans "Booking display template:" %}
91
        <pre>{{ agenda.get_booking_user_block_template }}</pre>
92
      </li>
93
    </ul>
94
    <div class="panel--buttons">
95
      <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-display-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
97 96
    </div>
97
  </div>
98 98

  
99
    <div aria-labelledby="tab-booking-check-options" hidden="" id="panel-booking-check-options" role="tabpanel" tabindex="0">
100
      <ul>
101
        {% with agenda.get_booking_check_filters as check_filters %}
102
          {% if check_filters %}
99
  <div aria-labelledby="tab-booking-check-options" hidden="" id="panel-booking-check-options" role="tabpanel" tabindex="0">
100
    <ul>
101
      {% with agenda.get_booking_check_filters as check_filters %}
102
        {% if check_filters %}
103 103
          <li>{% trans "Filters:" %}
104 104
            <ul>
105 105
              {% for key in check_filters %}
106
              <li>{{ key }}</li>
106
                <li>{{ key }}</li>
107 107
              {% endfor %}
108 108
            </ul>
109 109
          </li>
110
          {% else %}
110
        {% else %}
111 111
          <li>{% trans "No filters configured for this agenda." %}</li>
112
          {% endif %}
113
        {% endwith %}
114
        <li>{% trans "Automatically mark event as checked when all bookings have been checked:" %} {{ agenda.mark_event_checked_auto|yesno }}</li>
115
        <li>{% trans "Prevent the check of bookings when event was marked as checked:" %} {{ agenda.disable_check_update|yesno }}</li>
116
      </ul>
117
      <div class="panel--buttons">
118
        <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-booking-check-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
119
      </div>
112
        {% endif %}
113
      {% endwith %}
114
      <li>{% trans "Automatically mark event as checked when all bookings have been checked:" %} {{ agenda.mark_event_checked_auto|yesno }}</li>
115
      <li>{% trans "Prevent the check of bookings when event was marked as checked:" %} {{ agenda.disable_check_update|yesno }}</li>
116
    </ul>
117
    <div class="panel--buttons">
118
      <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-booking-check-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
120 119
    </div>
120
  </div>
121 121

  
122
    <div aria-labelledby="tab-notifications" hidden="" id="panel-notifications" role="tabpanel" tabindex="0">
123
      {% for notification_type in object.notifications_settings.get_notification_types %}
122
  <div aria-labelledby="tab-notifications" hidden="" id="panel-notifications" role="tabpanel" tabindex="0">
123
    {% for notification_type in object.notifications_settings.get_notification_types %}
124 124
      {% if forloop.first %}<ul>{% endif %}
125
        <li>
125
      <li>
126 126
        {% blocktrans trimmed with display_value=notification_type.display_value label=notification_type.label %}
127
        {{ label }}: {{ display_value }} will be notified.
127
          {{ label }}: {{ display_value }} will be notified.
128 128
        {% endblocktrans %}
129
        </li>
129
      </li>
130 130
      {% if forloop.last %}</ul>{% endif %}
131
      {% empty %}
132
        <p>{% trans "Notifications are disabled for this agenda." %}</p>
133
      {% endfor %}
134
      <div class="panel--buttons">
135
        <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-notifications-settings' pk=object.id %}">{% trans 'Configure' %}</a>
136
      </div>
131
    {% empty %}
132
      <p>{% trans "Notifications are disabled for this agenda." %}</p>
133
    {% endfor %}
134
    <div class="panel--buttons">
135
      <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-notifications-settings' pk=object.id %}">{% trans 'Configure' %}</a>
137 136
    </div>
137
  </div>
138 138

  
139 139
{% endblock %}
chrono/manager/templates/chrono/manager_events_timesheet.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans "Timesheet" %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans "Timesheet" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar_actions %}{% endblock %}
chrono/manager/templates/chrono/manager_events_timesheet_form_fragment.html
6 6
    <form id="timesheet">
7 7
      {{ form.as_p }}
8 8
      <script>
9
      $(function() {
10
        $('#id_date_display').on('change', function() {
11
          if ($(this).val() == 'custom') {
12
            $('#id_custom_nb_dates_per_page').parent().show();
13
          } else {
14
            $('#id_custom_nb_dates_per_page').parent().hide();
15
          }
9
        $(function() {
10
          $('#id_date_display').on('change', function() {
11
            if ($(this).val() == 'custom') {
12
              $('#id_custom_nb_dates_per_page').parent().show();
13
            } else {
14
              $('#id_custom_nb_dates_per_page').parent().hide();
15
            }
16
          });
17
          $('#id_date_display').trigger('change');
18
          $('#id_group_by').on('change', function() {
19
            if ($(this).val()) {
20
              $('#id_with_page_break').parent().show();
21
            } else {
22
              $('#id_with_page_break').parent().hide();
23
            }
24
          });
25
          $('#id_group_by').trigger('change');
16 26
        });
17
        $('#id_date_display').trigger('change');
18
        $('#id_group_by').on('change', function() {
19
          if ($(this).val()) {
20
            $('#id_with_page_break').parent().show();
21
          } else {
22
            $('#id_with_page_break').parent().hide();
23
          }
24
        });
25
        $('#id_group_by').trigger('change');
26
      });
27 27
      </script>
28 28
      <button class="submit-button">{% trans "See timesheet" %}</button>
29 29
      {% if request.GET and form.is_valid %}
30
      <button class="submit-button" name="pdf">{% trans "Get PDF file" %}</button>
31
      <button class="submit-button" name="csv">{% trans "Get CSV file" %}</button>
30
        <button class="submit-button" name="pdf">{% trans "Get PDF file" %}</button>
31
        <button class="submit-button" name="csv">{% trans "Get CSV file" %}</button>
32 32
      {% endif %}
33 33
    </form>
34 34

  
35 35
    {% if request.GET and form.is_valid %}
36
    {% include 'chrono/manager_events_timesheet_fragment.html' %}
36
      {% include 'chrono/manager_events_timesheet_fragment.html' %}
37 37
    {% endif %}
38 38
  </div>
39 39
</div>
chrono/manager/templates/chrono/manager_events_timesheet_fragment.html
1 1
{% load i18n %}
2 2

  
3 3
{% if event %}
4
<h4>{% blocktrans with event_date=event.start_datetime %}Timesheet - {{ event }} - {{ event_date }}{% endblocktrans %}</h4>
4
  <h4>{% blocktrans with event_date=event.start_datetime %}Timesheet - {{ event }} - {{ event_date }}{% endblocktrans %}</h4>
5 5
{% else %}
6
<h4>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Timesheet from {{ start }} to {{ end }}{% endblocktrans %}</h4>
6
  <h4>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Timesheet from {{ start }} to {{ end }}{% endblocktrans %}</h4>
7 7
{% endif %}
8 8

  
9 9

  
10 10
{% with slots=form.get_slots %}
11
{% with events_num=slots.events|length %}
12
{% for dates in slots.dates %}
13
{% for grouper in slots.users %}
14
{% if form.cleaned_data.group_by %}<h5>{{ form.cleaned_data.group_by }}: {{ grouper.grouper }}</h5>{% endif %}
15
<table class="main timesheet">
16
  <thead>
17
    <tr>
18
      <th>{% trans "First name" %}</th>
19
      <th>{% trans "Last name" %}</th>
20
      {% for k in slots.extra_data %}<th>{{ k }}</th>{% endfor %}
21
      {% if events_num > 1 and form.cleaned_data.activity_display != 'col' %}<th class="activity">{% trans "Activity" %}</th>{% endif %}
22
      {% for date, events in dates %}
23
        {% if form.cleaned_data.activity_display == 'col' %}
24
          {% for event in events %}
25
          <th class="date-event" data-id="{{ date|date:"d-m" }}:{{ event.slug }}">{% blocktrans with date=date|date:"d/m" %}{{ event }} of {{ date }}{% endblocktrans %}</th>
26
          {% endfor %}
27
        {% else %}
28
          <th class="date" data-id="{{ date|date:"d-m" }}">{{ date|date:"D d/m" }}</th>
29
        {% endif %}
11
  {% with events_num=slots.events|length %}
12
    {% for dates in slots.dates %}
13
      {% for grouper in slots.users %}
14
        {% if form.cleaned_data.group_by %}<h5>{{ form.cleaned_data.group_by }}: {{ grouper.grouper }}</h5>{% endif %}
15
        <table class="main timesheet">
16
          <thead>
17
            <tr>
18
              <th>{% trans "First name" %}</th>
19
              <th>{% trans "Last name" %}</th>
20
              {% for k in slots.extra_data %}<th>{{ k }}</th>{% endfor %}
21
              {% if events_num > 1 and form.cleaned_data.activity_display != 'col' %}<th class="activity">{% trans "Activity" %}</th>{% endif %}
22
              {% for date, events in dates %}
23
                {% if form.cleaned_data.activity_display == 'col' %}
24
                  {% for event in events %}
25
                    <th class="date-event" data-id="{{ date|date:"d-m" }}:{{ event.slug }}">{% blocktrans with date=date|date:"d/m" %}{{ event }} of {{ date }}{% endblocktrans %}</th>
26
                  {% endfor %}
27
                {% else %}
28
                  <th class="date" data-id="{{ date|date:"d-m" }}">{{ date|date:"D d/m" }}</th>
29
                {% endif %}
30
              {% endfor %}
31
            </tr>
32
          </thead>
33
          <tbody>
34
            {% if form.cleaned_data.activity_display == 'col' %}
35
              {% for user in grouper.users %}
36
                <tr>
37
                  <td>{{ user.user_first_name }}</td>
38
                  <td>{{ user.user_last_name }}</td>
39
                  {% for k in slots.extra_data %}<td>{{ user.extra_data|get:k }}</td>{% endfor %}
40
                  {% for date, events in dates %}
41
                    {% for event in events %}
42
                      {% for item in user.events %}{% if item.event == event %}{% with booked=item.dates|get:date %}<td class="date" data-id="{{ date|date:"d-m" }}:{{ item.event.slug }}:{{ user.user_id }}">{% if booked is True %}☐{% elif booked is None %}-{% endif %}</td>{% endwith %}{% endif %}{% endfor %}
43
                    {% endfor %}
44
                  {% endfor %}
45
                </tr>
46
              {% endfor %}
47
            {% else %}
48
              {% for user in grouper.users %}{% for item in user.events %}
49
                <tr>
50
                  {% if forloop.first %}
51
                    <td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_first_name }}</td>
52
                    <td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_last_name }}</td>
53
                    {% for k in slots.extra_data %}<td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.extra_data|get:k }}</td>{% endfor %}
54
                  {% endif %}
55
                  {% if events_num > 1 %}<td class="activity">{{ item.event }}</td>{% endif %}
56
                  {% for date, events in dates %}
57
                    {% with booked=item.dates|get:date %}<td class="date" data-id="{{ date|date:"d-m" }}:{{ item.event.slug }}:{{ user.user_id }}">{% if booked is True %}☐{% elif booked is None %}-{% endif %}</td>{% endwith %}
58
                  {% endfor %}
59
                </tr>
60
              {% endfor %}{% endfor %}
61
            {% endif %}
62
          </tbody>
63
        </table>
64
        {% if form.cleaned_data.with_page_break %}{% if not forloop.last or not forloop.parentloop.last %}<div class="page_break"></div>{% endif %}{% endif %}
30 65
      {% endfor %}
31
    </tr>
32
  </thead>
33
  <tbody>
34
    {% if form.cleaned_data.activity_display == 'col' %}
35
      {% for user in grouper.users %}
36
      <tr>
37
        <td>{{ user.user_first_name }}</td>
38
        <td>{{ user.user_last_name }}</td>
39
        {% for k in slots.extra_data %}<td>{{ user.extra_data|get:k }}</td>{% endfor %}
40
        {% for date, events in dates %}
41
          {% for event in events %}
42
          {% for item in user.events %}{% if item.event == event %}{% with booked=item.dates|get:date %}<td class="date" data-id="{{ date|date:"d-m" }}:{{ item.event.slug }}:{{ user.user_id }}">{% if booked is True %}☐{% elif booked is None %}-{% endif %}</td>{% endwith %}{% endif %}{% endfor %}
43
          {% endfor %}
44
        {% endfor %}
45
      </tr>
46
      {% endfor %}
47
    {% else %}
48
      {% for user in grouper.users %}{% for item in user.events %}
49
      <tr>
50
        {% if forloop.first %}
51
        <td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_first_name }}</td>
52
        <td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_last_name }}</td>
53
        {% for k in slots.extra_data %}<td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.extra_data|get:k }}</td>{% endfor %}
54
        {% endif %}
55
        {% if events_num > 1 %}<td class="activity">{{ item.event }}</td>{% endif %}
56
        {% for date, events in dates %}
57
        {% with booked=item.dates|get:date %}<td class="date" data-id="{{ date|date:"d-m" }}:{{ item.event.slug }}:{{ user.user_id }}">{% if booked is True %}☐{% elif booked is None %}-{% endif %}</td>{% endwith %}
58
        {% endfor %}
59
      </tr>
60
      {% endfor %}{% endfor %}
61
    {% endif %}
62
  </tbody>
63
</table>
64
{% if form.cleaned_data.with_page_break %}{% if not forloop.last or not forloop.parentloop.last %}<div class="page_break"></div>{% endif %}{% endif %}
65
{% endfor %}
66
{% if not form.cleaned_data.with_page_break and not forloop.last %}<div class="page_break"></div>{% endif %}
67
{% endfor %}
68
{% endwith %}
66
      {% if not form.cleaned_data.with_page_break and not forloop.last %}<div class="page_break"></div>{% endif %}
67
    {% endfor %}
68
  {% endwith %}
69 69
{% endwith %}
chrono/manager/templates/chrono/manager_events_timesheet_pdf.html
1 1
{% load static i18n %}
2 2
<html>
3
<head>
4
  <base href="{{ base_uri }}" />
5
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
  <title>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Timesheet from {{ start }} to {{ end }}{% endblocktrans %}</title>
7
  <meta name="author" content="Entr'ouvert" />
8
  <link href="{% static 'css/timesheet.css' %}" media="print" rel="stylesheet" />
9
  <style media="print">
10
    @page {
3
  <head>
4
    <base href="{{ base_uri }}" />
5
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
    <title>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Timesheet from {{ start }} to {{ end }}{% endblocktrans %}</title>
7
    <meta name="author" content="Entr'ouvert" />
8
    <link href="{% static 'css/timesheet.css' %}" media="print" rel="stylesheet" />
9
    <style media="print">
10
      @page {
11 11
        size: {{ form.cleaned_data.orientation|default:"portrait" }};
12
    }
13
  </style>
14
</head>
15
<body>
16
  <div id="main">
17
  {% if request.GET and form.is_valid %}
18
  {% include 'chrono/manager_events_timesheet_fragment.html' %}
19
  {% endif %}
20
  </div>
21
</body>
12
      }
13
    </style>
14
  </head>
15
  <body>
16
    <div id="main">
17
      {% if request.GET and form.is_valid %}
18
        {% include 'chrono/manager_events_timesheet_fragment.html' %}
19
      {% endif %}
20
    </div>
21
  </body>
22 22
</html>
chrono/manager/templates/chrono/manager_events_type_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
{% if object.pk %}
7
<a href="{% url 'chrono-manager-events-type-edit' pk=object.pk %}">{{ object.label }}</a>
8
{% else %}
9
<a href="{% url 'chrono-manager-events-type-add' %}">{% trans "New events type" %}</a>
10
{% endif %}
5
  {{ block.super }}
6
  {% if object.pk %}
7
    <a href="{% url 'chrono-manager-events-type-edit' pk=object.pk %}">{{ object.label }}</a>
8
  {% else %}
9
    <a href="{% url 'chrono-manager-events-type-add' %}">{% trans "New events type" %}</a>
10
  {% endif %}
11 11
{% endblock %}
12 12

  
13 13
{% block appbar %}
14
{% if object.pk %}
15
<h2>{% trans "Edit events type" %}</h2>
16
{% else %}
17
<h2>{% trans "New events type" %}</h2>
18
{% endif %}
14
  {% if object.pk %}
15
    <h2>{% trans "Edit events type" %}</h2>
16
  {% else %}
17
    <h2>{% trans "New events type" %}</h2>
18
  {% endif %}
19 19
{% endblock %}
20 20

  
21 21
{% block content %}
22 22

  
23
<form method="post" enctype="multipart/form-data">
24
  {% csrf_token %}
25
  {{ form.as_p }}
26
  {% if object.pk %}
27
  <h3>{% trans "Custom fields" %}</h3>
28
  {{ formset.management_form }}
29
  <table id="custom-field-forms">
30
    <thead>
31
      <tr>
32
        {% for field in formset.0 %}
33
        <th class="column-{{ field.name }}{% if field.required %} required{% endif %}">{{ field.label }}</th>
34
        {% endfor %}
35
      </tr>
36
    </thead>
37
    <tbody>
38
    {% for sub_form in formset %}
39
    <tr class='custom-field-form'>
40
      {% for field in sub_form %}
41
      <td class="field-{{ field.name }}">
42
        {{ field.errors.as_ul }}
43
        {{ field }}
44
      </td>
45
      {% endfor %}
46
    </tr>
47
    {% endfor %}
48
    </tbody>
49
  </table>
50
  <button id="add-custom-field-form" type="button">{% trans "Add another custom field" %}</button>
51
  {% endif %}
52
  <div class="buttons">
53
    <button class="submit-button">{% trans "Save" %}</button>
54
    <a class="cancel" href="{% url 'chrono-manager-events-type-list' %}">{% trans 'Cancel' %}</a>
55
  </div>
56
</form>
23
  <form method="post" enctype="multipart/form-data">
24
    {% csrf_token %}
25
    {{ form.as_p }}
26
    {% if object.pk %}
27
      <h3>{% trans "Custom fields" %}</h3>
28
      {{ formset.management_form }}
29
      <table id="custom-field-forms">
30
        <thead>
31
          <tr>
32
            {% for field in formset.0 %}
33
              <th class="column-{{ field.name }}{% if field.required %} required{% endif %}">{{ field.label }}</th>
34
            {% endfor %}
35
          </tr>
36
        </thead>
37
        <tbody>
38
          {% for sub_form in formset %}
39
            <tr class='custom-field-form'>
40
              {% for field in sub_form %}
41
                <td class="field-{{ field.name }}">
42
                  {{ field.errors.as_ul }}
43
                  {{ field }}
44
                </td>
45
              {% endfor %}
46
            </tr>
47
          {% endfor %}
48
        </tbody>
49
      </table>
50
      <button id="add-custom-field-form" type="button">{% trans "Add another custom field" %}</button>
51
    {% endif %}
52
    <div class="buttons">
53
      <button class="submit-button">{% trans "Save" %}</button>
54
      <a class="cancel" href="{% url 'chrono-manager-events-type-list' %}">{% trans 'Cancel' %}</a>
55
    </div>
56
  </form>
57 57
{% endblock %}
chrono/manager/templates/chrono/manager_events_type_list.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-events-type-list' %}">{% trans "Events types" %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-events-type-list' %}">{% trans "Events types" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans 'Events types' %}</h2>
11
<span class="actions">
12
<a rel="popup" href="{% url 'chrono-manager-events-type-add' %}">{% trans 'New' %}</a>
13
</span>
10
  <h2>{% trans 'Events types' %}</h2>
11
  <span class="actions">
12
    <a rel="popup" href="{% url 'chrono-manager-events-type-add' %}">{% trans 'New' %}</a>
13
  </span>
14 14
{% endblock %}
15 15

  
16 16
{% block content %}
17
<div class="pk-information">
18
<p>{% trans "Define here events types to set on events agendas." %}</p>
19
</div>
20
{% if object_list %}
21
<div>
22
  <ul class="objects-list single-links">
23
    {% for object in object_list %}
24
    <li>
25
        <a href="{% url 'chrono-manager-events-type-edit' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
26
        <a rel="popup" class="delete" href="{% url 'chrono-manager-events-type-delete' pk=object.pk %}">{% trans "remove" %}</a>
27
    </li>
28
    {% endfor %}
29
  </ul>
30
</div>
31
{% else %}
32
<div class="big-msg-info">
33
  {% blocktrans %}
34
  This site doesn't have any events type yet. Click on the "New" button in the top
35
  right of the page to add a first one.
36
  {% endblocktrans %}
37
</div>
38
{% endif %}
17
  <div class="pk-information">
18
    <p>{% trans "Define here events types to set on events agendas." %}</p>
19
  </div>
20
  {% if object_list %}
21
    <div>
22
      <ul class="objects-list single-links">
23
        {% for object in object_list %}
24
          <li>
25
            <a href="{% url 'chrono-manager-events-type-edit' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
26
            <a rel="popup" class="delete" href="{% url 'chrono-manager-events-type-delete' pk=object.pk %}">{% trans "remove" %}</a>
27
          </li>
28
        {% endfor %}
29
      </ul>
30
    </div>
31
  {% else %}
32
    <div class="big-msg-info">
33
      {% blocktrans %}
34
        This site doesn't have any events type yet. Click on the "New" button in the top
35
        right of the page to add a first one.
36
      {% endblocktrans %}
37
    </div>
38
  {% endif %}
39 39
{% endblock %}
chrono/manager/templates/chrono/manager_home.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Agendas' %}</h2>
6
<span class="actions">
7
{% if user.is_staff or has_access_to_unavailability_calendars %}
8
  <a class="extra-actions-menu-opener"></a>
9
  <ul class="extra-actions-menu">
10
    {% if user.is_staff %}
11
    <li><a rel="popup" href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Import' %}</a></li>
12
    <li><a rel="popup" href="{% url 'chrono-manager-agendas-export' %}" data-autoclose-dialog="true">{% trans 'Export' %}</a></li>
13
    <li><a href="{% url 'chrono-manager-events-type-list' %}">{% trans 'Events types' %}</a></li>
14
    {% if shared_custody_enabled %}
15
    <li><a rel="popup" href="{% url 'chrono-manager-shared-custody-settings' %}">{% trans 'Shared custody' %}</a></li>
16
    {% endif %}
17
    {% endif %}
18
    {% if has_access_to_unavailability_calendars %}
19
    <li><a href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans 'Unavailability calendars' %}</a></li>
5
  <h2>{% trans 'Agendas' %}</h2>
6
  <span class="actions">
7
    {% if user.is_staff or has_access_to_unavailability_calendars %}
8
      <a class="extra-actions-menu-opener"></a>
9
      <ul class="extra-actions-menu">
10
        {% if user.is_staff %}
11
          <li><a rel="popup" href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Import' %}</a></li>
12
          <li><a rel="popup" href="{% url 'chrono-manager-agendas-export' %}" data-autoclose-dialog="true">{% trans 'Export' %}</a></li>
13
          <li><a href="{% url 'chrono-manager-events-type-list' %}">{% trans 'Events types' %}</a></li>
14
          {% if shared_custody_enabled %}
15
            <li><a rel="popup" href="{% url 'chrono-manager-shared-custody-settings' %}">{% trans 'Shared custody' %}</a></li>
16
          {% endif %}
17
        {% endif %}
18
        {% if has_access_to_unavailability_calendars %}
19
          <li><a href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans 'Unavailability calendars' %}</a></li>
20
        {% endif %}
21
        {% if user.is_staff %}
22
          <li><a href="{% url 'chrono-manager-resource-list' %}">{% trans 'Resources' %}</a></li>
23
        {% endif %}
24
      </ul>
20 25
    {% endif %}
21 26
    {% if user.is_staff %}
22
    <li><a href="{% url 'chrono-manager-resource-list' %}">{% trans 'Resources' %}</a></li>
27
      <a href="{% url 'chrono-manager-category-list' %}">{% trans 'Categories' %}</a>
28
      <a rel="popup" href="{% url 'chrono-manager-agenda-add' %}">{% trans 'New' %}</a>
23 29
    {% endif %}
24
  </ul>
25
{% endif %}
26
{% if user.is_staff %}
27
<a href="{% url 'chrono-manager-category-list' %}">{% trans 'Categories' %}</a>
28
<a rel="popup" href="{% url 'chrono-manager-agenda-add' %}">{% trans 'New' %}</a>
29
{% endif %}
30
</span>
30
  </span>
31 31
{% endblock %}
32 32

  
33 33
{% block content %}
34 34

  
35
{% if object_list %}
36
{% regroup object_list by category as agenda_groups %}
37
{% for group in agenda_groups %}
38
<div class="section">
39
  {% if group.grouper %}<h3>{{ group.grouper }}</h3>{% elif not forloop.first %}<h3>{% trans "Misc" %}</h3>{% endif %}
40
  <ul class="objects-list single-links">
41
    {% for object in group.list %}
42
    <li><a href="{% url 'chrono-manager-agenda-view' pk=object.id %}"><span class="badge">{{ object.get_kind_display }}</span> {{ object.label }}{% if user.is_staff %} <span class="identifier">[{% trans "identifier:" %} {{ object.slug }}]{% endif %}</span></a></li>
35
  {% if object_list %}
36
    {% regroup object_list by category as agenda_groups %}
37
    {% for group in agenda_groups %}
38
      <div class="section">
39
        {% if group.grouper %}<h3>{{ group.grouper }}</h3>{% elif not forloop.first %}<h3>{% trans "Misc" %}</h3>{% endif %}
40
        <ul class="objects-list single-links">
41
          {% for object in group.list %}
42
            <li><a href="{% url 'chrono-manager-agenda-view' pk=object.id %}"><span class="badge">{{ object.get_kind_display }}</span> {{ object.label }}{% if user.is_staff %} <span class="identifier">[{% trans "identifier:" %} {{ object.slug }}]{% endif %}</span></a></li>
43
          {% endfor %}
44
        </ul>
45
      </div>
43 46
    {% endfor %}
44
  </ul>
45
</div>
46
{% endfor %}
47
{% else %}
48
<div class="big-msg-info">
49
  {% blocktrans %}
50
  This site doesn't have any agenda yet. Click on the "New" button in the top
51
  right of the page to add a first one.
52
  {% endblocktrans %}
53
</div>
54
{% endif %}
47
  {% else %}
48
    <div class="big-msg-info">
49
      {% blocktrans %}
50
        This site doesn't have any agenda yet. Click on the "New" button in the top
51
        right of the page to add a first one.
52
      {% endblocktrans %}
53
    </div>
54
  {% endif %}
55 55

  
56 56
{% endblock %}
chrono/manager/templates/chrono/manager_import_events.html
2 2
{% load i18n %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
{{ form.media }}
5
  {{ block.super }}
6
  {{ form.media }}
7 7
{% endblock %}
8 8

  
9 9
{% block breadcrumb %}
10
{{ block.super }}
11
<a href="{% url 'chrono-manager-agenda-view' pk=agenda.id %}">{{agenda.label}}</a>
10
  {{ block.super }}
11
  <a href="{% url 'chrono-manager-agenda-view' pk=agenda.id %}">{{agenda.label}}</a>
12 12
{% endblock %}
13 13

  
14 14
{% block appbar %}
15
<h2>{% trans "Import Events" %}</h2>
15
  <h2>{% trans "Import Events" %}</h2>
16 16
{% endblock %}
17 17

  
18 18
{% block content %}
19 19

  
20
<form method="post" enctype="multipart/form-data">
21
  {% csrf_token %}
22
  {{ form.as_p }}
23
  <p>
24
  <a href="{% url 'chrono-manager-sample-events-csv' %}">{% trans 'Download sample file' %}</a>
25
  </p>
26
  <div class="buttons">
27
    <button>{% trans "Import" %}</button>
28
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
29
  </div>
30
</form>
20
  <form method="post" enctype="multipart/form-data">
21
    {% csrf_token %}
22
    {{ form.as_p }}
23
    <p>
24
      <a href="{% url 'chrono-manager-sample-events-csv' %}">{% trans 'Download sample file' %}</a>
25
    </p>
26
    <div class="buttons">
27
      <button>{% trans "Import" %}</button>
28
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
29
    </div>
30
  </form>
31 31
{% endblock %}
chrono/manager/templates/chrono/manager_import_exceptions.html
2 2
{% load i18n %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
{{ form.media }}
5
  {{ block.super }}
6
  {{ form.media }}
7 7
{% endblock %}
8 8

  
9 9
{% block breadcrumb %}
10
{{ block.super }}
11
<a href="">{% trans "Manage exception sources" %}</a>
10
  {{ block.super }}
11
  <a href="">{% trans "Manage exception sources" %}</a>
12 12
{% endblock %}
13 13

  
14 14
{% block appbar %}
15
<h2>{% trans "Manage exception sources" %}</h2>
15
  <h2>{% trans "Manage exception sources" %}</h2>
16 16
{% endblock %}
17 17

  
18 18
{% block content %}
19 19

  
20
<form method="post" enctype="multipart/form-data">
21
  {% if exception_sources or unavailability_calendars %}
22
  <ul class="objects-list single-links">
23
      {% for object in exception_sources %}
24
        <li>
20
  <form method="post" enctype="multipart/form-data">
21
    {% if exception_sources or unavailability_calendars %}
22
      <ul class="objects-list single-links">
23
        {% for object in exception_sources %}
24
          <li>
25 25
            <a {% if not object.enabled %}class="disabled"{% endif %} title="{{ object }}" {% if object.ics_url %}href="{{ object.render_ics_url }}"{% endif %}>{{ object|truncatechars:50 }}</a>
26
          {% if object.ics_filename %}
27
            <a rel="popup" class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-replace' object.pk %}">{% trans "replace" %}</a>
28
          {% elif object.ics_url %}
29
            <a class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-refresh' object.pk %}">{% trans "refresh" %}</a>
30
          {% endif %}
31
          {% if not object.settings_slug %}
32
          <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-source-delete' object.pk %}">{% trans "remove" %}</a>
33
          {% else %}
34
          <a class="link-action-text" href="{% url 'chrono-manager-time-period-exception-source-toggle' object.pk %}">({{ object.enabled|yesno:_("disable,enable") }})</a>
35
          {% endif %}
36
        </li>
37
      {% endfor %}
38
      {% for unavailability_calendar in unavailability_calendars %}
39
        <li>
40
          <a {% if not unavailability_calendar.enabled %}class="disabled"{% endif %} title="{{ unavailability_calendar }}" href="{{ unavailability_calendar.get_absolute_url }}">{{ unavailability_calendar|truncatechars:50 }}</a>
41
          <a class="link-action-text" href="{% url 'chrono-manager-unavailability-calendar-toggle-view' desk.pk unavailability_calendar.pk %}">({{ unavailability_calendar.enabled|yesno:_("disable,enable") }})</a>
42
        </li>
43
      {% endfor %}
44
  </ul>
45
  {% endif %}
26
            {% if object.ics_filename %}
27
              <a rel="popup" class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-replace' object.pk %}">{% trans "replace" %}</a>
28
            {% elif object.ics_url %}
29
              <a class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-refresh' object.pk %}">{% trans "refresh" %}</a>
30
            {% endif %}
31
            {% if not object.settings_slug %}
32
              <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-source-delete' object.pk %}">{% trans "remove" %}</a>
33
            {% else %}
34
              <a class="link-action-text" href="{% url 'chrono-manager-time-period-exception-source-toggle' object.pk %}">({{ object.enabled|yesno:_("disable,enable") }})</a>
35
            {% endif %}
36
          </li>
37
        {% endfor %}
38
        {% for unavailability_calendar in unavailability_calendars %}
39
          <li>
40
            <a {% if not unavailability_calendar.enabled %}class="disabled"{% endif %} title="{{ unavailability_calendar }}" href="{{ unavailability_calendar.get_absolute_url }}">{{ unavailability_calendar|truncatechars:50 }}</a>
41
            <a class="link-action-text" href="{% url 'chrono-manager-unavailability-calendar-toggle-view' desk.pk unavailability_calendar.pk %}">({{ unavailability_calendar.enabled|yesno:_("disable,enable") }})</a>
42
          </li>
43
        {% endfor %}
44
      </ul>
45
    {% endif %}
46 46

  
47
  <p class="notice">{% trans "To add new exceptions, you can upload a file or specify an address to a remote calendar." %}</p>
48
  {% csrf_token %}
49
  {{ form.as_p }}
50
  <p>
51
  </p>
52
  <div class="buttons">
53
    <button>{% trans "Import" %}</button>
54
    <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
55
  </div>
56
</form>
47
    <p class="notice">{% trans "To add new exceptions, you can upload a file or specify an address to a remote calendar." %}</p>
48
    {% csrf_token %}
49
    {{ form.as_p }}
50
    <p>
51
    </p>
52
    <div class="buttons">
53
      <button>{% trans "Import" %}</button>
54
      <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
55
    </div>
56
  </form>
57 57
{% endblock %}
chrono/manager/templates/chrono/manager_meeting_type_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
{{ form.media }}
5
  {{ block.super }}
6
  {{ form.media }}
7 7
{% endblock %}
8 8

  
9 9
{% block breadcrumb %}
10
{{ block.super }}
11
{% if object.id %}
12
<a href="{% url 'chrono-manager-agenda-view' pk=object.agenda.id %}">{{object.agenda.label}}</a>
13
{% endif %}
10
  {{ block.super }}
11
  {% if object.id %}
12
    <a href="{% url 'chrono-manager-agenda-view' pk=object.agenda.id %}">{{object.agenda.label}}</a>
13
  {% endif %}
14 14
{% endblock %}
15 15

  
16 16
{% block appbar %}
17
{% if object.id %}
18
<h2>{% trans "Edit Meeting Type" %}</h2>
19
<span class="actions">
20
<a rel="popup" href="{% url 'chrono-manager-meeting-type-delete' pk=object.id %}">{% trans 'Delete' %}</a>
21
</span>
22
{% else %}
23
<h2>{% trans "New Meeting Type" %}</h2>
24
{% endif %}
17
  {% if object.id %}
18
    <h2>{% trans "Edit Meeting Type" %}</h2>
19
    <span class="actions">
20
      <a rel="popup" href="{% url 'chrono-manager-meeting-type-delete' pk=object.id %}">{% trans 'Delete' %}</a>
21
    </span>
22
  {% else %}
23
    <h2>{% trans "New Meeting Type" %}</h2>
24
  {% endif %}
25 25
{% endblock %}
26 26

  
27 27
{% block content %}
28 28

  
29
<form method="post" enctype="multipart/form-data">
30
  {% csrf_token %}
31
  {{ form.as_p }}
32
  <div class="buttons">
33
    <button class="submit-button">{% trans "Save" %}</button>
34
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
35
  </div>
36
</form>
29
  <form method="post" enctype="multipart/form-data">
30
    {% csrf_token %}
31
    {{ form.as_p }}
32
    <div class="buttons">
33
      <button class="submit-button">{% trans "Save" %}</button>
34
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
35
    </div>
36
  </form>
37 37
{% endblock %}
chrono/manager/templates/chrono/manager_meetings_agenda_day_view.html
2 2
{% load i18n %}
3 3

  
4 4
{% block actions %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-agenda-month-view' pk=agenda.id year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-agenda-month-view' pk=agenda.id year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block content %}
10 10

  
11
{% for period, desk_infos in view.get_timetable_infos %}
11
  {% for period, desk_infos in view.get_timetable_infos %}
12 12

  
13
{% if forloop.first %}
14
<table class="agenda-table day-view hourspan-{{ hour_span }} desks-{{ desk_infos|length }} ">
15
  <thead>
16
    <tr>
17
      <td></td>
18
      {% for desk_info in desk_infos %}
19
      <th>{{ desk_info.desk.label }}{% if agenda.kind == 'virtual' %} ({{ desk_info.desk.agenda.label }}){% endif %}</th>
20
      {% endfor %}
21
    </tr>
22
  </thead>
23
  <tbody>
24
{% endif %}
13
    {% if forloop.first %}
14
      <table class="agenda-table day-view hourspan-{{ hour_span }} desks-{{ desk_infos|length }} ">
15
        <thead>
16
          <tr>
17
            <td></td>
18
            {% for desk_info in desk_infos %}
19
              <th>{{ desk_info.desk.label }}{% if agenda.kind == 'virtual' %} ({{ desk_info.desk.agenda.label }}){% endif %}</th>
20
            {% endfor %}
21
          </tr>
22
        </thead>
23
        <tbody>
24
    {% endif %}
25 25

  
26 26
    <tr class="{% cycle 'odd' 'even' %}">
27 27
      <th class="hour">{{ period|date:"TIME_FORMAT" }}</th>
28 28
      {% for desk_info in desk_infos %}
29
      <td>
29
        <td>
30 30

  
31
        {% if forloop.parentloop.first %}
32
          {# opening hours on the first row #}
33
          {% for slot in desk_info.opening_hours %}
34
          <div class="opening-hours"
35
               style="height: {{ slot.css_height }}%; top: {{ slot.css_top }}%;"
36
                  >{{slot.begin}} {{slot.end}}</div>
37
          {% endfor %}
38
          {% for slot in desk_info.exceptions %}
39
          <div class="exception-hours"
40
               style="height: {{ slot.css_height }}%; top: {{ slot.css_top }}%;"
41
               >{% if slot.label %}<span class="exception-label">{{slot.label}}</span>{% endif %}</div>
42
          {% endfor %}
43
        {% endif %}
31
          {% if forloop.parentloop.first %}
32
            {# opening hours on the first row #}
33
            {% for slot in desk_info.opening_hours %}
34
              <div class="opening-hours"
35
                style="height: {{ slot.css_height }}%; top: {{ slot.css_top }}%;"
36
              >{{slot.begin}} {{slot.end}}</div>
37
            {% endfor %}
38
            {% for slot in desk_info.exceptions %}
39
              <div class="exception-hours"
40
                style="height: {{ slot.css_height }}%; top: {{ slot.css_top }}%;"
41
              >{% if slot.label %}<span class="exception-label">{{slot.label}}</span>{% endif %}</div>
42
            {% endfor %}
43
          {% endif %}
44 44

  
45
        {% for booking in desk_info.bookings %}
46
          <div class="booking{% if booking.color %} booking-color-{{ booking.color.index }}{% endif %}"
45
          {% for booking in desk_info.bookings %}
46
            <div class="booking{% if booking.color %} booking-color-{{ booking.color.index }}{% endif %}"
47 47
              style="height: {{ booking.css_height }}%; min-height: {{ booking.css_height }}%; top: {{ booking.css_top }}%;"
48 48
            ><span class="start-time">{{booking.event.start_datetime|date:"TIME_FORMAT"}}</span>
49
            <a {% if booking.get_backoffice_url %}href="{{booking.get_backoffice_url}}"{% endif %}>{{ booking.get_user_block }}</a>
50
            <a rel="popup" class="cancel" href="{% url 'chrono-manager-booking-cancel' pk=booking.event.agenda_id booking_pk=booking.pk %}?next={{ request.path }}">{% trans "Cancel" %}</a>
51
            {% if booking.color %}<span class="booking-color-label booking-bg-color-{{ booking.color.index }}">{{ booking.color }}</span>{% endif %}
52
          </div>
53
        {% endfor %}
54
      </td>
49
              <a {% if booking.get_backoffice_url %}href="{{booking.get_backoffice_url}}"{% endif %}>{{ booking.get_user_block }}</a>
50
              <a rel="popup" class="cancel" href="{% url 'chrono-manager-booking-cancel' pk=booking.event.agenda_id booking_pk=booking.pk %}?next={{ request.path }}">{% trans "Cancel" %}</a>
51
              {% if booking.color %}<span class="booking-color-label booking-bg-color-{{ booking.color.index }}">{{ booking.color }}</span>{% endif %}
52
            </div>
53
          {% endfor %}
54
        </td>
55 55
      {% endfor %}
56 56
    </tr>
57 57

  
58
{% if forloop.last %}
59
  </tbody>
60
</table>
61
{% endif %}
58
    {% if forloop.last %}
59
      </tbody>
60
      </table>
61
    {% endif %}
62 62

  
63
{% empty %}
64
<div class="closed-for-the-day">
65
  <p>{% trans "No opening hours this day." %}</p>
66
</div>
67
{% endfor %}
63
  {% empty %}
64
    <div class="closed-for-the-day">
65
      <p>{% trans "No opening hours this day." %}</p>
66
    </div>
67
  {% endfor %}
68 68

  
69
{% if booking_colors %}
70
{% include "chrono/booking_color_legend.html" with colors=booking_colors %}
71
{% endif %}
69
  {% if booking_colors %}
70
    {% include "chrono/booking_color_legend.html" with colors=booking_colors %}
71
  {% endif %}
72 72

  
73 73
{% endblock %}
chrono/manager/templates/chrono/manager_meetings_agenda_month_view.html
2 2
{% load i18n %}
3 3

  
4 4
{% block actions %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.id year=view.date|date:"Y" month=view.date|date:"m" day=view.date|date:"d" %}">{% trans 'Day view' %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.id year=view.date|date:"Y" month=view.date|date:"m" day=view.date|date:"d" %}">{% trans 'Day view' %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block content %}
10 10

  
11
{% for week_days in view.get_timetable_infos %}
12
{% if forloop.first %}
13
<table class="agenda-table month-view {% if single_desk %}single-desk{% endif %}">
14
  <tbody>
15
{% endif %}
16
  <tr>
17
    <th></th>
18
    {% for day in week_days.days %}
19
    <th class="weekday {% if day.today %}today{% endif %}">{% if not day.other_month %}<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.id year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"d" %}">{{ day.date|date:"l j" }}</a>{% endif %}</th>
20
    {% endfor %}
21
  </tr>
22
  {% for hour in week_days.periods %}
23
  <tr class="{% cycle 'odd' 'even' %}">
24
    <th class="hour">{{ hour|date:"TIME_FORMAT" }}</th>
25
    {% for day in week_days.days %}
26
    <td class="{% if day.other_month %}other-month{% endif %} {% if day.today %}today{% endif %}">
27
      {% if forloop.parentloop.first %}
28
      {% for slot in day.infos.opening_hours %}
29
      <div class="opening-hours" style="height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;left:{{ slot.css_left|stringformat:".1f" }}%;"></div>
11
  {% for week_days in view.get_timetable_infos %}
12
    {% if forloop.first %}
13
      <table class="agenda-table month-view {% if single_desk %}single-desk{% endif %}">
14
        <tbody>
15
    {% endif %}
16
    <tr>
17
      <th></th>
18
      {% for day in week_days.days %}
19
        <th class="weekday {% if day.today %}today{% endif %}">{% if not day.other_month %}<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.id year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"d" %}">{{ day.date|date:"l j" }}</a>{% endif %}</th>
30 20
      {% endfor %}
21
    </tr>
22
    {% for hour in week_days.periods %}
23
      <tr class="{% cycle 'odd' 'even' %}">
24
        <th class="hour">{{ hour|date:"TIME_FORMAT" }}</th>
25
        {% for day in week_days.days %}
26
          <td class="{% if day.other_month %}other-month{% endif %} {% if day.today %}today{% endif %}">
27
            {% if forloop.parentloop.first %}
28
              {% for slot in day.infos.opening_hours %}
29
                <div class="opening-hours" style="height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;left:{{ slot.css_left|stringformat:".1f" }}%;"></div>
30
              {% endfor %}
31 31

  
32
      {% for slot in day.infos.exceptions %}
33
      <div class="exception-hours" style="height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;left:{{ slot.css_left|stringformat:".1f" }}%;" {% if slot.label %}title="{{ slot.label }}"{% endif %}></div>
34
      {% endfor %}
32
              {% for slot in day.infos.exceptions %}
33
                <div class="exception-hours" style="height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;left:{{ slot.css_left|stringformat:".1f" }}%;" {% if slot.label %}title="{{ slot.label }}"{% endif %}></div>
34
              {% endfor %}
35 35

  
36
      {% for slot in day.infos.booked_slots %}
37
      <div class="booking{% if slot.booking.color %} booking-color-{{ slot.booking.color.index }}{% endif %}" style="left:{{ slot.css_left|stringformat:".1f" }}%;height:{{ slot.css_height|stringformat:".1f" }}%;min-height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;">
38
        <span class="start-time">{{slot.booking.event.start_datetime|date:"TIME_FORMAT"}}</span>
39
        <a {% if slot.booking.get_backoffice_url %}href="{{slot.booking.get_backoffice_url}}"{% endif %}>{{ slot.booking.get_user_block }}</a>
40
          <a rel="popup" class="cancel" href="{% url 'chrono-manager-booking-cancel' pk=slot.booking.event.agenda_id booking_pk=slot.booking.id %}?next={{ request.path }}">{% trans "Cancel" %}</a>
41
        {% if not single_desk %}<span class="desk">{{ slot.desk }}</span>{% endif %}
42
        {% if slot.booking.color %}<span class="booking-color-label booking-bg-color-{{ slot.booking.color.index }}">{{ slot.booking.color }}</span>{% endif %}
43
        </div>
44
      {% endfor %}
45
      {% endif %}
46
    </td>
36
              {% for slot in day.infos.booked_slots %}
37
                <div class="booking{% if slot.booking.color %} booking-color-{{ slot.booking.color.index }}{% endif %}" style="left:{{ slot.css_left|stringformat:".1f" }}%;height:{{ slot.css_height|stringformat:".1f" }}%;min-height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;">
38
                  <span class="start-time">{{slot.booking.event.start_datetime|date:"TIME_FORMAT"}}</span>
39
                  <a {% if slot.booking.get_backoffice_url %}href="{{slot.booking.get_backoffice_url}}"{% endif %}>{{ slot.booking.get_user_block }}</a>
40
                  <a rel="popup" class="cancel" href="{% url 'chrono-manager-booking-cancel' pk=slot.booking.event.agenda_id booking_pk=slot.booking.id %}?next={{ request.path }}">{% trans "Cancel" %}</a>
41
                  {% if not single_desk %}<span class="desk">{{ slot.desk }}</span>{% endif %}
42
                  {% if slot.booking.color %}<span class="booking-color-label booking-bg-color-{{ slot.booking.color.index }}">{{ slot.booking.color }}</span>{% endif %}
43
                </div>
44
              {% endfor %}
45
            {% endif %}
46
          </td>
47
        {% endfor %}
48
      </tr>
47 49
    {% endfor %}
48
  </tr>
49
  {% endfor %}
50
  {% resetcycle %}
51
{% if forloop.last %}
52
  </tbody>
53
</table>
54
{% endif %}
50
    {% resetcycle %}
51
    {% if forloop.last %}
52
      </tbody>
53
      </table>
54
    {% endif %}
55 55

  
56
{% empty %}
57
<div class="closed-for-the-day">
58
  <p>{% trans "No opening hours this month." %}</p>
59
</div>
60
{% endfor %}
56
  {% empty %}
57
    <div class="closed-for-the-day">
58
      <p>{% trans "No opening hours this month." %}</p>
59
    </div>
60
  {% endfor %}
61 61

  
62
{% if booking_colors %}
63
{% include "chrono/booking_color_legend.html" with colors=booking_colors %}
64
{% endif %}
62
  {% if booking_colors %}
63
    {% include "chrono/booking_color_legend.html" with colors=booking_colors %}
64
  {% endif %}
65 65

  
66 66
{% endblock %}
chrono/manager/templates/chrono/manager_meetings_agenda_settings.html
4 4
{% block extrascripts %}
5 5
  {{ block.super }}
6 6
  {% if 'display_exceptions' in request.GET %}
7
  <script>
8
    $(function () {
9
      $('a.timeperiod-exception-all.desk-{{ request.GET.display_exceptions }}').click();
10
    });
11
  </script>
7
    <script>
8
      $(function () {
9
        $('a.timeperiod-exception-all.desk-{{ request.GET.display_exceptions }}').click();
10
      });
11
    </script>
12 12
  {% endif %}
13 13
{% endblock %}
14 14

  
......
20 20

  
21 21
{% block agenda-extra-menu-actions %}
22 22
  {% if object.desk_simple_management %}
23
  <li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to invididual desk management' %}</a></li>
23
    <li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to invididual desk management' %}</a></li>
24 24
  {% elif agenda_is_available_for_simple_management %}
25
  <li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to global desk management' %}</a></li>
25
    <li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to global desk management' %}</a></li>
26 26
  {% endif %}
27 27
{% endblock %}
28 28

  
29 29
{% block agenda-settings-extra-tab-buttons %}
30
    <button aria-controls="panel-meeting-types"
31
            aria-selected="{{meeting_types|yesno:"false,true"}}"
32
            id="tab-meeting-types" role="tab"
33
            tabindex="{{meeting_types|yesno:"-1,0"}}"
34
            >{% trans "Meeting Types" %}</button>
35
    {% if object.desk_simple_management %}
30
  <button aria-controls="panel-meeting-types"
31
    aria-selected="{{meeting_types|yesno:"false,true"}}"
32
    id="tab-meeting-types" role="tab"
33
    tabindex="{{meeting_types|yesno:"-1,0"}}"
34
  >{% trans "Meeting Types" %}</button>
35
  {% if object.desk_simple_management %}
36 36
    <button aria-controls="panel-desks" aria-selected="false" id="tab-desks" role="tab" tabindex="-1">{% trans "Desks" %}</button>
37
    {% endif %}
38
    <button aria-controls="panel-time-periods"
39
            aria-selected="{{meeting_types|yesno:"true,false"}}"
40
            id="tab-time-periods" role="tab"
41
            tabindex="{{meeting_types|yesno:"0"}}"
42
            >{% trans "Time Periods" %}</button>
43
    {% if has_resources %}
37
  {% endif %}
38
  <button aria-controls="panel-time-periods"
39
    aria-selected="{{meeting_types|yesno:"true,false"}}"
40
    id="tab-time-periods" role="tab"
41
    tabindex="{{meeting_types|yesno:"0"}}"
42
  >{% trans "Time Periods" %}</button>
43
  {% if has_resources %}
44 44
    <button aria-controls="panel-resources" aria-selected="false" id="tab-resources" role="tab" tabindex="-1">{% trans "Resources" %}</button>
45
    {% endif %}
46
    <button aria-controls="panel-display-options" aria-selected="false" id="tab-display-options" role="tab" tabindex="-1">{% trans "Display options" %}</button>
45
  {% endif %}
46
  <button aria-controls="panel-display-options" aria-selected="false" id="tab-display-options" role="tab" tabindex="-1">{% trans "Display options" %}</button>
47 47
{% endblock %}
48 48

  
49 49
{% block agenda-settings-extra-tab-list %}
50 50

  
51
    <div aria-labelledby="tab-meeting-types" id="panel-meeting-types" role="tabpanel" tabindex="0"
52
              {% if meeting_types %}hidden{% endif %}>
53
      {% if meeting_types %}
51
  <div aria-labelledby="tab-meeting-types" id="panel-meeting-types" role="tabpanel" tabindex="0"
52
    {% if meeting_types %}hidden{% endif %}>
53
    {% if meeting_types %}
54 54
      <ul class="objects-list single-links">
55 55
        {% for meeting_type in meeting_types %}
56
        <li>
57
          <a rel="popup" href="{% url 'chrono-manager-meeting-type-edit' pk=meeting_type.id %}">
58
            {{meeting_type.label}}
59
            <span class="duration">({{meeting_type.duration}} {% trans "minutes" %})</span>
60
            <span class="identifier">[{% trans "identifier:" %} {{meeting_type.slug}}]</span>
61
          </a>
62
          <a rel="popup" class="delete" href="{% url 'chrono-manager-meeting-type-delete' pk=meeting_type.id %}">{% trans "remove" %}</a>
63
        </li>
56
          <li>
57
            <a rel="popup" href="{% url 'chrono-manager-meeting-type-edit' pk=meeting_type.id %}">
58
              {{meeting_type.label}}
59
              <span class="duration">({{meeting_type.duration}} {% trans "minutes" %})</span>
60
              <span class="identifier">[{% trans "identifier:" %} {{meeting_type.slug}}]</span>
61
            </a>
62
            <a rel="popup" class="delete" href="{% url 'chrono-manager-meeting-type-delete' pk=meeting_type.id %}">{% trans "remove" %}</a>
63
          </li>
64 64
        {% endfor %}
65 65
      </ul>
66
      {% else %}
66
    {% else %}
67 67
      <div class="big-msg-info">
68 68
        {% blocktrans %}
69
        This agenda doesn't have any meeting type yet. Click on the "New Meeting Type" button in
70
        the top right of the page to add a first one.
69
          This agenda doesn't have any meeting type yet. Click on the "New Meeting Type" button in
70
          the top right of the page to add a first one.
71 71
        {% endblocktrans %}
72 72
      </div>
73
      {% endif %}
74
    </div>
73
    {% endif %}
74
  </div>
75 75

  
76
    {% if object.desk_simple_management %}
76
  {% if object.desk_simple_management %}
77 77
    <div aria-labelledby="tab-desks" hidden="" id="panel-desks" role="tabpanel" tabindex="0">
78 78
      <ul class="objects-list single-links">
79 79
        {% for desk in object.prefetched_desks %}
......
84 84
        {% endfor %}
85 85
      </ul>
86 86
    </div>
87
    {% endif %}
87
  {% endif %}
88 88

  
89
    <div aria-labelledby="tab-time-periods" {% if not meeting_types %}hidden{% endif %} id="panel-time-periods" role="tabpanel" tabindex="0">
90
      {% if object.prefetched_desks %}
89
  <div aria-labelledby="tab-time-periods" {% if not meeting_types %}hidden{% endif %} id="panel-time-periods" role="tabpanel" tabindex="0">
90
    {% if object.prefetched_desks %}
91 91
      <div class="timeperiods">
92 92
        {% for desk in object.prefetched_desks %}
93
        {% if not object.desk_simple_management or object.desk_simple_management and forloop.counter == 1 %}
94
        <div class="timeperiod">
95
          {% url 'chrono-manager-agenda-add-time-period' agenda_pk=object.pk pk=desk.pk as add_time_period_url %}
96
          <ul class="objects-list single-links">
97
            {% if not object.desk_simple_management and object.prefetched_desks|length > 1 %}
98
            <li>
99
              <a rel="popup" href="{% url 'chrono-manager-desk-edit' pk=desk.id %}">
100
                <strong>{{ desk.label }}</strong>
101
              </a>
102
              <a rel="popup" class="delete" href="{% url 'chrono-manager-desk-delete' pk=desk.id %}">{% trans "remove" %}</a>
103
            </li>
104
            {% endif %}
105
            {% for time_period in desk.timeperiod_set.all %}
106
            <li>
107
              <a rel="popup" href="{% url 'chrono-manager-time-period-edit' pk=time_period.id %}">{{ time_period }}</a>
108
              <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-delete' pk=time_period.id %}">{% trans "remove" %}</a>
109
            </li>
110
            {% endfor %}
111
            <li><a class="add" rel="popup" href="{{add_time_period_url}}">{% trans 'Add a time period' %}</a></li>
112
            {% url 'chrono-manager-agenda-add-time-period-exception' agenda_pk=object.pk pk=desk.pk as add_time_period_exception_url %}
113
            <li>
114
              <a><strong>{% trans 'Exceptions' %}</strong></a>
115
              <a class="link-action-icon settings" rel="popup" href="{% url 'chrono-manager-desk-add-import-time-period-exceptions' pk=desk.pk %}" title="{% trans 'Manage exception sources' %}">{% trans 'manage exceptions' %}</a>
116
            </li>
117
            {% for exception in desk.get_exceptions_within_two_weeks %}
118
            <li>
119
              <a rel="popup" {% if not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.pk %}"{% endif %}>{{ exception }}</a>
120
              {% if not exception.read_only %}
121
              <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}">{% trans "remove" %}</a>
122
              {% endif %}
123
            </li>
124
            {% endfor %}
125
            {% if not desk.are_all_exceptions_displayed %}
126
            <li><a class="timeperiod-exception-all desk-{{ desk.pk }}" rel="popup" data-selector="div.timeperiod" href="{% url 'chrono-manager-time-period-exception-extract-list' pk=desk.id %}">({% trans 'see all exceptions' %})</a></li>
127
            {% endif %}
128
            <li><a class="add" rel="popup" href="{{add_time_period_exception_url}}">{% trans 'Add a time period exception' %}</a></li>
129
          </ul>
130
        </div>
131
        {% endif %}
93
          {% if not object.desk_simple_management or object.desk_simple_management and forloop.counter == 1 %}
94
            <div class="timeperiod">
95
              {% url 'chrono-manager-agenda-add-time-period' agenda_pk=object.pk pk=desk.pk as add_time_period_url %}
96
              <ul class="objects-list single-links">
97
                {% if not object.desk_simple_management and object.prefetched_desks|length > 1 %}
98
                  <li>
99
                    <a rel="popup" href="{% url 'chrono-manager-desk-edit' pk=desk.id %}">
100
                      <strong>{{ desk.label }}</strong>
101
                    </a>
102
                    <a rel="popup" class="delete" href="{% url 'chrono-manager-desk-delete' pk=desk.id %}">{% trans "remove" %}</a>
103
                  </li>
104
                {% endif %}
105
                {% for time_period in desk.timeperiod_set.all %}
106
                  <li>
107
                    <a rel="popup" href="{% url 'chrono-manager-time-period-edit' pk=time_period.id %}">{{ time_period }}</a>
108
                    <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-delete' pk=time_period.id %}">{% trans "remove" %}</a>
109
                  </li>
110
                {% endfor %}
111
                <li><a class="add" rel="popup" href="{{add_time_period_url}}">{% trans 'Add a time period' %}</a></li>
112
                {% url 'chrono-manager-agenda-add-time-period-exception' agenda_pk=object.pk pk=desk.pk as add_time_period_exception_url %}
113
                <li>
114
                  <a><strong>{% trans 'Exceptions' %}</strong></a>
115
                  <a class="link-action-icon settings" rel="popup" href="{% url 'chrono-manager-desk-add-import-time-period-exceptions' pk=desk.pk %}" title="{% trans 'Manage exception sources' %}">{% trans 'manage exceptions' %}</a>
116
                </li>
117
                {% for exception in desk.get_exceptions_within_two_weeks %}
118
                  <li>
119
                    <a rel="popup" {% if not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.pk %}"{% endif %}>{{ exception }}</a>
120
                    {% if not exception.read_only %}
121
                      <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}">{% trans "remove" %}</a>
122
                    {% endif %}
123
                  </li>
124
                {% endfor %}
125
                {% if not desk.are_all_exceptions_displayed %}
126
                  <li><a class="timeperiod-exception-all desk-{{ desk.pk }}" rel="popup" data-selector="div.timeperiod" href="{% url 'chrono-manager-time-period-exception-extract-list' pk=desk.id %}">({% trans 'see all exceptions' %})</a></li>
127
                {% endif %}
128
                <li><a class="add" rel="popup" href="{{add_time_period_exception_url}}">{% trans 'Add a time period exception' %}</a></li>
129
              </ul>
130
            </div>
131
          {% endif %}
132 132
        {% endfor %}
133 133
      </div>
134
      {% else %}
134
    {% else %}
135 135
      <div class="big-msg-info">
136 136
        {% blocktrans %}
137
        This agenda doesn't have any desk yet. Click on the "New Desk" button in
138
        the top right of the page to add a first one.
137
          This agenda doesn't have any desk yet. Click on the "New Desk" button in
138
          the top right of the page to add a first one.
139 139
        {% endblocktrans %}
140 140
      </div>
141
      {% endif %}
142
    </div>
141
    {% endif %}
142
  </div>
143 143

  
144
    {% if has_resources %}
144
  {% if has_resources %}
145 145
    <div aria-labelledby="tab-resources" hidden="" id="panel-resources" role="tabpanel" tabindex="0">
146 146
      {% with object.resources.all as agenda_resources %}
147
      {% if agenda_resources %}
148
      <ul class="objects-list single-links">
149
        {% for resource in agenda_resources %}
150
        <li>
151
          <a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">
152
            {{ resource.label }}
153
            <span class="identifier">[{% trans "identifier:" %} {{ resource.slug }}]</span>
154
          </a>
155
          <a rel="popup" class="delete" href="{% url 'chrono-manager-agenda-delete-resource' pk=object.pk resource_pk=resource.pk %}">{% trans "remove" %}</a>
156
        </li>
157
        {% endfor %}
158
      </ul>
159
      {% else %}
160
      <div class="big-msg-info">
161
        {% blocktrans %}
162
        This agenda doesn't have any resource yet. Click on the "Add resource" button in
163
        the top right of the page to add a first one.
164
        {% endblocktrans %}
165
      </div>
166
      {% endif %}
147
        {% if agenda_resources %}
148
          <ul class="objects-list single-links">
149
            {% for resource in agenda_resources %}
150
              <li>
151
                <a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">
152
                  {{ resource.label }}
153
                  <span class="identifier">[{% trans "identifier:" %} {{ resource.slug }}]</span>
154
                </a>
155
                <a rel="popup" class="delete" href="{% url 'chrono-manager-agenda-delete-resource' pk=object.pk resource_pk=resource.pk %}">{% trans "remove" %}</a>
156
              </li>
157
            {% endfor %}
158
          </ul>
159
        {% else %}
160
          <div class="big-msg-info">
161
            {% blocktrans %}
162
              This agenda doesn't have any resource yet. Click on the "Add resource" button in
163
              the top right of the page to add a first one.
164
            {% endblocktrans %}
165
          </div>
166
        {% endif %}
167 167
      {% endwith %}
168 168
    </div>
169
    {% endif %}
169
  {% endif %}
170 170

  
171
    <div aria-labelledby="tab-display-options" hidden="" id="panel-display-options" role="tabpanel" tabindex="0">
172
      <ul>
173
        <li>
174
          {% trans "Booking display template:" %}
175
          <pre>{{ agenda.get_booking_user_block_template }}</pre>
176
        </li>
177
      </ul>
178
      <div class="panel--buttons">
179
        <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-display-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
180
      </div>
171
  <div aria-labelledby="tab-display-options" hidden="" id="panel-display-options" role="tabpanel" tabindex="0">
172
    <ul>
173
      <li>
174
        {% trans "Booking display template:" %}
175
        <pre>{{ agenda.get_booking_user_block_template }}</pre>
176
      </li>
177
    </ul>
178
    <div class="panel--buttons">
179
      <a rel="popup" class="button" href="{% url 'chrono-manager-agenda-display-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
181 180
    </div>
181
  </div>
182 182

  
183 183
{% endblock %}
chrono/manager/templates/chrono/manager_no_access.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Agendas' %}</h2>
5
  <h2>{% trans 'Agendas' %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<div class="big-msg-sorry">
10
  <p>{% trans 'This screen displays agendas you can access.' %}</p>
11
  <p>{% trans 'Unfortunately, there is still no agenda configured this way.' %}</p>
12
</div>
9
  <div class="big-msg-sorry">
10
    <p>{% trans 'This screen displays agendas you can access.' %}</p>
11
    <p>{% trans 'Unfortunately, there is still no agenda configured this way.' %}</p>
12
  </div>
13 13
{% endblock %}
chrono/manager/templates/chrono/manager_replace_exceptions.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Replace exceptions" %}</h2>
5
  <h2>{% trans "Replace exceptions" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post" enctype="multipart/form-data">
10
  <p class="notice">{% trans "To replace existing exceptions, please upload a new file." %}</p>
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <p>
14
  </p>
15
  <div class="buttons">
16
    <button>{% trans "Replace" %}</button>
17
    <a class="cancel" href="{{ view.get_success_url }">{% trans 'Cancel' %}</a>
18
  </div>
19
</form>
9
  <form method="post" enctype="multipart/form-data">
10
    <p class="notice">{% trans "To replace existing exceptions, please upload a new file." %}</p>
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <p>
14
    </p>
15
    <div class="buttons">
16
      <button>{% trans "Replace" %}</button>
17
      <a class="cancel" href="{{ view.get_success_url }">{% trans 'Cancel' %}</a>
18
    </div>
19
  </form>
20 20
{% endblock %}
chrono/manager/templates/chrono/manager_resource_day_view.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a>{{ day|date:"SHORT_DATE_FORMAT" }}</a>
5
  {{ block.super }}
6
  <a>{{ day|date:"SHORT_DATE_FORMAT" }}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar-title %}
10
<h2>
11
  <a href="{{ view.get_previous_day_url }}">←</a>
12
  <span class="date-title">{{ view.date|date:"l j F Y" }}</span>
13
  {% with selected_day=view.date|date:"j" selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
14
    <div class="date-picker" style="display: none">
15
    <select name="day">{% for day in view.get_days %}<option value="{{ day }}" {% if selected_day == day %}selected{% endif %}>{{day}}</option>{% endfor %}</select>
16
    <select name="month">{% for month, month_label in view.get_months %}<option value="{{ month }}" {% if selected_month == month %}selected{% endif %}>{{ month_label }}</option>{% endfor %}</select>
17
    <select name="year">{% for year in view.get_years %}<option value="{{ year }}" {% if selected_year == year %}selected{% endif %}>{{year}}</option>{% endfor %}</select>
18
    <button>{% trans 'Set Date' %}</button>
19
    </div>
20
  {% endwith %}
21
  <a href="{{ view.get_next_day_url }}">→</a>
22
</h2>
10
  <h2>
11
    <a href="{{ view.get_previous_day_url }}">←</a>
12
    <span class="date-title">{{ view.date|date:"l j F Y" }}</span>
13
    {% with selected_day=view.date|date:"j" selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
14
      <div class="date-picker" style="display: none">
15
        <select name="day">{% for day in view.get_days %}<option value="{{ day }}" {% if selected_day == day %}selected{% endif %}>{{day}}</option>{% endfor %}</select>
16
        <select name="month">{% for month, month_label in view.get_months %}<option value="{{ month }}" {% if selected_month == month %}selected{% endif %}>{{ month_label }}</option>{% endfor %}</select>
17
        <select name="year">{% for year in view.get_years %}<option value="{{ year }}" {% if selected_year == year %}selected{% endif %}>{{year}}</option>{% endfor %}</select>
18
        <button>{% trans 'Set Date' %}</button>
19
      </div>
20
    {% endwith %}
21
    <a href="{{ view.get_next_day_url }}">→</a>
22
  </h2>
23 23
{% endblock %}
24 24
{% block appbar-extras %}
25
<a href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
25
  <a href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
26 26
{% endblock %}
27 27

  
28 28
{% block content %}
29 29

  
30
{% for period, resource_info in view.get_timetable_infos %}
30
  {% for period, resource_info in view.get_timetable_infos %}
31 31

  
32 32
    {% if forloop.first %}
33
    <table class="agenda-table day-view hourspan-{{ hour_span }}">
33
      <table class="agenda-table day-view hourspan-{{ hour_span }}">
34 34
        <tbody>
35 35
    {% endif %}
36
            <tr class="{% cycle 'odd' 'even' %}">
37
                <th class="hour">{{ period|date:"TIME_FORMAT" }}</th>
38
                <td>
39
                    {% for booking in resource_info.bookings %}
40
                      <div class="booking"
41
                          style="height: {{ booking.css_height }}%; min-height: {{ booking.css_height }}%; top: {{ booking.css_top }}%;"
42
                        ><span class="start-time">{{ booking.event.start_datetime|date:"TIME_FORMAT" }}</span>
43
                        <a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}</a>
44
                      </div>
45
                    {% endfor %}
46
                </td>
47
            </tr>
36
    <tr class="{% cycle 'odd' 'even' %}">
37
      <th class="hour">{{ period|date:"TIME_FORMAT" }}</th>
38
      <td>
39
        {% for booking in resource_info.bookings %}
40
          <div class="booking"
41
            style="height: {{ booking.css_height }}%; min-height: {{ booking.css_height }}%; top: {{ booking.css_top }}%;"
42
          ><span class="start-time">{{ booking.event.start_datetime|date:"TIME_FORMAT" }}</span>
43
            <a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}</a>
44
          </div>
45
        {% endfor %}
46
      </td>
47
    </tr>
48 48
    {% if forloop.last %}
49
        </tbody>
50
    </table>
49
      </tbody>
50
      </table>
51 51
    {% endif %}
52
{% empty %}
53
<div class="closed-for-the-day">
54
  <p>{% trans "No bookings this day." %}</p>
55
</div>
56
{% endfor %}
52
  {% empty %}
53
    <div class="closed-for-the-day">
54
      <p>{% trans "No bookings this day." %}</p>
55
    </div>
56
  {% endfor %}
57 57

  
58 58
{% endblock %}
chrono/manager/templates/chrono/manager_resource_detail.html
2 2
{% load i18n %}
3 3

  
4 4
{% block page-title-extra-label %}
5
- {{ resource.label }}
5
  - {{ resource.label }}
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
9
{{ block.super }}
10
<a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">{{ resource.label }}</a>
9
  {{ block.super }}
10
  <a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">{{ resource.label }}</a>
11 11
{% endblock %}
12 12

  
13 13
{% block appbar %}
14
{% block appbar-title %}
15
<h2>{{ resource }}</h2>
16
{% endblock %}
17
<span class="actions">
18
{% block appbar-extras %}
19
{% if request.user.is_staff %}
20
<a rel="popup" href="{% url 'chrono-manager-resource-edit' pk=resource.pk %}">{% trans 'Edit' %}</a>
21
<a rel="popup" href="{% url 'chrono-manager-resource-delete' pk=resource.pk %}">{% trans 'Delete' %}</a>
22
{% endif %}
23
{% now "Y" as today_year %}
24
{% now "n" as today_month %}
25
{% now "j" as today_day %}
26
<a href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=today_year month=today_month %}">{% trans 'Month view' %}</a>
27
<a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=today_year month=today_month day=today_day %}">{% trans 'Day view' %}</a>
28
{% endblock %}
29
</span>
14
  {% block appbar-title %}
15
    <h2>{{ resource }}</h2>
16
  {% endblock %}
17
  <span class="actions">
18
    {% block appbar-extras %}
19
      {% if request.user.is_staff %}
20
        <a rel="popup" href="{% url 'chrono-manager-resource-edit' pk=resource.pk %}">{% trans 'Edit' %}</a>
21
        <a rel="popup" href="{% url 'chrono-manager-resource-delete' pk=resource.pk %}">{% trans 'Delete' %}</a>
22
      {% endif %}
23
      {% now "Y" as today_year %}
24
      {% now "n" as today_month %}
25
      {% now "j" as today_day %}
26
      <a href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=today_year month=today_month %}">{% trans 'Month view' %}</a>
27
      <a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=today_year month=today_month day=today_day %}">{% trans 'Day view' %}</a>
28
    {% endblock %}
29
  </span>
30 30
{% endblock %}
31 31

  
32 32
{% block content %}
33 33

  
34
<div class="section">
35
<h3>{% trans 'Used in meetings agendas' %}</h3>
36
<div>
37
{% with resource.agenda_set.all as agendas %}
38
{% if agendas %}
39
  <ul class="objects-list single-links">
40
    {% for agenda in agendas %}
41
    <li>
42
        <a href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">
43
            {{ agenda.label }}
44
        </a>
45
    </li>
46
    {% endfor %}
47
  </ul>
48
{% else %}
49
<div class="big-msg-info">
50
  {% blocktrans %}
51
  This resource is not used yet.
52
  {% endblocktrans %}
53
</div>
54
{% endif %}
55
{% endwith %}
56
</div>
57
</div>
34
  <div class="section">
35
    <h3>{% trans 'Used in meetings agendas' %}</h3>
36
    <div>
37
      {% with resource.agenda_set.all as agendas %}
38
        {% if agendas %}
39
          <ul class="objects-list single-links">
40
            {% for agenda in agendas %}
41
              <li>
42
                <a href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">
43
                  {{ agenda.label }}
44
                </a>
45
              </li>
46
            {% endfor %}
47
          </ul>
48
        {% else %}
49
          <div class="big-msg-info">
50
            {% blocktrans %}
51
              This resource is not used yet.
52
            {% endblocktrans %}
53
          </div>
54
        {% endif %}
55
      {% endwith %}
56
    </div>
57
  </div>
58 58

  
59 59
{% endblock %}
chrono/manager/templates/chrono/manager_resource_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
{% if object.id %}
6
<h2>{% trans "Edit Resource" %}</h2>
7
{% else %}
8
<h2>{% trans "New Resource" %}</h2>
9
{% endif %}
5
  {% if object.id %}
6
    <h2>{% trans "Edit Resource" %}</h2>
7
  {% else %}
8
    <h2>{% trans "New Resource" %}</h2>
9
  {% endif %}
10 10
{% endblock %}
11 11

  
12 12
{% block content %}
13 13

  
14
<form method="post" enctype="multipart/form-data">
15
  {% csrf_token %}
16
  {{ form.as_p }}
17
  <div class="buttons">
18
    <button class="submit-button">{% trans "Save" %}</button>
19
    <a class="cancel" href="{% url 'chrono-manager-resource-list' %}">{% trans 'Cancel' %}</a>
20
  </div>
21
</form>
14
  <form method="post" enctype="multipart/form-data">
15
    {% csrf_token %}
16
    {{ form.as_p }}
17
    <div class="buttons">
18
      <button class="submit-button">{% trans "Save" %}</button>
19
      <a class="cancel" href="{% url 'chrono-manager-resource-list' %}">{% trans 'Cancel' %}</a>
20
    </div>
21
  </form>
22 22
{% endblock %}
chrono/manager/templates/chrono/manager_resource_list.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-resource-list' %}">{% trans "Resources" %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-resource-list' %}">{% trans "Resources" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans 'Resources' %}</h2>
11
<span class="actions">
12
<a rel="popup" href="{% url 'chrono-manager-resource-add' %}">{% trans 'New' %}</a>
13
</span>
10
  <h2>{% trans 'Resources' %}</h2>
11
  <span class="actions">
12
    <a rel="popup" href="{% url 'chrono-manager-resource-add' %}">{% trans 'New' %}</a>
13
  </span>
14 14
{% endblock %}
15 15

  
16 16

  
17 17
{% block content %}
18
{% if object_list %}
19
<div>
20
  <ul class="objects-list single-links">
21
    {% for object in object_list %}
22
    <li>
23
        <a href="{% url 'chrono-manager-resource-view' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
24
    </li>
25
    {% endfor %}
26
  </ul>
27
</div>
28
{% else %}
29
<div class="big-msg-info">
30
  {% blocktrans %}
31
  This site doesn't have any resource yet. Click on the "New" button in the top
32
  right of the page to add a first one.
33
  {% endblocktrans %}
34
</div>
35
{% endif %}
18
  {% if object_list %}
19
    <div>
20
      <ul class="objects-list single-links">
21
        {% for object in object_list %}
22
          <li>
23
            <a href="{% url 'chrono-manager-resource-view' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
24
          </li>
25
        {% endfor %}
26
      </ul>
27
    </div>
28
  {% else %}
29
    <div class="big-msg-info">
30
      {% blocktrans %}
31
        This site doesn't have any resource yet. Click on the "New" button in the top
32
        right of the page to add a first one.
33
      {% endblocktrans %}
34
    </div>
35
  {% endif %}
36 36
{% endblock %}
chrono/manager/templates/chrono/manager_resource_month_view.html
4 4
{% block bodyargs %}class="monthview"{% endblock %}
5 5

  
6 6
{% block breadcrumb %}
7
{{ block.super }}
8
<a>{{ view.date|date:"F Y" }}</a>
7
  {{ block.super }}
8
  <a>{{ view.date|date:"F Y" }}</a>
9 9
{% endblock %}
10 10

  
11 11
{% block appbar-title %}
12
<h2>
13
  <a href="{{ view.get_previous_month_url }}">←</a>
14
  <span class="date-title">{{ view.date|date:"F Y" }}</span>
15
  {% with selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
16
    <div class="date-picker" style="display: none">
17
    <select name="month">{% for month, month_label in view.get_months %}<option value="{{ month }}" {% if selected_month == month %}selected{% endif %}>{{ month_label }}</option>{% endfor %}</select>
18
    <select name="year">{% for year in view.get_years %}<option value="{{ year }}" {% if selected_year == year %}selected{% endif %}>{{year}}</option>{% endfor %}</select>
19
    <button>{% trans 'Set Date' %}</button>
20
    </div>
21
  {% endwith %}
22
  <a href="{{ view.get_next_month_url }}">→</a>
23
</h2>
12
  <h2>
13
    <a href="{{ view.get_previous_month_url }}">←</a>
14
    <span class="date-title">{{ view.date|date:"F Y" }}</span>
15
    {% with selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
16
      <div class="date-picker" style="display: none">
17
        <select name="month">{% for month, month_label in view.get_months %}<option value="{{ month }}" {% if selected_month == month %}selected{% endif %}>{{ month_label }}</option>{% endfor %}</select>
18
        <select name="year">{% for year in view.get_years %}<option value="{{ year }}" {% if selected_year == year %}selected{% endif %}>{{year}}</option>{% endfor %}</select>
19
        <button>{% trans 'Set Date' %}</button>
20
      </div>
21
    {% endwith %}
22
    <a href="{{ view.get_next_month_url }}">→</a>
23
  </h2>
24 24
{% endblock %}
25 25
{% block appbar-extras %}
26
<a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=view.date|date:"Y" month=view.date|date:"n" day=1 %}">{% trans 'Day view' %}</a>
26
  <a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=view.date|date:"Y" month=view.date|date:"n" day=1 %}">{% trans 'Day view' %}</a>
27 27
{% endblock %}
28 28

  
29 29
{% block content %}
30 30

  
31
{% for week_days in view.get_timetable_infos %}
31
  {% for week_days in view.get_timetable_infos %}
32 32

  
33 33
    {% if forloop.first %}
34
    <table class="agenda-table month-view single-desk">
34
      <table class="agenda-table month-view single-desk">
35 35
        <tbody>
36 36
    {% endif %}
37
        <tr>
38
            <th></th>
39
            {% for day in week_days.days %}
40
            <th class="weekday {% if day.today %}today{% endif %}">{% if not day.other_month %}<a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"j" %}">{{ day.date|date:"l j" }}</a>{% endif %}</th>
41
            {% endfor %}
42
        </tr>
43
        {% for hour in week_days.periods %}
44
        <tr class="{% cycle 'odd' 'even' %}">
45
            <th class="hour">{{ hour|date:"TIME_FORMAT" }}</th>
46
            {% for day in week_days.days %}
47
            <td class="{% if day.other_month %}other-month{% endif %} {% if day.today %}today{% endif %}">
48
                {% if forloop.parentloop.first %}
49
                {% for slot in day.infos.booked_slots %}
37
    <tr>
38
      <th></th>
39
      {% for day in week_days.days %}
40
        <th class="weekday {% if day.today %}today{% endif %}">{% if not day.other_month %}<a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"j" %}">{{ day.date|date:"l j" }}</a>{% endif %}</th>
41
      {% endfor %}
42
    </tr>
43
    {% for hour in week_days.periods %}
44
      <tr class="{% cycle 'odd' 'even' %}">
45
        <th class="hour">{{ hour|date:"TIME_FORMAT" }}</th>
46
        {% for day in week_days.days %}
47
          <td class="{% if day.other_month %}other-month{% endif %} {% if day.today %}today{% endif %}">
48
            {% if forloop.parentloop.first %}
49
              {% for slot in day.infos.booked_slots %}
50 50
                <div class="booking" style="height:{{ slot.css_height|stringformat:".1f" }}%;min-height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%">
51
                    <span class="start-time">{{ slot.booking.event.start_datetime|date:"TIME_FORMAT" }}</span>
52
                    <a {% if slot.booking.get_backoffice_url %}href="{{ slot.booking.get_backoffice_url }}"{% endif %}>{{ slot.booking.get_user_block }}</a>
51
                  <span class="start-time">{{ slot.booking.event.start_datetime|date:"TIME_FORMAT" }}</span>
52
                  <a {% if slot.booking.get_backoffice_url %}href="{{ slot.booking.get_backoffice_url }}"{% endif %}>{{ slot.booking.get_user_block }}</a>
53 53
                </div>
54
                {% endfor %}
55
                {% endif %}
56
            </td>
57
            {% endfor %}
58
        </tr>
54
              {% endfor %}
55
            {% endif %}
56
          </td>
59 57
        {% endfor %}
58
      </tr>
59
    {% endfor %}
60 60
    {% if forloop.last %}
61
        </tbody>
62
    </table>
61
      </tbody>
62
      </table>
63 63
    {% endif %}
64
{% empty %}
65
<div class="closed-for-the-day">
66
  <p>{% trans "No bookings this month." %}</p>
67
</div>
68
{% endfor %}
64
  {% empty %}
65
    <div class="closed-for-the-day">
66
      <p>{% trans "No bookings this month." %}</p>
67
    </div>
68
  {% endfor %}
69 69

  
70 70
{% endblock %}
chrono/manager/templates/chrono/manager_send_reminder_form.html
2 2
{% load i18n gadjo %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Settings' %}</a>
7
<a href="{% url 'chrono-manager-agenda-edit' agenda.pk %}">{{ title }}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Settings' %}</a>
7
  <a href="{% url 'chrono-manager-agenda-edit' agenda.pk %}">{{ title }}</a>
8 8
{% endblock %}
9 9

  
10 10
{% block appbar %}
11
<h2>{% trans "Test reminder sending" %}</h2>
11
  <h2>{% trans "Test reminder sending" %}</h2>
12 12
{% endblock %}
13 13

  
14 14
{% block content %}
15
<form method="post" enctype="multipart/form-data">
16
  {% csrf_token %}
17
  {{ form|with_template }}
18
  <div class="buttons">
19
    <button class="submit-button">{% trans "Send" %}</button>
20
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
21
  </div>
22
</form>
15
  <form method="post" enctype="multipart/form-data">
16
    {% csrf_token %}
17
    {{ form|with_template }}
18
    <div class="buttons">
19
      <button class="submit-button">{% trans "Send" %}</button>
20
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
21
    </div>
22
  </form>
23 23
{% endblock %}
chrono/manager/templates/chrono/manager_shared_custody_agenda_month_view.html
2 2
{% load i18n %}
3 3

  
4 4
{% block content %}
5
{% if agenda.is_complete %}
6
  {% for week, slots in slots_by_week.items %}
7
    {% if forloop.first %}
8
      <table class="agenda-table month-view single-desk">
9
        <tbody>
10
    {% endif %}
5
  {% if agenda.is_complete %}
6
    {% for week, slots in slots_by_week.items %}
7
      {% if forloop.first %}
8
        <table class="agenda-table month-view single-desk">
9
          <tbody>
10
      {% endif %}
11 11

  
12
    <tr>
13
      <th></th>
14
      {% for slot in slots %}
15
        <th class="weekday {% if slot.date == today %}today{% endif %}"><span>{{ slot.date|date:"l j" }}</span></th>
16
      {% endfor %}
17
    </tr>
18
    <tr>
19
      <th>{% trans "Week" %} {{ week }}</th>
20
      {% for slot in slots %}
21
        <td class="guardian {% if slot.guardian == agenda.first_guardian %}first-guardian{% else %}second-guardian{% endif %}">{{ slot }}</td>
22
      {% endfor %}
23
    </tr>
12
      <tr>
13
        <th></th>
14
        {% for slot in slots %}
15
          <th class="weekday {% if slot.date == today %}today{% endif %}"><span>{{ slot.date|date:"l j" }}</span></th>
16
        {% endfor %}
17
      </tr>
18
      <tr>
19
        <th>{% trans "Week" %} {{ week }}</th>
20
        {% for slot in slots %}
21
          <td class="guardian {% if slot.guardian == agenda.first_guardian %}first-guardian{% else %}second-guardian{% endif %}">{{ slot }}</td>
22
        {% endfor %}
23
      </tr>
24 24

  
25
    {% if forloop.last %}
26
      </tbody>
27
      </table>
28
    {% endif %}
29
  {% endfor %}
30
{% else %}
31
  <div class="warningnotice">
32
    <p>{% trans "Configuration is not completed yet." %}</p>
33
  </div>
34
{% endif %}
25
      {% if forloop.last %}
26
        </tbody>
27
        </table>
28
      {% endif %}
29
    {% endfor %}
30
  {% else %}
31
    <div class="warningnotice">
32
      <p>{% trans "Configuration is not completed yet." %}</p>
33
    </div>
34
  {% endif %}
35 35
{% endblock %}
chrono/manager/templates/chrono/manager_shared_custody_agenda_settings.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href=".">{% trans "Settings" %}</a>
5
  {{ block.super }}
6
  <a href=".">{% trans "Settings" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans "Settings" %}</h2>
11
<span class="actions">
12
  {% if user.is_staff %}
13
  <a class="extra-actions-menu-opener"></a>
14
  {% endif %}
15
  <a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-period' pk=object.id %}">{% trans 'Add custody period' %}</a>
16
  {% if has_holidays %}
17
  <a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-holiday-rule' pk=object.id %}">{% trans 'Add custody rule during holidays' %}</a>
18
  {% endif %}
19
  <a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-rule' pk=object.id %}">{% trans 'Add custody rule' %}</a>
20
  {% if user.is_staff %}
21
  <ul class="extra-actions-menu">
22
    <li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
23
  </ul>
24
  {% endif %}
25
</span>
10
  <h2>{% trans "Settings" %}</h2>
11
  <span class="actions">
12
    {% if user.is_staff %}
13
      <a class="extra-actions-menu-opener"></a>
14
    {% endif %}
15
    <a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-period' pk=object.id %}">{% trans 'Add custody period' %}</a>
16
    {% if has_holidays %}
17
      <a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-holiday-rule' pk=object.id %}">{% trans 'Add custody rule during holidays' %}</a>
18
    {% endif %}
19
    <a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-rule' pk=object.id %}">{% trans 'Add custody rule' %}</a>
20
    {% if user.is_staff %}
21
      <ul class="extra-actions-menu">
22
        <li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
23
      </ul>
24
    {% endif %}
25
  </span>
26 26
{% endblock %}
27 27

  
28 28
{% block content %}
29 29

  
30
{% if not agenda.is_complete %}
31
<div class="warningnotice">
32
<p>{% trans "Custody rules are not complete." %}</p>
33
</div>
34
{% endif %}
35

  
36
<div class="section agenda-settings">
37
<div class="pk-tabs">
38
  <div class="pk-tabs--tab-list" role="tablist">
39
    <button aria-controls="panel-rules" aria-selected="true" id="tab-rules" role="tab" tabindex="0">{% trans "Custody rules" %}</button>
40
    {% if has_holidays %}
41
    <button aria-controls="panel-holidays" aria-selected="false" id="tab-holidays" role="tab" tabindex="-1">{% trans "Custody rules during holidays" %}</button>
42
    {% endif %}
43
    <button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Exceptional custody periods" %}</button>
44
  </div>
45
  <div class="pk-tabs--container">
46

  
47
    <div aria-labelledby="tab-rules" id="panel-rules" role="tabpanel" tabindex="0">
48
      {% if agenda.rules.all %}
49
      <ul class="objects-list single-links">
50
        {% for rule in agenda.rules.all %}
51
        <li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-rule' pk=agenda.pk rule_pk=rule.pk %}">
52
            <span class="rule-info">
53
              {{ rule.guardian }}, {{ rule.label }}
54
            </span>
55
          </a>
56
          <a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-rule' pk=agenda.pk rule_pk=rule.pk %}?next=settings">{% trans "remove" %}</a>
57
        </li>
58
        {% endfor %}
59
      </ul>
60
      {% else %}
61
      <div class="big-msg-info">
62
        {% blocktrans trimmed %}
63
        This agenda doesn't have any custody rules yet.
64
        {% endblocktrans %}
65
      </div>
66
      {% endif %}
30
  {% if not agenda.is_complete %}
31
    <div class="warningnotice">
32
      <p>{% trans "Custody rules are not complete." %}</p>
67 33
    </div>
34
  {% endif %}
68 35

  
69
    {% if has_holidays %}
70
    <div aria-labelledby="tab-holidays" hidden="" id="panel-holidays" role="tabpanel" tabindex="0">
71
      {% if agenda.holiday_rules.all %}
72
      <ul class="objects-list single-links">
73
        {% for rule in agenda.holiday_rules.all %}
74
        <li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-holiday-rule' pk=agenda.pk rule_pk=rule.pk %}">
75
            <span class="rule-info">
76
              {{ rule.guardian }}, {{ rule.label }}
77
            </span>
78
          </a>
79
          <a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-holiday-rule' pk=agenda.pk rule_pk=rule.pk %}?next=settings">{% trans "remove" %}</a>
80
        </li>
81
        {% endfor %}
82
      </ul>
83
      {% else %}
84
      <div class="big-msg-info">
85
        {% blocktrans trimmed %}
86
        This agenda doesn't specify any custody rules during holidays. It means normal rules will be applied.
87
        {% endblocktrans %}
36
  <div class="section agenda-settings">
37
    <div class="pk-tabs">
38
      <div class="pk-tabs--tab-list" role="tablist">
39
        <button aria-controls="panel-rules" aria-selected="true" id="tab-rules" role="tab" tabindex="0">{% trans "Custody rules" %}</button>
40
        {% if has_holidays %}
41
          <button aria-controls="panel-holidays" aria-selected="false" id="tab-holidays" role="tab" tabindex="-1">{% trans "Custody rules during holidays" %}</button>
42
        {% endif %}
43
        <button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Exceptional custody periods" %}</button>
88 44
      </div>
89
      {% endif %}
90
    </div>
91
    {% endif %}
45
      <div class="pk-tabs--container">
46

  
47
        <div aria-labelledby="tab-rules" id="panel-rules" role="tabpanel" tabindex="0">
48
          {% if agenda.rules.all %}
49
            <ul class="objects-list single-links">
50
              {% for rule in agenda.rules.all %}
51
                <li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-rule' pk=agenda.pk rule_pk=rule.pk %}">
52
                  <span class="rule-info">
53
                    {{ rule.guardian }}, {{ rule.label }}
54
                  </span>
55
                </a>
56
                  <a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-rule' pk=agenda.pk rule_pk=rule.pk %}?next=settings">{% trans "remove" %}</a>
57
                </li>
58
              {% endfor %}
59
            </ul>
60
          {% else %}
61
            <div class="big-msg-info">
62
              {% blocktrans trimmed %}
63
                This agenda doesn't have any custody rules yet.
64
              {% endblocktrans %}
65
            </div>
66
          {% endif %}
67
        </div>
68

  
69
        {% if has_holidays %}
70
          <div aria-labelledby="tab-holidays" hidden="" id="panel-holidays" role="tabpanel" tabindex="0">
71
            {% if agenda.holiday_rules.all %}
72
              <ul class="objects-list single-links">
73
                {% for rule in agenda.holiday_rules.all %}
74
                  <li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-holiday-rule' pk=agenda.pk rule_pk=rule.pk %}">
75
                    <span class="rule-info">
76
                      {{ rule.guardian }}, {{ rule.label }}
77
                    </span>
78
                  </a>
79
                    <a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-holiday-rule' pk=agenda.pk rule_pk=rule.pk %}?next=settings">{% trans "remove" %}</a>
80
                  </li>
81
                {% endfor %}
82
              </ul>
83
            {% else %}
84
              <div class="big-msg-info">
85
                {% blocktrans trimmed %}
86
                  This agenda doesn't specify any custody rules during holidays. It means normal rules will be applied.
87
                {% endblocktrans %}
88
              </div>
89
            {% endif %}
90
          </div>
91
        {% endif %}
92

  
93
        <div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
94
          {% if exceptional_periods %}
95
            <ul class="objects-list single-links">
96
              {% for period in exceptional_periods %}
97
                <li>
98
                  <a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-period' pk=agenda.pk period_pk=period.pk %}">
99
                    {{ period }}
100
                    <a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-period' pk=agenda.pk period_pk=period.pk %}?next=settings">{% trans "remove" %}</a>
101
                  </a>
102
                </li>
103
              {% endfor %}
104
            </ul>
105
          {% else %}
106
            <div class="big-msg-info">
107
              {% blocktrans trimmed %}
108
                This agenda doesn't have any custody period. They can be used to specify explicit moments when one of the guardian should have custody, regardless of global rules.
109
              {% endblocktrans %}
110
            </div>
111
          {% endif %}
112
        </div>
92 113

  
93
    <div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
94
      {% if exceptional_periods %}
95
      <ul class="objects-list single-links">
96
        {% for period in exceptional_periods %}
97
        <li>
98
          <a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-period' pk=agenda.pk period_pk=period.pk %}">
99
            {{ period }}
100
            <a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-period' pk=agenda.pk period_pk=period.pk %}?next=settings">{% trans "remove" %}</a>
101
          </a>
102
        </li>
103
        {% endfor %}
104
      </ul>
105
      {% else %}
106
      <div class="big-msg-info">
107
        {% blocktrans trimmed %}
108
        This agenda doesn't have any custody period. They can be used to specify explicit moments when one of the guardian should have custody, regardless of global rules.
109
        {% endblocktrans %}
110 114
      </div>
111
      {% endif %}
112 115
    </div>
113

  
114 116
  </div>
115
</div>
116
</div>
117 117
{% endblock %}
chrono/manager/templates/chrono/manager_time_period_exception_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
{{ form.media }}
5
  {{ block.super }}
6
  {{ form.media }}
7 7
{% endblock %}
8 8

  
9 9
{% block breadcrumb %}
10
{{ block.super }}
11
{% if object.id %}
12
<a href="">{{object}}</a>
13
{% else %}
14
<a href="">{% trans "New time period exception" %}</a>
15
{% endif %}
10
  {{ block.super }}
11
  {% if object.id %}
12
    <a href="">{{object}}</a>
13
  {% else %}
14
    <a href="">{% trans "New time period exception" %}</a>
15
  {% endif %}
16 16
{% endblock %}
17 17

  
18 18
{% block appbar %}
19
{% if object.id %}
20
<h2>{% trans "Edit time period exception" %}</h2>
21
<span class="actions">
22
<a rel="popup" href="{% url 'chrono-manager-time-period-exception-delete' pk=object.id %}">{% trans 'Delete' %}</a>
23
</span>
24
{% else %}
25
<h2>{% trans "New time period exception" %}</h2>
26
{% endif %}
19
  {% if object.id %}
20
    <h2>{% trans "Edit time period exception" %}</h2>
21
    <span class="actions">
22
      <a rel="popup" href="{% url 'chrono-manager-time-period-exception-delete' pk=object.id %}">{% trans 'Delete' %}</a>
23
    </span>
24
  {% else %}
25
    <h2>{% trans "New time period exception" %}</h2>
26
  {% endif %}
27 27
{% endblock %}
28 28

  
29 29
{% block content %}
30 30

  
31
<form method="post" enctype="multipart/form-data">
32
  {% csrf_token %}
33
  {{ form.non_field_errors }}
34
  {% for field in form.visible_fields %}
35
    {{ field.errors }}
36
    <p>{{ field.label_tag }} {{ field }}{% if field.name == 'start_datetime' %} <button type="button" id="allday">{% trans "All day" %}</button>{% endif%}</p>
37
  {% endfor %}
38
  {% for hidden in form.hidden_fields %}
39
    {{ hidden }}
40
  {% endfor %}
41
  <div class="buttons">
42
    <button class="submit-button">{% trans "Save" %}</button>
43
    <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
44
  </div>
31
  <form method="post" enctype="multipart/form-data">
32
    {% csrf_token %}
33
    {{ form.non_field_errors }}
34
    {% for field in form.visible_fields %}
35
      {{ field.errors }}
36
      <p>{{ field.label_tag }} {{ field }}{% if field.name == 'start_datetime' %} <button type="button" id="allday">{% trans "All day" %}</button>{% endif%}</p>
37
    {% endfor %}
38
    {% for hidden in form.hidden_fields %}
39
      {{ hidden }}
40
    {% endfor %}
41
    <div class="buttons">
42
      <button class="submit-button">{% trans "Save" %}</button>
43
      <a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
44
    </div>
45 45

  
46
  <script>
47
  {% if not object.id %}
48
  $('[name="start_datetime_0"]').on('change', function() {
49
    var $end_datetime = $('[name="end_datetime_0"]');
50
    if (! $end_datetime.val()) {
51
      var value = $(this).val();
52
      if (value && new Date(value).getFullYear() > 999) {
53
        $end_datetime.val($(this).val());
54
      }
55
    }
56
  });
57
  {% endif %}
58
  $('button#allday').on('click', function() {
59
    var $start_datetime = $('[name="start_datetime_0"]');
60
    if ($start_datetime.val()) {
61
      var new_date = new Date($start_datetime.val());
62
      new_date.setDate(new_date.getDate() + 1);
63
      $('[name="start_datetime_1"]').val('00:00');
64
      $('[name="end_datetime_0"]').val(new_date.toISOString().substring(0, 10));
65
      $('[name="end_datetime_1"]').val('00:00');
66
    }
67
  });
68
  </script>
69
</form>
46
    <script>
47
      {% if not object.id %}
48
        $('[name="start_datetime_0"]').on('change', function() {
49
          var $end_datetime = $('[name="end_datetime_0"]');
50
          if (! $end_datetime.val()) {
51
            var value = $(this).val();
52
            if (value && new Date(value).getFullYear() > 999) {
53
              $end_datetime.val($(this).val());
54
            }
55
          }
56
        });
57
      {% endif %}
58
      $('button#allday').on('click', function() {
59
        var $start_datetime = $('[name="start_datetime_0"]');
60
        if ($start_datetime.val()) {
61
          var new_date = new Date($start_datetime.val());
62
          new_date.setDate(new_date.getDate() + 1);
63
          $('[name="start_datetime_1"]').val('00:00');
64
          $('[name="end_datetime_0"]').val(new_date.toISOString().substring(0, 10));
65
          $('[name="end_datetime_1"]').val('00:00');
66
        }
67
      });
68
    </script>
69
  </form>
70 70
{% endblock %}
chrono/manager/templates/chrono/manager_time_period_exception_list.html
2 2
{% load i18n %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
{{ form.media }}
5
  {{ block.super }}
6
  {{ form.media }}
7 7
{% endblock %}
8 8

  
9 9
{% block breadcrumb %}
10
{{ block.super }}
11
<a href=".">{% trans "All exceptions" %}</a>
10
  {{ block.super }}
11
  <a href=".">{% trans "All exceptions" %}</a>
12 12
{% endblock %}
13 13

  
14 14
{% block appbar %}
15
<h2>{% trans "Exceptions" %}</h2>
15
  <h2>{% trans "Exceptions" %}</h2>
16 16
{% endblock %}
17 17

  
18 18
{% block content %}
19
<div class="timeperiod">
19
  <div class="timeperiod">
20 20
    <ul class="objects-list single-links">
21
    {% for exception in object_list %}
22
     <li>
23
         <a {% if user_can_manage and not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.id %}"{% endif %}>{{ exception }}</a>
24
         {% if user_can_manage and not exception.from_settings and not exception.read_only %}<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}{% if not page_obj %}?from_popup{% endif %}">{% trans "remove" %}</a>{% endif %}
25
    </li>
26
    {% endfor %}
27
   </ul>
21
      {% for exception in object_list %}
22
        <li>
23
          <a {% if user_can_manage and not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.id %}"{% endif %}>{{ exception }}</a>
24
          {% if user_can_manage and not exception.from_settings and not exception.read_only %}<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}{% if not page_obj %}?from_popup{% endif %}">{% trans "remove" %}</a>{% endif %}
25
        </li>
26
      {% endfor %}
27
    </ul>
28 28

  
29 29
    {% if not page_obj %}
30
    <p><a href="{% url 'chrono-manager-time-period-exception-list' desk.pk %}">{% trans "Show more..." %}</a></p>
30
      <p><a href="{% url 'chrono-manager-time-period-exception-list' desk.pk %}">{% trans "Show more..." %}</a></p>
31 31
    {% endif %}
32 32

  
33
   {% include "gadjo/pagination.html" %}
34
</div>
33
    {% include "gadjo/pagination.html" %}
34
  </div>
35 35
{% endblock %}
chrono/manager/templates/chrono/manager_time_period_form.html
2 2
{% load i18n gadjo %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
{{ form.media }}
5
  {{ block.super }}
6
  {{ form.media }}
7 7
{% endblock %}
8 8

  
9 9
{% block breadcrumb %}
10
{{ block.super }}
11
{% if object.id %}
12
<a href="">{{object}}</a>
13
{% else %}
14
<a href="">{% trans "New Time Period" %}</a>
15
{% endif %}
10
  {{ block.super }}
11
  {% if object.id %}
12
    <a href="">{{object}}</a>
13
  {% else %}
14
    <a href="">{% trans "New Time Period" %}</a>
15
  {% endif %}
16 16
{% endblock %}
17 17

  
18 18
{% block appbar %}
19
{% if object.id %}
20
<h2>{% trans "Edit Time Period" %}</h2>
21
<span class="actions">
22
<a rel="popup" href="{% url 'chrono-manager-time-period-delete' pk=object.id %}">{% trans 'Delete' %}</a>
23
</span>
24
{% else %}
25
<h2>{% trans "New Time Period" %}</h2>
26
{% endif %}
19
  {% if object.id %}
20
    <h2>{% trans "Edit Time Period" %}</h2>
21
    <span class="actions">
22
      <a rel="popup" href="{% url 'chrono-manager-time-period-delete' pk=object.id %}">{% trans 'Delete' %}</a>
23
    </span>
24
  {% else %}
25
    <h2>{% trans "New Time Period" %}</h2>
26
  {% endif %}
27 27
{% endblock %}
28 28

  
29 29
{% block content %}
30 30

  
31
<form method="post" enctype="multipart/form-data">
32
  {% csrf_token %}
33
  {{ form|with_template }}
34
  <div class="buttons">
35
    <button class="submit-button">{% trans "Save" %}</button>
36
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
37
  </div>
31
  <form method="post" enctype="multipart/form-data">
32
    {% csrf_token %}
33
    {{ form|with_template }}
34
    <div class="buttons">
35
      <button class="submit-button">{% trans "Save" %}</button>
36
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
37
    </div>
38 38

  
39
  <script>
40
    $('input[type=radio][name=repeat]').change(function() {
41
      if(!this.checked)
39
    <script>
40
      $('input[type=radio][name=repeat]').change(function() {
41
        if(!this.checked)
42 42
        return;
43
      if(this.value == 'every-week') {
44
        $('div#weekday_indexes').parent().hide();
45
      } else {
46
        $('div#weekday_indexes').parent().show();
47
      }
48
    }).change();
49
  </script>
50
</form>
43
        if(this.value == 'every-week') {
44
          $('div#weekday_indexes').parent().hide();
45
        } else {
46
          $('div#weekday_indexes').parent().show();
47
        }
48
      }).change();
49
    </script>
50
  </form>
51 51
{% endblock %}
chrono/manager/templates/chrono/manager_unavailability_calendar_detail.html
2 2
{% load i18n %}
3 3

  
4 4
{% block page-title-extra-label %}
5
- {{ unavailability_calendar.label }}
5
  - {{ unavailability_calendar.label }}
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
9
{{ block.super }}
10
<a href="{% url 'chrono-manager-unavailability-calendar-view' pk=unavailability_calendar.pk %}">{{ unavailability_calendar.label }}</a>
9
  {{ block.super }}
10
  <a href="{% url 'chrono-manager-unavailability-calendar-view' pk=unavailability_calendar.pk %}">{{ unavailability_calendar.label }}</a>
11 11
{% endblock %}
12 12

  
13 13
{% block appbar %}
14
{% block appbar-title %}
15
<h2>{{ unavailability_calendar }}</h2>
16
{% endblock %}
17
{% if user_can_manage %}
18
<span class="actions">
19
{% block appbar-extras %}
20
<a href="{% url 'chrono-manager-unavailability-calendar-settings' pk=unavailability_calendar.pk %}">{% trans 'Settings' %}</a>
21
{% endblock %}
22
</span>
23
{% endif %}
14
  {% block appbar-title %}
15
    <h2>{{ unavailability_calendar }}</h2>
16
  {% endblock %}
17
  {% if user_can_manage %}
18
    <span class="actions">
19
      {% block appbar-extras %}
20
        <a href="{% url 'chrono-manager-unavailability-calendar-settings' pk=unavailability_calendar.pk %}">{% trans 'Settings' %}</a>
21
      {% endblock %}
22
    </span>
23
  {% endif %}
24 24
{% endblock %}
25 25

  
26 26
{% block content %}
27 27

  
28
<div class="section">
29
<h3>{% trans 'Used in meetings agendas' %}</h3>
30
<div>
31
{% if agendas %}
32
  <ul class="objects-list single-links">
33
    {% for agenda in agendas %}
34
    <li>
35
        <a href="{% url 'chrono-manager-agenda-view' pk=agenda.pk %}">
36
            {{ agenda.label }}
37
        </a>
38
    </li>
39
    {% endfor %}
40
  </ul>
41
{% else %}
42
<div class="big-msg-info">
43
  {% blocktrans %}
44
  This unavailability calendar is not used yet.
45
  {% endblocktrans %}
46
</div>
47
{% endif %}
48
</div>
49
</div>
28
  <div class="section">
29
    <h3>{% trans 'Used in meetings agendas' %}</h3>
30
    <div>
31
      {% if agendas %}
32
        <ul class="objects-list single-links">
33
          {% for agenda in agendas %}
34
            <li>
35
              <a href="{% url 'chrono-manager-agenda-view' pk=agenda.pk %}">
36
                {{ agenda.label }}
37
              </a>
38
            </li>
39
          {% endfor %}
40
        </ul>
41
      {% else %}
42
        <div class="big-msg-info">
43
          {% blocktrans %}
44
            This unavailability calendar is not used yet.
45
          {% endblocktrans %}
46
        </div>
47
      {% endif %}
48
    </div>
49
  </div>
50 50

  
51 51
{% endblock %}
chrono/manager/templates/chrono/manager_unavailability_calendar_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
{% if object.pk %}
7
  <a href="{% url 'chrono-manager-unavailability-calendar-view' object.pk %}">{{ object }}</a>
8
  <a href="{% url 'chrono-manager-unavailability-calendar-settings' object.pk %}">{% trans 'Settings' %}</a>
9
  <a href="{% url 'chrono-manager-unavailability-calendar-edit' object.pk %}">{% trans 'Edit Unavailability Calendar' %}</a>
10
{% else %}
11
  <a href="{% url 'chrono-manager-unavailability-calendar-add' %}">{% trans 'New Unavailability Calendar' %}</a>
12
{% endif %}
5
  {{ block.super }}
6
  {% if object.pk %}
7
    <a href="{% url 'chrono-manager-unavailability-calendar-view' object.pk %}">{{ object }}</a>
8
    <a href="{% url 'chrono-manager-unavailability-calendar-settings' object.pk %}">{% trans 'Settings' %}</a>
9
    <a href="{% url 'chrono-manager-unavailability-calendar-edit' object.pk %}">{% trans 'Edit Unavailability Calendar' %}</a>
10
  {% else %}
11
    <a href="{% url 'chrono-manager-unavailability-calendar-add' %}">{% trans 'New Unavailability Calendar' %}</a>
12
  {% endif %}
13 13
{% endblock %}
14 14

  
15 15
{% block appbar %}
16
{% if object.id %}
17
<h2>{% trans "Edit Unavailability Calendar" %}</h2>
18
{% else %}
19
<h2>{% trans "New Unavailability Calendar" %}</h2>
20
{% endif %}
16
  {% if object.id %}
17
    <h2>{% trans "Edit Unavailability Calendar" %}</h2>
18
  {% else %}
19
    <h2>{% trans "New Unavailability Calendar" %}</h2>
20
  {% endif %}
21 21
{% endblock %}
22 22

  
23 23
{% block content %}
24 24

  
25
<form method="post" enctype="multipart/form-data">
26
  {% csrf_token %}
27
  {{ form.as_p }}
28
  <div class="buttons">
29
    <button class="submit-button">{% trans "Save" %}</button>
30
    <a class="cancel" href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans 'Cancel' %}</a>
31
  </div>
32
</form>
25
  <form method="post" enctype="multipart/form-data">
26
    {% csrf_token %}
27
    {{ form.as_p }}
28
    <div class="buttons">
29
      <button class="submit-button">{% trans "Save" %}</button>
30
      <a class="cancel" href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans 'Cancel' %}</a>
31
    </div>
32
  </form>
33 33
{% endblock %}
chrono/manager/templates/chrono/manager_unavailability_calendar_list.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans "Unavailability Calendars" %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans "Unavailability Calendars" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans 'Unavailability Calendars' %}</h2>
11
{% if user.is_staff %}
12
<span class="actions">
13
<a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-add' %}">{% trans 'New' %}</a>
14
</span>
15
{% endif %}
10
  <h2>{% trans 'Unavailability Calendars' %}</h2>
11
  {% if user.is_staff %}
12
    <span class="actions">
13
      <a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-add' %}">{% trans 'New' %}</a>
14
    </span>
15
  {% endif %}
16 16
{% endblock %}
17 17

  
18 18

  
19 19
{% block content %}
20
{% if object_list %}
21
<div>
22
  <ul class="objects-list single-links">
23
    {% for object in object_list %}
24
    <li>
25
        <a href="{% url 'chrono-manager-unavailability-calendar-view' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
26
    </li>
27
    {% endfor %}
28
  </ul>
29
</div>
30
{% else %}
31
<div class="big-msg-info">
32
  {% blocktrans %}
33
  This site doesn't have any unavailability calendar yet. Click on the "New" button in the top
34
  right of the page to add a first one.
35
  {% endblocktrans %}
36
</div>
37
{% endif %}
20
  {% if object_list %}
21
    <div>
22
      <ul class="objects-list single-links">
23
        {% for object in object_list %}
24
          <li>
25
            <a href="{% url 'chrono-manager-unavailability-calendar-view' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
26
          </li>
27
        {% endfor %}
28
      </ul>
29
    </div>
30
  {% else %}
31
    <div class="big-msg-info">
32
      {% blocktrans %}
33
        This site doesn't have any unavailability calendar yet. Click on the "New" button in the top
34
        right of the page to add a first one.
35
      {% endblocktrans %}
36
    </div>
37
  {% endif %}
38 38
{% endblock %}
chrono/manager/templates/chrono/manager_unavailability_calendar_settings.html
2 2
{% load i18n %}
3 3

  
4 4
{% block breadcrumb %}
5
{{ block.super }}
6
<a href="{% url 'chrono-manager-unavailability-calendar-settings' unavailability_calendar.pk %}">{% trans "Settings" %}</a>
5
  {{ block.super }}
6
  <a href="{% url 'chrono-manager-unavailability-calendar-settings' unavailability_calendar.pk %}">{% trans "Settings" %}</a>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans "Settings" %}
11
</h2>
12
<span class="actions">
13
  <a class="extra-actions-menu-opener"></a>
14
  {% block agenda-extra-management-actions %}
15
    <a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-import-unavailabilities' pk=unavailability_calendar.id %}">{% trans 'Manage unavailabilities from ICS' %}</a>
16
    <a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-add-unavailability' pk=unavailability_calendar.id %}">{% trans 'Add Unavailability' %}</a>
17
  {% endblock %}
18
  <ul class="extra-actions-menu">
19
    <li><a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-edit' pk=unavailability_calendar.id %}">{% trans 'Options' %}</a></li>
20
    <li><a download href="{% url 'chrono-manager-unavailability-calendar-export' pk=unavailability_calendar.id %}">{% trans 'Export Configuration (JSON)' %}</a></li>
21
    {% if user.is_staff %}
22
      <li><a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-delete' pk=unavailability_calendar.id %}">{% trans 'Delete' %}</a></li>
23
    {% endif %}
24
  </ul>
25
</span>
10
  <h2>{% trans "Settings" %}
11
  </h2>
12
  <span class="actions">
13
    <a class="extra-actions-menu-opener"></a>
14
    {% block agenda-extra-management-actions %}
15
      <a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-import-unavailabilities' pk=unavailability_calendar.id %}">{% trans 'Manage unavailabilities from ICS' %}</a>
16
      <a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-add-unavailability' pk=unavailability_calendar.id %}">{% trans 'Add Unavailability' %}</a>
17
    {% endblock %}
18
    <ul class="extra-actions-menu">
19
      <li><a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-edit' pk=unavailability_calendar.id %}">{% trans 'Options' %}</a></li>
20
      <li><a download href="{% url 'chrono-manager-unavailability-calendar-export' pk=unavailability_calendar.id %}">{% trans 'Export Configuration (JSON)' %}</a></li>
21
      {% if user.is_staff %}
22
        <li><a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-delete' pk=unavailability_calendar.id %}">{% trans 'Delete' %}</a></li>
23
      {% endif %}
24
    </ul>
25
  </span>
26 26
{% endblock %}
27 27

  
28 28
{% block content %}
29
<div class="section">
30
<h3>{% trans 'Unavailabilities' %}</h3>
31
<div>
32
{% block agenda-settings %}
33
{% if unavailability_calendar.timeperiodexception_set.count %}
34
  <ul class="objects-list single-links">
35
    {% for time_period_exception in unavailability_calendar.timeperiodexception_set.all %}
36
    <li><a rel="popup" href="{% url 'chrono-manager-time-period-exception-edit' pk=time_period_exception.id %}">{{ time_period_exception }}</a>
37
      <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=time_period_exception.id %}">{% trans "remove" %}</a>
38
    </li>
39
    {% endfor %}
40
  </ul>
41
{% else %}
42
<div class="big-msg-info">
43
  {% blocktrans %}
44
  There is no unavailabilities yet. Click on the "Add Unavailabilty" button in
45
    the top right of the page to add a first one.
46
  {% endblocktrans %}
47
</div>
48
{% endif %}
49
</div>
50
</div>
51
{% endblock %}
29
  <div class="section">
30
    <h3>{% trans 'Unavailabilities' %}</h3>
31
    <div>
32
      {% block agenda-settings %}
33
        {% if unavailability_calendar.timeperiodexception_set.count %}
34
          <ul class="objects-list single-links">
35
            {% for time_period_exception in unavailability_calendar.timeperiodexception_set.all %}
36
              <li><a rel="popup" href="{% url 'chrono-manager-time-period-exception-edit' pk=time_period_exception.id %}">{{ time_period_exception }}</a>
37
                <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=time_period_exception.id %}">{% trans "remove" %}</a>
38
              </li>
39
            {% endfor %}
40
          </ul>
41
        {% else %}
42
          <div class="big-msg-info">
43
            {% blocktrans %}
44
              There is no unavailabilities yet. Click on the "Add Unavailabilty" button in
45
              the top right of the page to add a first one.
46
            {% endblocktrans %}
47
          </div>
48
        {% endif %}
49
        </div>
50
        </div>
51
      {% endblock %}
52 52

  
53 53

  
54 54
{% endblock %}
chrono/manager/templates/chrono/manager_virtual_agenda_settings.html
7 7
{% endblock %}
8 8

  
9 9
{% block agenda-settings-extra-tab-buttons %}
10
    <button aria-controls="panel-agendas" aria-selected="true" id="tab-agendas" role="tab" tabindex="0">{% trans "Included Agendas" %}</button>
11
   {% if virtual_members %}
10
  <button aria-controls="panel-agendas" aria-selected="true" id="tab-agendas" role="tab" tabindex="0">{% trans "Included Agendas" %}</button>
11
  {% if virtual_members %}
12 12
    <button aria-controls="panel-meeting-types" aria-selected="false" id="tab-meeting-types" role="tab" tabindex="-1">{% trans "Meeting Types" %}</button>
13
    {% endif %}
14
    <button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Excluded Periods" %}</button>
13
  {% endif %}
14
  <button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Excluded Periods" %}</button>
15 15
{% endblock %}
16 16

  
17 17
{% block agenda-settings-extra-tab-list %}
18 18

  
19
    <div aria-labelledby="tab-agendas" id="panel-agendas" role="tabpanel" tabindex="0">
20
      {% if virtual_members %}
19
  <div aria-labelledby="tab-agendas" id="panel-agendas" role="tabpanel" tabindex="0">
20
    {% if virtual_members %}
21 21
      <ul class="objects-list single-links">
22 22
        {% for virtual_member, can_be_managed in virtual_members %}
23
        <li>
24
          <a {% if can_be_managed %}href="{% url 'chrono-manager-agenda-settings' pk=virtual_member.real_agenda.id %}"{% endif %}>
25
            {{virtual_member.real_agenda.label}}
26
          </a>
27
          <a rel="popup" class="delete" href="{% url 'chrono-manager-virtual-member-delete' pk=virtual_member.pk %}">{% trans "remove" %}</a>
28
        </li>
23
          <li>
24
            <a {% if can_be_managed %}href="{% url 'chrono-manager-agenda-settings' pk=virtual_member.real_agenda.id %}"{% endif %}>
25
              {{virtual_member.real_agenda.label}}
26
            </a>
27
            <a rel="popup" class="delete" href="{% url 'chrono-manager-virtual-member-delete' pk=virtual_member.pk %}">{% trans "remove" %}</a>
28
          </li>
29 29
        {% endfor %}
30 30
      </ul>
31
      {% else %}
31
    {% else %}
32 32
      <div class="big-msg-info">
33 33
        {% blocktrans %}
34
        This virtual agenda doesn't include any agenda yet. Click on the "Include Agenda" button in
35
        the top right of the page to include a first one.
34
          This virtual agenda doesn't include any agenda yet. Click on the "Include Agenda" button in
35
          the top right of the page to include a first one.
36 36
        {% endblocktrans %}
37 37
      </div>
38
      {% endif %}
39
    </div>
38
    {% endif %}
39
  </div>
40 40

  
41
   {% if virtual_members %}
41
  {% if virtual_members %}
42 42
    <div aria-labelledby="tab-meeting-types" hidden="" id="panel-meeting-types" role="tabpanel" tabindex="0">
43 43
      {% if meeting_types %}
44
      <ul class="objects-list single-links">
45
        {% for meeting_type in meeting_types %}
46
        <li>
47
          <a rel="popup" href="">
48
            {{meeting_type.label}}
49
            <span class="duration">({{meeting_type.duration}} {% trans "minutes" %})</span>
50
            <span class="identifier">[{% trans "identifier:" %} {{meeting_type.slug}}]</span>
51
          </a>
52
        </li>
53
        {% endfor %}
54
      </ul>
44
        <ul class="objects-list single-links">
45
          {% for meeting_type in meeting_types %}
46
            <li>
47
              <a rel="popup" href="">
48
                {{meeting_type.label}}
49
                <span class="duration">({{meeting_type.duration}} {% trans "minutes" %})</span>
50
                <span class="identifier">[{% trans "identifier:" %} {{meeting_type.slug}}]</span>
51
              </a>
52
            </li>
53
          {% endfor %}
54
        </ul>
55 55
      {% else %}
56
      <div class="errornotice">
57
        {% blocktrans %}
58
        This virtual agenda doesn't have any meeting type.
59
        It is probably because its included agendas have incompatible meeting types
60
        and it makes this virtual agenda unusable.
61
        {% endblocktrans %}
62
      </div>
56
        <div class="errornotice">
57
          {% blocktrans %}
58
            This virtual agenda doesn't have any meeting type.
59
            It is probably because its included agendas have incompatible meeting types
60
            and it makes this virtual agenda unusable.
61
          {% endblocktrans %}
62
        </div>
63 63
      {% endif %}
64 64
    </div>
65
    {% endif %}
65
  {% endif %}
66 66

  
67
    <div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
68
      {% if agenda.excluded_timeperiods.count %}
67
  <div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
68
    {% if agenda.excluded_timeperiods.count %}
69 69
      <ul class="objects-list single-links">
70 70
        {% for time_period in agenda.excluded_timeperiods.all %}
71
        <li><a rel="popup" href="{% url 'chrono-manager-time-period-edit' pk=time_period.id %}">{{ time_period }}</a>
72
          <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-delete' pk=time_period.id %}">{% trans "remove" %}</a>
73
        </li>
71
          <li><a rel="popup" href="{% url 'chrono-manager-time-period-edit' pk=time_period.id %}">{{ time_period }}</a>
72
            <a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-delete' pk=time_period.id %}">{% trans "remove" %}</a>
73
          </li>
74 74
        {% endfor %}
75 75
      </ul>
76
      {% else %}
76
    {% else %}
77 77
      <div class="big-msg-info">
78 78
        {% blocktrans %}
79
        This virtual agenda doesn't have any excluded period yet. Click on the "Add Excluded Period" button in
80
        the top right of the page to include a first one.
79
          This virtual agenda doesn't have any excluded period yet. Click on the "Add Excluded Period" button in
80
          the top right of the page to include a first one.
81 81
        {% endblocktrans %}
82 82
      </div>
83
      {% endif %}
84
    </div>
83
    {% endif %}
84
  </div>
85 85

  
86 86
{% endblock %}
chrono/manager/templates/chrono/manager_virtual_member_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block extrascripts %}
5
{{ block.super }}
6
{{ form.media }}
5
  {{ block.super }}
6
  {{ form.media }}
7 7
{% endblock %}
8 8

  
9 9
{% block breadcrumb %}
10
{{ block.super }}
11
<a href="">{% trans "Include Agenda" %}</a>
10
  {{ block.super }}
11
  <a href="">{% trans "Include Agenda" %}</a>
12 12
{% endblock %}
13 13

  
14 14
{% block appbar %}
15
<h2>{% trans "Include Agenda" %}</h2>
15
  <h2>{% trans "Include Agenda" %}</h2>
16 16
{% endblock %}
17 17

  
18 18
{% block content %}
19 19

  
20
<form method="post" enctype="multipart/form-data">
21
  {% csrf_token %}
22
  {{ form.as_p }}
23
  <div class="buttons">
24
    <button class="submit-button">{% trans "Save" %}</button>
25
    <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
26
  </div>
27
</form>
20
  <form method="post" enctype="multipart/form-data">
21
    {% csrf_token %}
22
    {{ form.as_p }}
23
    <div class="buttons">
24
      <button class="submit-button">{% trans "Save" %}</button>
25
      <a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
26
    </div>
27
  </form>
28 28
{% endblock %}
chrono/manager/templates/chrono/splitdatetime.html
1 1
<span class="datetime">
2
{% with widget=widget.subwidgets.0 %}
3
  <input type="date" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
4
{% endwith %}
5
{% with widget=widget.subwidgets.1 %}
2
  {% with widget=widget.subwidgets.0 %}
3
    <input type="date" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
4
  {% endwith %}
5
  {% with widget=widget.subwidgets.1 %}
6 6
    <!-- {{ widget.value|pprint }} -->
7 7
    <input type="time" name="{{ widget.name }}" pattern="[0-9]{2}:[0-9]{2}" step="300" {% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
8
{% endwith %}
8
  {% endwith %}
9 9
</span>
chrono/manager/templates/chrono/widgets/weekdays.html
1 1
{% spaceless %}
2
<span id="{{ widget.attrs.id }}" class="weekdays-buttons-group{% if widget.attrs.class %} {{ widget.attrs.class }}{% endif %}" role="group">
3
	{% for group, options, index in widget.optgroups %}
4
	{% for option in options %}
5
	{% include "django/forms/widgets/input.html" with widget=option %}
6
	<label{% if option.attrs.id %} for="{{ option.attrs.id }}"{% endif %}>{{ option.label }}</label>
7
	{% endfor %}
8
	{% endfor %}
9
</span>
2
  <span id="{{ widget.attrs.id }}" class="weekdays-buttons-group{% if widget.attrs.class %} {{ widget.attrs.class }}{% endif %}" role="group">
3
    {% for group, options, index in widget.optgroups %}
4
      {% for option in options %}
5
        {% include "django/forms/widgets/input.html" with widget=option %}
6
        <label{% if option.attrs.id %} for="{{ option.attrs.id }}"{% endif %}>{{ option.label }}</label>
7
      {% endfor %}
8
    {% endfor %}
9
  </span>
10 10
{% endspaceless %}
chrono/manager/templates/registration/login.html
2 2
{% load i18n %}
3 3

  
4 4
{% block content %}
5
<form method="post">
6
{% csrf_token %}
7
{{ form.as_p }}
8
<input type="submit" value="{% trans 'Log in' %}" />
9
</form>
5
  <form method="post">
6
    {% csrf_token %}
7
    {{ form.as_p }}
8
    <input type="submit" value="{% trans 'Log in' %}" />
9
  </form>
10 10
{% endblock %}
11
-