Move Actions column to far left

This allows the columns to be ordered in a descending order of
importance from left to right, reducing scrolling.

Also un-center the column, as it is now flush to the left.

Fixes #236
This commit is contained in:
Ohad Lutzky 2021-08-04 21:19:16 +01:00 committed by Christopher Charbonneau Wells
parent cd9ef8724f
commit 207a5bc236
7 changed files with 64 additions and 64 deletions

View File

@ -21,6 +21,7 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Actions" %}</th>
<th>{% trans "Time" %}</th> <th>{% trans "Time" %}</th>
{% if not unique_child %} {% if not unique_child %}
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
@ -28,24 +29,13 @@
<th class="text-center">{% trans "Contents" %}</th> <th class="text-center">{% trans "Contents" %}</th>
<th>{% trans "Color" %}</th> <th>{% trans "Color" %}</th>
<th>{% trans "Amount" %}</th> <th>{% trans "Amount" %}</th>
<th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% 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">{{ change.time|datetime_short }}</th> <td>
{% if not unique_child %}
<td><a href="{% url 'core:child' change.child.slug %}">{{ change.child }}</a></td>
{% endif %}
<td class="text-center">
{% if change.wet %}<span title="{% trans "Wet" %}">💦</span>{% endif %}
{% if change.solid %}<span title="{% trans "Solid" %}">💩</span>{% endif %}
</td>
<td>{{ change.get_color_display }}</td>
<td>{{ change.amount|default_if_none:"" }}</td>
<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" %}">
{% if perms.core.change_diaperchange %} {% if perms.core.change_diaperchange %}
@ -62,6 +52,16 @@
</div> </div>
</td> </td>
<th scope="row">{{ change.time|datetime_short }}</th>
{% if not unique_child %}
<td><a href="{% url 'core:child' change.child.slug %}">{{ change.child }}</a></td>
{% endif %}
<td class="text-center">
{% if change.wet %}<span title="{% trans "Wet" %}">💦</span>{% endif %}
{% if change.solid %}<span title="{% trans "Solid" %}">💩</span>{% endif %}
</td>
<td>{{ change.get_color_display }}</td>
<td>{{ change.amount|default_if_none:"" }}</td>
</tr> </tr>
{% if change.notes %} {% if change.notes %}
<tr class="{{ row_class }} row-details"> <tr class="{{ row_class }} row-details">

View File

@ -21,6 +21,7 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Actions" %}</th>
<th>{% trans "Date" %}</th> <th>{% trans "Date" %}</th>
{% if not unique_child %} {% if not unique_child %}
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
@ -30,26 +31,13 @@
{% 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 class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% 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">{{ feeding.start|datetime_short }}</th>
{% if not unique_child %}
<td><a href="{% url 'core:child' feeding.child.slug %}">{{ feeding.child }}</a></td>
{% endif %}
<td>{{ feeding.get_method_display }}</td>
<td>{{ feeding.get_type_display }}</td>
<td> <td>
{% if feeding.amount %}
{{ feeding.amount }}
{% endif %}
</td>
<td>{{ feeding.duration|duration_string }}</td>
<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" %}">
{% if perms.core.change_feeding %} {% if perms.core.change_feeding %}
@ -66,6 +54,18 @@
</div> </div>
</td> </td>
<th scope="row">{{ feeding.start|datetime_short }}</th>
{% if not unique_child %}
<td><a href="{% url 'core:child' feeding.child.slug %}">{{ feeding.child }}</a></td>
{% endif %}
<td>{{ feeding.get_method_display }}</td>
<td>{{ feeding.get_type_display }}</td>
<td>
{% if feeding.amount %}
{{ feeding.amount }}
{% endif %}
</td>
<td>{{ feeding.duration|duration_string }}</td>
</tr> </tr>
{% if feeding.notes %} {% if feeding.notes %}
<tr class="{{ row_class }} row-details"> <tr class="{{ row_class }} row-details">

View File

@ -21,23 +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 "Actions" %}</th>
<th>{% trans "Time" %}</th> <th>{% trans "Time" %}</th>
{% if not unique_child %} {% if not unique_child %}
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
{% endif %} {% endif %}
<th>{% trans "Note" %}</th> <th>{% trans "Note" %}</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">{{ note.time|datetime_short }}</th> <td>
{% if not unique_child %}
<td><a href="{% url 'core:child' note.child.slug %}">{{ note.child }}</a></td>
{% endif %}
<td>{{ note.note }}</td>
<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" %}">
{% if perms.core.change_note %} {% if perms.core.change_note %}
@ -54,6 +49,11 @@
</div> </div>
</td> </td>
<th scope="row">{{ note.time|datetime_short }}</th>
{% if not unique_child %}
<td><a href="{% url 'core:child' note.child.slug %}">{{ note.child }}</a></td>
{% endif %}
<td>{{ note.note }}</td>
</tr> </tr>
{% empty %} {% empty %}
<tr> <tr>

View File

