Move Time column to be first in list view (#250)

Fixes #232
This commit is contained in:
Ohad Lutzky 2021-07-10 03:32:53 +01:00 committed by GitHub
parent beaf366079
commit 411641903f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 28 deletions

View File

@ -21,12 +21,12 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Time" %}</th>
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
<th class="text-center">{% trans "Wet" %}</th> <th class="text-center">{% trans "Wet" %}</th>
<th class="text-center">{% trans "Solid" %}</th> <th class="text-center">{% trans "Solid" %}</th>
<th>{% trans "Color" %}</th> <th>{% trans "Color" %}</th>
<th>{% trans "Amount" %}</th> <th>{% trans "Amount" %}</th>
<th>{% trans "Time" %}</th>
<th class="text-center">{% trans "Actions" %}</th> <th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
@ -34,12 +34,12 @@
{% for change in object_list %} {% for change in object_list %}
{% cycle "odd" "even" as row_class silent %} {% cycle "odd" "even" as row_class silent %}
<tr class="{{ row_class }}"> <tr class="{{ row_class }}">
<th scope="row"><a href="{% url 'core:child' change.child.slug %}">{{ change.child }}</a></th> <th scope="row">{{ change.time }}</th>
<td><a href="{% url 'core:child' change.child.slug %}">{{ change.child }}</a></td>
<td class="text-center">{{ change.wet|bool_icon }}</td> <td class="text-center">{{ change.wet|bool_icon }}</td>
<td class="text-center">{{ change.solid|bool_icon }}</td> <td class="text-center">{{ change.solid|bool_icon }}</td>
<td>{{ change.get_color_display }}</td> <td>{{ change.get_color_display }}</td>
<td>{{ change.amount|default_if_none:"" }}</td> <td>{{ change.amount|default_if_none:"" }}</td>
<td>{{ change.time }}</td>
<td class="text-center"> <td class="text-center">
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}"> <div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">

View File

@ -21,13 +21,13 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Date" %}</th>
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
<th>{% trans "Method" %}</th> <th>{% trans "Method" %}</th>
<th>{% trans "Type" %}</th> <th>{% trans "Type" %}</th>
{% comment %}Abbreviation of "Amount"{% endcomment %} {% comment %}Abbreviation of "Amount"{% endcomment %}
<th>{% trans "Amt." %}</th> <th>{% trans "Amt." %}</th>
<th>{% trans "Duration" %}</th> <th>{% trans "Duration" %}</th>
<th>{% trans "Date" %}</th>
<th class="text-center">{% trans "Actions" %}</th> <th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
@ -35,7 +35,8 @@
{% for feeding in object_list %} {% for feeding in object_list %}
{% cycle "odd" "even" as row_class silent %} {% cycle "odd" "even" as row_class silent %}
<tr class="{{ row_class }}"> <tr class="{{ row_class }}">
<th scope="row"><a href="{% url 'core:child' feeding.child.slug %}">{{ feeding.child }}</a></th> <th scope="row">{{ feeding.start }}</th>
<td><a href="{% url 'core:child' feeding.child.slug %}">{{ feeding.child }}</a></td>
<td>{{ feeding.get_method_display }}</td> <td>{{ feeding.get_method_display }}</td>
<td>{{ feeding.get_type_display }}</td> <td>{{ feeding.get_type_display }}</td>
<td> <td>
@ -44,7 +45,6 @@
{% endif %} {% endif %}
</td> </td>
<td>{{ feeding.duration|duration_string }}</td> <td>{{ feeding.duration|duration_string }}</td>
<td>{{ feeding.start }}</td>
<td class="text-center"> <td class="text-center">
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}"> <div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">

View File

@ -21,18 +21,18 @@
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Time" %}</th>
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
<th>{% trans "Note" %}</th> <th>{% trans "Note" %}</th>
<th>{% trans "Time" %}</th>
<th class="text-center">{% trans "Actions" %}</th> <th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for note in object_list %} {% for note in object_list %}
<tr> <tr>
<th scope="row"><a href="{% url 'core:child' note.child.slug %}">{{ note.child }}</a></th> <th scope="row">{{ note.time }}</th>
<td><a href="{% url 'core:child' note.child.slug %}">{{ note.child }}</a></td>
<td>{{ note.note }}</td> <td>{{ note.note }}</td>
<td>{{ note.time }}</td>
<td class="text-center"> <td class="text-center">
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}"> <div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">

View File

@ -21,10 +21,10 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Child" %}</th>
<th>{% trans "Duration" %}</th>
<th>{% trans "Start" %}</th> <th>{% trans "Start" %}</th>
<th>{% trans "End" %}</th> <th>{% trans "End" %}</th>
<th>{% trans "Child" %}</th>
<th>{% trans "Duration" %}</th>
<th class="text-center">{% trans "Nap" %}</th> <th class="text-center">{% trans "Nap" %}</th>
<th class="text-center">{% trans "Actions" %}</th> <th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
@ -33,10 +33,10 @@
{% for sleep in object_list %} {% for sleep in object_list %}
{% cycle "odd" "even" as row_class silent %} {% cycle "odd" "even" as row_class silent %}
<tr class="{{ row_class }}"> <tr class="{{ row_class }}">
<th scope="row"><a href="{% url 'core:child' sleep.child.slug %}">{{ sleep.child }}</a></th> <th scope="row">{{ sleep.start }}</th>
<td>{{ sleep.duration|duration_string }}</td>
<td>{{ sleep.start }}</td>
<td>{{ sleep.end }}</td> <td>{{ sleep.end }}</td>
<td><a href="{% url 'core:child' sleep.child.slug %}">{{ sleep.child }}</a></td>
<td>{{ sleep.duration|duration_string }}</td>
<td class="text-center">{{ sleep.nap|bool_icon }}</td> <td class="text-center">{{ sleep.nap|bool_icon }}</td>
<td class="text-center"> <td class="text-center">
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}"> <div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">

