diff --git a/babyblotter/static_src/scss/themes/blueorange.scss b/babyblotter/static_src/scss/themes/blueorange.scss index 5ddac31c..2f892080 100644 --- a/babyblotter/static_src/scss/themes/blueorange.scss +++ b/babyblotter/static_src/scss/themes/blueorange.scss @@ -143,4 +143,4 @@ $list-group-action-hover-color: $list-group-action-color; // Breadcrumbs $breadcrumb-bg: none; -$breadcrumb-active-color: $white; +$breadcrumb-active-color: $gray-600; diff --git a/babyblotter/templates/babyblotter/base.html b/babyblotter/templates/babyblotter/base.html index 3dc150d5..39b08734 100644 --- a/babyblotter/templates/babyblotter/base.html +++ b/babyblotter/templates/babyblotter/base.html @@ -18,6 +18,14 @@ {% block nav %}{% endblock %} + + + {% block page %}{% endblock %} {% if debug %} diff --git a/babyblotter/templates/babyblotter/breadcrumbs.html b/babyblotter/templates/babyblotter/breadcrumbs.html deleted file mode 100644 index 3eedfb0e..00000000 --- a/babyblotter/templates/babyblotter/breadcrumbs.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ path }} - - diff --git a/babyblotter/templates/babyblotter/nav-dropdown.html b/babyblotter/templates/babyblotter/nav-dropdown.html index 9b13c282..97b8d780 100644 --- a/babyblotter/templates/babyblotter/nav-dropdown.html +++ b/babyblotter/templates/babyblotter/nav-dropdown.html @@ -1,5 +1,5 @@ {% extends 'babyblotter/base.html' %} -{% load babyblotter timers %} +{% load timers %} {% block nav %} - - {% breadcrumbs %} - {% endblock %} \ No newline at end of file diff --git a/babyblotter/templates/babyblotter/page.html b/babyblotter/templates/babyblotter/page.html index 687cab5e..0b579211 100644 --- a/babyblotter/templates/babyblotter/page.html +++ b/babyblotter/templates/babyblotter/page.html @@ -1,6 +1,5 @@ {% extends 'babyblotter/nav-dropdown.html' %} -{% load static %} -{% load timers %} +{% load static timers %} {% block page %}
diff --git a/babyblotter/templatetags/__init__.py b/babyblotter/templatetags/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/babyblotter/templatetags/babyblotter.py b/babyblotter/templatetags/babyblotter.py deleted file mode 100644 index 7737c6d2..00000000 --- a/babyblotter/templatetags/babyblotter.py +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django import template - - -register = template.Library() - - -@register.inclusion_tag('babyblotter/breadcrumbs.html', takes_context=True) -def breadcrumbs(context): - request = context['request'] or None - # TODO: Process path and send breadcrumbs down. - return {'path': request.path} diff --git a/core/templates/core/child_confirm_delete.html b/core/templates/core/child_confirm_delete.html index 99674300..47f5baf7 100644 --- a/core/templates/core/child_confirm_delete.html +++ b/core/templates/core/child_confirm_delete.html @@ -3,6 +3,12 @@ {% block title %}Delete a Child{% endblock %} +{% block breadcrumbs %} + + + +{% endblock %} + {% block content %}
{% csrf_token %} diff --git a/core/templates/core/child_detail.html b/core/templates/core/child_detail.html index e2571026..acda5ac0 100644 --- a/core/templates/core/child_detail.html +++ b/core/templates/core/child_detail.html @@ -2,6 +2,11 @@ {% block title %}{{ object }}{% endblock %} +{% block breadcrumbs %} + + +{% endblock %} + {% block content %}
{{ object }}
diff --git a/core/templates/core/child_form.html b/core/templates/core/child_form.html index 4f6d288a..3f20b615 100644 --- a/core/templates/core/child_form.html +++ b/core/templates/core/child_form.html @@ -1,13 +1,23 @@ {% extends 'babyblotter/page.html' %} {% block title %} - {% if request.resolver_match.url_name == 'child-update' %} + {% if object %} {{ object }} {% else %} Add a Child {% endif %} {% endblock %} +{% block breadcrumbs %} + + {% if object %} + + + {% else %} + + {% endif %} +{% endblock %} + {% block content %} {% if object %}

Update {{ object }}

diff --git a/core/templates/core/child_list.html b/core/templates/core/child_list.html index 40aa5568..3622097d 100644 --- a/core/templates/core/child_list.html +++ b/core/templates/core/child_list.html @@ -3,6 +3,10 @@ {% block title %}Children{% endblock %} +{% block breadcrumbs %} + +{% endblock %} + {% block content %}

Children

@@ -18,20 +22,14 @@ {% for child in object_list %} - {{ child.first_name }} + {{ child.first_name }} {{ child.last_name }} {{ child.birth_date }}
- {% if perms.core.view_child %} - - - - {% endif %} - {% if perms.core.change_child %} - + {% endif %} diff --git a/core/templates/core/diaperchange_confirm_delete.html b/core/templates/core/diaperchange_confirm_delete.html index 8e56e7d8..78c18257 100644 --- a/core/templates/core/diaperchange_confirm_delete.html +++ b/core/templates/core/diaperchange_confirm_delete.html @@ -3,6 +3,11 @@ {% block title %}Delete a Diaper Change{% endblock %} +{% block breadcrumbs %} + + +{% endblock %} + {% block content %} {% csrf_token %} diff --git a/core/templates/core/diaperchange_form.html b/core/templates/core/diaperchange_form.html index 79c03540..d934550e 100644 --- a/core/templates/core/diaperchange_form.html +++ b/core/templates/core/diaperchange_form.html @@ -8,6 +8,15 @@ {% endif %} {% endblock %} +{% block breadcrumbs %} + + {% if object %} + + {% else %} + + {% endif %} +{% endblock %} + {% block content %} {% if object %}

Update {{ object }}

diff --git a/core/templates/core/diaperchange_list.html b/core/templates/core/diaperchange_list.html index 179a5094..f39d9b39 100644 --- a/core/templates/core/diaperchange_list.html +++ b/core/templates/core/diaperchange_list.html @@ -4,6 +4,10 @@ {% block title %}Diaper Changes{% endblock %} +{% block breadcrumbs %} + +{% endblock %} + {% block content %}

Diaper Changes

@@ -21,7 +25,7 @@ {% for change in object_list %} - {{ change.child }} + {{ change.child }} {{ change.wet|bool_icon }} {{ change.solid|bool_icon }} {{ change.color }} diff --git a/core/templates/core/feeding_confirm_delete.html b/core/templates/core/feeding_confirm_delete.html index 697a5996..84019a9a 100644 --- a/core/templates/core/feeding_confirm_delete.html +++ b/core/templates/core/feeding_confirm_delete.html @@ -3,6 +3,11 @@ {% block title %}Delete a Feeding{% endblock %} +{% block breadcrumbs %} + + +{% endblock %} + {% block content %} {% csrf_token %} diff --git a/core/templates/core/feeding_form.html b/core/templates/core/feeding_form.html index 020a4e59..77f35c1c 100644 --- a/core/templates/core/feeding_form.html +++ b/core/templates/core/feeding_form.html @@ -8,6 +8,15 @@ {% endif %} {% endblock %} +{% block breadcrumbs %} + + {% if object %} + + {% else %} + + {% endif %} +{% endblock %} + {% block content %} {% if object %}

Update {{ object }}

diff --git a/core/templates/core/feeding_list.html b/core/templates/core/feeding_list.html index bbc39d33..5a7198fb 100644 --- a/core/templates/core/feeding_list.html +++ b/core/templates/core/feeding_list.html @@ -4,6 +4,10 @@ {% block title %}Feedings{% endblock %} +{% block breadcrumbs %} + +{% endblock %} + {% block content %}

Feedings

@@ -22,7 +26,7 @@ {% for feeding in object_list %} - {{ feeding.child }} + {{ feeding.child }} {{ feeding.method }} {{ feeding.type }} diff --git a/core/templates/core/note_confirm_delete.html b/core/templates/core/note_confirm_delete.html index 5ed8fd0a..16102c09 100644 --- a/core/templates/core/note_confirm_delete.html +++ b/core/templates/core/note_confirm_delete.html @@ -3,6 +3,11 @@ {% block title %}Delete a Note{% endblock %} +{% block breadcrumbs %} + + +{% endblock %} + {% block content %} {% csrf_token %} diff --git a/core/templates/core/note_form.html b/core/templates/core/note_form.html index 029eec33..6e89a020 100644 --- a/core/templates/core/note_form.html +++ b/core/templates/core/note_form.html @@ -8,6 +8,15 @@ {% endif %} {% endblock %} +{% block breadcrumbs %} + + {% if object %} + + {% else %} + + {% endif %} +{% endblock %} + {% block content %} {% if object %}

Update {{ object }}

diff --git a/core/templates/core/note_list.html b/core/templates/core/note_list.html index 742b6042..9d700134 100644 --- a/core/templates/core/note_list.html +++ b/core/templates/core/note_list.html @@ -3,6 +3,10 @@ {% block title %}Notes{% endblock %} +{% block breadcrumbs %} + +{% endblock %} + {% block content %}

