diff options
Diffstat (limited to 'app/dispatch')
| -rw-r--r-- | app/dispatch/templates/dispatch/base.html | 6 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/companies/detail.html | 1 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/companies/edit.html | 1 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/companies/list.html | 1 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/drivers/detail.html | 1 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/drivers/edit.html | 1 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/drivers/list.html | 1 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/loads/create.html | 1 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/loads/detail.html | 3 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/loads/edit.html | 1 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/loads/list.html | 2 | ||||
| -rw-r--r-- | app/dispatch/views.py | 6 |
12 files changed, 18 insertions, 7 deletions
diff --git a/app/dispatch/templates/dispatch/base.html b/app/dispatch/templates/dispatch/base.html index de28d7a..693208f 100644 --- a/app/dispatch/templates/dispatch/base.html +++ b/app/dispatch/templates/dispatch/base.html @@ -3,7 +3,7 @@ <html lang="en"> <head> <meta charset="UTF-8"> - <title></title> + <title>{% block title %}{% endblock %}</title> <!--Import Google Icon Font--> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <!--Import materialize.css--> @@ -35,8 +35,8 @@ <div class="nav-wrapper container"><a id="logo-container" href="{% url 'home' %}" class="brand-logo">Dispatch Tracker</a> <ul class="right hide-on-med-and-down"> {% if user.is_authenticated %} - <li><a href="{% url 'driver_list' %}">Drivers</a></li> <li><a href="{% url 'load_list' %}">Loads</a></li> + <li><a href="{% url 'driver_list' %}">Drivers</a></li> <li><a href="{% url 'company_list' %}">Companies</a></li> <li><a href="#">Contacts</a></li> <li><a href="{% url 'logout' %}">Logout</a></li> @@ -47,8 +47,8 @@ <ul id="nav-mobile" class="side-nav"> {% if user.is_authenticated %} - <li><a href="#">Drivers</a></li> <li><a href="{% url 'load_list' %}">Loads</a></li> + <li><a href="#">Drivers</a></li> <li><a href="#">Companies</a></li> <li><a href="#">Contacts</a></li> <li><a href="{% url 'logout' %}">Logout</a></li> diff --git a/app/dispatch/templates/dispatch/companies/detail.html b/app/dispatch/templates/dispatch/companies/detail.html index 053f62b..b889055 100644 --- a/app/dispatch/templates/dispatch/companies/detail.html +++ b/app/dispatch/templates/dispatch/companies/detail.html @@ -1,5 +1,6 @@ {% extends 'dispatch/base.html' %} +{% block title %}Details - {{object.name}}{% endblock %} {% block content %} <div class="row"> diff --git a/app/dispatch/templates/dispatch/companies/edit.html b/app/dispatch/templates/dispatch/companies/edit.html index fe8460d..154ac1d 100644 --- a/app/dispatch/templates/dispatch/companies/edit.html +++ b/app/dispatch/templates/dispatch/companies/edit.html @@ -1,5 +1,6 @@ {% extends 'dispatch/base.html' %} +{% block title %}Edit - {{object.name}}{% endblock %} {% block content %} <div class="row"> diff --git a/app/dispatch/templates/dispatch/companies/list.html b/app/dispatch/templates/dispatch/companies/list.html index 9399276..2654587 100644 --- a/app/dispatch/templates/dispatch/companies/list.html +++ b/app/dispatch/templates/dispatch/companies/list.html @@ -1,5 +1,6 @@ {% extends 'dispatch/base.html' %} +{% block title %}Companies{% endblock %} {% block content %} <div class="row"> diff --git a/app/dispatch/templates/dispatch/drivers/detail.html b/app/dispatch/templates/dispatch/drivers/detail.html index 598d01e..69c1f3a 100644 --- a/app/dispatch/templates/dispatch/drivers/detail.html +++ b/app/dispatch/templates/dispatch/drivers/detail.html @@ -1,5 +1,6 @@ {% extends 'dispatch/base.html' %} +{% block title %}Details - {{ object.first_name }} {{ object.last_name }}{% endblock %} {% block content %} <div class="row"> diff --git a/app/dispatch/templates/dispatch/drivers/edit.html b/app/dispatch/templates/dispatch/drivers/edit.html index fe8460d..ef27923 100644 --- a/app/dispatch/templates/dispatch/drivers/edit.html +++ b/app/dispatch/templates/dispatch/drivers/edit.html @@ -1,5 +1,6 @@ {% extends 'dispatch/base.html' %} +{% block title %}Edit - {{ object.first_name }} {{ object.last_name }}{% endblock %} {% block content %} <div class="row"> diff --git a/app/dispatch/templates/dispatch/drivers/list.html b/app/dispatch/templates/dispatch/drivers/list.html index efc6141..ccfb50d 100644 --- a/app/dispatch/templates/dispatch/drivers/list.html +++ b/app/dispatch/templates/dispatch/drivers/list.html @@ -1,5 +1,6 @@ {% extends 'dispatch/base.html' %} +{% block title %}Drivers{% endblock %} {% block content %} <div class="row"> diff --git a/app/dispatch/templates/dispatch/loads/create.html b/app/dispatch/templates/dispatch/loads/create.html index ae40722..8d84df3 100644 --- a/app/dispatch/templates/dispatch/loads/create.html +++ b/app/dispatch/templates/dispatch/loads/create.html @@ -1,5 +1,6 @@ {% extends 'dispatch/base.html' %} +{% block title %}Create new load{% endblock %} {% block content %} <div class="row"> diff --git a/app/dispatch/templates/dispatch/loads/detail.html b/app/dispatch/templates/dispatch/loads/detail.html index e939fdb..3460ccc 100644 --- a/app/dispatch/templates/dispatch/loads/detail.html +++ b/app/dispatch/templates/dispatch/loads/detail.html @@ -1,10 +1,11 @@ {% extends 'dispatch/base.html' %} +{% block title %}Details - {{ object.load_number }}{% endblock %} {% block content %} <div class="row"> <div class="col s12 m6"> - <h1>{{ object.name }} details</h1> + <h1>Load details {{object.load_number}}</h1> </div> </div> {% endblock %} diff --git a/app/dispatch/templates/dispatch/loads/edit.html b/app/dispatch/templates/dispatch/loads/edit.html index fe8460d..37b4bb8 100644 --- a/app/dispatch/templates/dispatch/loads/edit.html +++ b/app/dispatch/templates/dispatch/loads/edit.html @@ -1,5 +1,6 @@ {% extends 'dispatch/base.html' %} +{% block title %}Edit - {{ object.load_number }}{% endblock %} {% block content %} <div class="row"> diff --git a/app/dispatch/templates/dispatch/loads/list.html b/app/dispatch/templates/dispatch/loads/list.html index d4caf71..6141e75 100644 --- a/app/dispatch/templates/dispatch/loads/list.html +++ b/app/dispatch/templates/dispatch/loads/list.html @@ -1,5 +1,7 @@ {% extends 'dispatch/base.html' %} +{% block title %}Loads{% endblock %} + {% block content %} diff --git a/app/dispatch/views.py b/app/dispatch/views.py index b5f3e0d..790428c 100644 --- a/app/dispatch/views.py +++ b/app/dispatch/views.py @@ -18,7 +18,7 @@ from django.utils import formats from dateutil import rrule def home(request): - return render(request,"dispatch/index.html") + return redirect(reverse('load_list')) def get_week_dates(date=None): if date == None: @@ -119,13 +119,13 @@ class CompanyDetail(LoadDateSort): model = Company class CompanyUpdate(UpdateView): - template_name = "dispatch/loads/edit.html" + template_name = "dispatch/companies/edit.html" model = Company success_url = reverse_lazy('company_list') fields = ['name', 'address', 'phone_number','email_address'] class CompanyDelete(DeleteView): - template_name = "dispatch/loads/delete.html" + template_name = "dispatch/companies/delete.html" model = Company success_url = reverse_lazy('company_list') |
