mirror of https://github.com/snachodog/mybuddy.git
Add active timers to children dashboard (#73)
This commit is contained in:
parent
1798707271
commit
fc820eb242
|
@ -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">
|
||||||
|
|
|
@ -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,30 +8,37 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row row-cols-2">
|
||||||
{% for object in objects %}
|
<div class="col-lg-4 col-md-4 col-sm-12">
|
||||||
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-2 mb-4">
|
{% card_timer_list %}
|
||||||
<div class="card">
|
</div>
|
||||||
<a class="text-center" href="{% url 'core:child' object.slug %}">
|
<div class="col-lg-8 col-md-8 col-sm-12">
|
||||||
{% if object.picture %}
|
<div class="row">
|
||||||
{% thumbnail object.picture 300x300 upscale crop as thumb %}
|
{% for object in objects %}
|
||||||
<img src="{{ thumb.url }}" class="child-photo img-fluid" />
|
<div class="col-lg-4 col-md-6 col-sm-6 col-xs-2 mb-4">
|
||||||
{% else %}
|
<div class="card">
|
||||||
<img src="{% static 'babybuddy/img/core/child-placeholder.png' %}" class="child-photo img-fluid" />
|
<a class="text-center" href="{% url 'core:child' object.slug %}">
|
||||||
{% endif %}
|
{% if object.picture %}
|
||||||
</a>
|
{% thumbnail object.picture 300x300 upscale crop as thumb %}
|
||||||
<div class="card-body text-center">
|
<img src="{{ thumb.url }}" class="child-photo img-fluid" />
|
||||||
<h4 class="card-title">{{ object }}</h4>
|
{% else %}
|
||||||
<div class="card-text">
|
<img src="{% static 'babybuddy/img/core/child-placeholder.png' %}" class="child-photo img-fluid" />
|
||||||
<p class="lead">
|
{% endif %}
|
||||||
{% trans "Born" %} <span class="text-secondary">{{ object.birth_date }}</span><br/>
|
</a>
|
||||||
{% trans "Age" %} <span class="text-secondary">{{ object.birth_date|timesince }}</span>
|
<div class="card-body text-center">
|
||||||
</p>
|
<h4 class="card-title">{{ object }}</h4>
|
||||||
{% include 'dashboard/child_button_group.html' %}
|
<div class="card-text">
|
||||||
|
<p>
|
||||||
|
{% trans "Born" %} <span class="text-secondary">{{ object.birth_date }}</span><br/>
|
||||||
|
{% trans "Age" %} <span class="text-secondary">{{ object.birth_date|timesince }}</span>
|
||||||
|
</p>
|
||||||
|
{% include 'dashboard/child_button_group.html' %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue