mirror of https://github.com/snachodog/mybuddy.git
Update list templates to include notes
This commit is contained in:
parent
f681c579e5
commit
37fc8aa5a8
|
@ -18,7 +18,7 @@
|
|||
</h1>
|
||||
{% include 'babybuddy/filter.html' %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-instances">
|
||||
<thead class="thead-inverse">
|
||||
<tr>
|
||||
<th>{% trans "Child" %}</th>
|
||||
|
@ -33,7 +33,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for feeding in object_list %}
|
||||
<tr>
|
||||
{% cycle "odd" "even" as row_class silent %}
|
||||
<tr class="{{ row_class }}">
|
||||
<th scope="row"><a href="{% url 'core:child' feeding.child.slug %}">{{ feeding.child }}</a></th>
|
||||
<td>{{ feeding.get_method_display }}</td>
|
||||
<td>{{ feeding.get_type_display }}</td>
|
||||
|
@ -62,6 +63,11 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% if feeding.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="7"><i class="icon icon-note mr-2" aria-hidden="true"></i>{{ feeding.notes }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
<tr>
|
||||
<th colspan="7">{% trans "No feedings found." %}</th>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</h1>
|
||||
{% include 'babybuddy/filter.html' %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-instances">
|
||||
<thead class="thead-inverse">
|
||||
<tr>
|
||||
<th>{% trans "Child" %}</th>
|
||||
|
@ -31,7 +31,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for sleep in object_list %}
|
||||
<tr>
|
||||
{% cycle "odd" "even" as row_class silent %}
|
||||
<tr class="{{ row_class }}">
|
||||
<th scope="row"><a href="{% url 'core:child' sleep.child.slug %}">{{ sleep.child }}</a></th>
|
||||
<td>{{ sleep.duration|duration_string }}</td>
|
||||
<td>{{ sleep.start }}</td>
|
||||
|
@ -55,9 +56,14 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% if sleep.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="6"><i class="icon icon-note mr-2" aria-hidden="true"></i>{{ sleep.notes }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
<tr>
|
||||
<th colspan="5">{% trans "No sleep entries found." %}</th>
|
||||
<th colspan="6">{% trans "No sleep entries found." %}</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</h1>
|
||||
{% include 'babybuddy/filter.html' %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-instances">
|
||||
<thead class="thead-inverse">
|
||||
<tr>
|
||||
<th>{% trans "Child" %}</th>
|
||||
|
@ -28,22 +28,23 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr>
|
||||
<th scope="row"><a href="{% url 'core:child' object.child.slug %}">{{ object.child }}</a></th>
|
||||
<td>{{ object.temperature }}</td>
|
||||
<td>{{ object.time }}</td>
|
||||
{% for temperature in object_list %}
|
||||
{% cycle "odd" "even" as row_class silent %}
|
||||
<tr class="{{ row_class }}">
|
||||
<th scope="row"><a href="{% url 'core:child' temperature.child.slug %}">{{ temperature.child }}</a></th>
|
||||
<td>{{ temperature.temperature }}</td>
|
||||
<td>{{ temperature.time }}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
{% if perms.core.change_temperature %}
|
||||
<a href="{% url 'core:temperature-update' object.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:temperature-update' temperature.id %}" class="btn btn-primary">
|
||||
<i class="icon icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_temperature %}
|
||||
<a href="{% url 'core:temperature-delete' object.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:temperature-delete' temperature.id %}" class="btn btn-danger">
|
||||
<i class="icon icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -51,6 +52,11 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% if temperature.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="4"><i class="icon icon-note mr-2" aria-hidden="true"></i>{{ temperature.notes }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
<tr>
|
||||
<th colspan="4">{% trans "No temperature entries found." %}</th>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</h1>
|
||||
{% include 'babybuddy/filter.html' %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-instances">
|
||||
<thead class="thead-inverse">
|
||||
<tr>
|
||||
<th>{% trans "Child" %}</th>
|
||||
|
@ -28,22 +28,23 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr>
|
||||
<th scope="row"><a href="{% url 'core:child' object.child.slug %}">{{ object.child }}</a></th>
|
||||
<td>{{ object.weight }}</td>
|
||||
<td>{{ object.date }}</td>
|
||||
{% for weight in object_list %}
|
||||
{% cycle "odd" "even" as row_class silent %}
|
||||
<tr class="{{ row_class }}">
|
||||
<th scope="row"><a href="{% url 'core:child' weight.child.slug %}">{{ weight.child }}</a></th>
|
||||
<td>{{ weight.weight }}</td>
|
||||
<td>{{ weight.date }}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
{% if perms.core.change_weight %}
|
||||
<a href="{% url 'core:weight-update' object.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:weight-update' weight.id %}" class="btn btn-primary">
|
||||
<i class="icon icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_weight %}
|
||||
<a href="{% url 'core:weight-delete' object.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:weight-delete' weight.id %}" class="btn btn-danger">
|
||||
<i class="icon icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -51,6 +52,11 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% if weight.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="4"><i class="icon icon-note mr-2" aria-hidden="true"></i>{{ weight.notes }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
<tr>
|
||||
<th colspan="4">{% trans "No weight entries found." %}</th>
|
||||
|
|
|
@ -7621,6 +7621,20 @@ a.text-error:hover, a.text-error:focus {
|
|||
.ptr--ptr .ptr--text, .ptr--ptr .ptr--icon {
|
||||
color: #f8f9fa !important; }
|
||||
|
||||
.table-instances tr td, .table-instances tr th {
|
||||
vertical-align: middle; }
|
||||
|
||||
.table-instances tr.odd {
|
||||
background: rgba(34, 111, 151, 0.1); }
|
||||
|
||||
.table-instances tr.even {
|
||||
background: none; }
|
||||
|
||||
.table-instances tr.row-details td {
|
||||
color: #adb5bd;
|
||||
padding-top: 0;
|
||||
border-top: 0; }
|
||||
|
||||
/*!
|
||||
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
|
||||
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue