2017-10-22 18:00:42 +00:00
|
|
|
{% extends 'babybuddy/base.html' %}
|
2017-10-20 20:07:53 +00:00
|
|
|
{% load timers %}
|
2017-08-18 02:15:15 +00:00
|
|
|
|
|
|
|
{% block nav %}
|
|
|
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
2017-10-22 18:00:42 +00:00
|
|
|
<a class="navbar-brand" href="/"><span class="text-info">Baby</span> Buddy</a>
|
2017-09-10 14:08:03 +00:00
|
|
|
|
2017-10-11 17:54:04 +00:00
|
|
|
<div class="d-lg-none d-md-none ml-auto p-0 mr-2">
|
|
|
|
<a class="text-success mr-2" href="{% url 'timer-add-quick' %}"><i class="icon icon-2x icon-timer" aria-hidden="true"></i></a>
|
|
|
|
<div class="dropdown show d-inline">
|
|
|
|
<a class="text-success"
|
|
|
|
href="#"
|
|
|
|
role="button"
|
|
|
|
id="nav-quick-add-link"
|
|
|
|
data-toggle="dropdown"
|
|
|
|
aria-haspopup="true"
|
|
|
|
aria-expanded="false"><i class="icon icon-2x icon-add" aria-hidden="true"></i>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="nav-quick-add-link">
|
|
|
|
{% if perms.core.add_diaperchange %}
|
|
|
|
<a class="dropdown-item p-2" href="{% url 'diaperchange-add' %}">
|
|
|
|
<i class="icon icon-diaperchange" aria-hidden="true"></i> Diaper Change
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.core.add_feeding %}
|
|
|
|
<a class="dropdown-item p-2" href="{% url 'feeding-add' %}">
|
|
|
|
<i class="icon icon-feeding" aria-hidden="true"></i> Feeding
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2017-11-04 01:33:34 +00:00
|
|
|
{% if perms.core.add_note %}
|
|
|
|
<a class="dropdown-item p-2" href="{% url 'note-add' %}">
|
|
|
|
<i class="icon icon-note" aria-hidden="true"></i> Note
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2017-10-11 17:54:04 +00:00
|
|
|
{% if perms.core.add_sleep %}
|
|
|
|
<a class="dropdown-item p-2" href="{% url 'sleep-add' %}">
|
|
|
|
<i class="icon icon-sleep" aria-hidden="true"></i> Sleep
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.core.add_tummytime %}
|
|
|
|
<a class="dropdown-item p-2" href="{% url 'tummytime-add' %}">
|
|
|
|
<i class="icon icon-tummytime" aria-hidden="true"></i> Tummy Time
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2017-11-10 02:15:09 +00:00
|
|
|
{% if perms.core.add_weight %}
|
|
|
|
<a class="dropdown-item p-2" href="{% url 'weight-add' %}">
|
|
|
|
<i class="icon icon-weight" aria-hidden="true"></i> Weight
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2017-10-11 17:54:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2017-09-10 14:08:03 +00:00
|
|
|
|
2017-08-18 02:15:15 +00:00
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
2017-08-20 16:29:19 +00:00
|
|
|
data-target="#navbar-app" aria-controls="navbar-app"
|
|
|
|
aria-expanded="false" aria-label="Toggle navigation">
|
2017-08-18 02:15:15 +00:00
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
|
2017-08-20 16:29:19 +00:00
|
|
|
<div class="collapse navbar-collapse" id="navbar-app">
|
2017-08-18 02:15:15 +00:00
|
|
|
<ul class="navbar-nav mr-auto">
|
|
|
|
<li class="nav-item{% if request.path == '/' %} active{% endif %}">
|
2017-08-18 12:17:45 +00:00
|
|
|
<a class="nav-link" href="{% url 'dashboard' %}">
|
2017-09-15 16:29:56 +00:00
|
|
|
<i class="icon icon-dashboard" aria-hidden="true"></i> Dashboard
|
2017-08-18 02:15:15 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
2017-11-10 00:39:50 +00:00
|
|
|
<li class="nav-item dropdown">
|
|
|
|
<a id="nav-children-menu-link"
|
|
|
|
class="nav-link dropdown-toggle"
|
|
|
|
href="#"
|
|
|
|
data-toggle="dropdown"
|
|
|
|
aria-haspopup="true"
|
|
|
|
aria-expanded="false"><i class="icon icon-child" aria-hidden="true"></i> Children</a>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="nav-children-menu-link">
|
|
|
|
|
|
|
|
{% if perms.core.view_child %}
|
|
|
|
<a class="dropdown-item{% if request.path == '/children/' %} active{% endif %}" href="{% url 'child-list' %}">
|
|
|
|
<i class="icon icon-child" aria-hidden="true"></i> Children
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.core.add_child %}
|
|
|
|
<a class="dropdown-item pl-5{% if request.path == '/children/add/' %} active{% endif %}"
|
|
|
|
href="{% url 'child-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Child</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if perms.core.view_note %}
|
|
|
|
<a class="dropdown-item{% if request.path == '/notes/' %} active{% endif %}" href="{% url 'note-list' %}">
|
|
|
|
<i class="icon icon-note" aria-hidden="true"></i> Notes
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.core.add_note %}
|
|
|
|
<a class="dropdown-item pl-5{% if request.path == '/notes/add/' %} active{% endif %}"
|
|
|
|
href="{% url 'note-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Note</a>
|
|
|
|
{% endif %}
|
|
|
|
|
2017-11-10 02:15:09 +00:00
|
|
|
{% if perms.core.view_weight %}
|
|
|
|
<a class="dropdown-item{% if request.path == '/weight/' %} active{% endif %}" href="{% url 'weight-list' %}">
|
|
|
|
<i class="icon icon-weight" aria-hidden="true"></i> Weight
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.core.add_weight %}
|
|
|
|
<a class="dropdown-item pl-5{% if request.path == '/weight/add/' %} active{% endif %}"
|
|
|
|
href="{% url 'weight-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Weight entry</a>
|
|
|
|
{% endif %}
|
|
|
|
|
2017-11-10 00:39:50 +00:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
|
2017-08-18 02:15:15 +00:00
|
|
|
<li class="nav-item dropdown">
|
2017-08-21 13:55:06 +00:00
|
|
|
<a id="nav-activity-menu-link"
|
|
|
|
class="nav-link dropdown-toggle"
|
|
|
|
href="#"
|
2017-08-18 02:15:15 +00:00
|
|
|
data-toggle="dropdown"
|
|
|
|
aria-haspopup="true"
|
2017-11-10 00:39:50 +00:00
|
|
|
aria-expanded="false"><i class="icon icon-activities" aria-hidden="true"></i> Activities</a>
|
2017-08-18 02:15:15 +00:00
|
|
|
<div class="dropdown-menu" aria-labelledby="nav-activity-menu-link">
|
|
|
|
|
|
|
|
{% if perms.core.view_diaperchange %}
|
|
|
|
<a class="dropdown-item{% if request.path == '/changes/' %} active{% endif %}"
|
2017-09-15 16:29:56 +00:00
|
|
|
href="{% url 'diaperchange-list' %}"><i class="icon icon-diaperchange" aria-hidden="true"></i> Changes</a>
|
2017-08-18 02:15:15 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.core.add_diaperchange %}
|
|
|
|
<a class="dropdown-item pl-5{% if request.path == '/changes/add/' %} active{% endif %}"
|
2017-09-15 16:29:56 +00:00
|
|
|
href="{% url 'diaperchange-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Change</a>
|
2017-08-18 02:15:15 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if perms.core.view_feeding %}
|
|
|
|
<a class="dropdown-item{% if request.path == '/feedings/' %} active{% endif %}"
|
2017-09-15 16:29:56 +00:00
|
|
|
href="{% url 'feeding-list' %}"><i class="icon icon-feeding" aria-hidden="true"></i> Feedings</a>
|
2017-08-18 02:15:15 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.core.add_diaperchange %}
|
|
|
|
<a class="dropdown-item pl-5{% if request.path == '/feedings/add/' %} active{% endif %}"
|
2017-09-15 16:29:56 +00:00
|
|
|
href="{% url 'feeding-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Feeding</a>
|
2017-08-18 02:15:15 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if perms.core.view_sleep %}
|
|
|
|
<a class="dropdown-item{% if request.path == '/sleep/' %} active{% endif %}"
|
2017-09-15 16:29:56 +00:00
|
|
|
href="{% url 'sleep-list' %}"><i class="icon icon-sleep" aria-hidden="true"></i> Sleep</a>
|
2017-08-18 02:15:15 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.core.add_sleep %}
|
|
|
|
<a class="dropdown-item pl-5{% if request.path == '/sleep/add/' %} active{% endif %}"
|
2017-09-15 16:29:56 +00:00
|
|
|
href="{% url 'sleep-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Sleep entry</a>
|
2017-08-18 02:15:15 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if perms.core.view_tummytime %}
|
|
|
|
<a class="dropdown-item{% if request.path == '/tummy-time/' %} active{% endif %}"
|
2017-09-15 16:29:56 +00:00
|
|
|
href="{% url 'tummytime-list' %}"><i class="icon icon-tummytime" aria-hidden="true"></i> Tummy Time</a>
|
2017-08-18 02:15:15 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.core.add_tummytime %}
|
|
|
|
<a class="dropdown-item pl-5{% if request.path == '/tummy-time/add/' %} active{% endif %}"
|
2017-09-15 16:29:56 +00:00
|
|
|
href="{% url 'tummytime-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Tummy Time entry</a>
|
2017-08-18 02:15:15 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
2017-08-18 03:10:07 +00:00
|
|
|
|
|
|
|
{% if perms.core.view_timer %}
|
|
|
|
{% timer_nav %}
|
|
|
|
{% endif %}
|
2017-08-18 02:15:15 +00:00
|
|
|
</ul>
|
2017-08-20 16:29:19 +00:00
|
|
|
|
|
|
|
{% if request.user %}
|
|
|
|
<ul class="navbar-nav ml-auto">
|
|
|
|
<li class="nav-item dropdown">
|
2017-08-21 13:55:06 +00:00
|
|
|
<a id="nav-user-menu-link"
|
|
|
|
class="nav-link dropdown-toggle"
|
|
|
|
href="#"
|
|
|
|
data-toggle="dropdown"
|
|
|
|
aria-haspopup="true"
|
2017-09-15 16:29:56 +00:00
|
|
|
aria-expanded="false"><i class="icon icon-user" aria-hidden="true"></i> {{ request.user }}
|
2017-08-20 16:29:19 +00:00
|
|
|
</a>
|
2017-10-11 17:54:04 +00:00
|
|
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="nav-user-menu-link">
|
2017-11-30 16:34:07 +00:00
|
|
|
<h6 class="dropdown-header">User</h6>
|
2017-11-11 22:27:42 +00:00
|
|
|
<a href="{% url 'user-settings' %}" class="dropdown-item">Settings</a>
|
2017-12-02 21:20:15 +00:00
|
|
|
<a href="{% url 'user-password' %}" class="dropdown-item">Password</a>
|
2017-11-30 16:34:07 +00:00
|
|
|
<a href="{% url 'logout' %}" class="dropdown-item">Logout</a>
|
|
|
|
<h6 class="dropdown-header">Site</h6>
|
2017-08-20 16:29:19 +00:00
|
|
|
<a href="{% url 'api:api-root' %}"
|
|
|
|
class="dropdown-item"
|
|
|
|
target="_blank">API Browser</a>
|
|
|
|
{% if request.user.is_staff %}
|
|
|
|
<a href="{% url 'admin:index' %}"
|
|
|
|
class="dropdown-item"
|
2017-11-30 16:34:07 +00:00
|
|
|
target="_blank">Backend Admin</a>
|
2017-08-20 16:29:19 +00:00
|
|
|
{% endif %}
|
2017-11-30 16:34:07 +00:00
|
|
|
<h6 class="dropdown-header">Support</h6>
|
|
|
|
<a href="https://github.com/cdubz/babybuddy"
|
|
|
|
class="dropdown-item"
|
|
|
|
target="_blank">
|
|
|
|
<i class="icon icon-source" aria-hidden="true"></i> Source Code</a>
|
|
|
|
<a href="https://gitter.im/babybuddy/Lobby"
|
|
|
|
class="dropdown-item"
|
|
|
|
target="_blank">
|
|
|
|
<i class="icon icon-chat" aria-hidden="true"></i> Chat / Support</a>
|
2017-08-20 16:29:19 +00:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
2017-08-18 02:15:15 +00:00
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
{% endblock %}
|