From c80060e516880eefddaea58bdc748317b3baa466 Mon Sep 17 00:00:00 2001 From: Carlos Vega <carlos.vega@uni.lu> Date: Wed, 3 Oct 2018 15:00:08 +0200 Subject: [PATCH] changed templates for new field 'kind' in holidays --- smash/web/templates/doctors/add_holiday.html | 6 ++++-- smash/web/templates/doctors/edit.html | 12 ++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/smash/web/templates/doctors/add_holiday.html b/smash/web/templates/doctors/add_holiday.html index 59e29750..5260a93c 100644 --- a/smash/web/templates/doctors/add_holiday.html +++ b/smash/web/templates/doctors/add_holiday.html @@ -9,7 +9,7 @@ {% endblock styles %} {% block ui_active_tab %}'workers'{% endblock ui_active_tab %} -{% block page_header %}New worker holiday{% endblock page_header %} +{% block page_header %}New worker holiday or extra availability{% endblock page_header %} {% block page_description %}{% endblock page_description %} {% block title %}{{ block.super }} - Add availability{% endblock %} @@ -36,8 +36,10 @@ <div class="form-group {% if field.errors %}has-error{% endif %}"> <label for="{# TODO #}" class="col-sm-4 control-label"> {{ field.label }} + {% if field.help_text %} + <i class="fa fa-info-circle" aria-hidden="true" data-toggle="tooltip" data-placement="top" title="{{field.help_text}}"></i> + {% endif %} </label> - <div class="col-sm-8"> {{ field|add_class:'form-control' }} </div> diff --git a/smash/web/templates/doctors/edit.html b/smash/web/templates/doctors/edit.html index 0cec140d..f9ea677d 100644 --- a/smash/web/templates/doctors/edit.html +++ b/smash/web/templates/doctors/edit.html @@ -112,7 +112,7 @@ </div> <div class="box-header with-border"> - <h3 class="box-title">Holidays</h3> + <h3 class="box-title">Holidays and Extra Availabilities</h3> </div> <div class="box-body"> <table id="table" class="table table-bordered table-striped"> @@ -120,6 +120,7 @@ <tr> <th>From</th> <th>Until</th> + <th>Kind</th> <th>Info</th> <th>Remove</th> </tr> @@ -129,6 +130,13 @@ <tr> <td>{{ holiday.datetime_start }}</td> <td>{{ holiday.datetime_end }}</td> + <td> + {% for kind in availability_choices %} + {% if holiday.kind == kind.0 %} + {{ kind.1 }} + {% endif %} + {% endfor %} + </td> <td>{{ holiday.info }}</td> <td> <a href="{% url 'web.views.worker_holiday_delete' holiday.id %}" type="button" @@ -143,7 +151,7 @@ <div class="box-footer"> <div class="col-sm-6"> <a href="{% url 'web.views.worker_holiday_add' doctor_id %}" type="button" - class="btn btn-block btn-success">Add holiday</a> + class="btn btn-block btn-success">Add Holiday or Extra Availability</a> </div> </div><!-- /.box-footer --> -- GitLab