Add active timers to children dashboard (#73)

This commit is contained in:
Christopher C. Wells 2020-01-04 06:14:40 -08:00
parent 1798707271
commit fc820eb242
2 changed files with 30 additions and 23 deletions

View File

@ -1,6 +1,6 @@
{% load i18n %} {% load i18n %}
<div class="child-actions btn-group btn-group-lg center-block" role="group" aria-label="{% trans "Child actions" %}"> <div class="child-actions btn-group btn-group-md center-block" role="group" aria-label="{% trans "Child actions" %}">
{% if perms.core.view_child %} {% if perms.core.view_child %}
<a href="{% url 'dashboard:dashboard-child' object.slug %}" class="btn btn-success"> <a href="{% url 'dashboard:dashboard-child' object.slug %}" class="btn btn-success">

View File

@ -1,5 +1,5 @@
{% extends 'babybuddy/page.html' %} {% extends 'babybuddy/page.html' %}
{% load i18n static thumbnail %} {% load cards i18n static thumbnail %}
{% block title %}{% trans "Dashboard" %}{% endblock %} {% block title %}{% trans "Dashboard" %}{% endblock %}
@ -8,9 +8,14 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="row row-cols-2">
<div class="col-lg-4 col-md-4 col-sm-12">
{% card_timer_list %}
</div>
<div class="col-lg-8 col-md-8 col-sm-12">
<div class="row"> <div class="row">
{% for object in objects %} {% for object in objects %}
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-2 mb-4"> <div class="col-lg-4 col-md-6 col-sm-6 col-xs-2 mb-4">
<div class="card"> <div class="card">
<a class="text-center" href="{% url 'core:child' object.slug %}"> <a class="text-center" href="{% url 'core:child' object.slug %}">
{% if object.picture %} {% if object.picture %}
@ -23,7 +28,7 @@
<div class="card-body text-center"> <div class="card-body text-center">
<h4 class="card-title">{{ object }}</h4> <h4 class="card-title">{{ object }}</h4>
<div class="card-text"> <div class="card-text">
<p class="lead"> <p>
{% trans "Born" %} <span class="text-secondary">{{ object.birth_date }}</span><br/> {% trans "Born" %} <span class="text-secondary">{{ object.birth_date }}</span><br/>
{% trans "Age" %} <span class="text-secondary">{{ object.birth_date|timesince }}</span> {% trans "Age" %} <span class="text-secondary">{{ object.birth_date|timesince }}</span>
</p> </p>
@ -34,4 +39,6 @@
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
</div>
</div>
{% endblock %} {% endblock %}