diff --git a/smash/web/templates/appointments/index.html b/smash/web/templates/appointments/index.html index 94a7f026992b5d7be21632e4c073b089c22417db..703c851cf079f057aab449b93e6dbb18436194c2 100644 --- a/smash/web/templates/appointments/index.html +++ b/smash/web/templates/appointments/index.html @@ -24,46 +24,6 @@ {% block maincontent %} <div class="row"> <div class="col-md-5"> - <h3>Planning</h3> - - {% if planning_list %} - <table id="planning_table" class="table table-bordered table-striped"> - <thead> - <tr> - <th>Subject name</th> - <th>Subject's details</th> - <th>Suggested date</th> - <th>Plan/Modify</th> - </tr> - </thead> - <tbody> - {% for planned in planning_list %} - <tr> - <td>{{ planned.visit.subject.first_name }} {{ planned.visit.subject.last_name }}</td> - <td> - <a href="{% url 'web.views.subject_edit' planned.visit.subject.id %}" type="button" - class="btn btn-block btn-default">Subject's details</a> - </td> - <td> - {{ planned.datetime_when }} - </td> - <td> - <a href="{% url 'web.views.appointment_edit_datetime' planned.id %}" type="button" - class="btn btn-block btn-default">Plan/Modify</a> - </td> - </tr> - {% endfor %} - </tbody> - </table> - - {% else %} - <p>No visits to plan in close future.</p> - {% endif %} - - <hr/> - - <h3>Approaching</h3> - {% if approaching_list %} <table id="approaching_table" class="table table-bordered table-striped"> <thead> diff --git a/smash/web/urls.py b/smash/web/urls.py index 9fb19ef846112fd2431b5778b7ac14ea72cc3073..1e50377222bada763c2608afcd6094af75375dae 100644 --- a/smash/web/urls.py +++ b/smash/web/urls.py @@ -28,8 +28,6 @@ urlpatterns = [ url(r'^appointments/add/(?P<visit_id>\d+)$', views.appointment.appointment_add, name='web.views.appointment_add'), url(r'^appointments/add/general$', views.appointment.appointment_add, name='web.views.appointment_add'), url(r'^appointments/edit/(?P<id>\d+)$', views.appointment.appointment_edit, name='web.views.appointment_edit'), - url(r'^appointments/edit_datetime/(?P<id>\d+)$', views.appointment.appointment_edit_datetime, - name='web.views.appointment_edit_datetime'), url(r'^visits$', views.visit.visits, name='web.views.visits'), url(r'^visits/exceeded$', views.visit.exceeded_visits, name='web.views.exceeded_visits'), diff --git a/smash/web/views/appointment.py b/smash/web/views/appointment.py index d0a4582f153e4b49b1eca86b48aae2f9952fd816..279f44fa3b0c6921e1b9e896df62c154d5c036e2 100644 --- a/smash/web/views/appointment.py +++ b/smash/web/views/appointment.py @@ -99,17 +99,4 @@ def appointment_edit(request, id): 'subject_form': subject_form, 'id': id, 'appointment': the_appointment - }) - - -def appointment_edit_datetime(request, id): - the_appointment = get_object_or_404(Appointment, id=id) - if request.method == 'POST': - form = AppointmentEditForm(request.POST, request.FILES, instance=the_appointment, user=request.user) - if form.is_valid(): - form.save() - return redirect('web.views.appointments') - else: - the_appointment.datetime_when = the_appointment.visit.datetime_begin - form = AppointmentEditForm(instance=the_appointment, user=request.user) - return wrap_response(request, 'appointments/edit.html', {'form': form}) + }) \ No newline at end of file