View File

@ -21,9 +21,9 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Time" %}</th>
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
<th>{% trans "Temperature" %}</th> <th>{% trans "Temperature" %}</th>
<th>{% trans "Time" %}</th>
<th class="text-center">{% trans "Actions" %}</th> <th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
@ -31,9 +31,9 @@
{% for temperature in object_list %} {% for temperature in object_list %}
{% cycle "odd" "even" as row_class silent %} {% cycle "odd" "even" as row_class silent %}
<tr class="{{ row_class }}"> <tr class="{{ row_class }}">
<th scope="row"><a href="{% url 'core:child' temperature.child.slug %}">{{ temperature.child }}</a></th> <th scope="row">{{ temperature.time }}</th>
<td><a href="{% url 'core:child' temperature.child.slug %}">{{ temperature.child }}</a></td>
<td>{{ temperature.temperature }}</td> <td>{{ temperature.temperature }}</td>
<td>{{ temperature.time }}</td>
<td class="text-center"> <td class="text-center">
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}"> <div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">

View File

@ -21,9 +21,9 @@
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Start" %}</th>
<th>{% trans "Name" %}</th> <th>{% trans "Name" %}</th>
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
<th>{% trans "Start" %}</th>
<th>{% trans "Duration" %}</th> <th>{% trans "Duration" %}</th>
<th>{% trans "End" %}</th> <th>{% trans "End" %}</th>
<th>{% trans "Active" %}</th> <th>{% trans "Active" %}</th>
@ -33,7 +33,8 @@
<tbody> <tbody>
{% for timer in object_list %} {% for timer in object_list %}
<tr> <tr>
<th scope="row"><a href="{% url 'core:timer-detail' timer.id %}">{{ timer }}</a></th> <th scope="row">{{ timer.start }}</th>
<td><a href="{% url 'core:timer-detail' timer.id %}">{{ timer }}</a></td>
<td> <td>
{% if timer.child %} {% if timer.child %}
<a href="{% url 'core:child' timer.child.slug %}">{{ timer.child }}</a> <a href="{% url 'core:child' timer.child.slug %}">{{ timer.child }}</a>
@ -41,7 +42,6 @@
&nbsp; &nbsp;
{% endif %} {% endif %}
</td> </td>
<td>{{ timer.start }}</td>
<td>{{ timer.duration|duration_string }}</td> <td>{{ timer.duration|duration_string }}</td>
<td>{{ timer.end }}</td> <td>{{ timer.end }}</td>
<td>{{ timer.active|bool_icon }}</td> <td>{{ timer.active|bool_icon }}</td>

View File

@ -20,10 +20,10 @@
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Child" %}</th>
<th>{% trans "Duration" %}</th>
<th>{% trans "Start" %}</th> <th>{% trans "Start" %}</th>
<th>{% trans "End" %}</th> <th>{% trans "End" %}</th>
<th>{% trans "Child" %}</th>
<th>{% trans "Duration" %}</th>
<th>{% trans "Milestone" %}</th> <th>{% trans "Milestone" %}</th>
<th class="text-center">{% trans "Actions" %}</th> <th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
@ -31,10 +31,10 @@
<tbody> <tbody>
{% for tummytime in object_list %} {% for tummytime in object_list %}
<tr> <tr>
<th scope="row"><a href="{% url 'core:child' tummytime.child.slug %}">{{ tummytime.child }}</a></th> <th scope="row">{{ tummytime.start }}</th>
<td>{{ tummytime.duration|duration_string }}</td>
<td>{{ tummytime.start }}</td>
<td>{{ tummytime.end }}</td> <td>{{ tummytime.end }}</td>
<td><a href="{% url 'core:child' tummytime.child.slug %}">{{ tummytime.child }}</a></td>
<td>{{ tummytime.duration|duration_string }}</td>
<td>{{ tummytime.milestone }}</td> <td>{{ tummytime.milestone }}</td>
<td class="text-center"> <td class="text-center">
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}"> <div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">

View File

@ -21,9 +21,9 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Date" %}</th>
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
<th>{% trans "Weight" %}</th> <th>{% trans "Weight" %}</th>
<th>{% trans "Date" %}</th>
<th class="text-center">{% trans "Actions" %}</th> <th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
@ -31,9 +31,9 @@
{% for weight in object_list %} {% for weight in object_list %}
{% cycle "odd" "even" as row_class silent %} {% cycle "odd" "even" as row_class silent %}
<tr class="{{ row_class }}"> <tr class="{{ row_class }}">
<th scope="row"><a href="{% url 'core:child' weight.child.slug %}">{{ weight.child }}</a></th> <th scope="row">{{ weight.date }}</th>
<td><a href="{% url 'core:child' weight.child.slug %}">{{ weight.child }}</a></td>
<td>{{ weight.weight }}</td> <td>{{ weight.weight }}</td>
<td>{{ weight.date }}</td>
<td class="text-center"> <td class="text-center">
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}"> <div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">