mirror of https://github.com/snachodog/mybuddy.git
ci: add djlint to ci (#763)
* ci: add djlint to ci * lint: all django templates
This commit is contained in:
parent
ae76ef3606
commit
f30479db42
1
Pipfile
1
Pipfile
|
@ -34,4 +34,5 @@ mkdocs = "*"
|
|||
mkdocs-material = "*"
|
||||
tblib = "*"
|
||||
black = "*"
|
||||
djlint = "*"
|
||||
pysnooper = "*"
|
||||
|
|
|
@ -189,7 +189,8 @@
|
|||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="css/animation.css"><!--[if IE 7]><link rel="stylesheet" href="css/" + font.fontname + "-ie7.css"><![endif]-->
|
||||
<link rel="stylesheet" href="css/animation.css">
|
||||
<!--[if IE 7]><link rel="stylesheet" href="css/" + font.fontname + "-ie7.css"><![endif]-->
|
||||
<script>
|
||||
function toggleCodes(on) {
|
||||
var obj = document.getElementById('icons');
|
||||
|
@ -204,9 +205,12 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="container header">
|
||||
<h1>babybuddy <small>font demo</small></h1>
|
||||
<h1>
|
||||
babybuddy <small>font demo</small>
|
||||
</h1>
|
||||
<label class="switch">
|
||||
<input type="checkbox" onclick="toggleCodes(this.checked)">show codes
|
||||
<input type="checkbox" onclick="toggleCodes(this.checked)">
|
||||
show codes
|
||||
</label>
|
||||
</div>
|
||||
<div class="container" id="icons">
|
||||
|
@ -356,6 +360,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container footer">Generated by <a href="https://fontello.com">fontello.com</a></div>
|
||||
<div class="container footer">
|
||||
Generated by <a href="https://fontello.com">fontello.com</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{% extends "admin/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ title }} | {% trans "Database Admin"%}{% endblock %}
|
||||
|
||||
{% block branding %}
|
||||
<h1 id="site-name"><a href="{% url 'admin:index' %}">{% trans "Database Admin"%}</a></h1>
|
||||
{% block title %}
|
||||
{{ title }} | {% trans "Database Admin" %}
|
||||
{% endblock %}
|
||||
{% block branding %}
|
||||
<h1 id="site-name">
|
||||
<a href="{% url 'admin:index' %}">{% trans "Database Admin" %}</a>
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav-global %}{% endblock %}
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% get_current_locale as LOCALE %}
|
||||
{% get_current_timezone as TIMEZONE %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-bs-theme="dark">
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block title %}{% endblock %} | Baby Buddy</title>
|
||||
<title>
|
||||
{% block title %}{% endblock %}
|
||||
| Baby Buddy</title>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{% static "babybuddy/root/apple-touch-icon.png" %}?v=20211218" />
|
||||
<link rel="apple-touch-startup-image" href="{% static "babybuddy/root/apple-touch-startup-image.png" %}?v=20211218" />
|
||||
<link rel="icon" type="image/svg+xml" href="{% static "babybuddy/root/favicon.svg" %}?v=20210925" />
|
||||
|
@ -24,29 +25,25 @@
|
|||
<meta name="msapplication-starturl" content="/">
|
||||
<meta name="msapplication-TileColor" content="#37abe9" />
|
||||
<meta name="theme-color" content="#37abe9" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{% block nav %}{% endblock %}
|
||||
|
||||
{% block breadcrumb_nav %}
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
</head>
|
||||
<body>
|
||||
{% block nav %}{% endblock %}
|
||||
{% block breadcrumb_nav %}
|
||||
<nav aria-label="breadcrumb" role="navigation">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href={% url "babybuddy:root-router" %}>{% trans "Home" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href={% url "babybuddy:root-router" %}>{% trans "Home" %}</a>
|
||||
</li>
|
||||
{% block breadcrumbs %}{% endblock %}
|
||||
</ol>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
{% block page %}{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
{% block page %}{% endblock %}
|
||||
<script src="{% static "babybuddy/js/vendor.js" %}"></script>
|
||||
<script src="{% static "babybuddy/js/app.js" %}"></script>
|
||||
{% if user.is_authenticated %}
|
||||
<script>BabyBuddy.PullToRefresh.init()</script>
|
||||
{% endif %}
|
||||
|
||||
{% block javascript %}{% endblock %}
|
||||
</body>
|
||||
{% if user.is_authenticated %}<script>BabyBuddy.PullToRefresh.init()</script>{% endif %}
|
||||
{% block javascript %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{% load i18n widget_tweaks %}
|
||||
|
||||
<form id="filter_form" role="form" action="" method="get" class="collapse{% if request.GET.filtered %} show{% endif %}">
|
||||
<form id="filter_form"
|
||||
role="form"
|
||||
action=""
|
||||
method="get"
|
||||
class="collapse{% if request.GET.filtered %} show{% endif %}">
|
||||
<div class="form-group form-row">
|
||||
{% for field in filter.form %}
|
||||
<label for="id_{{ field.name }}" class="col-xs-2 col-sm-auto col-form-label col-form-label-sm">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
<label for="id_{{ field.name }}"
|
||||
class="col-xs-2 col-sm-auto col-form-label col-form-label-sm">{{ field.label }}</label>
|
||||
<div class="col-xs-10 col-sm-auto">
|
||||
{% if 'choice' or 'boolean' in field|field_type %}
|
||||
{{ field|add_class:"form-select form-select-sm" }}
|
||||
|
@ -19,16 +21,13 @@
|
|||
<a href="{{ request.path }}" class="btn btn-sm btn-error">{% trans "Reset" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="filtered" value="1"/>
|
||||
<input type="hidden" name="filtered" value="1" />
|
||||
</form>
|
||||
|
||||
<p>
|
||||
<a class="btn btn btn-sm"
|
||||
data-bs-toggle="collapse"
|
||||
href="#filter_form"
|
||||
role="button"
|
||||
aria-expanded="false"
|
||||
aria-controls="filter_form">
|
||||
{% trans "Filters" %}
|
||||
</a>
|
||||
aria-controls="filter_form">{% trans "Filters" %}</a>
|
||||
</p>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{% load i18n widget_tweaks %}
|
||||
|
||||
{# Load any form-javascript files #}
|
||||
{{ form.media.js }}
|
||||
<div class="container-fluid pb-5">
|
||||
|
@ -7,9 +6,7 @@
|
|||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
{{ field.widget }}
|
||||
<div class="row">
|
||||
{% include 'babybuddy/form_field.html' %}
|
||||
</div>
|
||||
<div class="row">{% include 'babybuddy/form_field.html' %}</div>
|
||||
{% endfor %}
|
||||
<button type="submit" class="submit-primary btn btn-primary btn-lg">{% trans "Submit" %}</button>
|
||||
</form>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% load widget_tweaks %}
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="id_{{ field.name }}" class="col-sm-2 col-form-label{% if field|field_type == 'booleanfield' %} boolean-label{% endif %}">
|
||||
<label for="id_{{ field.name }}"
|
||||
class="col-sm-2 col-form-label{% if field|field_type == 'booleanfield' %} boolean-label{% endif %}">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
<div class="col-sm-10{% if field|widget_type == 'childradioselect' %} overflow-auto"{% endif %}">
|
||||
|
@ -11,9 +11,7 @@
|
|||
{% else %}
|
||||
{{ field|add_class:"btn-check" }}
|
||||
{% endif %}
|
||||
<label for="id_{{ field.name }}" class="btn btn-outline-light btn-no-hover">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
<label for="id_{{ field.name }}" class="btn btn-outline-light btn-no-hover">{{ field.label }}</label>
|
||||
{% elif 'choice' in field|field_type %}
|
||||
{% if field.errors %}
|
||||
{{ field|add_class:"form-select is-invalid" }}
|
||||
|
@ -28,10 +26,14 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
{% if field.help_text %}
|
||||
<div class="help-block"><small>{{ field.help_text }}</small></div>
|
||||
<div class="help-block">
|
||||
<small>{{ field.help_text }}</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if field.errors %}
|
||||
<div class="invalid-feedback">{% for error in field.errors %}{{ error }}{% endfor %}</div>
|
||||
<div class="invalid-feedback">
|
||||
{% for error in field.errors %}{{ error }}{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block messages %}
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert{% if message.tags %} alert-{{ message.tags }}{% endif %} alert-dismissible fade show" role="alert">
|
||||
<div class="alert{% if message.tags %} alert-{{ message.tags }}{% endif %} alert-dismissible fade show"
|
||||
role="alert">
|
||||
{{ message }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
<button type="button"
|
||||
class="btn-close"
|
||||
data-bs-dismiss="alert"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
@ -18,7 +21,7 @@
|
|||
{% endfor %}
|
||||
{% elif form.errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{% blocktrans trimmed%}
|
||||
{% blocktrans trimmed %}
|
||||
<strong>Error:</strong> Some fields have errors. See below
|
||||
for details.
|
||||
{% endblocktrans %}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
{% extends 'babybuddy/base.html' %}
|
||||
{% load babybuddy i18n static timers %}
|
||||
|
||||
{% block nav %}
|
||||
<nav class="navbar navbar-expand-md navbar bg-dark sticky-top">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand me-2" href={% url "babybuddy:root-router" %}>
|
||||
<img src="{% static "babybuddy/logo/icon-brand.png" %}" width="30" height="30"
|
||||
class="d-inline-block align-top" alt="">
|
||||
<img src="{% static "babybuddy/logo/icon-brand.png" %}" width="30" height="30" class="d-inline-block align-top" alt="">
|
||||
<span class="d-none d-lg-inline-block">
|
||||
<span class="text-primary">Baby</span> Buddy
|
||||
</span>
|
||||
|
@ -25,9 +23,9 @@
|
|||
aria-expanded="false"><i class="icon-2x icon-timeline" aria-hidden="true"></i>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-lg-none d-md-none d-flex ms-auto p-0 me-2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-lg-none d-md-none d-flex ms-auto p-0 me-2">
|
||||
{% quick_timer_nav %}
|
||||
<div class="dropdown show">
|
||||
<a class="text-success"
|
||||
|
@ -37,9 +35,9 @@
|
|||
data-bs-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"><i class="icon-2x icon-add" aria-hidden="true"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="nav-quick-add-link">
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end"
|
||||
aria-labelledby="nav-quick-add-link">
|
||||
{% if perms.core.add_diaperchange %}
|
||||
<a class="dropdown-item p-2" href="{% url 'core:diaperchange-add' %}">
|
||||
<i class="icon-diaperchange" aria-hidden="true"></i>
|
||||
|
@ -76,17 +74,19 @@
|
|||
{% trans "Tummy Time" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#navbar-app" aria-controls="navbar-app"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#navbar-app"
|
||||
aria-controls="navbar-app"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbar-app">
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbar-app">
|
||||
<ul class="navbar-nav me-auto">
|
||||
<li class="nav-item{% if request.path == '/' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'dashboard:dashboard' %}">
|
||||
|
@ -94,14 +94,12 @@
|
|||
{% trans "Dashboard" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item{% if request.path == '/timeline' %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'core:timeline' %}">
|
||||
<i class="icon-timeline" aria-hidden="true"></i>
|
||||
{% trans "Timeline" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a id="nav-children-menu-link"
|
||||
class="nav-link dropdown-toggle"
|
||||
|
@ -112,7 +110,6 @@
|
|||
{% trans "Children" %}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="nav-children-menu-link">
|
||||
|
||||
{% if perms.core.view_child %}
|
||||
<a class="dropdown-item{% if request.path == '/children/' %} active{% endif %}"
|
||||
href="{% url 'core:child-list' %}">
|
||||
|
@ -125,36 +122,32 @@
|
|||
href="{% url 'core:child-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Child" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_note %}
|
||||
{% endif %}
|
||||
{% if perms.core.view_note %}
|
||||
<a class="dropdown-item{% if request.path == '/notes/' %} active{% endif %}"
|
||||
href="{% url 'core:note-list' %}">
|
||||
<i class="icon-note" aria-hidden="true"></i>
|
||||
{% trans "Notes" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_note %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/notes/add/' %} active{% endif %}"
|
||||
{% endif %}
|
||||
{% if perms.core.add_note %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/notes/add/' %} active{% endif %}"
|
||||
href="{% url 'core:note-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Note" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a id="nav-measurements-menu-link"
|
||||
{% trans "Note" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a id="nav-measurements-menu-link"
|
||||
class="nav-link dropdown-toggle"
|
||||
href="#"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"><i class="icon-measurements" aria-hidden="true"></i>
|
||||
{% trans "Measurements" %}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="nav-measurements-menu-link">
|
||||
|
||||
{% trans "Measurements" %}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="nav-measurements-menu-link">
|
||||
{% if perms.core.view_bmi %}
|
||||
<a class="dropdown-item{% if request.path == '/bmi/' %} active{% endif %}"
|
||||
href="{% url 'core:bmi-list' %}">
|
||||
|
@ -166,159 +159,146 @@
|
|||
<a class="dropdown-item ps-5{% if request.path == '/bmi/add/' %} active{% endif %}"
|
||||
href="{% url 'core:bmi-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "BMI entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_head_circumference %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_head_circumference %}
|
||||
<a class="dropdown-item{% if request.path == '/head-circumference/' %} active{% endif %}"
|
||||
href="{% url 'core:head-circumference-list' %}">
|
||||
<i class="icon-head-circumference" aria-hidden="true"></i>
|
||||
{% trans "Head Circumference" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_head_circumference %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/head-circumference/add/' %} active{% endif %}"
|
||||
{% endif %}
|
||||
{% if perms.core.add_head_circumference %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/head-circumference/add/' %} active{% endif %}"
|
||||
href="{% url 'core:head-circumference-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Head Circumference entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_height %}
|
||||
{% trans "Head Circumference entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_height %}
|
||||
<a class="dropdown-item{% if request.path == '/height/' %} active{% endif %}"
|
||||
href="{% url 'core:height-list' %}">
|
||||
<i class="icon-height" aria-hidden="true"></i>
|
||||
{% trans "Height" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_height %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/height/add/' %} active{% endif %}"
|
||||
{% endif %}
|
||||
{% if perms.core.add_height %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/height/add/' %} active{% endif %}"
|
||||
href="{% url 'core:height-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Height entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_temperature %}
|
||||
{% trans "Height entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_temperature %}
|
||||
<a class="dropdown-item{% if request.path == '/temperature/' %} active{% endif %}"
|
||||
href="{% url 'core:temperature-list' %}">
|
||||
<i class="icon-temperature" aria-hidden="true"></i>
|
||||
{% trans "Temperature" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_temperature %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/temperature/add/' %} active{% endif %}"
|
||||
{% endif %}
|
||||
{% if perms.core.add_temperature %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/temperature/add/' %} active{% endif %}"
|
||||
href="{% url 'core:temperature-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Temperature reading" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_weight %}
|
||||
{% trans "Temperature reading" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_weight %}
|
||||
<a class="dropdown-item{% if request.path == '/weight/' %} active{% endif %}"
|
||||
href="{% url 'core:weight-list' %}">
|
||||
<i class="icon-weight" aria-hidden="true"></i>
|
||||
{% trans "Weight" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_weight %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/weight/add/' %} active{% endif %}"
|
||||
{% endif %}
|
||||
{% if perms.core.add_weight %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/weight/add/' %} active{% endif %}"
|
||||
href="{% url 'core:weight-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Weight entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a id="nav-activity-menu-link"
|
||||
{% trans "Weight entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a id="nav-activity-menu-link"
|
||||
class="nav-link dropdown-toggle"
|
||||
href="#"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"><i class="icon-activities" aria-hidden="true"></i>
|
||||
{% trans "Activities" %}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="nav-activity-menu-link">
|
||||
|
||||
{% trans "Activities" %}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="nav-activity-menu-link">
|
||||
{% if perms.core.view_diaperchange %}
|
||||
<a class="dropdown-item{% if request.path == '/changes/' %} active{% endif %}"
|
||||
href="{% url 'core:diaperchange-list' %}"><i class="icon-diaperchange"
|
||||
aria-hidden="true"></i>
|
||||
href="{% url 'core:diaperchange-list' %}"><i class="icon-diaperchange" aria-hidden="true"></i>
|
||||
{% trans "Changes" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_diaperchange %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/changes/add/' %} active{% endif %}"
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_diaperchange %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/changes/add/' %} active{% endif %}"
|
||||
href="{% url 'core:diaperchange-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Change" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_feeding %}
|
||||
<a class="dropdown-item{% if request.path == '/feedings/' %} active{% endif %}"
|
||||
{% trans "Change" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_feeding %}
|
||||
<a class="dropdown-item{% if request.path == '/feedings/' %} active{% endif %}"
|
||||
href="{% url 'core:feeding-list' %}"><i class="icon-feeding" aria-hidden="true"></i>
|
||||
{% trans "Feedings" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_feeding %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/feedings/add/' %} active{% endif %}"
|
||||
{% trans "Feedings" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_feeding %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/feedings/add/' %} active{% endif %}"
|
||||
href="{% url 'core:feeding-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Feeding" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_feeding %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/feedings/bottle/add/' %} active{% endif %}"
|
||||
{% trans "Feeding" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_feeding %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/feedings/bottle/add/' %} active{% endif %}"
|
||||
href="{% url 'core:bottle-feeding-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Bottle Feeding" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_pumping %}
|
||||
{% trans "Bottle Feeding" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_pumping %}
|
||||
<a class="dropdown-item{% if request.path == '/pumping/' %} active{% endif %}"
|
||||
href="{% url 'core:pumping-list' %}">
|
||||
<i class="icon-pumping" aria-hidden="true"></i>
|
||||
{% trans "Pumping" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_pumping %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/pumping/add/' %} active{% endif %}"
|
||||
{% endif %}
|
||||
{% if perms.core.add_pumping %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/pumping/add/' %} active{% endif %}"
|
||||
href="{% url 'core:pumping-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Pumping entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_sleep %}
|
||||
<a class="dropdown-item{% if request.path == '/sleep/' %} active{% endif %}"
|
||||
{% trans "Pumping entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_sleep %}
|
||||
<a class="dropdown-item{% if request.path == '/sleep/' %} active{% endif %}"
|
||||
href="{% url 'core:sleep-list' %}"><i class="icon-sleep" aria-hidden="true"></i>
|
||||
{% trans "Sleep" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_sleep %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/sleep/add/' %} active{% endif %}"
|
||||
{% trans "Sleep" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_sleep %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/sleep/add/' %} active{% endif %}"
|
||||
href="{% url 'core:sleep-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Sleep entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.view_tummytime %}
|
||||
<a class="dropdown-item{% if request.path == '/tummy-time/' %} active{% endif %}"
|
||||
href="{% url 'core:tummytime-list' %}"><i class="icon-tummytime"
|
||||
aria-hidden="true"></i>
|
||||
{% trans "Tummy Time" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_tummytime %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/tummy-time/add/' %} active{% endif %}"
|
||||
{% trans "Sleep entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.view_tummytime %}
|
||||
<a class="dropdown-item{% if request.path == '/tummy-time/' %} active{% endif %}"
|
||||
href="{% url 'core:tummytime-list' %}"><i class="icon-tummytime" aria-hidden="true"></i>
|
||||
{% trans "Tummy Time" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_tummytime %}
|
||||
<a class="dropdown-item ps-5{% if request.path == '/tummy-time/add/' %} active{% endif %}"
|
||||
href="{% url 'core:tummytime-add' %}"><i class="icon-add" aria-hidden="true"></i>
|
||||
{% trans "Tummy Time entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
{% if perms.core.view_timer %}
|
||||
{% trans "Tummy Time entry" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% if perms.core.view_timer %}
|
||||
{% timer_nav %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if request.user %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if request.user %}
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a id="nav-user-menu-link"
|
||||
|
@ -330,28 +310,22 @@
|
|||
<i class="icon-user" aria-hidden="true"></i>
|
||||
{% firstof user.get_full_name user.get_username %}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="nav-user-menu-link">
|
||||
<div class="dropdown-menu dropdown-menu-end"
|
||||
aria-labelledby="nav-user-menu-link">
|
||||
<h6 class="dropdown-header">{% trans "User" %}</h6>
|
||||
<a href="{% url 'babybuddy:user-settings' %}"
|
||||
class="dropdown-item">{% trans "Settings" %}</a>
|
||||
<a href="{% url 'babybuddy:user-password' %}"
|
||||
class="dropdown-item">{% trans "Password" %}</a>
|
||||
<a href="{% url 'babybuddy:user-settings' %}" class="dropdown-item">{% trans "Settings" %}</a>
|
||||
<a href="{% url 'babybuddy:user-password' %}" class="dropdown-item">{% trans "Password" %}</a>
|
||||
<a href="{% url 'babybuddy:user-add-device' %}" class="dropdown-item">{% trans "Add a device" %}</a>
|
||||
<form action="{% url 'babybuddy:logout' %}" role="form" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="dropdown-item">
|
||||
{% trans "Logout" %}
|
||||
</button>
|
||||
<button class="dropdown-item">{% trans "Logout" %}</button>
|
||||
</form>
|
||||
<h6 class="dropdown-header">{% trans "Site" %}</h6>
|
||||
<a href="{% url 'api:api-root' %}" class="dropdown-item">{% trans "API Browser" %}</a>
|
||||
{% if request.user.is_staff %}
|
||||
<a href="{% url 'babybuddy:site_settings' %}"
|
||||
class="dropdown-item">{% trans "Settings" %}</a>
|
||||
<a href="{% url 'babybuddy:user-list' %}"
|
||||
class="dropdown-item">{% trans "Users" %}</a>
|
||||
<a href="{% url 'admin:index' %}"
|
||||
class="dropdown-item">{% trans "Database Admin" %}</a>
|
||||
<a href="{% url 'babybuddy:site_settings' %}" class="dropdown-item">{% trans "Settings" %}</a>
|
||||
<a href="{% url 'babybuddy:user-list' %}" class="dropdown-item">{% trans "Users" %}</a>
|
||||
<a href="{% url 'admin:index' %}" class="dropdown-item">{% trans "Database Admin" %}</a>
|
||||
{% endif %}
|
||||
<h6 class="dropdown-header">{% trans "Support" %}</h6>
|
||||
<a href="https://github.com/babybuddy/babybuddy" class="dropdown-item">
|
||||
|
@ -362,8 +336,8 @@
|
|||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends 'babybuddy/nav-dropdown.html' %}
|
||||
{% load static timers %}
|
||||
|
||||
{% block page %}
|
||||
<div id="view-{{ request.resolver_match.view_name }}" class="container-fluid">
|
||||
<div id="view-{{ request.resolver_match.view_name }}"
|
||||
class="container-fluid">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-lg-12 mb-4">
|
||||
{% include 'babybuddy/messages.html' %}
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
{% load i18n babybuddy %}
|
||||
|
||||
{% if is_paginated %}
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination justify-content-center">
|
||||
|
||||
{% if page_obj.has_previous %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{% relative_url 'page' page_obj.previous_page_number %}" aria-label="Previous">
|
||||
<a class="page-link"
|
||||
href="{% relative_url 'page' page_obj.previous_page_number %}"
|
||||
aria-label="Previous">
|
||||
<i class="icon-angle-circled-left" aria-hidden="true"></i>
|
||||
<span class="visually-hidden">{% trans "Previous" %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for num in page_obj.paginator.page_range %}
|
||||
{% if num > page_obj.number|add:"-3" and num < page_obj.number|add:"3" %}
|
||||
<li class="page-item{% if num == page_obj.number %} active{% endif %}">
|
||||
|
@ -20,10 +19,11 @@
|
|||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if page_obj.has_next %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{% relative_url 'page' page_obj.next_page_number %}" aria-label="Next">
|
||||
<a class="page-link"
|
||||
href="{% relative_url 'page' page_obj.next_page_number %}"
|
||||
aria-label="Next">
|
||||
<i class="icon-angle-circled-right" aria-hidden="true"></i>
|
||||
<span class="visually-hidden">{% trans "Next" %}</span>
|
||||
</a>
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks babybuddy qr_code %}
|
||||
|
||||
{% block title %}{% trans "Add a device" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Add a device" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item">{% trans "User" %}</li>
|
||||
<li class="breadcrumb-item active">{% trans "Add a device" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Add a device" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<legend>{% trans "Authentication Methods" %}</legend>
|
||||
<fieldset>
|
||||
|
@ -20,16 +18,19 @@
|
|||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<samp>{{ user.settings.api_key }}</samp>
|
||||
<input type="submit" name="api_key_regenerate" value="{% trans "Regenerate" %}" class="btn btn-danger btn-xs" />
|
||||
<input type="submit"
|
||||
name="api_key_regenerate"
|
||||
value="{% trans "Regenerate" %}"
|
||||
class="btn btn-danger btn-xs" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">{% trans "Login QR code" %}</label>
|
||||
<div class="col-sm-10">
|
||||
<div style="display:inline-block;background-color:white;" data-qr-code-content="{{ qr_code_data }}">
|
||||
{% qr_from_text qr_code_data size="s" %}
|
||||
</div>
|
||||
<div style="display:inline-block;
|
||||
background-color:white"
|
||||
data-qr-code-content="{{ qr_code_data }}">{% qr_from_text qr_code_data size="s" %}</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete User" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete User" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'babybuddy:user-list' %}">{% trans "Users" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'babybuddy:user-list' %}">{% trans "Users" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">{{ object }}</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'babybuddy:user-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Unlock User" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Unlock User" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'babybuddy:user-list' %}">{% trans "Users" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'babybuddy:user-list' %}">{% trans "Users" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">{{ object }}</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Unlock" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to unlock <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to unlock <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Unlock" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'babybuddy:user-update' object.pk %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
<a href="{% url 'babybuddy:user-update' object.pk %}"
|
||||
class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load babybuddy i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if object %}
|
||||
{{ object }}
|
||||
|
@ -8,9 +7,10 @@
|
|||
{% trans "Create User" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'babybuddy:user-list' %}">{% trans "Users" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'babybuddy:user-list' %}">{% trans "Users" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item fw-bold">{{ object }}</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
|
@ -18,22 +18,20 @@
|
|||
<li class="breadcrumb-item active" aria-current="page">{% trans "Create User" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% user_is_locked object as is_locked %}
|
||||
{% if is_locked %}
|
||||
<div class="alert alert-danger">
|
||||
<div class="alert-heading h4">
|
||||
{% blocktrans %}User locked.{% endblocktrans %}
|
||||
</div>
|
||||
<a href="{% url 'babybuddy:user-unlock' object.id %}" class="btn btn-danger">
|
||||
{% blocktrans %}Unlock{% endblocktrans %}
|
||||
</a>
|
||||
<div class="alert-heading h4">{% blocktrans %}User locked.{% endblocktrans %}</div>
|
||||
<a href="{% url 'babybuddy:user-unlock' object.id %}"
|
||||
class="btn btn-danger">{% blocktrans %}Unlock{% endblocktrans %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Create User" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load babybuddy bootstrap i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Users" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Users" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Users" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Users</h1>
|
||||
{% include 'babybuddy/filter.html' %}
|
||||
|
@ -40,19 +39,18 @@
|
|||
<td class="text-center">{{ is_locked|bool_icon }}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="Actions">
|
||||
|
||||
{% if perms.admin.change_user %}
|
||||
<a href="{% url 'babybuddy:user-update' object.id %}" class="btn btn-warning">
|
||||
<a href="{% url 'babybuddy:user-update' object.id %}"
|
||||
class="btn btn-warning">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.admin.delete_user %}
|
||||
<a href="{% url 'babybuddy:user-delete' object.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'babybuddy:user-delete' object.id %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -65,11 +63,9 @@
|
|||
</table>
|
||||
</div>
|
||||
{% include 'babybuddy/paginator.html' %}
|
||||
|
||||
{% if perms.admin.add_user %}
|
||||
<a href="{% url 'babybuddy:user-add' %}" class="btn btn-sm btn-success">
|
||||
<i class="icon-add" aria-hidden="true"></i> {% trans "Create User" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Change Password" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item">{% trans "User" %}</li>
|
||||
<li class="breadcrumb-item active">{% trans "Change Password" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Change Password" %}</h1>
|
||||
{% include 'babybuddy/form.html' %}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks babybuddy %}
|
||||
|
||||
{% block title %}{% trans "User Settings" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "User Settings" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item">{% trans "User" %}</li>
|
||||
<li class="breadcrumb-item active">{% trans "Settings" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "User Settings" %}</h1>
|
||||
<div class="container-fluid">
|
||||
|
@ -81,12 +80,18 @@
|
|||
<label class="col-sm-2 col-form-label">{% trans "Key" %}</label>
|
||||
<div class="col-sm-10">
|
||||
<samp>{{ user.settings.api_key }}</samp>
|
||||
<input type="submit" name="api_key_regenerate" value="{% trans "Regenerate" %}" class="btn btn-danger btn-xs" />
|
||||
<input type="submit"
|
||||
name="api_key_regenerate"
|
||||
value="{% trans "Regenerate" %}"
|
||||
class="btn btn-danger btn-xs" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="next" value="{% url 'babybuddy:user-settings' %}" />
|
||||
<input type="submit" name="save_settings" value="{% trans "Submit" %}" class="btn btn-primary">
|
||||
<input type="submit"
|
||||
name="save_settings"
|
||||
value="{% trans "Submit" %}"
|
||||
class="btn btn-primary">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Welcome!" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Welcome!" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Welcome!" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="px-2 py-5 bg rounded-3">
|
||||
<div class="container-fluid">
|
||||
<h1 class="display-3">{% trans "Welcome to Baby Buddy!" %}</h1>
|
||||
<p class="lead">
|
||||
{% blocktrans trimmed%}
|
||||
{% blocktrans trimmed %}
|
||||
Learn about and predict baby's needs without (<em>as much</em>)
|
||||
guess work by using Baby Buddy to track —
|
||||
{% endblocktrans %}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Site Settings" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Site Settings" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item">{% trans "Site" %}</li>
|
||||
<li class="breadcrumb-item active">{% trans "Settings" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Site Settings" %}</h1>
|
||||
{% include 'babybuddy/form.html' %}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends 'error/base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}400 {% trans "Bad Request" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
400 {% trans "Bad Request" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<h1>400 {% trans "Bad Request" %}</h1>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends 'error/base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}403 {% trans "Permission Denied" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
403 {% trans "Permission Denied" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<h1>403 {% trans "Permission Denied" %}</h1>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
{% extends 'error/base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}403 {{ title }}{% endblock %}
|
||||
|
||||
{% block breadcrumb_nav %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>403: {{ title }}</h1>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ main }} {{ reason }}
|
||||
</div>
|
||||
<div class="alert alert-danger" role="alert">{{ main }} {{ reason }}</div>
|
||||
<div class="px-2 py-5 bg rounded-3">
|
||||
<div class="container-fluid">
|
||||
<h2>{% trans "How to Fix" %}</h2>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends 'error/base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}404 {% trans "Page Not Found" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
404 {% trans "Page Not Found" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<h1>404 {% trans "Page Not Found" %}</h1>
|
||||
<div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends 'error/base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}500 {% trans "Server Error" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
500 {% trans "Server Error" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<h1>500 {% trans "Server Error" %}</h1>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{% extends 'babybuddy/base.html' %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block breadcrumb_nav %}{% endblock %}
|
||||
|
||||
{% block page %}
|
||||
<div class="container mt-2 mt-lg-4">
|
||||
<div class="row justify-content-md-center">
|
||||
|
@ -11,7 +9,8 @@
|
|||
<img class="d-inline-block align-self-top me-2 mt-2 text-center" src="{% static "babybuddy/logo/logo-sad.png" %}" width="65" height="65">
|
||||
<div class="p-2 flex-grow-1">
|
||||
{% block content %}{% endblock %}
|
||||
<a href="{% url "babybuddy:root-router" %}" class="btn btn-outline-primary mt-3">{% trans "Return to Baby Buddy" %}</a>
|
||||
<a href="{% url "babybuddy:root-router" %}"
|
||||
class="btn btn-outline-primary mt-3">{% trans "Return to Baby Buddy" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends 'error/base.html' %}
|
||||
{% load babybuddy i18n %}
|
||||
|
||||
{% block title %}403 {% trans "Too Many Login Attempts" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
403 {% trans "Too Many Login Attempts" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<h1>{% axes_lockout_message %}</h1>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{% extends "babybuddy/base.html" %}
|
||||
{% load static widget_tweaks %}
|
||||
|
||||
{% block breadcrumb_nav %}{% endblock %}
|
||||
|
||||
{% block page %}
|
||||
<div id="view-{{ request.resolver_match.view_name }}" class="container">
|
||||
<div class="text-center pt-3">
|
||||
|
@ -16,5 +14,5 @@
|
|||
{% include 'babybuddy/messages.html' %}
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,36 +1,23 @@
|
|||
{% extends "registration/base.html" %}
|
||||
{% load i18n static widget_tweaks %}
|
||||
|
||||
{% block title %}Login{% endblock %}
|
||||
{% block content %}
|
||||
<form class="login-form" method="post" action="{% url 'babybuddy:login' %}">
|
||||
{% csrf_token %}
|
||||
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
|
||||
<label class="visually-hidden" for="username-input-group">
|
||||
{{ form.username.label }}
|
||||
</label>
|
||||
<label class="visually-hidden" for="username-input-group">{{ form.username.label }}</label>
|
||||
<div class="input-group mb-3 fade-in">
|
||||
<span class="input-group-text text-body-secondary"><i class="icon-user" aria-hidden="true"></i></span>
|
||||
{% render_field form.username name='username' class+='form-control' id='username-input-group' placeholder=form.username.label %}
|
||||
</div>
|
||||
|
||||
<label class="visually-hidden" for="password-input-group">
|
||||
{{ form.password.label }}
|
||||
</label>
|
||||
<label class="visually-hidden" for="password-input-group">{{ form.password.label }}</label>
|
||||
<div class="input-group mb-3 fade-in">
|
||||
<span class="input-group-text text-body-secondary"><i class="icon-lock" aria-hidden="true"></i></span>
|
||||
{% render_field form.password name='password' class+='form-control' id='password-input-group' placeholder=form.password.label %}
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary w-100 fade-in" type="submit" name="login">
|
||||
{% trans "Login" %}
|
||||
</button>
|
||||
<button class="btn btn-primary w-100 fade-in" type="submit" name="login">{% trans "Login" %}</button>
|
||||
</form>
|
||||
|
||||
<div class="bg-faded text-center px-4 py-3 rounded-bottom">
|
||||
<a href="{% url 'babybuddy:password_reset' %}" name="reset">
|
||||
{% trans "Forgot your password?" %}</a>
|
||||
<a href="{% url 'babybuddy:password_reset' %}" name="reset">{% trans "Forgot your password?" %}</a>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,12 +1,13 @@
|
|||
{% extends "registration/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Password Reset Successfully!" %}{% endblock %}
|
||||
{% block title %}
|
||||
{% trans "Password Reset Successfully!" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<div class="text-center mb-0">
|
||||
<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>
|
||||
<p class="mb-0"><a href="{{ login_url }}">{% trans "Log in" %}</a></p>
|
||||
<p class="mb-0">
|
||||
<a href="{{ login_url }}">{% trans "Log in" %}</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
|
@ -1,12 +1,11 @@
|
|||
{% extends "registration/base.html" %}
|
||||
{% load i18n static widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Password Reset" %}{% endblock %}
|
||||
{% block title %}
|
||||
{% trans "Password Reset" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{% if form.errors %}
|
||||
<div class="alert alert-danger">
|
||||
<p class="mb-0">
|
||||
|
@ -17,30 +16,19 @@
|
|||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="text-center mb-4">
|
||||
<p class="mb-0">{% trans "Enter your new password in each field below." %}</p>
|
||||
</div>
|
||||
|
||||
<label class="visually-hidden" for="password1-input-group">
|
||||
{{ form.new_password1.label }}
|
||||
</label>
|
||||
<label class="visually-hidden" for="password1-input-group">{{ form.new_password1.label }}</label>
|
||||
<div class="input-group mb-3 fade-in">
|
||||
<span class="input-group-text text-body-secondary"><i class="icon-lock" aria-hidden="true"></i></span>
|
||||
{% render_field form.new_password1 name='new_password1' class+='form-control' id='password1-input-group' %}
|
||||
</div>
|
||||
|
||||
<label class="visually-hidden" for="password2-input-group">
|
||||
{{ form.new_password2.label }}
|
||||
</label>
|
||||
<label class="visually-hidden" for="password2-input-group">{{ form.new_password2.label }}</label>
|
||||
<div class="input-group mb-3 fade-in">
|
||||
<span class="input-group-text text-body-secondary"><i class="icon-lock" aria-hidden="true"></i></span>
|
||||
{% render_field form.new_password2 name='new_password2' class+='form-control' id='password2-input-group' %}
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary w-100 fade-in" type="submit" name="reset">
|
||||
{% trans "Reset Password" %}
|
||||
</button>
|
||||
<button class="btn btn-primary w-100 fade-in" type="submit" name="reset">{% trans "Reset Password" %}</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
|
@ -1,12 +1,13 @@
|
|||
{% extends "registration/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Reset Email Sent" %}{% endblock %}
|
||||
{% block title %}
|
||||
{% trans "Reset Email Sent" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<div class="text-center mb-0">
|
||||
<p>
|
||||
{% blocktrans trimmed %}We've emailed you instructions for setting your
|
||||
{% blocktrans trimmed %}
|
||||
We've emailed you instructions for setting your
|
||||
password, if an account exists with the email you entered. You
|
||||
should receive them shortly.
|
||||
{% endblocktrans %}
|
||||
|
@ -18,5 +19,4 @@
|
|||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
|
@ -1,12 +1,10 @@
|
|||
{% load i18n %}{% autoescape off %}
|
||||
{% blocktranslate %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktranslate %}
|
||||
|
||||
{% translate "Please go to the following page and choose a new password:" %}
|
||||
{% block reset_link %}
|
||||
{{ protocol }}://{{ domain }}{% url 'babybuddy:password_reset_confirm' uidb64=uid token=token %}
|
||||
{% endblock %}
|
||||
{% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }}
|
||||
|
||||
{% translate "Thanks for using Baby Buddy!" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% autoescape off %}
|
||||
{% blocktranslate %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktranslate %}
|
||||
{% translate "Please go to the following page and choose a new password:" %}
|
||||
{% block reset_link %}
|
||||
{{ protocol }}://{{ domain }}{% url 'babybuddy:password_reset_confirm' uidb64=uid token=token %}
|
||||
{% endblock %}
|
||||
{% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }}
|
||||
{% translate "Thanks for using Baby Buddy!" %}
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{% extends "registration/base.html" %}
|
||||
{% load i18n static widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Forgot Password" %}{% endblock %}
|
||||
{% block title %}
|
||||
{% trans "Forgot Password" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<div class="text-center mb-4">
|
||||
<p class="mb-0">
|
||||
{% blocktrans trimmed %}
|
||||
|
@ -13,21 +13,13 @@
|
|||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<label class="visually-hidden" for="email-input-group">
|
||||
{{ form.email.label }}
|
||||
</label>
|
||||
<label class="visually-hidden" for="email-input-group">{{ form.email.label }}</label>
|
||||
<div class="input-group mb-3 fade-in">
|
||||
<span class="input-group-text text-body-secondary"><i class="icon-mail" aria-hidden="true"></i></span>
|
||||
{% render_field form.email name='email' class+='form-control' id='email-input-group' placeholder=form.email.label %}
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary w-100 fade-in" type="submit" name="reset">
|
||||
{% trans "Reset Password" %}
|
||||
</button>
|
||||
<button class="btn btn-primary w-100 fade-in" type="submit" name="reset">{% trans "Reset Password" %}</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a BMI Entry" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a BMI Entry" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:bmi-list' %}">{% trans "BMI" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:bmi-list' %}">{% trans "BMI" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:bmi-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if object %}
|
||||
{{ object }}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a BMI Entry" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:bmi-list' %}">{% trans "BMI" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:bmi-list' %}">{% trans "BMI" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add a BMI Entry" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a BMI Entry" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "BMI" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "BMI" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "BMI" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "BMI" %}
|
||||
|
@ -34,34 +33,35 @@
|
|||
{% for bmi in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_bmi %}
|
||||
<a href="{% url 'core:bmi-update' bmi.id %}" class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_bmi %}
|
||||
<a href="{% url 'core:bmi-delete' bmi.id %}" class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ bmi.date }}</th>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' bmi.child.slug %}">{{ bmi.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' bmi.child.slug %}">{{ bmi.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ bmi.bmi }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=bmi.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=bmi.tags.all %}</td>
|
||||
</tr>
|
||||
{% if bmi.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="5"><i class="icon-note me-2" aria-hidden="true"></i>{{ bmi.notes }}</td>
|
||||
<td colspan="5">
|
||||
<i class="icon-note me-2" aria-hidden="true"></i>{{ bmi.notes }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
|
|
|
@ -1,19 +1,24 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Child" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Child" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:child-list' %}">{% trans "Children" %}</a></li>
|
||||
<li class="breadcrumb-item fw-bold"><a href="{% url 'core:child' object.slug %}">{{ object }}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:child-list' %}">{% trans "Children" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item fw-bold">
|
||||
<a href="{% url 'core:child' object.slug %}">{{ object }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.confirm_name.id_for_label }}">
|
||||
|
@ -24,9 +29,7 @@
|
|||
{% else %}
|
||||
{{ form.confirm_name|add_class:"form-control" }}
|
||||
{% endif %}
|
||||
{% if form.confirm_name.errors %}
|
||||
<div class="invalid-feedback">{{ form.confirm_name.errors.0 }}</div>
|
||||
{% endif %}
|
||||
{% if form.confirm_name.errors %}<div class="invalid-feedback">{{ form.confirm_name.errors.0 }}</div>{% endif %}
|
||||
</div>
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:child-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load breadcrumb duration i18n imagekit static %}
|
||||
|
||||
{% block title %}{{ object }}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:child-list' %}">{% trans "Children" %}</a></li>
|
||||
<li class="breadcrumb-item fw-bold">
|
||||
{% child_quick_switch object 'core:child' %}
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:child-list' %}">{% trans "Children" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item fw-bold">{% child_quick_switch object 'core:child' %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="child-detail-column">
|
||||
<div class="row">
|
||||
|
@ -18,11 +15,13 @@
|
|||
{% thumbnail '150x150' object.picture as thumb %}
|
||||
<img src="{{ thumb.url }}" class="child-photo img-fluid rounded-circle" />
|
||||
{% else %}
|
||||
<img src="{% static 'babybuddy/img/core/child-placeholder.png' %}" class="child-photo img-fluid rounded-circle" />
|
||||
<img src="{% static 'babybuddy/img/core/child-placeholder.png' %}"
|
||||
class="child-photo img-fluid rounded-circle" />
|
||||
{% endif %}
|
||||
<div class="child-name display-4">{{ object }}</div>
|
||||
<p class="lead">
|
||||
{% trans "Born" %} <span class="text-secondary">{{ object.birth_datetime }}</span><br/>
|
||||
{% trans "Born" %} <span class="text-secondary">{{ object.birth_datetime }}</span>
|
||||
<br />
|
||||
{% trans "Age" %} <span class="text-secondary">{{ object.birth_datetime|child_age_string }}</span>
|
||||
</p>
|
||||
{% include 'dashboard/child_button_group.html' %}
|
||||
|
@ -30,8 +29,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 offset-lg-4 col-md-6 offset-md-6">
|
||||
{% include 'timeline/_timeline.html' %}
|
||||
<div class="col-lg-8 offset-lg-4 col-md-6 offset-md-6">{% include 'timeline/_timeline.html' %}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if object %}
|
||||
{{ object }}
|
||||
|
@ -8,21 +7,25 @@
|
|||
{% trans "Add a Child" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:child-list' %}">{% trans "Children" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:child-list' %}">{% trans "Children" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item fw-bold"><a href="{% url 'core:child' object.slug %}">{{ object }}</a></li>
|
||||
<li class="breadcrumb-item fw-bold">
|
||||
<a href="{% url 'core:child' object.slug %}">{{ object }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add a Child" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Child" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n imagekit static widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Children" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Children" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Children" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Children" %}
|
||||
|
@ -21,7 +20,9 @@
|
|||
<table class="table table-borderless table-striped table-hover align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><i class="icon-camera" aria-hidden="true"></i></th>
|
||||
<th>
|
||||
<i class="icon-camera" aria-hidden="true"></i>
|
||||
</th>
|
||||
<th>{% trans "First Name" %}</th>
|
||||
<th>{% trans "Last Name" %}</th>
|
||||
<th>{% trans "Birth Date" %}</th>
|
||||
|
@ -35,7 +36,10 @@
|
|||
{% if child.picture %}
|
||||
{% include "core/child_thumbnail.html" %}
|
||||
{% else %}
|
||||
<img src="{% static 'babybuddy/img/core/child-placeholder.png' %}" width="40" height="40" class="img-fluid rounded-circle" />
|
||||
<img src="{% static 'babybuddy/img/core/child-placeholder.png' %}"
|
||||
width="40"
|
||||
height="40"
|
||||
class="img-fluid rounded-circle" />
|
||||
{% endif %}
|
||||
</td>
|
||||
<th scope="row">
|
||||
|
@ -44,20 +48,21 @@
|
|||
<td>{{ child.last_name }}</td>
|
||||
<td>{{ child.birth_datetime }}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_child %}
|
||||
<a href="{% url 'core:child-update' child.slug %}" class="btn btn-warning">
|
||||
<a href="{% url 'core:child-update' child.slug %}"
|
||||
class="btn btn-warning">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_child %}
|
||||
<a href="{% url 'core:child-delete' child.slug %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:child-delete' child.slug %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,18 +1,27 @@
|
|||
{% load i18n %}
|
||||
|
||||
<a href="{% url 'core:child' current_child.slug %}">{{ current_child }}</a>
|
||||
{% if children.count > 0 %}
|
||||
<a href="#" class="ms-1 ps-1 pe-1 dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<a href="#"
|
||||
class="ms-1 ps-1 pe-1 dropdown-toggle-split"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
<span class="visually-hidden">{% trans 'Switch child' %}</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 16 16">
|
||||
<path d="M3.626 6.832A.5.5 0 0 1 4 6h8a.5.5 0 0 1 .374.832l-4 4.5a.5.5 0 0 1-.748 0l-4-4.5z"></path>
|
||||
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 0a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2z"></path>
|
||||
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 0a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2z">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-start">
|
||||
<h6 class="dropdown-header">{% trans "Switch to…" %}</h6>
|
||||
{% for child in children %}
|
||||
<a class="dropdown-item d-flex align-items-center" href="{% url target_url child.slug %}">
|
||||
<a class="dropdown-item d-flex align-items-center"
|
||||
href="{% url target_url child.slug %}">
|
||||
{% include "core/child_thumbnail.html" %}
|
||||
<span class="text-wrap ms-2">{{ child }}</span>
|
||||
</a>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{% with id=widget.attrs.id %}
|
||||
<div{% if id %} id="{{ id }}"{% endif %} class="btn-group btn-group-toggle" data-bs-toggle="buttons">
|
||||
<div {% if id %}id="{{ id }}"{% endif %}
|
||||
class="btn-group btn-group-toggle"
|
||||
data-bs-toggle="buttons">
|
||||
{% for group, options, index in widget.optgroups %}
|
||||
{% for option in options %}
|
||||
{% if option.value != '' %}
|
||||
|
@ -7,4 +9,5 @@
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>{% endwith %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% load imagekit static %}
|
||||
|
||||
{% include "django/forms/widgets/input.html" %}
|
||||
<label{% if widget.attrs.id %} for="{{ widget.attrs.id }}"{% endif %} class="btn btn-outline-light btn-no-hover">
|
||||
<label {% if widget.attrs.id %}for="{{ widget.attrs.id }}"{% endif %}
|
||||
class="btn btn-outline-light btn-no-hover">
|
||||
{% include "core/child_thumbnail.html" with child=widget %}
|
||||
{{ widget.label }}
|
||||
</label>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{% load imagekit static %}
|
||||
|
||||
{% if child.picture %}
|
||||
{% thumbnail '40x40' child.picture as thumb %}
|
||||
<img src="{{ thumb.url }}" class="img-fluid rounded-circle" />
|
||||
{% else %}
|
||||
{% else %}
|
||||
<img src="{% static 'babybuddy/img/core/child-placeholder.png' %}"
|
||||
width="40" height="40" class="img-fluid rounded-circle" />
|
||||
{% endif %}
|
||||
width="40"
|
||||
height="40"
|
||||
class="img-fluid rounded-circle" />
|
||||
{% endif %}
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Diaper Change" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Diaper Change" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:diaperchange-list' %}">{% trans "Diaper Changes" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:diaperchange-list' %}">{% trans "Diaper Changes" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:diaperchange-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if request.resolver_match.url_name == 'diaperchange-update' %}
|
||||
{% trans "Update a Diaper Change" %}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a Diaper Change" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:diaperchange-list' %}">{% trans "Diaper Changes" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:diaperchange-list' %}">{% trans "Diaper Changes" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Diaper Change" %}</h1>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load bootstrap datetime i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Diaper Changes" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Diaper Changes" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Diaper Changes" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Diaper Changes" %}
|
||||
{% if perms.core.add_diaperchange %}
|
||||
<a href="{% url 'core:diaperchange-add' %}" class="btn btn-sm btn-success">
|
||||
<a href="{% url 'core:diaperchange-add' %}"
|
||||
class="btn btn-sm btn-success">
|
||||
<i class="icon-diaperchange" aria-hidden="true"></i> {% trans "Add Diaper Change" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -36,39 +36,46 @@
|
|||
{% for change in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_diaperchange %}
|
||||
<a href="{% url 'core:diaperchange-update' change.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:diaperchange-update' change.id %}"
|
||||
class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_diaperchange %}
|
||||
<a href="{% url 'core:diaperchange-delete' change.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:diaperchange-delete' change.id %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ change.time|datetime_short }}</th>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' change.child.slug %}">{{ change.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' change.child.slug %}">{{ change.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-center">
|
||||
{% if change.wet %}<span title="{% trans "Wet" %}">💦</span>{% endif %}
|
||||
{% if change.solid %}<span title="{% trans "Solid" %}">💩</span>{% endif %}
|
||||
{% if change.wet %}
|
||||
<span title="{% trans "Wet" %}">💦</span>
|
||||
{% endif %}
|
||||
{% if change.solid %}
|
||||
<span title="{% trans "Solid" %}">💩</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ change.get_color_display }}</td>
|
||||
<td>{{ change.amount|default_if_none:"" }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=change.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=change.tags.all %}</td>
|
||||
</tr>
|
||||
{% if change.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="7"><i class="icon-note me-2" aria-hidden="true"></i>{{ change.notes }}</td>
|
||||
<td colspan="7">
|
||||
<i class="icon-note me-2" aria-hidden="true"></i>{{ change.notes }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Feeding" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Feeding" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:feeding-list' %}">{% trans "Feedings" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:feeding-list' %}">{% trans "Feedings" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:feeding-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if request.resolver_match.url_name == 'feeding-update' %}
|
||||
{% trans "Update a Feeding" %}
|
||||
|
@ -10,20 +9,22 @@
|
|||
{% trans "Add a Feeding" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:feeding-list' %}">{% trans "Feedings" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:feeding-list' %}">{% trans "Feedings" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% elif request.resolver_match.url_name == 'bottle-feeding-add' %}
|
||||
<h1>{% trans "Add a Bottle Feeding" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime duration i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Feedings" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Feedings" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Feedings" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Feedings" %}
|
||||
|
@ -38,41 +37,42 @@
|
|||
{% for feeding in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_feeding %}
|
||||
<a href="{% url 'core:feeding-update' feeding.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:feeding-update' feeding.id %}"
|
||||
class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_feeding %}
|
||||
<a href="{% url 'core:feeding-delete' feeding.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:feeding-delete' feeding.id %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ feeding.start|datetime_short }}</th>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' feeding.child.slug %}">{{ feeding.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' feeding.child.slug %}">{{ feeding.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ feeding.get_method_display }}</td>
|
||||
<td>{{ feeding.get_type_display }}</td>
|
||||
<td>
|
||||
{% if feeding.amount %}
|
||||
{{ feeding.amount }}
|
||||
{% endif %}
|
||||
{% if feeding.amount %}{{ feeding.amount }}{% endif %}
|
||||
</td>
|
||||
<td>{{ feeding.duration|duration_string }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=feeding.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=feeding.tags.all %}</td>
|
||||
</tr>
|
||||
{% if feeding.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="8"><i class="icon-note me-2" aria-hidden="true"></i>{{ feeding.notes }}</td>
|
||||
<td colspan="8">
|
||||
<i class="icon-note me-2" aria-hidden="true"></i>{{ feeding.notes }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Head Circumference Entry" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Head Circumference Entry" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:head-circumference-list' %}">{% trans "Head Circumference" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:head-circumference-list' %}">{% trans "Head Circumference" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:head-circumference-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
<a href="{% url 'core:head-circumference-list' %}"
|
||||
class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if object %}
|
||||
{{ object }}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a Head Circumference Entry" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:head-circumference-list' %}">{% trans "Head Circumference" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:head-circumference-list' %}">{% trans "Head Circumference" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add a Head Circumference Entry" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Head Circumference Entry" %}</h1>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Head Circumference" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Head Circumference" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Head Circumference" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Head Circumference" %}
|
||||
{% if perms.core.add_head_circumference %}
|
||||
<a href="{% url 'core:head-circumference-add' %}" class="btn btn-sm btn-success">
|
||||
<a href="{% url 'core:head-circumference-add' %}"
|
||||
class="btn btn-sm btn-success">
|
||||
<i class="icon-head-circumference" aria-hidden="true"></i> {% trans "Add Head Circumference" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -34,34 +34,37 @@
|
|||
{% for head_circumference in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_head_circumference %}
|
||||
<a href="{% url 'core:head-circumference-update' head_circumference.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:head-circumference-update' head_circumference.id %}"
|
||||
class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_head_circumference %}
|
||||
<a href="{% url 'core:head-circumference-delete' head_circumference.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:head-circumference-delete' head_circumference.id %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ head_circumference.date }}</th>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' head_circumference.child.slug %}">{{ head_circumference.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' head_circumference.child.slug %}">{{ head_circumference.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ head_circumference.head_circumference }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=head_circumference.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=head_circumference.tags.all %}</td>
|
||||
</tr>
|
||||
{% if head_circumference.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="5"><i class="icon-note me-2" aria-hidden="true"></i>{{ head_circumference.notes }}</td>
|
||||
<td colspan="5">
|
||||
<i class="icon-note me-2" aria-hidden="true"></i>{{ head_circumference.notes }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Height Entry" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Height Entry" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:height-list' %}">{% trans "Height" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:height-list' %}">{% trans "Height" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:height-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if object %}
|
||||
{{ object }}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a Height Entry" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:height-list' %}">{% trans "Height" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:height-list' %}">{% trans "Height" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add a Height Entry" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Height Entry" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Height" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Height" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Height" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Height" %}
|
||||
|
@ -34,34 +33,37 @@
|
|||
{% for height in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_height %}
|
||||
<a href="{% url 'core:height-update' height.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:height-update' height.id %}"
|
||||
class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_height %}
|
||||
<a href="{% url 'core:height-delete' height.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:height-delete' height.id %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ height.date }}</th>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' height.child.slug %}">{{ height.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' height.child.slug %}">{{ height.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ height.height }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=height.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=height.tags.all %}</td>
|
||||
</tr>
|
||||
{% if height.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="5"><i class="icon-note me-2" aria-hidden="true"></i>{{ height.notes }}</td>
|
||||
<td colspan="5">
|
||||
<i class="icon-note me-2" aria-hidden="true"></i>{{ height.notes }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Note" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Note" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:note-list' %}">{% trans "Notes" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:note-list' %}">{% trans "Notes" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:note-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if request.resolver_match.url_name == 'note-update' %}
|
||||
{% trans "Update a Note" %}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a Note" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:note-list' %}">{% trans "Notes" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:note-list' %}">{% trans "Notes" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Note" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime i18n imagekit widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Notes" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Notes" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Notes" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Notes" %}
|
||||
|
@ -35,36 +34,37 @@
|
|||
{% for note in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_note %}
|
||||
<a href="{% url 'core:note-update' note.id %}" class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_note %}
|
||||
<a href="{% url 'core:note-delete' note.id %}" class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ note.time|datetime_short }}</th>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' note.child.slug %}">{{ note.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' note.child.slug %}">{{ note.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
{% if note.image %}
|
||||
{% thumbnail '40x40' note.image as thumb %}
|
||||
<a href="{{ note.image.url }}" target="_blank"><img src="{{ thumb.url }}" class="img-fluid" /></a>
|
||||
<a href="{{ note.image.url }}" target="_blank">
|
||||
<img src="{{ thumb.url }}" class="img-fluid" />
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ note.note }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=note.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=note.tags.all %}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
|
@ -75,4 +75,4 @@
|
|||
</table>
|
||||
</div>
|
||||
{% include 'babybuddy/paginator.html' %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Pumping Entry" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Pumping Entry" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:pumping-list' %}">{% trans "Pumping" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:pumping-list' %}">{% trans "Pumping" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:pumping-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if object %}
|
||||
{{ object }}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a Pumping Entry" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:pumping-list' %}">{% trans "Pumping" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:pumping-list' %}">{% trans "Pumping" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add a Pumping Entry" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Pumping Entry" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime duration i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Pumping" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Pumping" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Pumping" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Pumping" %}
|
||||
|
@ -35,35 +34,38 @@
|
|||
{% for pumping in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_pumping %}
|
||||
<a href="{% url 'core:pumping-update' pumping.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:pumping-update' pumping.id %}"
|
||||
class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_pumping %}
|
||||
<a href="{% url 'core:pumping-delete' pumping.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:pumping-delete' pumping.id %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ pumping.start|datetime_short }}</th>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' pumping.child.slug %}">{{ pumping.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' pumping.child.slug %}">{{ pumping.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ pumping.amount }}</td>
|
||||
<td>{{ pumping.duration|duration_string }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=pumping.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=pumping.tags.all %}</td>
|
||||
</tr>
|
||||
{% if pumping.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="5"><i class="icon-note me-2" aria-hidden="true"></i>{{ pumping.notes }}</td>
|
||||
<td colspan="5">
|
||||
<i class="icon-note me-2" aria-hidden="true"></i>{{ pumping.notes }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
|
||||
|
||||
<form action="{% url 'core:timer-add-quick' %}" role="form" method="post" class="mr-2">
|
||||
<form action="{% url 'core:timer-add-quick' %}"
|
||||
role="form"
|
||||
method="post"
|
||||
class="mr-2">
|
||||
{% csrf_token %}
|
||||
{% if children.count > 1 %}
|
||||
<div class="dropdown show">
|
||||
|
@ -14,21 +15,24 @@
|
|||
aria-haspopup="true"
|
||||
aria-expanded="false"><i class="icon-2x icon-timer" aria-hidden="true"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="quick-timer-menu-toggle">
|
||||
<div class="dropdown-menu dropdown-menu-end"
|
||||
aria-labelledby="quick-timer-menu-toggle">
|
||||
<h6 class="dropdown-header">{% trans "Quick Start Timer For…" %}</h6>
|
||||
{% for child in children %}
|
||||
<button class="dropdown-item d-flex align-items-center" type="submit" name="child" value="{{ child.pk }}">
|
||||
<button class="dropdown-item d-flex align-items-center"
|
||||
type="submit"
|
||||
name="child"
|
||||
value="{{ child.pk }}">
|
||||
{% include "core/child_thumbnail.html" %}
|
||||
<span class="text-wrap ms-2">{{ child }}</span>
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<label class="visually-hidden">{% trans "Quick Start Timer" %}</label>
|
||||
<button class="btn m-0 p-0 text-success">
|
||||
</div>
|
||||
{% else %}
|
||||
<label class="visually-hidden">{% trans "Quick Start Timer" %}</label>
|
||||
<button class="btn m-0 p-0 text-success">
|
||||
<i class="icon-2x icon-timer" aria-hidden="true"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<span class="badge badge-pill" style="background-color:{{ tag.color }};color:{{ tag.complementary_color }};">
|
||||
{{ tag.name|escape }}
|
||||
</span>
|
||||
<span class="badge badge-pill"
|
||||
style="background-color:{{ tag.color }};
|
||||
color:{{ tag.complementary_color }}">{{ tag.name|escape }}</span>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for tag in tags %}
|
||||
{% include "core/render_tag.html" %}
|
||||
{% empty %}
|
||||
-
|
||||
-
|
||||
{% endfor %}
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Sleep Entry" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Sleep Entry" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:sleep-list' %}">{% trans "Sleep" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:sleep-list' %}">{% trans "Sleep" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:sleep-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if request.resolver_match.url_name == 'sleep-update' %}
|
||||
{% trans "Update a Sleep Entry" %}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a Sleep Entry" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:sleep-list' %}">{% trans "Sleep" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:sleep-list' %}">{% trans "Sleep" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Sleep Entry" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load bootstrap datetime duration i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Sleep" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Sleep" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Sleep" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Sleep" %}
|
||||
|
@ -36,36 +35,37 @@
|
|||
{% for sleep in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_sleep %}
|
||||
<a href="{% url 'core:sleep-update' sleep.id %}" class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_sleep %}
|
||||
<a href="{% url 'core:sleep-delete' sleep.id %}" class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ sleep.start|datetime_short }}</th>
|
||||
<td>{{ sleep.end|datetime_short }}</td>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' sleep.child.slug %}">{{ sleep.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' sleep.child.slug %}">{{ sleep.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ sleep.duration|duration_string }}</td>
|
||||
<td class="text-center">{{ sleep.nap|bool_icon }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=sleep.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=sleep.tags.all %}</td>
|
||||
</tr>
|
||||
{% if sleep.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="7"><i class="icon-note me-2" aria-hidden="true"></i>{{ sleep.notes }}</td>
|
||||
<td colspan="7">
|
||||
<i class="icon-note me-2" aria-hidden="true"></i>{{ sleep.notes }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Temperature Reading" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Temperature Reading" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:temperature-list' %}">{% trans "Temperature" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:temperature-list' %}">{% trans "Temperature" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:temperature-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if object %}
|
||||
{{ object }}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a Temperature Reading" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:temperature-list' %}">{% trans "Temperature" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:temperature-list' %}">{% trans "Temperature" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add a Temperature Reading" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Temperature Entry" %}</h1>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Temperature" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Temperature" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Temperature" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Temperature" %}
|
||||
{% if perms.core.add_temperature %}
|
||||
<a href="{% url 'core:temperature-add' %}" class="btn btn-sm btn-success">
|
||||
<a href="{% url 'core:temperature-add' %}"
|
||||
class="btn btn-sm btn-success">
|
||||
<i class="icon-temperature" aria-hidden="true"></i> {% trans "Add Temperature Reading" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -34,34 +34,37 @@
|
|||
{% for temperature in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_temperature %}
|
||||
<a href="{% url 'core:temperature-update' temperature.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:temperature-update' temperature.id %}"
|
||||
class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_temperature %}
|
||||
<a href="{% url 'core:temperature-delete' temperature.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:temperature-delete' temperature.id %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ temperature.time|datetime_short }}</th>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' temperature.child.slug %}">{{ temperature.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' temperature.child.slug %}">{{ temperature.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ temperature.temperature }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=temperature.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=temperature.tags.all %}</td>
|
||||
</tr>
|
||||
{% if temperature.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="5"><i class="icon-note me-2" aria-hidden="true"></i>{{ temperature.notes }}</td>
|
||||
<td colspan="5">
|
||||
<i class="icon-note me-2" aria-hidden="true"></i>{{ temperature.notes }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}
|
||||
{% blocktrans %}Delete {{ object }}{% endblocktrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:timer-list' %}">{% trans "Timers" %}</a></li>
|
||||
<li class="breadcrumb-item fw-bold"><a href="{% url 'core:timer-detail' object.id %}">{{ object }}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:timer-list' %}">{% trans "Timers" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item fw-bold">
|
||||
<a href="{% url 'core:timer-detail' object.id %}">{{ object }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:timer-detail' object.id %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
<a href="{% url 'core:timer-detail' object.id %}"
|
||||
class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -1,39 +1,28 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load babybuddy duration i18n timers %}
|
||||
{% get_child_count as CHILD_COUNT %}
|
||||
|
||||
{% block title %}{{ object }}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:timer-list' %}">{% trans "Timers" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:timer-list' %}">{% trans "Timers" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item fw-bold">{{ object }}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="p-5 mb-4 bg rounded-3 text-center">
|
||||
<div class="container-fluid py-1">
|
||||
<h1 id="timer-status"
|
||||
class="display-1">
|
||||
<h1 id="timer-status" class="display-1">
|
||||
<span class="timer-hours">{{ object.duration|hours }}</span>h
|
||||
<span class="timer-minutes">{{ object.duration|minutes }}</span>m
|
||||
<span class="timer-seconds">{{ object.duration|seconds }}</span>s
|
||||
</h1>
|
||||
|
||||
{% if timer.child and CHILD_COUNT > 1 %}
|
||||
<h2 class="text-body-secondary">
|
||||
{{ timer.child }}
|
||||
</h2>
|
||||
{% endif %}
|
||||
|
||||
<p class="lead text-secondary">
|
||||
{% trans "Started" %} {{ object.start }}
|
||||
</p>
|
||||
{% if timer.child and CHILD_COUNT > 1 %}<h2 class="text-body-secondary">{{ timer.child }}</h2>{% endif %}
|
||||
<p class="lead text-secondary">{% trans "Started" %} {{ object.start }}</p>
|
||||
<p class="text-body-secondary">
|
||||
{% blocktrans trimmed with user=object.user_username %}
|
||||
{{ timer }} created by {{ user }}
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<div class="d-grid gap-4 mb-4">
|
||||
{% if perms.core.add_feeding %}
|
||||
<a class="btn btn-success btn-lg"
|
||||
|
@ -42,57 +31,55 @@
|
|||
{% trans "Feeding" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.add_pumping %}
|
||||
<a class="btn btn-success btn-lg"
|
||||
href="{% instance_add_url 'core:pumping-add' %}"
|
||||
role="button"><i class="icon-pumping" aria-hidden="true"></i>
|
||||
{% trans "Pumping" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.add_sleep %}
|
||||
<a class="btn btn-success btn-lg"
|
||||
{% endif %}
|
||||
{% if perms.core.add_sleep %}
|
||||
<a class="btn btn-success btn-lg"
|
||||
href="{% instance_add_url 'core:sleep-add' %}"
|
||||
role="button"><i class="icon-sleep" aria-hidden="true"></i>
|
||||
{% trans "Sleep" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.add_tummytime %}
|
||||
<a class="btn btn-success btn-lg"
|
||||
{% trans "Sleep" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_tummytime %}
|
||||
<a class="btn btn-success btn-lg"
|
||||
href="{% instance_add_url 'core:tummytime-add' %}"
|
||||
role="button"><i class="icon-tummytime" aria-hidden="true"></i>
|
||||
{% trans "Tummy Time" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="center-block" role="group" aria-label="{% trans "Timer actions" %}">
|
||||
{% trans "Tummy Time" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="center-block"
|
||||
role="group"
|
||||
aria-label="{% trans "Timer actions" %}">
|
||||
{% if perms.core.delete_timer %}
|
||||
<a class="btn btn-lg btn-danger"
|
||||
href="{% url 'core:timer-delete' timer.id %}"
|
||||
role="button"><i class="icon-delete" aria-hidden="true"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.change_timer %}
|
||||
<a class="btn btn-lg btn-primary"
|
||||
href="{% url 'core:timer-update' timer.id %}"
|
||||
role="button"><i class="icon-update" aria-hidden="true"></i></a>
|
||||
|
||||
<form action="{% url 'core:timer-restart' timer.id %}" role="form" method="post" class="d-inline">
|
||||
<form action="{% url 'core:timer-restart' timer.id %}"
|
||||
role="form"
|
||||
method="post"
|
||||
class="d-inline">
|
||||
{% csrf_token %}
|
||||
<label class="visually-hidden">{% trans "Restart timer" %}</label>
|
||||
<button type="submit" class="btn btn-lg btn-secondary"><i class="icon-refresh" aria-hidden="true"></i></button>
|
||||
<button type="submit" class="btn btn-lg btn-secondary">
|
||||
<i class="icon-refresh" aria-hidden="true"></i>
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script type="application/javascript">
|
||||
BabyBuddy.Timer.run({{ timer.id }}, 'timer-status');
|
||||
</script>
|
||||
<script type="application/javascript">BabyBuddy.Timer.run({{ timer.id }}, 'timer-status');</script>
|
||||
{% endblock %}
|
|
@ -1,22 +1,27 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime duration i18n %}
|
||||
|
||||
{% block title %}{% trans "Timer" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Timer" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:timer-list' %}">{% trans "Timers" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:timer-list' %}">{% trans "Timers" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item fw-bold"><a href="{% url 'core:timer-detail' object.id %}">{{ object }}</a></li>
|
||||
<li class="breadcrumb-item fw-bold">
|
||||
<a href="{% url 'core:timer-detail' object.id %}">{{ object }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Start" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Start Timer" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load bootstrap datetime duration i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Timers" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Timers" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Timers" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Timers" %}
|
||||
|
@ -33,7 +32,9 @@
|
|||
{% for timer in object_list %}
|
||||
<tr>
|
||||
<th scope="row">{{ timer.start|datetime_short }}</th>
|
||||
<td><a href="{% url 'core:timer-detail' timer.id %}">{{ timer }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:timer-detail' timer.id %}">{{ timer }}</a>
|
||||
</td>
|
||||
{% if not unique_child %}
|
||||
<td>
|
||||
{% if timer.child %}
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
{% load i18n %}
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a id="nav-timer-menu-link"
|
||||
<a id="nav-timer-menu-link"
|
||||
class="nav-link dropdown-toggle"
|
||||
href="#"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"><i class="icon-timer" aria-hidden="true"></i>
|
||||
{% trans "Timers" %}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="nav-timer-menu-link">
|
||||
{% trans "Timers" %}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="nav-timer-menu-link">
|
||||
{% if perms.core.add_timer %}
|
||||
<a class="dropdown-item" href="{% url 'core:timer-add' %}">
|
||||
<i class="icon-add" aria-hidden="true"></i> {% trans "Start Timer" %}
|
||||
|
@ -21,13 +20,19 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
{% if perms.core.add_timer %}
|
||||
<form action="{% url 'core:timer-add-quick' %}" role="form" method="post" class="d-inline">
|
||||
<form action="{% url 'core:timer-add-quick' %}"
|
||||
role="form"
|
||||
method="post"
|
||||
class="d-inline">
|
||||
{% csrf_token %}
|
||||
{% if children.count > 1 %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<h6 class="dropdown-header">{% trans "Quick Start Timer For…" %}</h6>
|
||||
{% for child in children %}
|
||||
<button class="dropdown-item d-flex align-items-center" type="submit" name="child" value="{{ child.pk }}">
|
||||
<button class="dropdown-item d-flex align-items-center"
|
||||
type="submit"
|
||||
name="child"
|
||||
value="{{ child.pk }}">
|
||||
{% include "core/child_thumbnail.html" %}
|
||||
<span class="text-wrap ms-2">{{ child }}</span>
|
||||
</button>
|
||||
|
@ -43,12 +48,10 @@
|
|||
<div class="dropdown-divider"></div>
|
||||
<h6 class="dropdown-header">{% trans "Timers" %}</h6>
|
||||
{% for timer in timers %}
|
||||
<a class="dropdown-item" href="{% url 'core:timer-detail' timer.id %}">
|
||||
{{ timer.title_with_child }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url 'core:timer-detail' timer.id %}">{{ timer.title_with_child }}</a>
|
||||
{% empty %}
|
||||
<a class="dropdown-item disabled" href="#">{% trans "None" %}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Tummy Time Entry" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Tummy Time Entry" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:tummytime-list' %}">{% trans "Tummy Time" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:tummytime-list' %}">{% trans "Tummy Time" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:tummytime-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if request.resolver_match.url_name == 'tummytime-update' %}
|
||||
{% trans "Update a Tummy Time Entry" %}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a Tummy Time Entry" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:tummytime-list' %}">{% trans "Tummy Time" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:tummytime-list' %}">{% trans "Tummy Time" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Tummy Time Entry" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load datetime duration i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Tummy Time" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Tummy Time" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Tummy Time" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Tummy Time" %}
|
||||
|
@ -35,32 +34,33 @@
|
|||
{% for tummytime in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_tummytime %}
|
||||
<a href="{% url 'core:tummytime-update' tummytime.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:tummytime-update' tummytime.id %}"
|
||||
class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_tummytime %}
|
||||
<a href="{% url 'core:tummytime-delete' tummytime.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:tummytime-delete' tummytime.id %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ tummytime.start|datetime_short }}</th>
|
||||
<td>{{ tummytime.end|datetime_short }}</td>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' tummytime.child.slug %}">{{ tummytime.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' tummytime.child.slug %}">{{ tummytime.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ tummytime.duration|duration_string }}</td>
|
||||
<td>{{ tummytime.milestone }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=tummytime.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=tummytime.tags.all %}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Delete a Weight Entry" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Delete a Weight Entry" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:weight-list' %}">{% trans "Weight" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:weight-list' %}">{% trans "Weight" %}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<h1>
|
||||
Are you sure you want to delete <span class="text-info">{{ object }}</span>?
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" />
|
||||
<a href="{% url 'core:weight-list' %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if object %}
|
||||
{{ object }}
|
||||
|
@ -8,20 +7,22 @@
|
|||
{% trans "Add a Weight Entry" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'core:weight-list' %}">{% trans "Weight" %}</a></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'core:weight-list' %}">{% trans "Weight" %}</a>
|
||||
</li>
|
||||
{% if object %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add a Weight Entry" %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
{% blocktrans trimmed %}
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
<h1>
|
||||
Update <span class="text-info">{{ object }}</span>
|
||||
</h1>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<h1>{% trans "Add a Weight Entry" %}</h1>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load i18n widget_tweaks %}
|
||||
|
||||
{% block title %}{% trans "Weight" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Weight" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans "Weight" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% trans "Weight" %}
|
||||
|
@ -34,34 +33,37 @@
|
|||
{% for weight in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
|
||||
|
||||
<div class="btn-group btn-group-sm"
|
||||
role="group"
|
||||
aria-label="{% trans "Actions" %}">
|
||||
{% if perms.core.change_weight %}
|
||||
<a href="{% url 'core:weight-update' weight.id %}" class="btn btn-primary">
|
||||
<a href="{% url 'core:weight-update' weight.id %}"
|
||||
class="btn btn-primary">
|
||||
<i class="icon-update" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.core.delete_weight %}
|
||||
<a href="{% url 'core:weight-delete' weight.id %}" class="btn btn-danger">
|
||||
<a href="{% url 'core:weight-delete' weight.id %}"
|
||||
class="btn btn-danger">
|
||||
<i class="icon-delete" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<th scope="row">{{ weight.date }}</th>
|
||||
{% if not unique_child %}
|
||||
<td><a href="{% url 'core:child' weight.child.slug %}">{{ weight.child }}</a></td>
|
||||
<td>
|
||||
<a href="{% url 'core:child' weight.child.slug %}">{{ weight.child }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ weight.weight }}</td>
|
||||
<td>
|
||||
{% include "core/render_tag_list.html" with tags=weight.tags.all %}
|
||||
</td>
|
||||
<td>{% include "core/render_tag_list.html" with tags=weight.tags.all %}</td>
|
||||
</tr>
|
||||
{% if weight.notes %}
|
||||
<tr class="{{ row_class }} row-details">
|
||||
<td colspan="5"><i class="icon-note me-2" aria-hidden="true"></i>{{ weight.notes }}</td>
|
||||
<td colspan="5">
|
||||
<i class="icon-note me-2" aria-hidden="true"></i>{{ weight.notes }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{% load i18n %}
|
||||
|
||||
<div data-tags-url="{% url 'api:api-root' %}tags/"
|
||||
{% for k, v in widget.attrs.items %}
|
||||
{{ k }}="{{ v }}"
|
||||
{% endfor %}>
|
||||
<div data-tags-url="{% url 'api:api-root' %}tags/" {% for k, v in widget.attrs.items %}{{ k }}="{{ v }}"{% endfor %}>
|
||||
{% csrf_token %}
|
||||
<span class="prototype-tag btn badge badge-pill cursor-pointer me-1" style="display: none;">
|
||||
<span class="prototype-tag btn badge badge-pill cursor-pointer me-1"
|
||||
style="display: none">
|
||||
UNINITIALIZED PROTOTYPE
|
||||
<span class="add-remove-icon ps-1 pe-1">+ or -</span>
|
||||
</span>
|
||||
<div class="current_tags" style="min-height: 2em;">
|
||||
{% for t in widget.value %}
|
||||
<span data-value="{{ t.name }}" data-color="{{ t.color }}" class="tag btn badge badge-pill cursor-pointer me-1" style="background-color: {{ t.color }};">
|
||||
<span data-value="{{ t.name }}"
|
||||
data-color="{{ t.color }}"
|
||||
class="tag btn badge badge-pill cursor-pointer me-1"
|
||||
style="background-color: {{ t.color }}">
|
||||
{{ t.name }}
|
||||
<span class="add-remove-icon ps-1 pe-1">-</span>
|
||||
</span>
|
||||
|
@ -19,25 +19,28 @@
|
|||
</div>
|
||||
<div class="new-tags">
|
||||
<div class="create-tag-inputs input-group">
|
||||
<input class="form-control" type="text" name="" placeholder="{% trans "Tag name" %}">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name=""
|
||||
placeholder="{% trans "Tag name" %}">
|
||||
<button id="add-tag" class="btn btn-outline-primary bg" type="button">{% trans "Add" %}</button>
|
||||
</div>
|
||||
{% if widget.tag_suggestions.quick %}
|
||||
<span>{% trans "Recently used:" %}</span>
|
||||
{% for t in widget.tag_suggestions.quick %}
|
||||
<span data-value="{{ t.name }}" data-color="{{ t.color }}" class="tag btn badge badge-pill cursor-pointer me-1" style="background-color: {{ t.color }};">
|
||||
<span data-value="{{ t.name }}"
|
||||
data-color="{{ t.color }}"
|
||||
class="tag btn badge badge-pill cursor-pointer me-1"
|
||||
style="background-color: {{ t.color }}">
|
||||
{{ t.name }}
|
||||
<span class="add-remove-icon ps-1 pe-1">+</span>
|
||||
</span>
|
||||
{% endfor %}
|
||||
{%endif%}
|
||||
{% endif %}
|
||||
</div>
|
||||
<input
|
||||
type="hidden"
|
||||
<input type="hidden"
|
||||
name="{{ widget.name }}"
|
||||
value="{% for t in widget.value %}"{{ t.name }}"{% if not forloop.last %},{% endif %}{% endfor %}"
|
||||
>
|
||||
|
||||
value="{% for t in widget.value %}"{{ t.name }}"{% if not forloop.last %},{% endif %}{% endfor %}">
|
||||
<div class="modal fade tag-editor-error-modal">
|
||||
<div class="modal-dialog modal-sm" role="document">
|
||||
<div class="modal-content">
|
||||
|
@ -45,18 +48,14 @@
|
|||
<h4 class="modal-title">{% trans "Error" context "Error modal" %}</h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<span data-message="generic">{% trans "An error ocurred." context "Error modal" %}</span>
|
||||
<span data-message="invalid-tag-name">{% trans "Invalid tag name." context "Error modal" %}</span>
|
||||
<span data-message="tag-creation-failed">{% trans "Failed to create tag." context "Error modal" %}</span>
|
||||
<span data-message="tag-checking-failed">{% trans "Failed to obtain tag data." context "Error modal" %}</span>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">
|
||||
{% trans "Close" context "Error modal" %}
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">{% trans "Close" context "Error modal" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
{% load i18n %}
|
||||
|
||||
<h3 class="text-center">
|
||||
{% if date_previous %}
|
||||
<a class="btn btn-sm btn-default" href="?date={{ date_previous|date:"Y-m-d" }}" aria-label="{% trans "Previous" %}">
|
||||
<a class="btn btn-sm btn-default"
|
||||
href="?date={{ date_previous|date:"Y-m-d" }}"
|
||||
aria-label="{% trans "Previous" %}">
|
||||
<i class="icon-2x icon-angle-circled-left" aria-hidden="true"></i>
|
||||
<span class="visually-hidden">{% trans "Previous" %}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{{ date|date }}
|
||||
{% if date_next %}
|
||||
<a class="btn btn-sm btn-default" href="?date={{ date_next|date:"Y-m-d" }}" aria-label="{% trans "Next" %}">
|
||||
<a class="btn btn-sm btn-default"
|
||||
href="?date={{ date_next|date:"Y-m-d" }}"
|
||||
aria-label="{% trans "Next" %}">
|
||||
<i class="icon-2x icon-angle-circled-right" aria-hidden="true"></i>
|
||||
<span class="visually-hidden">{% trans "Next" %}</span>
|
||||
</a>
|
||||
|
@ -18,7 +21,7 @@
|
|||
{% if timeline_objects %}
|
||||
<ul class="timeline m-auto">
|
||||
{% for object in timeline_objects %}
|
||||
<li{% cycle "" ' class="timeline-inverted"' %}>
|
||||
<li {% cycle "" ' class="timeline-inverted"' %}>
|
||||
<div class="timeline-badge {% if object.type == "start" %}bg-success{% elif object.type == "end" %}bg-danger{% else %}bg-info{% endif %}">
|
||||
<i class="icon-{{ object.model_name }}"></i>
|
||||
</div>
|
||||
|
@ -26,12 +29,12 @@
|
|||
<div class="card-body">
|
||||
{{ object.event }}
|
||||
{% for detail in object.details %}
|
||||
<div><small>{{ detail }}</small></div>
|
||||
<div>
|
||||
<small>{{ detail }}</small>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if object.tags %}
|
||||
<div>
|
||||
{% include "core/render_tag_list.html" with tags=object.tags %}
|
||||
</div>
|
||||
<div>{% include "core/render_tag_list.html" with tags=object.tags %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-footer text-body-secondary">
|
||||
|
@ -68,14 +71,18 @@
|
|||
</ul>
|
||||
<h3 class="text-center">
|
||||
{% if date_previous %}
|
||||
<a class="btn btn-sm btn-default" href="?date={{ date_previous|date:"Y-m-d" }}" aria-label="{% trans "Previous" %}">
|
||||
<a class="btn btn-sm btn-default"
|
||||
href="?date={{ date_previous|date:"Y-m-d" }}"
|
||||
aria-label="{% trans "Previous" %}">
|
||||
<i class="icon-2x icon-angle-circled-left" aria-hidden="true"></i>
|
||||
<span class="visually-hidden">{% trans "Previous" %}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{{ date|date }}
|
||||
{% if date_next %}
|
||||
<a class="btn btn-sm btn-default" href="?date={{ date_next|date:"Y-m-d" }}" aria-label="{% trans "Next" %}">
|
||||
<a class="btn btn-sm btn-default"
|
||||
href="?date={{ date_next|date:"Y-m-d" }}"
|
||||
aria-label="{% trans "Next" %}">
|
||||
<i class="icon-2x icon-angle-circled-right" aria-hidden="true"></i>
|
||||
<span class="visually-hidden">{% trans "Next" %}</span>
|
||||
</a>
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
{% extends 'babybuddy/page.html' %}
|
||||
{% load cards i18n static %}
|
||||
|
||||
{% block title %}{% trans "Timeline" %}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Timeline" %}
|
||||
{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<li class="breadcrumb-item fw-bold">{% trans "Timeline" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{% include 'timeline/_timeline.html' %}
|
||||
</div>
|
||||
<div class="col">{% include 'timeline/_timeline.html' %}</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -5,8 +5,12 @@
|
|||
{% block header %}{% endblock %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<span class="card-title"><strong>{% block title %}{% endblock %}</strong></span>
|
||||
<div class="card-text"> {% block content %}{% endblock %} </div>
|
||||
<span class="card-title"><strong>
|
||||
{% block title %}{% endblock %}
|
||||
</strong></span>
|
||||
<div class="card-text">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% block listgroup %}{% endblock %}
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load duration i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:diaperchange-list" %}">
|
||||
{% trans "Last Diaper Change" %}
|
||||
</a>
|
||||
<a href="{% url "core:diaperchange-list" %}">{% trans "Last Diaper Change" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if change %}
|
||||
{% blocktrans trimmed with since=change.time|deltasince|duration_string:'m' time=change.time|time %}
|
||||
|
@ -17,7 +13,6 @@
|
|||
{% trans "None" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if change %}{{ change.attributes|join:', ' }}{% endif %}
|
||||
{% endblock %}
|
|
@ -1,12 +1,8 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:diaperchange-list" %}">
|
||||
{% trans "Diaper Changes" %}
|
||||
</a>
|
||||
<a href="{% url "core:diaperchange-list" %}">{% trans "Diaper Changes" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if total == 0 %}
|
||||
{% trans "None" %}
|
||||
|
@ -14,31 +10,25 @@
|
|||
{% trans "Past Week" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% for key, info in stats.items %}
|
||||
{% if info.wet > 0 or info.solid > 0 or info.empty > 0 %}
|
||||
<div class="progress mt-3" role="progressbar">
|
||||
|
||||
{% if info.wet_pct > 0 %}
|
||||
<div class="progress-bar bg-primary lead"
|
||||
style="width: {{ info.wet_pct|safe }}%;">
|
||||
style="width: {{ info.wet_pct|safe }}%">
|
||||
{{ info.wet|floatformat:'0' }} {% trans "wet" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if info.solid_pct > 0 %}
|
||||
<div class="progress-bar bg-secondary lead"
|
||||
style="width: {{ info.solid_pct|safe }}%;">
|
||||
style="width: {{ info.solid_pct|safe }}%">
|
||||
{{ info.solid|floatformat:'0' }} {% trans "solid" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if info.empty_pct > 0 %}
|
||||
<div class="progress-bar bg-transparent lead"
|
||||
style="width: {{ info.empty_pct|safe }}%;">
|
||||
{{ info.empty|floatformat:'0' }}
|
||||
</div>
|
||||
style="width: {{ info.empty_pct|safe }}%">{{ info.empty|floatformat:'0' }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-center text-light small">
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load duration i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:feeding-list" %}">
|
||||
{% trans "Last Feeding" %}
|
||||
</a>
|
||||
<a href="{% url "core:feeding-list" %}">{% trans "Last Feeding" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if feeding %}
|
||||
{% blocktrans trimmed with since=feeding.start|deltasince|duration_string:'m' time=feeding.start|time %}
|
||||
|
@ -17,12 +13,9 @@
|
|||
{% trans "None" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if feeding %}
|
||||
{{ feeding.get_type_display }}, {{ feeding.get_method_display }}
|
||||
{% if feeding.amount %}
|
||||
({{ feeding.amount }})
|
||||
{% endif %}
|
||||
{% if feeding.amount %}({{ feeding.amount }}){% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:feeding-list" %}">
|
||||
{% trans "Last Feeding Method" %}
|
||||
</a>
|
||||
<a href="{% url "core:feeding-list" %}">{% trans "Last Feeding Method" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if feedings|length > 0 %}
|
||||
<div id="feeding-methods-carousel" class="carousel slide" data-bs-interval="false">
|
||||
<div id="feeding-methods-carousel"
|
||||
class="carousel slide"
|
||||
data-bs-interval="false">
|
||||
<div class="carousel-inner">
|
||||
{% for feeding in feedings %}
|
||||
<div class="carousel-item{% if forloop.counter == feedings|length %} active{% endif %}">
|
||||
|
@ -48,5 +46,4 @@
|
|||
{% else %}
|
||||
{% trans "None" %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
|
@ -1,15 +1,13 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load duration i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:feeding-list" %}">
|
||||
{% trans "Recent Feedings" %}
|
||||
</a>
|
||||
<a href="{% url "core:feeding-list" %}">{% trans "Recent Feedings" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if feedings|length > 0 %}
|
||||
<div id="feeding-days-carousel" class="carousel slide" data-bs-interval="false">
|
||||
{% if feedings|length > 0 %}
|
||||
<div id="feeding-days-carousel"
|
||||
class="carousel slide"
|
||||
data-bs-interval="false">
|
||||
<div class="carousel-inner">
|
||||
{% for feeding in feedings %}
|
||||
<div class="carousel-item{% if forloop.counter == 1 %} active{% endif %}">
|
||||
|
@ -30,9 +28,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
{% blocktrans trimmed with since=feeding.date.date|dayssince %}
|
||||
<div class="text-center small text-body-secondary">
|
||||
{{ since }}
|
||||
</div>
|
||||
<div class="text-center small text-body-secondary">{{ since }}</div>
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
@ -53,9 +49,8 @@
|
|||
<span class="visually-hidden">{% trans "Next" %}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% trans "None" %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% else %}
|
||||
{% trans "None" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load duration i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:pumping-list" %}">
|
||||
{% trans "Last Pumping" %}
|
||||
</a>
|
||||
<a href="{% url "core:pumping-list" %}">{% trans "Last Pumping" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if pumping %}
|
||||
{% blocktrans trimmed with since=pumping.start|deltasince|duration_string:'m' time=pumping.start|time %}
|
||||
|
@ -17,7 +13,6 @@
|
|||
{% trans "None" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if pumping %}
|
||||
{% trans "Amount" %}: {{ pumping.amount }}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load duration i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:sleep-list" %}">
|
||||
{% trans "Last Sleep" %}
|
||||
</a>
|
||||
<a href="{% url "core:sleep-list" %}">{% trans "Last Sleep" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if sleep %}
|
||||
{% blocktrans trimmed with since=sleep.end|deltasince|duration_string:'m' time=sleep.end|time %}
|
||||
|
@ -17,5 +13,4 @@
|
|||
{% trans "None" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}{{ sleep.duration|duration_string }}{% endblock %}
|
|
@ -1,12 +1,8 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load duration i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:sleep-list" %}">
|
||||
{% trans "Today's Naps" %}
|
||||
</a>
|
||||
<a href="{% url "core:sleep-list" %}">{% trans "Today's Naps" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if count %}
|
||||
{% blocktrans trimmed count counter=count %}
|
||||
|
@ -18,7 +14,6 @@
|
|||
{% trans "None" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if total %}{{ total|duration_string }}{% endif %}
|
||||
{% endblock %}
|
|
@ -1,15 +1,13 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load duration i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:sleep-list" %}">
|
||||
{% trans "Recent Sleep" %}
|
||||
</a>
|
||||
<a href="{% url "core:sleep-list" %}">{% trans "Recent Sleep" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if sleeps|length > 0 %}
|
||||
<div id="sleep-days-carousel" class="carousel slide" data-bs-interval="false">
|
||||
{% if sleeps|length > 0 %}
|
||||
<div id="sleep-days-carousel"
|
||||
class="carousel slide"
|
||||
data-bs-interval="false">
|
||||
<div class="carousel-inner">
|
||||
{% for sleep in sleeps %}
|
||||
<div class="carousel-item{% if forloop.counter == 1 %} active{% endif %}">
|
||||
|
@ -30,25 +28,29 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
{% blocktrans trimmed with since=sleep.date.date|dayssince %}
|
||||
<div class="text-center small text-body-secondary">
|
||||
{{ since }}
|
||||
</div>
|
||||
<div class="text-center small text-body-secondary">{{ since }}</div>
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if sleeps|length > 1 %}
|
||||
<a class="carousel-control-prev" href="#sleep-days-carousel" role="button" data-bs-slide="prev">
|
||||
<a class="carousel-control-prev"
|
||||
href="#sleep-days-carousel"
|
||||
role="button"
|
||||
data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">{% trans "Previous" %}</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#sleep-days-carousel" role="button" data-bs-slide="next">
|
||||
<a class="carousel-control-next"
|
||||
href="#sleep-days-carousel"
|
||||
role="button"
|
||||
data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">{% trans "Next" %}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% trans "None" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% trans "None" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -1,5 +1,4 @@
|
|||
{% load duration i18n %}
|
||||
|
||||
{% if not empty or not hide_empty %}
|
||||
<div class="card card-dashboard card-statistics">
|
||||
<div class="card-header">
|
||||
|
@ -8,7 +7,9 @@
|
|||
</div>
|
||||
<div class="card-body text-center">
|
||||
{% if stats|length > 0 %}
|
||||
<div id="statistics-carousel" class="carousel slide" data-bs-interval="false">
|
||||
<div id="statistics-carousel"
|
||||
class="carousel slide"
|
||||
data-bs-interval="false">
|
||||
<div class="carousel-inner">
|
||||
{% for stat in stats %}
|
||||
<div class="carousel-item{% if forloop.counter == 1 %} active{% endif %}">
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:timer-list" %}">
|
||||
{% trans "Timers" %}
|
||||
</a>
|
||||
<a href="{% url "core:timer-list" %}">{% trans "Timers" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% with instances|length as count %}
|
||||
{% blocktrans trimmed count counter=count %}
|
||||
|
@ -16,7 +12,6 @@
|
|||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block listgroup %}
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for timer in instances %}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load duration i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:tummytime-list" %}">
|
||||
{% trans "Today's Tummy Time" %}
|
||||
</a>
|
||||
<a href="{% url "core:tummytime-list" %}">{% trans "Today's Tummy Time" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if stats.count > 0 %}
|
||||
{{ stats.total|duration_string }}
|
||||
|
@ -14,7 +10,6 @@
|
|||
{% trans "None" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block listgroup %}
|
||||
<ul class="list-group list-group-flush text-body-secondary small">
|
||||
{% for instance in instances %}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{% extends 'cards/base.html' %}
|
||||
{% load duration i18n %}
|
||||
|
||||
{% block header %}
|
||||
<a href="{% url "core:tummytime-list" %}">
|
||||
{% trans "Last Tummy Time" %}
|
||||
</a>
|
||||
<a href="{% url "core:tummytime-list" %}">{% trans "Last Tummy Time" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block title %}
|
||||
{% if tummytime %}
|
||||
{% blocktrans trimmed with since=tummytime.time|deltasince|duration_string:'m' time=tummytime.time|time %}
|
||||
|
@ -18,12 +13,12 @@
|
|||
{% trans "Never" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if tummytime %}
|
||||
{{ tummytime.duration|duration_string }}
|
||||
{% if tummytime.milestone %}
|
||||
<br /> {{ tummytime.milestone }}
|
||||
<br />
|
||||
{{ tummytime.milestone }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue