ci: add djlint to ci (#763)

* ci: add djlint to ci

* lint: all django templates
This commit is contained in:
Sebastien Stettler 2024-02-06 21:35:36 +08:00 committed by GitHub
parent ae76ef3606
commit f30479db42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
124 changed files with 1827 additions and 1861 deletions

View File

@ -34,4 +34,5 @@ mkdocs = "*"
mkdocs-material = "*"
tblib = "*"
black = "*"
djlint = "*"
pysnooper = "*"

View File

@ -1,9 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<meta charset="UTF-8">
<style>
<head>
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<meta charset="UTF-8">
<style>
html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
@ -188,9 +188,10 @@
/* Uncomment for 3D effect */
/* 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]-->
<script>
</style>
<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');
@ -200,162 +201,167 @@
obj.className = obj.className.replace(' codesOn', '');
}
}
</script>
</head>
<body>
<div class="container header">
<h1>babybuddy <small>font demo</small></h1>
<label class="switch">
<input type="checkbox" onclick="toggleCodes(this.checked)">show codes
</label>
</div>
<div class="container" id="icons">
<div class="row">
<div class="span3" title="Code: 0xe800">
<i class="demo-icon icon-add">&#xe800;</i> <span class="i-name">icon-add</span><span class="i-code">0xe800</span>
</script>
</head>
<body>
<div class="container header">
<h1>
babybuddy <small>font demo</small>
</h1>
<label class="switch">
<input type="checkbox" onclick="toggleCodes(this.checked)">
show codes
</label>
</div>
<div class="span3" title="Code: 0xe801">
<i class="demo-icon icon-camera">&#xe801;</i> <span class="i-name">icon-camera</span><span class="i-code">0xe801</span>
<div class="container" id="icons">
<div class="row">
<div class="span3" title="Code: 0xe800">
<i class="demo-icon icon-add">&#xe800;</i> <span class="i-name">icon-add</span><span class="i-code">0xe800</span>
</div>
<div class="span3" title="Code: 0xe801">
<i class="demo-icon icon-camera">&#xe801;</i> <span class="i-name">icon-camera</span><span class="i-code">0xe801</span>
</div>
<div class="span3" title="Code: 0xe802">
<i class="demo-icon icon-chat">&#xe802;</i> <span class="i-name">icon-chat</span><span class="i-code">0xe802</span>
</div>
<div class="span3" title="Code: 0xe803">
<i class="demo-icon icon-delete">&#xe803;</i> <span class="i-name">icon-delete</span><span class="i-code">0xe803</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe804">
<i class="demo-icon icon-mail">&#xe804;</i> <span class="i-name">icon-mail</span><span class="i-code">0xe804</span>
</div>
<div class="span3" title="Code: 0xe805">
<i class="demo-icon icon-false">&#xe805;</i> <span class="i-name">icon-false</span><span class="i-code">0xe805</span>
</div>
<div class="span3" title="Code: 0xe806">
<i class="demo-icon icon-graph">&#xe806;</i> <span class="i-name">icon-graph</span><span class="i-code">0xe806</span>
</div>
<div class="span3" title="Code: 0xe807">
<i class="demo-icon icon-list">&#xe807;</i> <span class="i-name">icon-list</span><span class="i-code">0xe807</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe808">
<i class="demo-icon icon-lock">&#xe808;</i> <span class="i-name">icon-lock</span><span class="i-code">0xe808</span>
</div>
<div class="span3" title="Code: 0xe809">
<i class="demo-icon icon-refresh">&#xe809;</i> <span class="i-name">icon-refresh</span><span class="i-code">0xe809</span>
</div>
<div class="span3" title="Code: 0xe80a">
<i class="demo-icon icon-stop">&#xe80a;</i> <span class="i-name">icon-stop</span><span class="i-code">0xe80a</span>
</div>
<div class="span3" title="Code: 0xe80b">
<i class="demo-icon icon-timer">&#xe80b;</i> <span class="i-name">icon-timer</span><span class="i-code">0xe80b</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe80c">
<i class="demo-icon icon-true">&#xe80c;</i> <span class="i-name">icon-true</span><span class="i-code">0xe80c</span>
</div>
<div class="span3" title="Code: 0xe80d">
<i class="demo-icon icon-update">&#xe80d;</i> <span class="i-name">icon-update</span><span class="i-code">0xe80d</span>
</div>
<div class="span3" title="Code: 0xe80e">
<i class="demo-icon icon-user">&#xe80e;</i> <span class="i-name">icon-user</span><span class="i-code">0xe80e</span>
</div>
<div class="span3" title="Code: 0xe80f">
<i class="demo-icon icon-clock">&#xe80f;</i> <span class="i-name">icon-clock</span><span class="i-code">0xe80f</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe810">
<i class="demo-icon icon-calendar">&#xe810;</i> <span class="i-name">icon-calendar</span><span class="i-code">0xe810</span>
</div>
<div class="span3" title="Code: 0xe811">
<i class="demo-icon icon-arrow-up">&#xe811;</i> <span class="i-name">icon-arrow-up</span><span class="i-code">0xe811</span>
</div>
<div class="span3" title="Code: 0xe812">
<i class="demo-icon icon-arrow-down">&#xe812;</i> <span class="i-name">icon-arrow-down</span><span class="i-code">0xe812</span>
</div>
<div class="span3" title="Code: 0xe813">
<i class="demo-icon icon-cancel">&#xe813;</i> <span class="i-name">icon-cancel</span><span class="i-code">0xe813</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe814">
<i class="demo-icon icon-head-circumference">&#xe814;</i> <span class="i-name">icon-head-circumference</span><span class="i-code">0xe814</span>
</div>
<div class="span3" title="Code: 0xe815">
<i class="demo-icon icon-measurements">&#xe815;</i> <span class="i-name">icon-measurements</span><span class="i-code">0xe815</span>
</div>
<div class="span3" title="Code: 0xf044">
<i class="demo-icon icon-height">&#xf044;</i> <span class="i-name">icon-height</span><span class="i-code">0xf044</span>
</div>
<div class="span3" title="Code: 0xf0e4">
<i class="demo-icon icon-dashboard">&#xf0e4;</i> <span class="i-name">icon-dashboard</span><span class="i-code">0xf0e4</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf118">
<i class="demo-icon icon-tummytime">&#xf118;</i> <span class="i-name">icon-tummytime</span><span class="i-code">0xf118</span>
</div>
<div class="span3" title="Code: 0xf119">
<i class="demo-icon icon-sad">&#xf119;</i> <span class="i-name">icon-sad</span><span class="i-code">0xf119</span>
</div>
<div class="span3" title="Code: 0xf126">
<i class="demo-icon icon-source">&#xf126;</i> <span class="i-name">icon-source</span><span class="i-code">0xf126</span>
</div>
<div class="span3" title="Code: 0xf137">
<i class="demo-icon icon-angle-circled-left">&#xf137;</i> <span class="i-name">icon-angle-circled-left</span><span class="i-code">0xf137</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf138">
<i class="demo-icon icon-angle-circled-right">&#xf138;</i> <span class="i-name">icon-angle-circled-right</span><span class="i-code">0xf138</span>
</div>
<div class="span3" title="Code: 0xf1ae">
<i class="demo-icon icon-child">&#xf1ae;</i> <span class="i-name">icon-child</span><span class="i-code">0xf1ae</span>
</div>
<div class="span3" title="Code: 0xf1b1">
<i class="demo-icon icon-feeding">&#xf1b1;</i> <span class="i-name">icon-feeding</span><span class="i-code">0xf1b1</span>
</div>
<div class="span3" title="Code: 0xf1b3">
<i class="demo-icon icon-activities">&#xf1b3;</i> <span class="i-name">icon-activities</span><span class="i-code">0xf1b3</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf1da">
<i class="demo-icon icon-timeline">&#xf1da;</i> <span class="i-name">icon-timeline</span><span class="i-code">0xf1da</span>
</div>
<div class="span3" title="Code: 0xf1f8">
<i class="demo-icon icon-diaperchange">&#xf1f8;</i> <span class="i-name">icon-diaperchange</span><span class="i-code">0xf1f8</span>
</div>
<div class="span3" title="Code: 0xf236">
<i class="demo-icon icon-sleep">&#xf236;</i> <span class="i-name">icon-sleep</span><span class="i-code">0xf236</span>
</div>
<div class="span3" title="Code: 0xf249">
<i class="demo-icon icon-note">&#xf249;</i> <span class="i-name">icon-note</span><span class="i-code">0xf249</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf24e">
<i class="demo-icon icon-weight">&#xf24e;</i> <span class="i-name">icon-weight</span><span class="i-code">0xf24e</span>
</div>
<div class="span3" title="Code: 0xf274">
<i class="demo-icon icon-today">&#xf274;</i> <span class="i-name">icon-today</span><span class="i-code">0xf274</span>
</div>
<div class="span3" title="Code: 0xf295">
<i class="demo-icon icon-bmi">&#xf295;</i> <span class="i-name">icon-bmi</span><span class="i-code">0xf295</span>
</div>
<div class="span3" title="Code: 0xf2c8">
<i class="demo-icon icon-temperature">&#xf2c8;</i> <span class="i-name">icon-temperature</span><span class="i-code">0xf2c8</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf4a7">
<i class="demo-icon icon-pumping">&#xf4a7;</i> <span class="i-name">icon-pumping</span><span class="i-code">0xf4a7</span>
</div>
</div>
</div>
<div class="span3" title="Code: 0xe802">
<i class="demo-icon icon-chat">&#xe802;</i> <span class="i-name">icon-chat</span><span class="i-code">0xe802</span>
<div class="container footer">
Generated by <a href="https://fontello.com">fontello.com</a>
</div>
<div class="span3" title="Code: 0xe803">
<i class="demo-icon icon-delete">&#xe803;</i> <span class="i-name">icon-delete</span><span class="i-code">0xe803</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe804">
<i class="demo-icon icon-mail">&#xe804;</i> <span class="i-name">icon-mail</span><span class="i-code">0xe804</span>
</div>
<div class="span3" title="Code: 0xe805">
<i class="demo-icon icon-false">&#xe805;</i> <span class="i-name">icon-false</span><span class="i-code">0xe805</span>
</div>
<div class="span3" title="Code: 0xe806">
<i class="demo-icon icon-graph">&#xe806;</i> <span class="i-name">icon-graph</span><span class="i-code">0xe806</span>
</div>
<div class="span3" title="Code: 0xe807">
<i class="demo-icon icon-list">&#xe807;</i> <span class="i-name">icon-list</span><span class="i-code">0xe807</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe808">
<i class="demo-icon icon-lock">&#xe808;</i> <span class="i-name">icon-lock</span><span class="i-code">0xe808</span>
</div>
<div class="span3" title="Code: 0xe809">
<i class="demo-icon icon-refresh">&#xe809;</i> <span class="i-name">icon-refresh</span><span class="i-code">0xe809</span>
</div>
<div class="span3" title="Code: 0xe80a">
<i class="demo-icon icon-stop">&#xe80a;</i> <span class="i-name">icon-stop</span><span class="i-code">0xe80a</span>
</div>
<div class="span3" title="Code: 0xe80b">
<i class="demo-icon icon-timer">&#xe80b;</i> <span class="i-name">icon-timer</span><span class="i-code">0xe80b</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe80c">
<i class="demo-icon icon-true">&#xe80c;</i> <span class="i-name">icon-true</span><span class="i-code">0xe80c</span>
</div>
<div class="span3" title="Code: 0xe80d">
<i class="demo-icon icon-update">&#xe80d;</i> <span class="i-name">icon-update</span><span class="i-code">0xe80d</span>
</div>
<div class="span3" title="Code: 0xe80e">
<i class="demo-icon icon-user">&#xe80e;</i> <span class="i-name">icon-user</span><span class="i-code">0xe80e</span>
</div>
<div class="span3" title="Code: 0xe80f">
<i class="demo-icon icon-clock">&#xe80f;</i> <span class="i-name">icon-clock</span><span class="i-code">0xe80f</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe810">
<i class="demo-icon icon-calendar">&#xe810;</i> <span class="i-name">icon-calendar</span><span class="i-code">0xe810</span>
</div>
<div class="span3" title="Code: 0xe811">
<i class="demo-icon icon-arrow-up">&#xe811;</i> <span class="i-name">icon-arrow-up</span><span class="i-code">0xe811</span>
</div>
<div class="span3" title="Code: 0xe812">
<i class="demo-icon icon-arrow-down">&#xe812;</i> <span class="i-name">icon-arrow-down</span><span class="i-code">0xe812</span>
</div>
<div class="span3" title="Code: 0xe813">
<i class="demo-icon icon-cancel">&#xe813;</i> <span class="i-name">icon-cancel</span><span class="i-code">0xe813</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xe814">
<i class="demo-icon icon-head-circumference">&#xe814;</i> <span class="i-name">icon-head-circumference</span><span class="i-code">0xe814</span>
</div>
<div class="span3" title="Code: 0xe815">
<i class="demo-icon icon-measurements">&#xe815;</i> <span class="i-name">icon-measurements</span><span class="i-code">0xe815</span>
</div>
<div class="span3" title="Code: 0xf044">
<i class="demo-icon icon-height">&#xf044;</i> <span class="i-name">icon-height</span><span class="i-code">0xf044</span>
</div>
<div class="span3" title="Code: 0xf0e4">
<i class="demo-icon icon-dashboard">&#xf0e4;</i> <span class="i-name">icon-dashboard</span><span class="i-code">0xf0e4</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf118">
<i class="demo-icon icon-tummytime">&#xf118;</i> <span class="i-name">icon-tummytime</span><span class="i-code">0xf118</span>
</div>
<div class="span3" title="Code: 0xf119">
<i class="demo-icon icon-sad">&#xf119;</i> <span class="i-name">icon-sad</span><span class="i-code">0xf119</span>
</div>
<div class="span3" title="Code: 0xf126">
<i class="demo-icon icon-source">&#xf126;</i> <span class="i-name">icon-source</span><span class="i-code">0xf126</span>
</div>
<div class="span3" title="Code: 0xf137">
<i class="demo-icon icon-angle-circled-left">&#xf137;</i> <span class="i-name">icon-angle-circled-left</span><span class="i-code">0xf137</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf138">
<i class="demo-icon icon-angle-circled-right">&#xf138;</i> <span class="i-name">icon-angle-circled-right</span><span class="i-code">0xf138</span>
</div>
<div class="span3" title="Code: 0xf1ae">
<i class="demo-icon icon-child">&#xf1ae;</i> <span class="i-name">icon-child</span><span class="i-code">0xf1ae</span>
</div>
<div class="span3" title="Code: 0xf1b1">
<i class="demo-icon icon-feeding">&#xf1b1;</i> <span class="i-name">icon-feeding</span><span class="i-code">0xf1b1</span>
</div>
<div class="span3" title="Code: 0xf1b3">
<i class="demo-icon icon-activities">&#xf1b3;</i> <span class="i-name">icon-activities</span><span class="i-code">0xf1b3</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf1da">
<i class="demo-icon icon-timeline">&#xf1da;</i> <span class="i-name">icon-timeline</span><span class="i-code">0xf1da</span>
</div>
<div class="span3" title="Code: 0xf1f8">
<i class="demo-icon icon-diaperchange">&#xf1f8;</i> <span class="i-name">icon-diaperchange</span><span class="i-code">0xf1f8</span>
</div>
<div class="span3" title="Code: 0xf236">
<i class="demo-icon icon-sleep">&#xf236;</i> <span class="i-name">icon-sleep</span><span class="i-code">0xf236</span>
</div>
<div class="span3" title="Code: 0xf249">
<i class="demo-icon icon-note">&#xf249;</i> <span class="i-name">icon-note</span><span class="i-code">0xf249</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf24e">
<i class="demo-icon icon-weight">&#xf24e;</i> <span class="i-name">icon-weight</span><span class="i-code">0xf24e</span>
</div>
<div class="span3" title="Code: 0xf274">
<i class="demo-icon icon-today">&#xf274;</i> <span class="i-name">icon-today</span><span class="i-code">0xf274</span>
</div>
<div class="span3" title="Code: 0xf295">
<i class="demo-icon icon-bmi">&#xf295;</i> <span class="i-name">icon-bmi</span><span class="i-code">0xf295</span>
</div>
<div class="span3" title="Code: 0xf2c8">
<i class="demo-icon icon-temperature">&#xf2c8;</i> <span class="i-name">icon-temperature</span><span class="i-code">0xf2c8</span>
</div>
</div>
<div class="row">
<div class="span3" title="Code: 0xf4a7">
<i class="demo-icon icon-pumping">&#xf4a7;</i> <span class="i-name">icon-pumping</span><span class="i-code">0xf4a7</span>
</div>
</div>
</div>
<div class="container footer">Generated by <a href="https://fontello.com">fontello.com</a></div>
</body>
</body>
</html>

View File

@ -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 %}

View File

@ -2,51 +2,48 @@
{% 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>
<meta charset="utf-8" />
<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" />
<link rel="manifest" href="{% static "babybuddy/root/site.webmanifest" %}?v=20211225" />
<link rel="mask-icon" href="{% static "babybuddy/root/safari-pinned-tab.svg" %}?v=20211218" color="#37abe9" />
<link rel="shortcut icon" href="{% static "babybuddy/root/favicon.ico" %}?v=20211218" />
<link rel="stylesheet" href="{% static "babybuddy/css/app.css" %}" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Baby Buddy" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="application-name" content="Baby Buddy" />
<meta name="mobile-web-app-capable" content="yes">
<meta name="msapplication-navbutton-color" content="#37abe9">
<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 %}
<nav aria-label="breadcrumb" role="navigation">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href={% url "babybuddy:root-router" %}>{% trans "Home" %}</a></li>
{% block breadcrumbs %}{% endblock %}
</ol>
</nav>
{% 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>
<head>
<meta charset="utf-8" />
<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" />
<link rel="manifest" href="{% static "babybuddy/root/site.webmanifest" %}?v=20211225" />
<link rel="mask-icon" href="{% static "babybuddy/root/safari-pinned-tab.svg" %}?v=20211218" color="#37abe9" />
<link rel="shortcut icon" href="{% static "babybuddy/root/favicon.ico" %}?v=20211218" />
<link rel="stylesheet" href="{% static "babybuddy/css/app.css" %}" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Baby Buddy" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="application-name" content="Baby Buddy" />
<meta name="mobile-web-app-capable" content="yes">
<meta name="msapplication-navbutton-color" content="#37abe9">
<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 %}
<nav aria-label="breadcrumb" role="navigation">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href={% url "babybuddy:root-router" %}>{% trans "Home" %}</a>
</li>
{% block breadcrumbs %}{% endblock %}
</ol>
</nav>
{% 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>
</html>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -1,369 +1,343 @@
{% 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>
</a>
<div class="d-lg-none d-md-none d-flex me-auto p-0 ms-2">
<div>
<a class="text-body-secondary"
href="{% url 'dashboard:dashboard' %}"
aria-expanded="false"><i class="icon-2x icon-dashboard" aria-hidden="true"></i>
</a>
&nbsp;
</div>
<div>
<a class="text-body-secondary"
href="{% url 'core:timeline' %}"
aria-expanded="false"><i class="icon-2x icon-timeline" aria-hidden="true"></i>
</a>
&nbsp;
</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"
href="#"
role="button"
id="nav-quick-add-link"
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">
{% if perms.core.add_diaperchange %}
<a class="dropdown-item p-2" href="{% url 'core:diaperchange-add' %}">
<i class="icon-diaperchange" aria-hidden="true"></i>
{% trans "Diaper Change" %}
</a>
{% endif %}
{% if perms.core.add_feeding %}
<a class="dropdown-item p-2" href="{% url 'core:feeding-add' %}">
<i class="icon-feeding" aria-hidden="true"></i>
{% trans "Feeding" %}
</a>
{% endif %}
{% if perms.core.add_pumping %}
<a class="dropdown-item p-2" href="{% url 'core:pumping-add' %}">
<i class="icon-pumping" aria-hidden="true"></i>
{% trans "Pumping" %}
</a>
{% endif %}
{% if perms.core.add_note %}
<a class="dropdown-item p-2" href="{% url 'core:note-add' %}">
<i class="icon-note" aria-hidden="true"></i>
{% trans "Note" %}
</a>
{% endif %}
{% if perms.core.add_sleep %}
<a class="dropdown-item p-2" href="{% url 'core:sleep-add' %}">
<i class="icon-sleep" aria-hidden="true"></i>
{% trans "Sleep" %}
</a>
{% endif %}
{% if perms.core.add_tummytime %}
<a class="dropdown-item p-2" href="{% url 'core:tummytime-add' %}">
<i class="icon-tummytime" aria-hidden="true"></i>
{% 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">
<span class="navbar-toggler-icon"></span>
</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' %}">
<i class="icon-dashboard" aria-hidden="true"></i>
{% 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"
href="#"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"><i class="icon-child" aria-hidden="true"></i>
{% 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' %}">
<i class="icon-child" aria-hidden="true"></i>
{% trans "Children" %}
</a>
{% endif %}
{% if perms.core.add_child %}
<a class="dropdown-item ps-5{% if request.path == '/children/add/' %} active{% endif %}"
href="{% url 'core:child-add' %}"><i class="icon-add" aria-hidden="true"></i>
{% trans "Child" %}
</a>
{% 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 %}"
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"
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">
{% if perms.core.view_bmi %}
<a class="dropdown-item{% if request.path == '/bmi/' %} active{% endif %}"
href="{% url 'core:bmi-list' %}">
<i class="icon-bmi" aria-hidden="true"></i>
{% trans "BMI" %}
</a>
{% endif %}
{% if perms.core.add_bmi %}
<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 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 %}"
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 %}
<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 %}"
href="{% url 'core:height-add' %}"><i class="icon-add" aria-hidden="true"></i>
{% 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 %}"
href="{% url 'core:temperature-add' %}"><i class="icon-add" aria-hidden="true"></i>
{% 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 %}"
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"
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">
{% 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>
{% trans "Changes" %}
</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 %}"
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 %}"
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 %}"
href="{% url 'core:bottle-feeding-add' %}"><i class="icon-add" aria-hidden="true"></i>
{% 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 %}"
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 %}"
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 %}"
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 %}"
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 %}
{% timer_nav %}
{% endif %}
</ul>
{% if request.user %}
<ul class="navbar-nav ms-auto">
<li class="nav-item dropdown">
<a id="nav-user-menu-link"
class="nav-link dropdown-toggle"
href="#"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
<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">
<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-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>
</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>
{% endif %}
<h6 class="dropdown-header">{% trans "Support" %}</h6>
<a href="https://github.com/babybuddy/babybuddy" class="dropdown-item">
<i class="icon-source" aria-hidden="true"></i> {% trans "Source Code" %}</a>
<a href="https://gitter.im/babybuddy/Lobby" class="dropdown-item">
<i class="icon-chat" aria-hidden="true"></i> {% trans "Chat / Support" %}</a>
<h6 class="dropdown-header">v{% version_string %}</h6>
</div>
</li>
</ul>
{% endif %}
</div>
<a class="text-body-secondary"
href="{% url 'dashboard:dashboard' %}"
aria-expanded="false"><i class="icon-2x icon-dashboard" aria-hidden="true"></i>
</a>
&nbsp;
</div>
</nav>
<div>
<a class="text-body-secondary"
href="{% url 'core:timeline' %}"
aria-expanded="false"><i class="icon-2x icon-timeline" aria-hidden="true"></i>
</a>
&nbsp;
</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"
href="#"
role="button"
id="nav-quick-add-link"
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">
{% if perms.core.add_diaperchange %}
<a class="dropdown-item p-2" href="{% url 'core:diaperchange-add' %}">
<i class="icon-diaperchange" aria-hidden="true"></i>
{% trans "Diaper Change" %}
</a>
{% endif %}
{% if perms.core.add_feeding %}
<a class="dropdown-item p-2" href="{% url 'core:feeding-add' %}">
<i class="icon-feeding" aria-hidden="true"></i>
{% trans "Feeding" %}
</a>
{% endif %}
{% if perms.core.add_pumping %}
<a class="dropdown-item p-2" href="{% url 'core:pumping-add' %}">
<i class="icon-pumping" aria-hidden="true"></i>
{% trans "Pumping" %}
</a>
{% endif %}
{% if perms.core.add_note %}
<a class="dropdown-item p-2" href="{% url 'core:note-add' %}">
<i class="icon-note" aria-hidden="true"></i>
{% trans "Note" %}
</a>
{% endif %}
{% if perms.core.add_sleep %}
<a class="dropdown-item p-2" href="{% url 'core:sleep-add' %}">
<i class="icon-sleep" aria-hidden="true"></i>
{% trans "Sleep" %}
</a>
{% endif %}
{% if perms.core.add_tummytime %}
<a class="dropdown-item p-2" href="{% url 'core:tummytime-add' %}">
<i class="icon-tummytime" aria-hidden="true"></i>
{% 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">
<span class="navbar-toggler-icon"></span>
</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' %}">
<i class="icon-dashboard" aria-hidden="true"></i>
{% 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"
href="#"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"><i class="icon-child" aria-hidden="true"></i>
{% 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' %}">
<i class="icon-child" aria-hidden="true"></i>
{% trans "Children" %}
</a>
{% endif %}
{% if perms.core.add_child %}
<a class="dropdown-item ps-5{% if request.path == '/children/add/' %} active{% endif %}"
href="{% url 'core:child-add' %}"><i class="icon-add" aria-hidden="true"></i>
{% trans "Child" %}
</a>
{% 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 %}"
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"
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">
{% if perms.core.view_bmi %}
<a class="dropdown-item{% if request.path == '/bmi/' %} active{% endif %}"
href="{% url 'core:bmi-list' %}">
<i class="icon-bmi" aria-hidden="true"></i>
{% trans "BMI" %}
</a>
{% endif %}
{% if perms.core.add_bmi %}
<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 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 %}"
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 %}
<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 %}"
href="{% url 'core:height-add' %}"><i class="icon-add" aria-hidden="true"></i>
{% 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 %}"
href="{% url 'core:temperature-add' %}"><i class="icon-add" aria-hidden="true"></i>
{% 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 %}"
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"
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">
{% 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>
{% trans "Changes" %}
</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 %}"
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 %}"
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 %}"
href="{% url 'core:bottle-feeding-add' %}"><i class="icon-add" aria-hidden="true"></i>
{% 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 %}"
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 %}"
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 %}"
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 %}"
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 %}
{% timer_nav %}
{% endif %}
</ul>
{% if request.user %}
<ul class="navbar-nav ms-auto">
<li class="nav-item dropdown">
<a id="nav-user-menu-link"
class="nav-link dropdown-toggle"
href="#"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
<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">
<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-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>
</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>
{% endif %}
<h6 class="dropdown-header">{% trans "Support" %}</h6>
<a href="https://github.com/babybuddy/babybuddy" class="dropdown-item">
<i class="icon-source" aria-hidden="true"></i> {% trans "Source Code" %}</a>
<a href="https://gitter.im/babybuddy/Lobby" class="dropdown-item">
<i class="icon-chat" aria-hidden="true"></i> {% trans "Chat / Support" %}</a>
<h6 class="dropdown-header">v{% version_string %}</h6>
</div>
</li>
</ul>
{% endif %}
</div>
</div>
</nav>
{% endblock %}

View File

@ -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' %}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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>

View File

@ -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 %}

View File

@ -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' %}

View File

@ -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 %}

View File

@ -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 &mdash;
{% endblocktrans %}

View File

@ -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' %}

View File

@ -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 %}

View File

@ -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">

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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>

View File

@ -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 %}

View File

@ -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">
@ -11,10 +9,10 @@
<span class="text-primary">Baby</span> Buddy
</h1>
</a>
</div>
<div class="p-4 rounded text-light">
{% include 'babybuddy/messages.html' %}
{% block content %}{% endblock %}
</div>
</div>
<div class="p-4 rounded text-light">
{% include 'babybuddy/messages.html' %}
{% block content %}{% endblock %}
</div>
</div>
{% endblock %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -1,46 +1,34 @@
{% 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">
{% blocktrans trimmed %}
<strong>Oh snap!</strong> The two passwords did not
match. Please try again.
{% endblocktrans %}
{% blocktrans trimmed %}
<strong>Oh snap!</strong> The two passwords did not
match. Please try again.
{% endblocktrans %}
</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 %}

View File

@ -1,22 +1,22 @@
{% 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
password, if an account exists with the email you entered. You
should receive them shortly.
{% endblocktrans %}
{% 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 %}
</p>
<p class="mb-0">
{% blocktrans trimmed %}
If you don't receive an email, please make sure you've entered the
address you registered with, and check your spam folder.
{% endblocktrans %}
{% blocktrans trimmed %}
If you don't receive an email, please make sure you've entered the
address you registered with, and check your spam folder.
{% endblocktrans %}
</p>
</div>
{% endblock %}

View File

@ -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 youve 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 youve forgotten:' %} {{ user.get_username }}
{% translate "Thanks for using Baby Buddy!" %}
{% endautoescape %}

View File

@ -1,33 +1,25 @@
{% 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 %}
Enter your account email address in the form below. If the address
is valid, you will receive instructions for resetting your
password.
{% endblocktrans %}
{% blocktrans trimmed %}
Enter your account email address in the form below. If the address
is valid, you will receive instructions for resetting your
password.
{% 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 %}

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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>

View File

@ -1,37 +1,34 @@
{% 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">
<div class="col-lg-4 col-md-6 pb-3 text-center">
{% if object.picture %}
{% 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" />
{% endif %}
<div class="child-name display-4">{{ object }}</div>
<p class="lead">
{% 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' %}
<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" />
{% endif %}
<div class="child-name display-4">{{ object }}</div>
<p class="lead">
{% 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' %}
</div>
</div>
</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="row">
<div class="col-lg-8 offset-lg-4 col-md-6 offset-md-6">{% include 'timeline/_timeline.html' %}</div>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -1,10 +1,13 @@
{% 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 != '' %}
{% include option.template_name with widget=option %}
{% include option.template_name with widget=option %}
{% endif %}
{% endfor %}
{% endfor %}
</div>{% endwith %}
</div>
{% endwith %}

View File

@ -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>

View File

@ -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 %}
<img src="{% static 'babybuddy/img/core/child-placeholder.png' %}"
width="40" height="40" class="img-fluid rounded-circle" />
{% endif %}
<img src="{{ thumb.url }}" class="img-fluid rounded-circle" />
{% else %}
<img src="{% static 'babybuddy/img/core/child-placeholder.png' %}"
width="40"
height="40"
class="img-fluid rounded-circle" />
{% endif %}

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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>

View File

@ -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 %}

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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>

View File

@ -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>

View File

@ -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,44 +34,45 @@
{% 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>
{% endif %}
</td>
<td>{{ note.note }}</td>
<td>
{% include "core/render_tag_list.html" with tags=note.tags.all %}
</td>
</tr>
{% empty %}
<tr>
<th colspan="5">{% trans "No notes found." %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% include 'babybuddy/paginator.html' %}
{% endblock %}
<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>
</tr>
{% empty %}
<tr>
<th colspan="5">{% trans "No notes found." %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% include 'babybuddy/paginator.html' %}
{% endblock %}

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -1,34 +1,38 @@
{% 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">
<a class="m-0 p-0 text-success"
title="{% trans "Quick Start Timer" %}"
href="#"
role="button"
id="quick-timer-menu-toggle"
data-bs-toggle="dropdown"
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">
<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 }}">
{% 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">
<i class="icon-2x icon-timer" aria-hidden="true"></i>
</button>
{% endif %}
<a class="m-0 p-0 text-success"
title="{% trans "Quick Start Timer" %}"
href="#"
role="button"
id="quick-timer-menu-toggle"
data-bs-toggle="dropdown"
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">
<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 }}">
{% 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">
<i class="icon-2x icon-timer" aria-hidden="true"></i>
</button>
{% endif %}
</form>

View File

@ -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>

View File

@ -1,5 +1,5 @@
{% for tag in tags %}
{% include "core/render_tag.html" %}
{% empty %}
-
-
{% endfor %}

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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 %}

View File

@ -1,98 +1,85 @@
{% 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"
href="{% instance_add_url 'core:feeding-add' %}"
role="button"><i class="icon-feeding" aria-hidden="true"></i>
{% 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"
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"
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" %}">
{% 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">
{% 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>
</form>
{% endif %}
</div>
</div>
</div>
<a class="btn btn-success btn-lg"
href="{% instance_add_url 'core:feeding-add' %}"
role="button"><i class="icon-feeding" aria-hidden="true"></i>
{% 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"
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"
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" %}">
{% 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">
{% 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>
</form>
{% endif %}
</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 %}

View File

@ -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>

View File

@ -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" %}
@ -20,34 +19,36 @@
<div class="table-responsive">
<table class="table table-instances table-borderless table-striped table-hover align-middle">
<thead>
<tr>
<th>{% trans "Start" %}</th>
<th>{% trans "Name" %}</th>
{% if not unique_child %}
<th>{% trans "Child" %}</th>
{% endif %}
<th>{% trans "User" %}</th>
</tr>
<tr>
<th>{% trans "Start" %}</th>
<th>{% trans "Name" %}</th>
{% if not unique_child %}
<th>{% trans "Child" %}</th>
{% endif %}
<th>{% trans "User" %}</th>
</tr>
</thead>
<tbody>
{% 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>
{% if not unique_child %}
{% for timer in object_list %}
<tr>
<th scope="row">{{ timer.start|datetime_short }}</th>
<td>
{% if timer.child %}
<a href="{% url 'core:child' timer.child.slug %}">{{ timer.child }}</a>
{% endif %}
<a href="{% url 'core:timer-detail' timer.id %}">{{ timer }}</a>
</td>
{% endif %}
<td>{{ timer.user_username }}</td>
</tr>
{% empty %}
<tr>
<th colspan="7">{% trans "No timer entries found." %}</th>
</tr>
{% endfor %}
{% if not unique_child %}
<td>
{% if timer.child %}
<a href="{% url 'core:child' timer.child.slug %}">{{ timer.child }}</a>
{% endif %}
</td>
{% endif %}
<td>{{ timer.user_username }}</td>
</tr>
{% empty %}
<tr>
<th colspan="7">{% trans "No timer entries found." %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>

View File

@ -1,54 +1,57 @@
{% load i18n %}
<li class="nav-item dropdown">
<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">
{% 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" %}
</a>
{% endif %}
{% if perms.core.view_timer %}
<a class="dropdown-item" href="{% url 'core:timer-list' %}">
<i class="icon-list" aria-hidden="true"></i> {% trans "View Timers" %}
</a>
{% endif %}
{% if perms.core.add_timer %}
<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 }}">
{% include "core/child_thumbnail.html" %}
<span class="text-wrap ms-2">{{ child }}</span>
</button>
{% endfor %}
{% else %}
<button class="dropdown-item" type="submit">
<i class="icon-timer" aria-hidden="true"></i> {% trans "Quick Start Timer" %}
<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">
{% 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" %}
</a>
{% endif %}
{% if perms.core.view_timer %}
<a class="dropdown-item" href="{% url 'core:timer-list' %}">
<i class="icon-list" aria-hidden="true"></i> {% trans "View Timers" %}
</a>
{% endif %}
{% if perms.core.add_timer %}
<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 }}">
{% include "core/child_thumbnail.html" %}
<span class="text-wrap ms-2">{{ child }}</span>
</button>
{% endif %}
</form>
{% endif %}
{% if timers %}
<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>
{% empty %}
<a class="dropdown-item disabled" href="#">{% trans "None" %}</a>
{% endfor %}
{% endif %}
</div>
{% endfor %}
{% else %}
<button class="dropdown-item" type="submit">
<i class="icon-timer" aria-hidden="true"></i> {% trans "Quick Start Timer" %}
</button>
{% endif %}
</form>
{% endif %}
{% if timers %}
<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>
{% empty %}
<a class="dropdown-item disabled" href="#">{% trans "None" %}</a>
{% endfor %}
{% endif %}
</div>
</li>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -1,43 +1,46 @@
{% 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 }};">
{{ t.name }}
<span class="add-remove-icon ps-1 pe-1">-</span>
</span>
<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 %}
</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 }};">
{{ t.name }}
<span class="add-remove-icon ps-1 pe-1">+</span>
</span>
<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"
name="{{ widget.name }}"
value="{% for t in widget.value %}&quot;{{ t.name }}&quot;{% if not forloop.last %},{% endif %}{% endfor %}"
>
<input type="hidden"
name="{{ widget.name }}"
value="{% for t in widget.value %}&quot;{{ t.name }}&quot;{% 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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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>

View File

@ -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 %}

View File

@ -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,35 +10,29 @@
{% 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' }}&nbsp;{% 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' }}&nbsp;{% 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">
{% if key == 0 %}
{% if key == 0 %}
{% trans "today" %}
{% elif key == 1 %}
{% trans "yesterday" %}

View File

@ -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 %}

View File

@ -1,32 +1,30 @@
{% 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 %}">
<div class="last-feeding-method text-center">{{ feeding.get_method_display }}</div>
<div class="text-center small text-body-secondary">
{% if forloop.last %}
{% trans "most recent" %}
{% else %}
{% blocktrans trimmed with n=forloop.revcounter0 count counter=n %}
{{ n }} feeding ago
{% plural %}
{{ n }} feedings ago
{% endblocktrans %}
{% endif %}
{% for feeding in feedings %}
<div class="carousel-item{% if forloop.counter == feedings|length %} active{% endif %}">
<div class="last-feeding-method text-center">{{ feeding.get_method_display }}</div>
<div class="text-center small text-body-secondary">
{% if forloop.last %}
{% trans "most recent" %}
{% else %}
{% blocktrans trimmed with n=forloop.revcounter0 count counter=n %}
{{ n }} feeding ago
{% plural %}
{{ n }} feedings ago
{% endblocktrans %}
{% endif %}
</div>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
{% if feedings|length > 1 %}
<a class="carousel-control-prev"
@ -48,5 +46,4 @@
{% else %}
{% trans "None" %}
{% endif %}
{% endblock %}

View File

@ -1,61 +1,56 @@
{% 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">
<div class="carousel-inner">
{% for feeding in feedings %}
<div class="carousel-item{% if forloop.counter == 1 %} active{% endif %}">
<div class="last-feeding-method text-center">
{% if feeding.total %}
{{ feeding.total|floatformat }}
{% else %}
{% trans "None" %}
{% endif %}
</div>
<div class="text-center small">
{% if feeding.count > 0 %}
{% blocktrans trimmed count counter=feeding.count %}
{{ counter }} feeding
{% plural %}
{{ counter }} feedings
{% 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 %}">
<div class="last-feeding-method text-center">
{% if feeding.total %}
{{ feeding.total|floatformat }}
{% else %}
{% trans "None" %}
{% endif %}
</div>
<div class="text-center small">
{% if feeding.count > 0 %}
{% blocktrans trimmed count counter=feeding.count %}
{{ counter }} feeding
{% plural %}
{{ counter }} feedings
{% endblocktrans %}
{% endif %}
</div>
{% blocktrans trimmed with since=feeding.date.date|dayssince %}
<div class="text-center small text-body-secondary">{{ since }}</div>
{% endblocktrans %}
{% endif %}
</div>
{% blocktrans trimmed with since=feeding.date.date|dayssince %}
<div class="text-center small text-body-secondary">
{{ since }}
</div>
{% endblocktrans %}
</div>
{% endfor %}
</div>
{% if feedings|length > 1 %}
<a class="carousel-control-prev"
href="#feeding-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="#feeding-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>
{% endfor %}
</div>
{% if feedings|length > 1 %}
<a class="carousel-control-prev"
href="#feeding-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="#feeding-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 %}

View File

@ -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 }}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -1,54 +1,56 @@
{% 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">
<div class="carousel-inner">
{% for sleep in sleeps %}
<div class="carousel-item{% if forloop.counter == 1 %} active{% endif %}">
<div class="last-sleep-method text-center">
{% if sleep.total %}
{{ sleep.total|duration_string:"m" }}
{% else %}
{% trans "None" %}
{% endif %}
</div>
<div class="text-center small">
{% if sleep.count > 0 %}
{% blocktrans trimmed count counter=sleep.count %}
{{ counter }} sleep
{% plural %}
{{ counter }} sleeps
{% 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 %}">
<div class="last-sleep-method text-center">
{% if sleep.total %}
{{ sleep.total|duration_string:"m" }}
{% else %}
{% trans "None" %}
{% endif %}
</div>
<div class="text-center small">
{% if sleep.count > 0 %}
{% blocktrans trimmed count counter=sleep.count %}
{{ counter }} sleep
{% plural %}
{{ counter }} sleeps
{% endblocktrans %}
{% endif %}
</div>
{% blocktrans trimmed with since=sleep.date.date|dayssince %}
<div class="text-center small text-body-secondary">{{ since }}</div>
{% endblocktrans %}
{% endif %}
</div>
{% blocktrans trimmed with since=sleep.date.date|dayssince %}
<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">
<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">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">{% trans "Next" %}</span>
</a>
{% endfor %}
</div>
{% if sleeps|length > 1 %}
<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">
<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 %}

View File

@ -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,44 +7,46 @@
</div>
<div class="card-body text-center">
{% if stats|length > 0 %}
<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 %}">
<span class="card-title">
{% if stat.stat %}
{% if stat.type == 'duration' %}
{{ stat.stat|duration_string:'m' }}
{% elif stat.type == 'float' %}
{{ stat.stat|floatformat }}
<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 %}">
<span class="card-title">
{% if stat.stat %}
{% if stat.type == 'duration' %}
{{ stat.stat|duration_string:'m' }}
{% elif stat.type == 'float' %}
{{ stat.stat|floatformat }}
{% else %}
{{ stat.stat }}
{% endif %}
{% else %}
{{ stat.stat }}
<em>{% trans "Not enough data" %}</em>
{% endif %}
{% else %}
<em>{% trans "Not enough data" %}</em>
{% endif %}
</span>
<div class="card-text">{{ stat.title }}</div>
</div>
{% endfor %}
</span>
<div class="card-text">{{ stat.title }}</div>
</div>
{% endfor %}
</div>
<a class="carousel-control-prev"
href="#statistics-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="#statistics-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>
</div>
<a class="carousel-control-prev"
href="#statistics-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="#statistics-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>
</div>
{% else %}
<span class="card-title"><strong>{% trans "No data yet" %}</strong></span>
<span class="card-title"><strong>{% trans "No data yet" %}</strong></span>
{% endif %}
</div>
</div>

View File

@ -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,19 +12,18 @@
{% endblocktrans %}
{% endwith %}
{% endblock %}
{% block listgroup %}
<ul class="list-group list-group-flush">
{% for timer in instances %}
<a href="{% url 'core:timer-detail' timer.id %}"
class="list-group-item list-group-item-action">
<strong>{{ timer.title_with_child }}</strong>
<p class="text-body-secondary small m-0">
{% blocktrans trimmed with start=timer.start|time user=timer.user_username %}
Started by {{ user }} at {{ start }}
{% endblocktrans %}
</p>
</a>
{% endfor %}
{% for timer in instances %}
<a href="{% url 'core:timer-detail' timer.id %}"
class="list-group-item list-group-item-action">
<strong>{{ timer.title_with_child }}</strong>
<p class="text-body-secondary small m-0">
{% blocktrans trimmed with start=timer.start|time user=timer.user_username %}
Started by {{ user }} at {{ start }}
{% endblocktrans %}
</p>
</a>
{% endfor %}
</ul>
{% endblock %}

View File

@ -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,15 +10,14 @@
{% trans "None" %}
{% endif %}
{% endblock %}
{% block listgroup %}
<ul class="list-group list-group-flush text-body-secondary small">
{% for instance in instances %}
<li class="list-group-item">
{% blocktrans trimmed with duration=instance.duration|duration_string end=instance.end|time %}
{{ duration }} at {{ end }}
{% endblocktrans %}
</li>
{% endfor %}
{% for instance in instances %}
<li class="list-group-item">
{% blocktrans trimmed with duration=instance.duration|duration_string end=instance.end|time %}
{{ duration }} at {{ end }}
{% endblocktrans %}
</li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -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