mirror of https://github.com/snachodog/mybuddy.git
Implement generic, app-specific "icon" style names over FA.
This commit is contained in:
parent
c49b8d1930
commit
3d88235eb9
|
@ -6,7 +6,7 @@
|
||||||
<a class="navbar-brand" href="/"><span class="text-info">Baby</span> Blotter</a>
|
<a class="navbar-brand" href="/"><span class="text-info">Baby</span> Blotter</a>
|
||||||
|
|
||||||
<a class="d-lg-none d-md-none text-secondary ml-auto p-0 mr-3" href="{% url 'timer-add-quick' %}">
|
<a class="d-lg-none d-md-none text-secondary ml-auto p-0 mr-3" href="{% url 'timer-add-quick' %}">
|
||||||
<i class="fa fa-2x fa-clock-o" aria-hidden="true"></i>
|
<i class="icon icon-2x icon-timer" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
<li class="nav-item{% if request.path == '/' %} active{% endif %}">
|
<li class="nav-item{% if request.path == '/' %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'dashboard' %}">
|
<a class="nav-link" href="{% url 'dashboard' %}">
|
||||||
<i class="fa fa-dashboard" aria-hidden="true"></i> Dashboard
|
<i class="icon icon-dashboard" aria-hidden="true"></i> Dashboard
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -29,56 +29,56 @@
|
||||||
href="#"
|
href="#"
|
||||||
data-toggle="dropdown"
|
data-toggle="dropdown"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false"><i class="fa fa-child" aria-hidden="true"></i> Activities</a>
|
aria-expanded="false"><i class="icon icon-child" aria-hidden="true"></i> Activities</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="nav-activity-menu-link">
|
<div class="dropdown-menu" aria-labelledby="nav-activity-menu-link">
|
||||||
|
|
||||||
{% if perms.core.view_diaperchange %}
|
{% if perms.core.view_diaperchange %}
|
||||||
<a class="dropdown-item{% if request.path == '/changes/' %} active{% endif %}"
|
<a class="dropdown-item{% if request.path == '/changes/' %} active{% endif %}"
|
||||||
href="{% url 'diaperchange-list' %}"><i class="fa fa-trash" aria-hidden="true"></i> Changes</a>
|
href="{% url 'diaperchange-list' %}"><i class="icon icon-diaperchange" aria-hidden="true"></i> Changes</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.core.add_diaperchange %}
|
{% if perms.core.add_diaperchange %}
|
||||||
<a class="dropdown-item pl-5{% if request.path == '/changes/add/' %} active{% endif %}"
|
<a class="dropdown-item pl-5{% if request.path == '/changes/add/' %} active{% endif %}"
|
||||||
href="{% url 'diaperchange-add' %}"><i class="fa fa-plus" aria-hidden="true"></i> Change</a>
|
href="{% url 'diaperchange-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Change</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.view_feeding %}
|
{% if perms.core.view_feeding %}
|
||||||
<a class="dropdown-item{% if request.path == '/feedings/' %} active{% endif %}"
|
<a class="dropdown-item{% if request.path == '/feedings/' %} active{% endif %}"
|
||||||
href="{% url 'feeding-list' %}"><i class="fa fa-spoon" aria-hidden="true"></i> Feedings</a>
|
href="{% url 'feeding-list' %}"><i class="icon icon-feeding" aria-hidden="true"></i> Feedings</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.core.add_diaperchange %}
|
{% if perms.core.add_diaperchange %}
|
||||||
<a class="dropdown-item pl-5{% if request.path == '/feedings/add/' %} active{% endif %}"
|
<a class="dropdown-item pl-5{% if request.path == '/feedings/add/' %} active{% endif %}"
|
||||||
href="{% url 'feeding-add' %}"><i class="fa fa-plus" aria-hidden="true"></i> Feeding</a>
|
href="{% url 'feeding-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Feeding</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.view_sleep %}
|
{% if perms.core.view_sleep %}
|
||||||
<a class="dropdown-item{% if request.path == '/sleep/' %} active{% endif %}"
|
<a class="dropdown-item{% if request.path == '/sleep/' %} active{% endif %}"
|
||||||
href="{% url 'sleep-list' %}"><i class="fa fa-bed" aria-hidden="true"></i> Sleep</a>
|
href="{% url 'sleep-list' %}"><i class="icon icon-sleep" aria-hidden="true"></i> Sleep</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.core.add_sleep %}
|
{% if perms.core.add_sleep %}
|
||||||
<a class="dropdown-item pl-5{% if request.path == '/sleep/add/' %} active{% endif %}"
|
<a class="dropdown-item pl-5{% if request.path == '/sleep/add/' %} active{% endif %}"
|
||||||
href="{% url 'sleep-add' %}"><i class="fa fa-plus" aria-hidden="true"></i> Sleep entry</a>
|
href="{% url 'sleep-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Sleep entry</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.view_tummytime %}
|
{% if perms.core.view_tummytime %}
|
||||||
<a class="dropdown-item{% if request.path == '/tummy-time/' %} active{% endif %}"
|
<a class="dropdown-item{% if request.path == '/tummy-time/' %} active{% endif %}"
|
||||||
href="{% url 'tummytime-list' %}"><i class="fa fa-smile-o" aria-hidden="true"></i> Tummy Time</a>
|
href="{% url 'tummytime-list' %}"><i class="icon icon-tummytime" aria-hidden="true"></i> Tummy Time</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.core.add_tummytime %}
|
{% if perms.core.add_tummytime %}
|
||||||
<a class="dropdown-item pl-5{% if request.path == '/tummy-time/add/' %} active{% endif %}"
|
<a class="dropdown-item pl-5{% if request.path == '/tummy-time/add/' %} active{% endif %}"
|
||||||
href="{% url 'tummytime-add' %}"><i class="fa fa-plus" aria-hidden="true"></i> Tummy Time entry</a>
|
href="{% url 'tummytime-add' %}"><i class="icon icon-add" aria-hidden="true"></i> Tummy Time entry</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
{% if perms.core.view_child %}
|
{% if perms.core.view_child %}
|
||||||
<a class="dropdown-item{% if request.path == '/children/' %} active{% endif %}" href="{% url 'child-list' %}">
|
<a class="dropdown-item{% if request.path == '/children/' %} active{% endif %}" href="{% url 'child-list' %}">
|
||||||
<i class="fa fa-child" aria-hidden="true"></i> Children
|
<i class="icon icon-child" aria-hidden="true"></i> Children
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.view_note %}
|
{% if perms.core.view_note %}
|
||||||
<a class="dropdown-item{% if request.path == '/notes/' %} active{% endif %}" href="{% url 'note-list' %}">
|
<a class="dropdown-item{% if request.path == '/notes/' %} active{% endif %}" href="{% url 'note-list' %}">
|
||||||
<i class="fa fa-sticky-note" aria-hidden="true"></i> Notes
|
<i class="icon icon-note" aria-hidden="true"></i> Notes
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
href="#"
|
href="#"
|
||||||
data-toggle="dropdown"
|
data-toggle="dropdown"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false"><i class="fa fa-user" aria-hidden="true"></i> {{ request.user }}
|
aria-expanded="false"><i class="icon icon-user" aria-hidden="true"></i> {{ request.user }}
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="nav-user-menu-link">
|
<div class="dropdown-menu" aria-labelledby="nav-user-menu-link">
|
||||||
<a href="{% url 'api:api-root' %}"
|
<a href="{% url 'api:api-root' %}"
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
{% extends 'babyblotter/base.html' %}
|
|
||||||
|
|
||||||
{% block nav %}
|
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
|
||||||
<a class="navbar-brand" href="/"><span class="text-info">Baby</span> Blotter</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
|
||||||
data-target="#navbarsExampleDefault"
|
|
||||||
aria-controls="navbarsExampleDefault" aria-expanded="false"
|
|
||||||
aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li class="nav-item{% if request.path == '/' %} active{% endif %}">
|
|
||||||
<a class="nav-link" href="{% url 'dashboard' %}">
|
|
||||||
<i class="fa fa-dashboard" aria-hidden="true"></i> Dashboard
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{% if perms.core.view_child %}
|
|
||||||
<li class="nav-item{% if request.path == '/children/' %} active{% endif %}">
|
|
||||||
<a class="nav-link" href="{% url 'child-list' %}">
|
|
||||||
<i class="fa fa-child" aria-hidden="true"></i> Children
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if perms.core.view_diaperchange %}
|
|
||||||
<li class="nav-item{% if request.path == '/changes/' %} active{% endif %}">
|
|
||||||
<a class="nav-link" href="{% url 'diaperchange-list' %}">
|
|
||||||
<i class="fa fa-trash" aria-hidden="true"></i> Changes
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if perms.core.view_feeding %}
|
|
||||||
<li class="nav-item{% if request.path == '/feedings/' %} active{% endif %}">
|
|
||||||
<a class="nav-link" href="{% url 'feeding-list' %}">
|
|
||||||
<i class="fa fa-spoon" aria-hidden="true"></i> Feedings
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if perms.core.view_sleep %}
|
|
||||||
<li class="nav-item{% if request.path == '/sleep/' %} active{% endif %}">
|
|
||||||
<a class="nav-link" href="{% url 'sleep-list' %}">
|
|
||||||
<i class="fa fa-bed" aria-hidden="true"></i> Sleep
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if perms.core.view_tummytime %}
|
|
||||||
<li class="nav-item{% if request.path == '/tummy-time/' %} active{% endif %}">
|
|
||||||
<a class="nav-link" href="{% url 'tummytime-list' %}">
|
|
||||||
<i class="fa fa-smile-o" aria-hidden="true"></i> Tummy Time
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if perms.core.view_note %}
|
|
||||||
<li class="nav-item{% if request.path == '/notes/' %} active{% endif %}">
|
|
||||||
<a class="nav-link" href="{% url 'note-list' %}">
|
|
||||||
<i class="fa fa-sticky-note" aria-hidden="true"></i> Notes
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
{% endblock %}
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% if page_obj.has_previous %}
|
{% if page_obj.has_previous %}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="Previous">
|
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="Previous">
|
||||||
<i class="fa fa-chevron-left" aria-hidden="true"></i>
|
<i class="icon icon-chevron-left" aria-hidden="true"></i>
|
||||||
<span class="sr-only">Previous</span>
|
<span class="sr-only">Previous</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
{% if page_obj.has_next %}
|
{% if page_obj.has_next %}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a class="page-link" href="?page={{ page_obj.next_page_number }}" aria-label="Next">
|
<a class="page-link" href="?page={{ page_obj.next_page_number }}" aria-label="Next">
|
||||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
<i class="icon icon-chevron-right" aria-hidden="true"></i>
|
||||||
<span class="sr-only">Next</span>
|
<span class="sr-only">Next</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group mb-3 fade-in">
|
<div class="input-group mb-3 fade-in">
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<i class="fa fa-user" aria-hidden="true"></i>
|
<i class="icon icon-user" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
{% render_field form.username name='username' class+='form-control' id='username-input-group' placeholder=form.username.label %}
|
{% render_field form.username name='username' class+='form-control' id='username-input-group' placeholder=form.username.label %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group mb-3 fade-in">
|
<div class="input-group mb-3 fade-in">
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<i class="fa fa-lock" aria-hidden="true"></i>
|
<i class="icon icon-lock" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
{% render_field form.password name='password' class+='form-control' id='password-input-group' placeholder=form.password.label %}
|
{% render_field form.password name='password' class+='form-control' id='password-input-group' placeholder=form.password.label %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group mb-3 fade-in">
|
<div class="input-group mb-3 fade-in">
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<i class="fa fa-lock" aria-hidden="true"></i>
|
<i class="icon icon-lock" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
{% render_field form.new_password1 name='new_password1' class+='form-control' id='password1-input-group' %}
|
{% render_field form.new_password1 name='new_password1' class+='form-control' id='password1-input-group' %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group mb-3 fade-in">
|
<div class="input-group mb-3 fade-in">
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<i class="fa fa-lock" aria-hidden="true"></i>
|
<i class="icon icon-lock" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
{% render_field form.new_password2 name='new_password2' class+='form-control' id='password2-input-group' %}
|
{% render_field form.new_password2 name='new_password2' class+='form-control' id='password2-input-group' %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group mb-3 fade-in">
|
<div class="input-group mb-3 fade-in">
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<i class="fa fa-envelope" aria-hidden="true"></i>
|
<i class="icon icon-envelope" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
{% render_field form.email name='email' class+='form-control' id='email-input-group' placeholder=form.email.label %}
|
{% render_field form.email name='email' class+='form-control' id='email-input-group' placeholder=form.email.label %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,6 +7,7 @@ from django.utils import timezone, timesince
|
||||||
|
|
||||||
|
|
||||||
class Child(models.Model):
|
class Child(models.Model):
|
||||||
|
model_name = 'child'
|
||||||
first_name = models.CharField(max_length=255)
|
first_name = models.CharField(max_length=255)
|
||||||
last_name = models.CharField(max_length=255)
|
last_name = models.CharField(max_length=255)
|
||||||
birth_date = models.DateField(blank=False, null=False)
|
birth_date = models.DateField(blank=False, null=False)
|
||||||
|
@ -34,6 +35,7 @@ class Child(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class DiaperChange(models.Model):
|
class DiaperChange(models.Model):
|
||||||
|
model_name = 'diaperchange'
|
||||||
child = models.ForeignKey('Child', related_name='diaper_change')
|
child = models.ForeignKey('Child', related_name='diaper_change')
|
||||||
time = models.DateTimeField(blank=False, null=False)
|
time = models.DateTimeField(blank=False, null=False)
|
||||||
wet = models.BooleanField()
|
wet = models.BooleanField()
|
||||||
|
@ -77,6 +79,7 @@ class DiaperChange(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class Feeding(models.Model):
|
class Feeding(models.Model):
|
||||||
|
model_name = 'feeding'
|
||||||
child = models.ForeignKey('Child', related_name='feeding')
|
child = models.ForeignKey('Child', related_name='feeding')
|
||||||
start = models.DateTimeField(blank=False, null=False)
|
start = models.DateTimeField(blank=False, null=False)
|
||||||
end = models.DateTimeField(blank=False, null=False)
|
end = models.DateTimeField(blank=False, null=False)
|
||||||
|
@ -114,6 +117,7 @@ class Feeding(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class Note(models.Model):
|
class Note(models.Model):
|
||||||
|
model_name = 'note'
|
||||||
child = models.ForeignKey('Child', related_name='note')
|
child = models.ForeignKey('Child', related_name='note')
|
||||||
note = models.TextField()
|
note = models.TextField()
|
||||||
time = models.DateTimeField(auto_now=True)
|
time = models.DateTimeField(auto_now=True)
|
||||||
|
@ -132,6 +136,7 @@ class Note(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class Sleep(models.Model):
|
class Sleep(models.Model):
|
||||||
|
model_name = 'sleep'
|
||||||
child = models.ForeignKey('Child', related_name='sleep')
|
child = models.ForeignKey('Child', related_name='sleep')
|
||||||
start = models.DateTimeField(blank=False, null=False)
|
start = models.DateTimeField(blank=False, null=False)
|
||||||
end = models.DateTimeField(blank=False, null=False)
|
end = models.DateTimeField(blank=False, null=False)
|
||||||
|
@ -157,6 +162,7 @@ class Sleep(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class Timer(models.Model):
|
class Timer(models.Model):
|
||||||
|
model_name = 'timer'
|
||||||
name = models.CharField(max_length=255, null=True, blank=True)
|
name = models.CharField(max_length=255, null=True, blank=True)
|
||||||
start = models.DateTimeField(auto_now_add=True)
|
start = models.DateTimeField(auto_now_add=True)
|
||||||
end = models.DateTimeField(blank=True, null=True, editable=False)
|
end = models.DateTimeField(blank=True, null=True, editable=False)
|
||||||
|
@ -203,6 +209,7 @@ class Timer(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class TummyTime(models.Model):
|
class TummyTime(models.Model):
|
||||||
|
model_name = 'tummytime'
|
||||||
child = models.ForeignKey('Child', related_name='tummy_time')
|
child = models.ForeignKey('Child', related_name='tummy_time')
|
||||||
start = models.DateTimeField(blank=False, null=False)
|
start = models.DateTimeField(blank=False, null=False)
|
||||||
end = models.DateTimeField(blank=False, null=False)
|
end = models.DateTimeField(blank=False, null=False)
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
@import '../../../node_modules/font-awesome/scss/font-awesome';
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
@extend .fa
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-2x {
|
||||||
|
@extend .fa-2x
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-add {
|
||||||
|
@extend .fa-plus
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-chevron-left {
|
||||||
|
@extend .fa-chevron-left
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-chevron-right {
|
||||||
|
@extend .fa-chevron-right
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-child {
|
||||||
|
@extend .fa-child
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-dashboard {
|
||||||
|
@extend .fa-tachometer
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-delete {
|
||||||
|
@extend .fa-trash-o
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-diaperchange {
|
||||||
|
@extend .fa-trash
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-envelope {
|
||||||
|
@extend .fa-envelope
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-false {
|
||||||
|
@extend .fa-times-circle-o
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-feeding {
|
||||||
|
@extend .fa-spoon
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-graph {
|
||||||
|
@extend .fa-bar-chart-o
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-list {
|
||||||
|
@extend .fa-list
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-lock {
|
||||||
|
@extend .fa-lock
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-note {
|
||||||
|
@extend .fa-sticky-note
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-refresh {
|
||||||
|
@extend .fa-refresh
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-sad {
|
||||||
|
@extend .fa-frown-o
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-sleep {
|
||||||
|
@extend .fa-bed
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-stop {
|
||||||
|
@extend .fa-stop
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-timer {
|
||||||
|
@extend .fa-clock-o
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-true {
|
||||||
|
@extend .fa-check-circle-o
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-tummytime {
|
||||||
|
@extend .fa-smile-o
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-update {
|
||||||
|
@extend .fa-pencil
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-user {
|
||||||
|
@extend .fa-user
|
||||||
|
}
|
|
@ -26,19 +26,19 @@
|
||||||
|
|
||||||
{% if perms.core.view_child %}
|
{% if perms.core.view_child %}
|
||||||
<a href="{% url 'dashboard-child' child.slug %}" class="btn btn-success">
|
<a href="{% url 'dashboard-child' child.slug %}" class="btn btn-success">
|
||||||
<i class="fa fa-tachometer" aria-hidden="true"></i>
|
<i class="icon icon-dashboard" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.change_child %}
|
{% if perms.core.change_child %}
|
||||||
<a href="{% url 'child-update' child.slug %}" class="btn btn-primary">
|
<a href="{% url 'child-update' child.slug %}" class="btn btn-primary">
|
||||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
<i class="icon icon-update" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.delete_child %}
|
{% if perms.core.delete_child %}
|
||||||
<a href="{% url 'child-delete' child.slug %}" class="btn btn-danger">
|
<a href="{% url 'child-delete' child.slug %}" class="btn btn-danger">
|
||||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
<i class="icon icon-delete" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
{% if perms.core.add_child %}
|
{% if perms.core.add_child %}
|
||||||
<a href="{% url 'child-add' %}" class="btn btn-sm btn-success">
|
<a href="{% url 'child-add' %}" class="btn btn-sm btn-success">
|
||||||
<i class="fa fa-child" aria-hidden="true"></i> Add a Child
|
<i class="icon icon-child" aria-hidden="true"></i> Add a Child
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,13 @@
|
||||||
|
|
||||||
{% if perms.core.change_diaperchange %}
|
{% if perms.core.change_diaperchange %}
|
||||||
<a href="{% url 'diaperchange-update' change.id %}" class="btn btn-primary">
|
<a href="{% url 'diaperchange-update' change.id %}" class="btn btn-primary">
|
||||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
<i class="icon icon-update" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.delete_diaperchange %}
|
{% if perms.core.delete_diaperchange %}
|
||||||
<a href="{% url 'diaperchange-delete' change.id %}" class="btn btn-danger">
|
<a href="{% url 'diaperchange-delete' change.id %}" class="btn btn-danger">
|
||||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
<i class="icon icon-delete" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
{% if perms.core.add_diaperchange %}
|
{% if perms.core.add_diaperchange %}
|
||||||
<a href="{% url 'diaperchange-add' %}" class="btn btn-sm btn-success">
|
<a href="{% url 'diaperchange-add' %}" class="btn btn-sm btn-success">
|
||||||
<i class="fa fa-trash" aria-hidden="true"></i> Add a Change
|
<i class="icon icon-diaperchange" aria-hidden="true"></i> Add a Change
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,13 @@
|
||||||
|
|
||||||
{% if perms.core.change_feeding %}
|
{% if perms.core.change_feeding %}
|
||||||
<a href="{% url 'feeding-update' feeding.id %}" class="btn btn-primary">
|
<a href="{% url 'feeding-update' feeding.id %}" class="btn btn-primary">
|
||||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
<i class="icon icon-update" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.delete_feeding %}
|
{% if perms.core.delete_feeding %}
|
||||||
<a href="{% url 'feeding-delete' feeding.id %}" class="btn btn-danger">
|
<a href="{% url 'feeding-delete' feeding.id %}" class="btn btn-danger">
|
||||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
<i class="icon icon-delete" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
{% if perms.core.add_feeding %}
|
{% if perms.core.add_feeding %}
|
||||||
<a href="{% url 'feeding-add' %}" class="btn btn-sm btn-success">
|
<a href="{% url 'feeding-add' %}" class="btn btn-sm btn-success">
|
||||||
<i class="fa fa-spoon" aria-hidden="true"></i> Add a Feeding
|
<i class="icon icon-feeding" aria-hidden="true"></i> Add a Feeding
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
|
|
||||||
{% if perms.core.change_note %}
|
{% if perms.core.change_note %}
|
||||||
<a href="{% url 'note-update' note.id %}" class="btn btn-primary">
|
<a href="{% url 'note-update' note.id %}" class="btn btn-primary">
|
||||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
<i class="icon icon-update" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.delete_note %}
|
{% if perms.core.delete_note %}
|
||||||
<a href="{% url 'note-delete' note.id %}" class="btn btn-danger">
|
<a href="{% url 'note-delete' note.id %}" class="btn btn-danger">
|
||||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
<i class="icon icon-delete" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
{% if perms.core.add_note %}
|
{% if perms.core.add_note %}
|
||||||
<a href="{% url 'note-add' %}" class="btn btn-sm btn-success">
|
<a href="{% url 'note-add' %}" class="btn btn-sm btn-success">
|
||||||
<i class="fa fa-sticky-note" aria-hidden="true"></i> Add a Note
|
<i class="icon icon-note" aria-hidden="true"></i> Add a Note
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -29,13 +29,13 @@
|
||||||
|
|
||||||
{% if perms.core.change_sleep %}
|
{% if perms.core.change_sleep %}
|
||||||
<a href="{% url 'sleep-update' sleep.id %}" class="btn btn-primary">
|
<a href="{% url 'sleep-update' sleep.id %}" class="btn btn-primary">
|
||||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
<i class="icon icon-update" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.delete_sleep %}
|
{% if perms.core.delete_sleep %}
|
||||||
<a href="{% url 'sleep-delete' sleep.id %}" class="btn btn-danger">
|
<a href="{% url 'sleep-delete' sleep.id %}" class="btn btn-danger">
|
||||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
<i class="icon icon-delete" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
{% if perms.core.add_sleep %}
|
{% if perms.core.add_sleep %}
|
||||||
<a href="{% url 'sleep-add' %}" class="btn btn-sm btn-success">
|
<a href="{% url 'sleep-add' %}" class="btn btn-sm btn-success">
|
||||||
<i class="fa fa-bed" aria-hidden="true"></i> Add a Sleep Entry
|
<i class="icon icon-sleep" aria-hidden="true"></i> Add a Sleep Entry
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -25,19 +25,19 @@
|
||||||
{% if perms.core.add_feeding %}
|
{% if perms.core.add_feeding %}
|
||||||
<a class="btn btn-success btn-lg btn-block mb-3"
|
<a class="btn btn-success btn-lg btn-block mb-3"
|
||||||
href="{% url 'feeding-add' %}?timer={{ timer.id }}"
|
href="{% url 'feeding-add' %}?timer={{ timer.id }}"
|
||||||
role="button"><i class="fa fa-spoon" aria-hidden="true"></i> Feeding</a>
|
role="button"><i class="icon icon-feeding" aria-hidden="true"></i> Feeding</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.add_sleep %}
|
{% if perms.core.add_sleep %}
|
||||||
<a class="btn btn-success btn-lg btn-block mb-3"
|
<a class="btn btn-success btn-lg btn-block mb-3"
|
||||||
href="{% url 'sleep-add' %}?timer={{ timer.id }}"
|
href="{% url 'sleep-add' %}?timer={{ timer.id }}"
|
||||||
role="button"><i class="fa fa-bed" aria-hidden="true"></i> Sleep</a>
|
role="button"><i class="icon icon-sleep" aria-hidden="true"></i> Sleep</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.add_tummytime %}
|
{% if perms.core.add_tummytime %}
|
||||||
<a class="btn btn-success btn-lg btn-block mb-3"
|
<a class="btn btn-success btn-lg btn-block mb-3"
|
||||||
href="{% url 'tummytime-add' %}?timer={{ timer.id }}"
|
href="{% url 'tummytime-add' %}?timer={{ timer.id }}"
|
||||||
role="button"><i class="fa fa-smile-o" aria-hidden="true"></i> Tummy Time</a>
|
role="button"><i class="icon icon-tummytime" aria-hidden="true"></i> Tummy Time</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="btn-group btn-group-lg center-block" role="group" aria-label="Timer actions">
|
<div class="btn-group btn-group-lg center-block" role="group" aria-label="Timer actions">
|
||||||
|
@ -45,22 +45,22 @@
|
||||||
{% if perms.core.delete_timer %}
|
{% if perms.core.delete_timer %}
|
||||||
<a class="btn btn-danger"
|
<a class="btn btn-danger"
|
||||||
href="{% url 'timer-delete' timer.id %}"
|
href="{% url 'timer-delete' timer.id %}"
|
||||||
role="button"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
role="button"><i class="icon icon-delete" aria-hidden="true"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.change_timer %}
|
{% if perms.core.change_timer %}
|
||||||
<a class="btn btn-primary"
|
<a class="btn btn-primary"
|
||||||
href="{% url 'timer-update' timer.id %}"
|
href="{% url 'timer-update' timer.id %}"
|
||||||
role="button"><i class="fa fa-pencil" aria-hidden="true"></i></a>
|
role="button"><i class="icon icon-update" aria-hidden="true"></i></a>
|
||||||
|
|
||||||
<a class="btn btn-dark"
|
<a class="btn btn-dark"
|
||||||
href="{% url 'timer-restart' timer.id %}"
|
href="{% url 'timer-restart' timer.id %}"
|
||||||
role="button"><i class="fa fa-refresh" aria-hidden="true"></i></a>
|
role="button"><i class="icon icon-refresh" aria-hidden="true"></i></a>
|
||||||
|
|
||||||
{% if object.active %}
|
{% if object.active %}
|
||||||
<a class="btn btn-warning"
|
<a class="btn btn-warning"
|
||||||
href="{% url 'timer-stop' timer.id %}"
|
href="{% url 'timer-stop' timer.id %}"
|
||||||
role="button"><i class="fa fa-stop" aria-hidden="true"></i></a>
|
role="button"><i class="icon icon-stop" aria-hidden="true"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -4,19 +4,19 @@
|
||||||
href="#"
|
href="#"
|
||||||
data-toggle="dropdown"
|
data-toggle="dropdown"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false"><i class="fa fa-clock-o" aria-hidden="true"></i> Timers</a>
|
aria-expanded="false"><i class="icon icon-timer" aria-hidden="true"></i> Timers</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="nav-timer-menu-link">
|
<div class="dropdown-menu" aria-labelledby="nav-timer-menu-link">
|
||||||
{% if perms.core.add_timer %}
|
{% if perms.core.add_timer %}
|
||||||
<a class="dropdown-item" href="{% url 'timer-add-quick' %}">
|
<a class="dropdown-item" href="{% url 'timer-add-quick' %}">
|
||||||
<i class="fa fa-clock-o" aria-hidden="true"></i> Quick Start Timer
|
<i class="icon icon-timer" aria-hidden="true"></i> Quick Start Timer
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" href="{% url 'timer-add' %}">
|
<a class="dropdown-item" href="{% url 'timer-add' %}">
|
||||||
<i class="fa fa-plus" aria-hidden="true"></i> Start Timer
|
<i class="icon icon-add" aria-hidden="true"></i> Start Timer
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.core.view_timer %}
|
{% if perms.core.view_timer %}
|
||||||
<a class="dropdown-item" href="{% url 'timer-list' %}">
|
<a class="dropdown-item" href="{% url 'timer-list' %}">
|
||||||
<i class="fa fa-list" aria-hidden="true"></i> View Timers
|
<i class="icon icon-list" aria-hidden="true"></i> View Timers
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if timers %}
|
{% if timers %}
|
||||||
|
|
|
@ -31,13 +31,13 @@
|
||||||
|
|
||||||
{% if perms.core.change_tummytime %}
|
{% if perms.core.change_tummytime %}
|
||||||
<a href="{% url 'tummytime-update' tummytime.id %}" class="btn btn-primary">
|
<a href="{% url 'tummytime-update' tummytime.id %}" class="btn btn-primary">
|
||||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
<i class="icon icon-update" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if perms.core.delete_tummytime %}
|
{% if perms.core.delete_tummytime %}
|
||||||
<a href="{% url 'tummytime-delete' tummytime.id %}" class="btn btn-danger">
|
<a href="{% url 'tummytime-delete' tummytime.id %}" class="btn btn-danger">
|
||||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
<i class="icon icon-delete" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -56,7 +56,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if perms.core.add_tummytime %}
|
{% if perms.core.add_tummytime %}
|
||||||
<a href="{% url 'tummytime-add' %}" class="btn btn-sm btn-success"><i class="fa fa-smile-o" aria-hidden="true"></i> Add a Tummy Time Entry</a>
|
<a href="{% url 'tummytime-add' %}" class="btn btn-sm btn-success">
|
||||||
|
<i class="icon icon-tummytime" aria-hidden="true"></i> Add a Tummy Time Entry</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -10,8 +10,8 @@ register = template.Library()
|
||||||
@register.filter()
|
@register.filter()
|
||||||
def bool_icon(value):
|
def bool_icon(value):
|
||||||
if value:
|
if value:
|
||||||
classes = 'fa-check-circle-o text-success'
|
classes = 'icon-true text-success'
|
||||||
else:
|
else:
|
||||||
classes = 'fa-times-circle-o text-danger'
|
classes = 'icon-false text-danger'
|
||||||
icon_html = '<i class="fa {}" aria-hidden="true"></i>'.format(classes)
|
icon_html = '<i class="icon {}" aria-hidden="true"></i>'.format(classes)
|
||||||
return mark_safe(icon_html)
|
return mark_safe(icon_html)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="card card-diaperchange border-danger mb-3">
|
<div class="card card-diaperchange border-danger mb-3">
|
||||||
<div class="card-header text-white bg-danger h4">
|
<div class="card-header text-white bg-danger h4">
|
||||||
<i class="fa fa-trash pull-left" aria-hidden="true"></i>
|
<i class="icon icon-diaperchange pull-left" aria-hidden="true"></i>
|
||||||
{% block header %}{% endblock %}
|
{% block header %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body text-danger">
|
<div class="card-body text-danger">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="card card-feeding border-primary mb-3">
|
<div class="card card-feeding border-primary mb-3">
|
||||||
<div class="card-header text-white bg-primary h4">
|
<div class="card-header text-white bg-primary h4">
|
||||||
<i class="fa fa-spoon pull-left" aria-hidden="true"></i>
|
<i class="icon icon-feeding pull-left" aria-hidden="true"></i>
|
||||||
{% block header %}{% endblock %}
|
{% block header %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body text-primary">
|
<div class="card-body text-primary">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="card card-sleep border-dark mb-3">
|
<div class="card card-sleep border-dark mb-3">
|
||||||
<div class="card-header text-white bg-dark h4">
|
<div class="card-header text-white bg-dark h4">
|
||||||
<i class="fa fa-bed pull-left" aria-hidden="true"></i>
|
<i class="icon icon-sleep pull-left" aria-hidden="true"></i>
|
||||||
{% block header %}{% endblock %}
|
{% block header %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body text-dark">
|
<div class="card-body text-dark">
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
{% if total %}
|
{% if total %}
|
||||||
<strong>{{ total|duration_string }}</strong>
|
<strong>{{ total|duration_string }}</strong>
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="fa fa-frown-o" aria-hidden="true"></i>
|
<i class="icon icon-sad" aria-hidden="true"></i>
|
||||||
<strong>None yet today</strong>
|
<strong>None yet today</strong>
|
||||||
<i class="fa fa-frown-o" aria-hidden="true"></i>
|
<i class="icon icon-sad" aria-hidden="true"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="card card-tummytime border-success mb-3">
|
<div class="card card-tummytime border-success mb-3">
|
||||||
<div class="card-header text-white bg-success h4">
|
<div class="card-header text-white bg-success h4">
|
||||||
<i class="fa fa-smile-o pull-left" aria-hidden="true"></i>
|
<i class="icon icon-tummytime pull-left" aria-hidden="true"></i>
|
||||||
{% block header %}{% endblock %}
|
{% block header %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body text-success">
|
<div class="card-body text-success">
|
||||||
|
|
|
@ -14,14 +14,14 @@
|
||||||
type="button"
|
type="button"
|
||||||
data-toggle="dropdown"
|
data-toggle="dropdown"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false"><i class="fa fa-bar-chart" aria-hidden="true"></i> Reports</button>
|
aria-expanded="false"><i class="icon icon-graph" aria-hidden="true"></i> Reports</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="reports-dropdown">
|
<div class="dropdown-menu" aria-labelledby="reports-dropdown">
|
||||||
{% if perms.core.view_diaperchange %}
|
{% if perms.core.view_diaperchange %}
|
||||||
<h6 class="dropdown-header"><i class="fa fa-trash" aria-hidden="true"></i> Diaper Changes</h6>
|
<h6 class="dropdown-header"><i class="icon icon-delete" aria-hidden="true"></i> Diaper Changes</h6>
|
||||||
<a class="dropdown-item" href="{% url 'reports:report-diaperchange-types-child' object.slug %}">Change Types</a>
|
<a class="dropdown-item" href="{% url 'reports:report-diaperchange-types-child' object.slug %}">Change Types</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.core.view_sleep %}
|
{% if perms.core.view_sleep %}
|
||||||
<h6 class="dropdown-header"><i class="fa fa-bed" aria-hidden="true"></i> Sleep</h6>
|
<h6 class="dropdown-header"><i class="icon icon-sleep" aria-hidden="true"></i> Sleep</h6>
|
||||||
<a class="dropdown-item" href="{% url 'reports:report-sleep-pattern-child' object.slug %}">Sleep Pattern</a>
|
<a class="dropdown-item" href="{% url 'reports:report-sleep-pattern-child' object.slug %}">Sleep Pattern</a>
|
||||||
<a class="dropdown-item" href="{% url 'reports:report-sleep-totals-child' object.slug %}">Sleep Totals</a>
|
<a class="dropdown-item" href="{% url 'reports:report-sleep-totals-child' object.slug %}">Sleep Totals</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
{% if perms.core.view_child %}
|
{% if perms.core.view_child %}
|
||||||
<a href="{% url 'dashboard-child' child.slug %}" class="btn btn-success">
|
<a href="{% url 'dashboard-child' child.slug %}" class="btn btn-success">
|
||||||
<i class="fa fa-tachometer" aria-hidden="true"></i>
|
<i class="icon icon-dashboard" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -7,14 +7,16 @@
|
||||||
<h1 class="text-center">Timeline</h1>
|
<h1 class="text-center">Timeline</h1>
|
||||||
<h2 class="text-center text-muted">{{ object }}</h2>
|
<h2 class="text-center text-muted">{{ object }}</h2>
|
||||||
<ul class="timeline">
|
<ul class="timeline">
|
||||||
<li>
|
{% for object in objects %}
|
||||||
<div class="timeline-badge bg-info"><i class="fa fa-trash"></i></div>
|
<li>
|
||||||
<div class="card">
|
<div class="timeline-badge bg-info"><i class="icon icon-{{ object.model_name }}"></i></div>
|
||||||
<div class="card-body">
|
<div class="card">
|
||||||
This is some text within a card block.
|
<div class="card-body">
|
||||||
|
{{ object }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</li>
|
||||||
</li>
|
{% endfor %}
|
||||||
<li class="timeline-inverted">
|
<li class="timeline-inverted">
|
||||||
<div class="timeline-badge bg-warning"><i class="fa fa-bed"></i></div>
|
<div class="timeline-badge bg-warning"><i class="fa fa-bed"></i></div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|
|
@ -5,7 +5,7 @@ from django.contrib.auth.mixins import PermissionRequiredMixin
|
||||||
from django.views.generic.detail import DetailView
|
from django.views.generic.detail import DetailView
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
from core.models import Child
|
from core.models import Child, DiaperChange
|
||||||
|
|
||||||
from .graphs import diaperchange_types, sleep_pattern, sleep_totals
|
from .graphs import diaperchange_types, sleep_pattern, sleep_totals
|
||||||
|
|
||||||
|
@ -70,6 +70,10 @@ class TimelineChildReport(PermissionRequiredMixin, DetailView):
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super(TimelineChildReport, self).get_context_data(**kwargs)
|
context = super(TimelineChildReport, self).get_context_data(**kwargs)
|
||||||
date = kwargs.get('date', timezone.now().date())
|
date = self.request.GET.get('date', timezone.now().date())
|
||||||
print(date)
|
|
||||||
|
changes = DiaperChange.objects.filter(child=self.object).filter(
|
||||||
|
time__contains=date).order_by('-time')
|
||||||
|
|
||||||
|
context['objects'] = changes
|
||||||
return context
|
return context
|
||||||
|
|
Loading…
Reference in New Issue