@ -21,6 +21,7 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Actions" %}</th>
<th>{% trans "Start" %}</th> <th>{% trans "Start" %}</th>
<th>{% trans "End" %}</th> <th>{% trans "End" %}</th>
{% if not unique_child %} {% if not unique_child %}
@ -28,21 +29,13 @@
{% endif %} {% endif %}
<th>{% trans "Duration" %}</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>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% 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">{{ sleep.start|datetime_short }}</th> <td>
<td>{{ sleep.end|datetime_short }}</td>
{% if not unique_child %}
<td><a href="{% url 'core:child' sleep.child.slug %}">{{ sleep.child }}</a></td>
{% endif %}
<td>{{ sleep.duration|duration_string }}</td>
<td class="text-center">{{ sleep.nap|bool_icon }}</td>
<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" %}">
{% if perms.core.change_sleep %} {% if perms.core.change_sleep %}
@ -59,6 +52,13 @@
</div> </div>
</td> </td>
<th scope="row">{{ sleep.start|datetime_short }}</th>
<td>{{ sleep.end|datetime_short }}</td>
{% if not unique_child %}
<td><a href="{% url 'core:child' sleep.child.slug %}">{{ sleep.child }}</a></td>
{% endif %}
<td>{{ sleep.duration|duration_string }}</td>
<td class="text-center">{{ sleep.nap|bool_icon }}</td>
</tr> </tr>
{% if sleep.notes %} {% if sleep.notes %}
<tr class="{{ row_class }} row-details"> <tr class="{{ row_class }} row-details">

View File

@ -21,24 +21,19 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Actions" %}</th>
<th>{% trans "Time" %}</th> <th>{% trans "Time" %}</th>
{% if not unique_child %} {% if not unique_child %}
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
{% endif %} {% endif %}
<th>{% trans "Temperature" %}</th> <th>{% trans "Temperature" %}</th>
<th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% 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">{{ temperature.time|datetime_short }}</th> <td>
{% if not unique_child %}
<td><a href="{% url 'core:child' temperature.child.slug %}">{{ temperature.child }}</a></td>
{% endif %}
<td>{{ temperature.temperature }}</td>
<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" %}">
{% if perms.core.change_temperature %} {% if perms.core.change_temperature %}
@ -55,6 +50,11 @@
</div> </div>
</td> </td>
<th scope="row">{{ temperature.time|datetime_short }}</th>
{% if not unique_child %}
<td><a href="{% url 'core:child' temperature.child.slug %}">{{ temperature.child }}</a></td>
{% endif %}
<td>{{ temperature.temperature }}</td>
</tr> </tr>
{% if temperature.notes %} {% if temperature.notes %}
<tr class="{{ row_class }} row-details"> <tr class="{{ row_class }} row-details">

View File

@ -20,6 +20,7 @@
<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 "Actions" %}</th>
<th>{% trans "Start" %}</th> <th>{% trans "Start" %}</th>
<th>{% trans "End" %}</th> <th>{% trans "End" %}</th>
{% if not unique_child %} {% if not unique_child %}
@ -27,20 +28,12 @@
{% endif %} {% endif %}
<th>{% trans "Duration" %}</th> <th>{% trans "Duration" %}</th>
<th>{% trans "Milestone" %}</th> <th>{% trans "Milestone" %}</th>
<th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for tummytime in object_list %} {% for tummytime in object_list %}
<tr> <tr>
<th scope="row">{{ tummytime.start|datetime_short }}</th> <td>
<td>{{ tummytime.end|datetime_short }}</td>
{% if not unique_child %}
<td><a href="{% url 'core:child' tummytime.child.slug %}">{{ tummytime.child }}</a></td>
{% endif %}
<td>{{ tummytime.duration|duration_string }}</td>
<td>{{ tummytime.milestone }}</td>
<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" %}">
{% if perms.core.change_tummytime %} {% if perms.core.change_tummytime %}
@ -57,6 +50,13 @@
</div> </div>
</td> </td>
<th scope="row">{{ tummytime.start|datetime_short }}</th>
<td>{{ tummytime.end|datetime_short }}</td>
{% if not unique_child %}
<td><a href="{% url 'core:child' tummytime.child.slug %}">{{ tummytime.child }}</a></td>
{% endif %}
<td>{{ tummytime.duration|duration_string }}</td>
<td>{{ tummytime.milestone }}</td>
</tr> </tr>
{% empty %} {% empty %}
<tr> <tr>

View File

@ -21,24 +21,19 @@
<table class="table table-instances"> <table class="table table-instances">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
<th>{% trans "Actions" %}</th>
<th>{% trans "Date" %}</th> <th>{% trans "Date" %}</th>
{% if not unique_child %} {% if not unique_child %}
<th>{% trans "Child" %}</th> <th>{% trans "Child" %}</th>
{% endif %} {% endif %}
<th>{% trans "Weight" %}</th> <th>{% trans "Weight" %}</th>
<th class="text-center">{% trans "Actions" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% 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">{{ weight.date }}</th> <td>
{% if not unique_child %}
<td><a href="{% url 'core:child' weight.child.slug %}">{{ weight.child }}</a></td>
{% endif %}
<td>{{ weight.weight }}</td>
<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" %}">
{% if perms.core.change_weight %} {% if perms.core.change_weight %}
@ -55,6 +50,11 @@
</div> </div>
</td> </td>
<th scope="row">{{ weight.date }}</th>
{% if not unique_child %}
<td><a href="{% url 'core:child' weight.child.slug %}">{{ weight.child }}</a></td>
{% endif %}
<td>{{ weight.weight }}</td>
</tr> </tr>
{% if weight.notes %} {% if weight.notes %}
<tr class="{{ row_class }} row-details"> <tr class="{{ row_class }} row-details">