mirror of https://github.com/snachodog/mybuddy.git
Further standardize report templates.
This commit is contained in:
parent
f89a8ce289
commit
6cfbba5f81
|
@ -17,12 +17,12 @@
|
|||
aria-expanded="false"><i class="fa fa-bar-chart" aria-hidden="true"></i> Reports</button>
|
||||
<div class="dropdown-menu" aria-labelledby="reports-dropdown">
|
||||
{% if perms.core.view_diaperchange %}
|
||||
<a class="dropdown-item" href="{% url 'reports:report-diaperchange-child' object.slug %}">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i> Changes</a>
|
||||
<h6 class="dropdown-header"><i class="fa fa-trash" aria-hidden="true"></i> Diaper Changes</h6>
|
||||
<a class="dropdown-item" href="{% url 'reports:report-diaperchange-child' object.slug %}">Change Types</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_sleep %}
|
||||
<a class="dropdown-item" href="{% url 'reports:report-sleep-child' object.slug %}">
|
||||
<i class="fa fa-bed" aria-hidden="true"></i> Sleep</a>
|
||||
<h6 class="dropdown-header"><i class="fa fa-bed" aria-hidden="true"></i> Sleep</h6>
|
||||
<a class="dropdown-item" href="{% url 'reports:report-sleep-child' object.slug %}">Sleep Patterns</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -46,7 +46,7 @@ def diaperchange_types(child):
|
|||
|
||||
layout_args = default_graph_layout_options()
|
||||
layout_args['barmode'] = 'stack'
|
||||
layout_args['title'] = 'Diaper Change types'
|
||||
layout_args['title'] = '<b>Diaper Change Types</b><br>{}'.format(child)
|
||||
layout_args['xaxis']['title'] = 'Date'
|
||||
layout_args['yaxis']['title'] = 'Number of changes'
|
||||
|
||||
|
@ -173,7 +173,7 @@ def sleep_times(child):
|
|||
|
||||
layout_args['barmode'] = 'stack'
|
||||
layout_args['hovermode'] = 'closest'
|
||||
layout_args['title'] = 'Sleep vs. wake times'
|
||||
layout_args['title'] = '<b>Sleep Patterns</b><br>{}'.format(child)
|
||||
layout_args['height'] = 600
|
||||
|
||||
layout_args['xaxis']['title'] = 'Date'
|
||||
|
|
|
@ -1,17 +1,6 @@
|
|||
{% extends 'reports/report_base.html' %}
|
||||
|
||||
{% block title %}Diaper Change Report - {{ object }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jumbotron jumbotron-fluid text-center">
|
||||
<h1 class="display-3">Diaper Change Reports</h1>
|
||||
<h2 class="text-muted">{{ object }}</h2>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{{ html|safe }}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block title %}Diaper Change Types - {{ object }}{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
{{ block.super }}
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
{% extends 'babyblotter/page.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
{{ html|safe }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
{% if debug %}
|
||||
<script src="{% static "babyblotter/js/graph.js" %}"></script>
|
||||
|
|
|
@ -1,17 +1,6 @@
|
|||
{% extends 'reports/report_base.html' %}
|
||||
|
||||
{% block title %}Sleep Reports - {{ object }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jumbotron jumbotron-fluid text-center">
|
||||
<h1 class="display-3">Sleep Reports</h1>
|
||||
<h2 class="text-muted">{{ object }}</h2>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{{ html|safe }}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block title %}Sleep Patterns - {{ object }}{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
{{ block.super }}
|
||||
|
|
Loading…
Reference in New Issue