From 6333b0b1ead9d0ed3b507f6737283d8739816be5 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Thu, 6 Feb 2020 20:09:24 -0800 Subject: [PATCH] Move add button to header in list views --- core/templates/core/child_list.html | 16 ++++++++-------- core/templates/core/diaperchange_list.html | 16 ++++++++-------- core/templates/core/feeding_list.html | 16 ++++++++-------- core/templates/core/note_list.html | 16 ++++++++-------- core/templates/core/sleep_list.html | 16 ++++++++-------- core/templates/core/temperature_list.html | 16 ++++++++-------- core/templates/core/timer_list.html | 9 ++++++++- core/templates/core/tummytime_list.html | 14 +++++++------- core/templates/core/weight_list.html | 16 ++++++++-------- 9 files changed, 71 insertions(+), 64 deletions(-) diff --git a/core/templates/core/child_list.html b/core/templates/core/child_list.html index e571f92e..7afa92ba 100644 --- a/core/templates/core/child_list.html +++ b/core/templates/core/child_list.html @@ -8,7 +8,14 @@ {% endblock %} {% block content %} -

{% trans "Children" %}

+

+ {% trans "Children" %} + {% if perms.core.add_child %} + + {% trans "Add Child" %} + + {% endif %} +

{% include 'babybuddy/filter.html' %}
@@ -64,11 +71,4 @@
{% include 'babybuddy/paginator.html' %} - - {% if perms.core.add_child %} - - {% trans "Add a Child" %} - - {% endif %} - {% endblock %} diff --git a/core/templates/core/diaperchange_list.html b/core/templates/core/diaperchange_list.html index dfb8ffa9..83514cfe 100644 --- a/core/templates/core/diaperchange_list.html +++ b/core/templates/core/diaperchange_list.html @@ -8,7 +8,14 @@ {% endblock %} {% block content %} -

{% trans "Diaper Changes" %}

+

+ {% trans "Diaper Changes" %} + {% if perms.core.add_diaperchange %} + + {% trans "Add Diaper Change" %} + + {% endif %} +

{% include 'babybuddy/filter.html' %}
@@ -59,11 +66,4 @@
{% include 'babybuddy/paginator.html' %} - - {% if perms.core.add_diaperchange %} - - {% trans "Add a Change" %} - - {% endif %} - {% endblock %} \ No newline at end of file diff --git a/core/templates/core/feeding_list.html b/core/templates/core/feeding_list.html index d337a112..f50fd7f8 100644 --- a/core/templates/core/feeding_list.html +++ b/core/templates/core/feeding_list.html @@ -8,7 +8,14 @@ {% endblock %} {% block content %} -

{% trans "Feedings" %}

+

+ {% trans "Feedings" %} + {% if perms.core.add_feeding %} + + {% trans "Add Feeding" %} + + {% endif %} +

{% include 'babybuddy/filter.html' %}
@@ -64,11 +71,4 @@
{% include 'babybuddy/paginator.html' %} - - {% if perms.core.add_feeding %} - - {% trans "Add a Feeding" %} - - {% endif %} - {% endblock %} \ No newline at end of file diff --git a/core/templates/core/note_list.html b/core/templates/core/note_list.html index fccb94cf..63c15cc7 100644 --- a/core/templates/core/note_list.html +++ b/core/templates/core/note_list.html @@ -8,7 +8,14 @@ {% endblock %} {% block content %} -

{% trans "Notes" %}

+

+ {% trans "Notes" %} + {% if perms.core.add_note %} + + {% trans "Add Note" %} + + {% endif %} +

{% include 'babybuddy/filter.html' %}
@@ -53,11 +60,4 @@
{% include 'babybuddy/paginator.html' %} - - {% if perms.core.add_note %} - - {% trans "Add a Note" %} - - {% endif %} - {% endblock %} \ No newline at end of file diff --git a/core/templates/core/sleep_list.html b/core/templates/core/sleep_list.html index fa069752..a20cdbf9 100644 --- a/core/templates/core/sleep_list.html +++ b/core/templates/core/sleep_list.html @@ -8,7 +8,14 @@ {% endblock %} {% block content %} -

{% trans "Sleep" %}

+

+ {% trans "Sleep" %} + {% if perms.core.add_sleep %} + + {% trans "Add Sleep" %} + + {% endif %} +

{% include 'babybuddy/filter.html' %}
@@ -57,11 +64,4 @@
{% include 'babybuddy/paginator.html' %} - - {% if perms.core.add_sleep %} - - {% trans "Add a Sleep Entry" %} - - {% endif %} - {% endblock %} \ No newline at end of file diff --git a/core/templates/core/temperature_list.html b/core/templates/core/temperature_list.html index 2a09c519..dc71a0c0 100644 --- a/core/templates/core/temperature_list.html +++ b/core/templates/core/temperature_list.html @@ -8,7 +8,14 @@ {% endblock %} {% block content %} -

{% trans "Temperature" %}

+

+ {% trans "Temperature" %} + {% if perms.core.add_temperature %} + + {% trans "Add Temperature Reading" %} + + {% endif %} +

{% include 'babybuddy/filter.html' %}
@@ -53,11 +60,4 @@
{% include 'babybuddy/paginator.html' %} - - {% if perms.core.add_temperature %} - - {% trans "Add a Temperature Reading" %} - - {% endif %} - {% endblock %} \ No newline at end of file diff --git a/core/templates/core/timer_list.html b/core/templates/core/timer_list.html index fd16b815..c8261cbd 100644 --- a/core/templates/core/timer_list.html +++ b/core/templates/core/timer_list.html @@ -8,7 +8,14 @@ {% endblock %} {% block content %} -

{% trans "Timers" %}

+

+ {% trans "Timers" %} + {% if perms.core.add_timer %} + + {% trans "Start Timer" %} + + {% endif %} +

{% include 'babybuddy/filter.html' %}
diff --git a/core/templates/core/tummytime_list.html b/core/templates/core/tummytime_list.html index 26369984..2fc2a415 100644 --- a/core/templates/core/tummytime_list.html +++ b/core/templates/core/tummytime_list.html @@ -8,7 +8,13 @@ {% endblock %} {% block content %} -

{% trans "Tummy Time" %}

+

+ {% trans "Tummy Time" %} + {% if perms.core.add_tummytime %} + + {% trans "Add Tummy Time" %} + {% endif %} +

{% include 'babybuddy/filter.html' %}
@@ -57,10 +63,4 @@
{% include 'babybuddy/paginator.html' %} - - {% if perms.core.add_tummytime %} - - {% trans "Add a Tummy Time Entry" %} - {% endif %} - {% endblock %} \ No newline at end of file diff --git a/core/templates/core/weight_list.html b/core/templates/core/weight_list.html index 4cc90c4e..ce18b18c 100644 --- a/core/templates/core/weight_list.html +++ b/core/templates/core/weight_list.html @@ -8,7 +8,14 @@ {% endblock %} {% block content %} -

{% trans "Weight" %}

+

+ {% trans "Weight" %} + {% if perms.core.add_weight %} + + {% trans "Add Weight" %} + + {% endif %} +

{% include 'babybuddy/filter.html' %}
@@ -53,11 +60,4 @@
{% include 'babybuddy/paginator.html' %} - - {% if perms.core.add_weight %} - - {% trans "Add a Weight Entry" %} - - {% endif %} - {% endblock %} \ No newline at end of file