From ed1d6b779eb76f1cd3fe01fa7e35ee6f7c39008c Mon Sep 17 00:00:00 2001 From: Ohad Lutzky Date: Fri, 2 Jul 2021 20:10:11 +0100 Subject: [PATCH] Show absolute last times in dashboard --- dashboard/templates/cards/diaperchange_last.html | 5 +++-- dashboard/templates/cards/feeding_last.html | 5 +++-- dashboard/templates/cards/sleep_last.html | 5 +++-- dashboard/templates/cards/tummytime_last.html | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dashboard/templates/cards/diaperchange_last.html b/dashboard/templates/cards/diaperchange_last.html index e3299ed0..0508ca6a 100644 --- a/dashboard/templates/cards/diaperchange_last.html +++ b/dashboard/templates/cards/diaperchange_last.html @@ -5,8 +5,9 @@ {% block title %} {% if change %} - {% blocktrans trimmed with time=change.time|timesince %} - {{ time }} ago + {% blocktrans trimmed with since=change.time|timesince time=change.time|time %} +
{{ since }} ago
+ {{ time }} {% endblocktrans %} {% else %} {% trans "None" %} diff --git a/dashboard/templates/cards/feeding_last.html b/dashboard/templates/cards/feeding_last.html index abcf8de3..00faea80 100644 --- a/dashboard/templates/cards/feeding_last.html +++ b/dashboard/templates/cards/feeding_last.html @@ -5,8 +5,9 @@ {% block title %} {% if feeding %} - {% blocktrans trimmed with time=feeding.start|timesince %} - {{ time }} ago + {% blocktrans trimmed with since=feeding.start|timesince time=feeding.start|time %} +
{{ since }} ago
+ {{ time }} {% endblocktrans %} {% else %} {% trans "None" %} diff --git a/dashboard/templates/cards/sleep_last.html b/dashboard/templates/cards/sleep_last.html index 805b17db..8a04df01 100644 --- a/dashboard/templates/cards/sleep_last.html +++ b/dashboard/templates/cards/sleep_last.html @@ -5,8 +5,9 @@ {% block title %} {% if sleep %} - {% blocktrans trimmed with time=sleep.end|timesince %} - {{ time }} ago + {% blocktrans trimmed with since=sleep.end|timesince time=sleep.end|time %} +
{{ since }} ago
+ {{ time }} {% endblocktrans %} {% else %} {% trans "None" %} diff --git a/dashboard/templates/cards/tummytime_last.html b/dashboard/templates/cards/tummytime_last.html index e423bfbf..9cdb1cd4 100644 --- a/dashboard/templates/cards/tummytime_last.html +++ b/dashboard/templates/cards/tummytime_last.html @@ -5,8 +5,9 @@ {% block title %} {% if tummytime %} - {% blocktrans trimmed with time=tummytime.time|timesince %} - {{ time }} ago + {% blocktrans trimmed with since=tummytime.time|timesince time=tummytime.time|time %} +
{{ since }} ago
+ {{ time }} {% endblocktrans %} {% else %} {% trans "Never" %}