Notes

@@ -18,7 +22,7 @@ {% for note in object_list %} - {{ note.child }} + {{ note.child }} {{ note.note }} {{ note.time }} diff --git a/core/templates/core/sleep_confirm_delete.html b/core/templates/core/sleep_confirm_delete.html index cafeacd5..03079205 100644 --- a/core/templates/core/sleep_confirm_delete.html +++ b/core/templates/core/sleep_confirm_delete.html @@ -3,6 +3,11 @@ {% block title %}Delete a Sleep Entry{% endblock %} +{% block breadcrumbs %} + + +{% endblock %} + {% block content %} {% csrf_token %} diff --git a/core/templates/core/sleep_form.html b/core/templates/core/sleep_form.html index fcfd38d5..d3ad3302 100644 --- a/core/templates/core/sleep_form.html +++ b/core/templates/core/sleep_form.html @@ -8,6 +8,15 @@ {% endif %} {% endblock %} +{% block breadcrumbs %} + + {% if object %} + + {% else %} + + {% endif %} +{% endblock %} + {% block content %} {% if object %}

Update {{ object }}

diff --git a/core/templates/core/sleep_list.html b/core/templates/core/sleep_list.html index 5e63bc97..f7db2085 100644 --- a/core/templates/core/sleep_list.html +++ b/core/templates/core/sleep_list.html @@ -4,6 +4,10 @@ {% block title %}Sleep{% endblock %} +{% block breadcrumbs %} + +{% endblock %} + {% block content %}

Sleep

@@ -20,7 +24,7 @@ {% for sleep in object_list %} - {{ sleep.child }} + {{ sleep.child }} {{ sleep.duration|duration_string }} {{ sleep.start|date:'n/j/y G:i' }} {{ sleep.end|date:'n/j/y G:i' }} diff --git a/core/templates/core/timer_confirm_delete.html b/core/templates/core/timer_confirm_delete.html index 34179f4a..3122931a 100644 --- a/core/templates/core/timer_confirm_delete.html +++ b/core/templates/core/timer_confirm_delete.html @@ -3,6 +3,12 @@ {% block title %}Delete {{ object }}{% endblock %} +{% block breadcrumbs %} + + + +{% endblock %} + {% block content %} {% csrf_token %} diff --git a/core/templates/core/timer_detail.html b/core/templates/core/timer_detail.html index 567971d9..2a944c29 100644 --- a/core/templates/core/timer_detail.html +++ b/core/templates/core/timer_detail.html @@ -1,9 +1,13 @@ {% extends 'babyblotter/page.html' %} -{% load timers %} -{% load duration %} +{% load duration timers %} {% block title %}{{ object }}{% endblock %} +{% block breadcrumbs %} + + +{% endblock %} + {% block content %}
@@ -53,7 +57,7 @@ href="{% url 'timer-update' timer.id %}" role="button"> - diff --git a/core/templates/core/timer_form.html b/core/templates/core/timer_form.html index e19ef66d..8b5aba5f 100644 --- a/core/templates/core/timer_form.html +++ b/core/templates/core/timer_form.html @@ -3,6 +3,16 @@ {% block title %}Timer{% endblock %} +{% block breadcrumbs %} + + {% if object %} + + + {% else %} + + {% endif %} +{% endblock %} + {% block content %} {% if object %}

Update {{ object }}

diff --git a/core/templates/core/timer_list.html b/core/templates/core/timer_list.html index d9b836b0..b80c4085 100644 --- a/core/templates/core/timer_list.html +++ b/core/templates/core/timer_list.html @@ -1,9 +1,11 @@ {% extends 'babyblotter/page.html' %} -{% load bootstrap %} -{% load duration %} -{% load widget_tweaks %} +{% load bootstrap duration widget_tweaks %} -{% block title %}Sleep{% endblock %} +{% block title %}Timers{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} {% block content %}

Timers

diff --git a/core/templates/core/tummytime_confirm_delete.html b/core/templates/core/tummytime_confirm_delete.html index 3a8bbe96..10917f97 100644 --- a/core/templates/core/tummytime_confirm_delete.html +++ b/core/templates/core/tummytime_confirm_delete.html @@ -3,6 +3,11 @@ {% block title %}Delete a Tummy Time Entry{% endblock %} +{% block breadcrumbs %} + + +{% endblock %} + {% block content %} {% csrf_token %} diff --git a/core/templates/core/tummytime_form.html b/core/templates/core/tummytime_form.html index 7b8687e1..79dd909c 100644 --- a/core/templates/core/tummytime_form.html +++ b/core/templates/core/tummytime_form.html @@ -8,6 +8,15 @@ {% endif %} {% endblock %} +{% block breadcrumbs %} + + {% if object %} + + {% else %} + + {% endif %} +{% endblock %} + {% block content %} {% if object %}

