From 214026dfd7a2a9291deaf4a7b190925e77750f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Sun, 5 Aug 2018 12:18:10 +0200 Subject: [PATCH] Integrate into new teams structure. --- .../migrations/0045_merge_20180805_1131.py | 14 +++++++++++++ .../shifts/shift_confirm_delete.html | 16 --------------- src/teams/templates/team_base.html | 6 ++++++ .../templates/team_shift_confirm_delete.html | 10 ++++++++++ .../shift_form.html => team_shift_form.html} | 11 ++-------- .../shift_list.html => team_shift_list.html} | 11 ++-------- src/teams/urls.py | 2 +- src/teams/views/shifts.py | 20 +++++++++---------- 8 files changed, 45 insertions(+), 45 deletions(-) create mode 100644 src/teams/migrations/0045_merge_20180805_1131.py delete mode 100644 src/teams/templates/shifts/shift_confirm_delete.html create mode 100644 src/teams/templates/team_shift_confirm_delete.html rename src/teams/templates/{shifts/shift_form.html => team_shift_form.html} (55%) rename src/teams/templates/{shifts/shift_list.html => team_shift_list.html} (91%) diff --git a/src/teams/migrations/0045_merge_20180805_1131.py b/src/teams/migrations/0045_merge_20180805_1131.py new file mode 100644 index 00000000..5eb121ee --- /dev/null +++ b/src/teams/migrations/0045_merge_20180805_1131.py @@ -0,0 +1,14 @@ +# Generated by Django 2.0.4 on 2018-08-05 09:31 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('teams', '0044_auto_20180702_1507'), + ('teams', '0043_auto_20180804_1641'), + ] + + operations = [ + ] diff --git a/src/teams/templates/shifts/shift_confirm_delete.html b/src/teams/templates/shifts/shift_confirm_delete.html deleted file mode 100644 index 57ee688b..00000000 --- a/src/teams/templates/shifts/shift_confirm_delete.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends 'base.html' %} - -{% block content %} - - Cancel - - -
- -
{% csrf_token %} -

Are you sure you want to delete "{{ object }}"?

- -
- -{% endblock %} diff --git a/src/teams/templates/team_base.html b/src/teams/templates/team_base.html index 8ef87216..3b36ede8 100644 --- a/src/teams/templates/team_base.html +++ b/src/teams/templates/team_base.html @@ -37,6 +37,12 @@ Team: {{ team.name }} | {{ block.super }} +
  • + + Shifts + +
  • + {% if request.user in team.responsible_members.all %}
  • diff --git a/src/teams/templates/team_shift_confirm_delete.html b/src/teams/templates/team_shift_confirm_delete.html new file mode 100644 index 00000000..51b3992c --- /dev/null +++ b/src/teams/templates/team_shift_confirm_delete.html @@ -0,0 +1,10 @@ +{% extends 'team_base.html' %} + +{% block team_content %} + +
    {% csrf_token %} +

    Are you sure you want to delete "{{ object }}"?

    + +
    + +{% endblock %} diff --git a/src/teams/templates/shifts/shift_form.html b/src/teams/templates/team_shift_form.html similarity index 55% rename from src/teams/templates/shifts/shift_form.html rename to src/teams/templates/team_shift_form.html index 511ba5ce..a8f9da76 100644 --- a/src/teams/templates/shifts/shift_form.html +++ b/src/teams/templates/team_shift_form.html @@ -1,16 +1,9 @@ -{% extends 'base.html' %} +{% extends 'team_base.html' %} {% load commonmark %} {% load bootstrap3 %} -{% block content %} - -
    - Cancel - - -
    +{% block team_content %}
    {% csrf_token %} diff --git a/src/teams/templates/shifts/shift_list.html b/src/teams/templates/team_shift_list.html similarity index 91% rename from src/teams/templates/shifts/shift_list.html rename to src/teams/templates/team_shift_list.html index c01710db..42f2ddb3 100644 --- a/src/teams/templates/shifts/shift_list.html +++ b/src/teams/templates/team_shift_list.html @@ -1,16 +1,9 @@ -{% extends 'base.html' %} +{% extends 'team_base.html' %} {% load commonmark %} {% load bootstrap3 %} -{% block content %} - - - Back to team detail - - -
    +{% block team_content %} {% if request.user in team.responsible_members.all %}