diff --git a/smash/web/templates/equipment_and_rooms/equipment/add.html b/smash/web/templates/equipment_and_rooms/equipment/add.html index c73c1847ff639043cdbbf07a24182bfe115c68ea..104530ac08654a6cd0ae46fbee4ecc8f4ddf0517 100644 --- a/smash/web/templates/equipment_and_rooms/equipment/add.html +++ b/smash/web/templates/equipment_and_rooms/equipment/add.html @@ -2,11 +2,6 @@ {% load static %} {% load filters %} -{% block styles %} - {{ block.super }} - <link rel="stylesheet" href="{% static 'AdminLTE/plugins/awesomplete/awesomplete.css' %}"/> -{% endblock styles %} - {% block ui_active_tab %}'equipment_and_rooms'{% endblock ui_active_tab %} {% block page_header %}New equipment definition{% endblock page_header %} {% block page_description %}{% endblock page_description %} diff --git a/smash/web/templates/equipment_and_rooms/equipment/edit.html b/smash/web/templates/equipment_and_rooms/equipment/edit.html index df7d706b7f4faa53b128ebdf55bb28aa03ea251c..72ac27597bac687fbf8d0c3a1b41c86fa8700b32 100644 --- a/smash/web/templates/equipment_and_rooms/equipment/edit.html +++ b/smash/web/templates/equipment_and_rooms/equipment/edit.html @@ -2,11 +2,6 @@ {% load static %} {% load filters %} -{% block styles %} - {{ block.super }} - <link rel="stylesheet" href="{% static 'AdminLTE/plugins/awesomplete/awesomplete.css' %}"/> -{% endblock styles %} - {% block ui_active_tab %}'equipment_and_rooms'{% endblock ui_active_tab %} {% block page_header %}Edit equipment definition{% endblock page_header %} {% block page_description %}{% endblock page_description %} diff --git a/smash/web/templates/equipment_and_rooms/rooms/add.html b/smash/web/templates/equipment_and_rooms/rooms/add.html index f5cd36e3ed15a93141bf2cd69dbf6d08add05a5e..36cc0a78dd4d08ec7f8ba07a1469075dae5e845e 100644 --- a/smash/web/templates/equipment_and_rooms/rooms/add.html +++ b/smash/web/templates/equipment_and_rooms/rooms/add.html @@ -2,11 +2,6 @@ {% load static %} {% load filters %} -{% block styles %} - {{ block.super }} - <link rel="stylesheet" href="{% static 'AdminLTE/plugins/awesomplete/awesomplete.css' %}"/> -{% endblock styles %} - {% block ui_active_tab %}'equipment_and_rooms'{% endblock ui_active_tab %} {% block page_header %}New room{% endblock page_header %} {% block page_description %}{% endblock page_description %} diff --git a/smash/web/templates/equipment_and_rooms/rooms/edit.html b/smash/web/templates/equipment_and_rooms/rooms/edit.html index 4a7e9b9e69aa9b3693dcf5f21dd4dd05f57cb7cc..130720fc62efd99caadc2e5a2477a761a9f143dc 100644 --- a/smash/web/templates/equipment_and_rooms/rooms/edit.html +++ b/smash/web/templates/equipment_and_rooms/rooms/edit.html @@ -2,11 +2,6 @@ {% load static %} {% load filters %} -{% block styles %} - {{ block.super }} - <link rel="stylesheet" href="{% static 'AdminLTE/plugins/awesomplete/awesomplete.css' %}"/> -{% endblock styles %} - {% block ui_active_tab %}'equipment_and_rooms'{% endblock ui_active_tab %} {% block page_header %}Edit room{% endblock page_header %} {% block page_description %}{% endblock page_description %} diff --git a/smash/web/urls.py b/smash/web/urls.py index fc52d712fe0b73ccce3b81a1e013ee2b078f117f..cd0f9de0a8f8081aea413640f2672834b115c097 100644 --- a/smash/web/urls.py +++ b/smash/web/urls.py @@ -121,7 +121,7 @@ urlpatterns = [ # EQUIPMENT # #################### - url(r'^equipment_and_rooms$', views.equipment.equipment_and_rooms, name='web.views.equipment_and_rooms'), + url(r'^equipment_and_rooms$', views.equipment_and_rooms.equipment_and_rooms, name='web.views.equipment_and_rooms'), url(r'^equipment_and_rooms/equipment/add$', views.equipment.equipment_add, name='web.views.equipment_add'), url(r'^equipment_and_rooms/equipment/edit/(?P<equipment_id>\d+)$', views.equipment.equipment_edit, name='web.views.equipment_edit'), url(r'^equipment_and_rooms/equipment/delete/(?P<equipment_id>\d+)$', views.equipment.equipment_delete, name='web.views.equipment_delete'), diff --git a/smash/web/views/__init__.py b/smash/web/views/__init__.py index 7870edac540b9a1ca976b73d5b59ffd7fdec8750..235e822e9ef2091d784925500acb65438a8f32bc 100644 --- a/smash/web/views/__init__.py +++ b/smash/web/views/__init__.py @@ -70,6 +70,7 @@ import visit import doctor import subject import equipment +import equipment_and_rooms import flying_teams import kit import mails diff --git a/smash/web/views/equipment.py b/smash/web/views/equipment.py index 6db424770e40d6204d22a74ef2461579e76b4773..ff498134cab372d0f026c0316f89295d60b83191 100644 --- a/smash/web/views/equipment.py +++ b/smash/web/views/equipment.py @@ -16,7 +16,6 @@ def equipment(request): def equipment_add(request): - 0 // 0 if request.method == 'POST': form = ItemForm(request.POST) if form.is_valid(): @@ -46,16 +45,3 @@ def equipment_delete(request, equipment_id): the_item.delete() return redirect('web.views.equipment') - - -def equipment_add(request): - equipment_list = Item.objects.order_by('-name') - context = { - 'equipment_list': equipment_list - } - - return wrap_response(request, "equipment_and_rooms/equipment/index.html", context) - - -def equipment_and_rooms(request): - return wrap_response(request, "equipment_and_rooms/index.html", {}) diff --git a/smash/web/views/equipment_and_rooms.py b/smash/web/views/equipment_and_rooms.py new file mode 100644 index 0000000000000000000000000000000000000000..0d8092e6b2cf5d5c7b194030461dff7e636813cd --- /dev/null +++ b/smash/web/views/equipment_and_rooms.py @@ -0,0 +1,5 @@ +from . import wrap_response + + +def equipment_and_rooms(request): + return wrap_response(request, "equipment_and_rooms/index.html", {})