Started using Bootstrap for styling, moved app factory, added tests, started work on login and registration templates, and more
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% set title %}{{ user.username }} - Dashboard{% endset %}
|
||||
{% set title %}{{ user.username }} - Account Dashboard{% endset %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Account Overview<h1>
|
||||
<h1 class="text-center h1">Account Dashboard</h1>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>Pets</h3>
|
||||
{% include 'users/dashboard/pets_overview.html' %}
|
||||
{% include 'users/dashboard/dogs_overview.html' %}
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Booking History</h3>
|
||||
{% include 'users/dashboard/visits_overview.html' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
27
accounts/templates/users/dashboard/dogs_overview.html
Normal file
27
accounts/templates/users/dashboard/dogs_overview.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-responsive table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="colgroup" colspan="4" class="text-center h3">Dogs overview</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Breed size</th>
|
||||
<th scope="col">Birth date</th>
|
||||
<th scope="col">Age</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="table-group-divider">
|
||||
{% for dog in user_dogs %}
|
||||
<tr>
|
||||
<td>{{ dog.name }}</td>
|
||||
<td>{{ dog.breed_size.value }}</td>
|
||||
<td>{{ dog.birth_date.strftime('%Y-%m-%d') }}</td>
|
||||
<td>{{ dog.get_age() }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>Breed</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td>Date</td>
|
||||
<td>Time</td>
|
||||
<td>Dog</td>
|
||||
</tr>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="colgroup" colspan="4" class="text-center h3">Visits overview</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Type</th>
|
||||
<th scope="col">Date</th>
|
||||
<th scope="col">Time</th>
|
||||
<th scope="col">Pets</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% for visit in user.visits %}
|
||||
<tr>
|
||||
<td>{{ visit.type }}</td>
|
||||
<td>{{ visit.get_date() }}</td>
|
||||
<td>{{ visit.get_time() }}</td>
|
||||
<td>{{ visit.dog }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<tbody class="table-group-divider">
|
||||
{% for visit in user_book_history %}
|
||||
<tr>
|
||||
<td>{{ visit.visit_type.value }}</td>
|
||||
<td>{{ visit.get_date() }}</td>
|
||||
<td>{{ visit.get_time() }}</td>
|
||||
<td>{{ visit.dogs }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
12
accounts/templates/users/my_dogs/base.html
Normal file
12
accounts/templates/users/my_dogs/base.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% set title %}{{ user.username }} - My Dogs{% endset %}
|
||||
|
||||
{% block content %}
|
||||
<h1>My Dogs</h1>
|
||||
|
||||
<hr>
|
||||
|
||||
{% include 'users/my_dogs/dogs_panel.html' %}
|
||||
{% endblock %}
|
||||
|
||||
27
accounts/templates/users/my_dogs/dogs_panel.html
Normal file
27
accounts/templates/users/my_dogs/dogs_panel.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="colgroup" colspan="4" class="text-center h3">My dogs</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Breed size</th>
|
||||
<th scope="col">Birth date</th>
|
||||
<th scope="col">Age</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="table-group-divider">
|
||||
{% for dog in user_dogs %}
|
||||
<tr>
|
||||
<td>{{ dog.name }}</td>
|
||||
<td>{{ dog.breed_size.value }}</td>
|
||||
<td>{{ dog.birth_date.strftime('%Y-%m-%d') }}</td>
|
||||
<td>{{ dog.get_age() }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user