Update {{ object }}

diff --git a/core/templates/core/tummytime_list.html b/core/templates/core/tummytime_list.html index caaf5dbd..44921fdc 100644 --- a/core/templates/core/tummytime_list.html +++ b/core/templates/core/tummytime_list.html @@ -4,6 +4,10 @@ {% block title %}Tummy Time{% endblock %} +{% block breadcrumbs %} + +{% endblock %} + {% block content %}

Tummy Time

@@ -21,7 +25,7 @@ {% for tummytime in object_list %} - {{ tummytime.child }} + {{ tummytime.child }} {{ tummytime.duration|duration_string }} {{ tummytime.start|date:'n/j/y G:i' }} {{ tummytime.end|date:'n/j/y G:i' }} diff --git a/dashboard/templates/dashboard/child.html b/dashboard/templates/dashboard/child.html index 9778d666..fc344352 100644 --- a/dashboard/templates/dashboard/child.html +++ b/dashboard/templates/dashboard/child.html @@ -3,25 +3,14 @@ {% block title %}Dashboard - {{ object }}{% endblock %} +{% block breadcrumbs %} + + + +{% endblock %} + {% block content %} - - - -
+
{% card_feeding_last object %} {% card_feeding_last_method object %} diff --git a/reports/templates/reports/diaperchange_lifetimes.html b/reports/templates/reports/diaperchange_lifetimes.html index 6cbef9e8..e12a6df4 100644 --- a/reports/templates/reports/diaperchange_lifetimes.html +++ b/reports/templates/reports/diaperchange_lifetimes.html @@ -2,6 +2,11 @@ {% block title %}Diaper Lifetimes - {{ object }}{% endblock %} +{% block breadcrumbs %} + {{ block.super }} + +{% endblock %} + {% block javascript %} {{ block.super }} {{ javascript|safe }} diff --git a/reports/templates/reports/diaperchange_types.html b/reports/templates/reports/diaperchange_types.html index f516c03f..59757023 100644 --- a/reports/templates/reports/diaperchange_types.html +++ b/reports/templates/reports/diaperchange_types.html @@ -2,6 +2,11 @@ {% block title %}Diaper Change Types - {{ object }}{% endblock %} +{% block breadcrumbs %} + {{ block.super }} + +{% endblock %} + {% block javascript %} {{ block.super }} {{ javascript|safe }} diff --git a/reports/templates/reports/report_base.html b/reports/templates/reports/report_base.html index 4bef5b91..7099f579 100644 --- a/reports/templates/reports/report_base.html +++ b/reports/templates/reports/report_base.html @@ -3,6 +3,12 @@ {% block title %}{% endblock %} +{% block breadcrumbs %} + + + +{% endblock %} + {% block content %}
{{ html|safe }} diff --git a/reports/templates/reports/sleep_pattern.html b/reports/templates/reports/sleep_pattern.html index 524a9125..cd206dba 100644 --- a/reports/templates/reports/sleep_pattern.html +++ b/reports/templates/reports/sleep_pattern.html @@ -2,6 +2,11 @@ {% block title %}Sleep Patterns - {{ object }}{% endblock %} +{% block breadcrumbs %} + {{ block.super }} + +{% endblock %} + {% block javascript %} {{ block.super }} {{ javascript|safe }} diff --git a/reports/templates/reports/sleep_totals.html b/reports/templates/reports/sleep_totals.html index ffc31024..0223d63f 100644 --- a/reports/templates/reports/sleep_totals.html +++ b/reports/templates/reports/sleep_totals.html @@ -2,6 +2,11 @@ {% block title %}Sleep Totals - {{ object }}{% endblock %} +{% block breadcrumbs %} + {{ block.super }} + +{% endblock %} + {% block javascript %} {{ block.super }} {{ javascript|safe }} diff --git a/reports/templates/reports/timeline.html b/reports/templates/reports/timeline.html index 59e0f17c..858be8e9 100644 --- a/reports/templates/reports/timeline.html +++ b/reports/templates/reports/timeline.html @@ -1,8 +1,13 @@ -{% extends 'babyblotter/page.html' %} +{% extends 'reports/report_base.html' %} {% load static %} {% block title %}Timeline - {{ object }}{% endblock %} +{% block breadcrumbs %} + {{ block.super }} + +{% endblock %} + {% block content %}

Timeline

{{ object }}