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 %}
<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 %}
<a href="{% url 'dashboard:dashboard-child' object.slug %}" class="btn btn-success">

View File

@ -1,5 +1,5 @@
{% extends 'babybuddy/page.html' %}
{% load i18n static thumbnail %}
{% load cards i18n static thumbnail %}
{% block title %}{% trans "Dashboard" %}{% endblock %}
@ -8,9 +8,14 @@
{% endblock %}
{% 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">
{% 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">
<a class="text-center" href="{% url 'core:child' object.slug %}">
{% if object.picture %}
@ -23,7 +28,7 @@
<div class="card-body text-center">
<h4 class="card-title">{{ object }}</h4>
<div class="card-text">
<p class="lead">
<p>
{% trans "Born" %} <span class="text-secondary">{{ object.birth_date }}</span><br/>
{% trans "Age" %} <span class="text-secondary">{{ object.birth_date|timesince }}</span>
</p>
@ -34,4 +39,6 @@
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}