From c38290838b5ca2b261f9f63a2a46037373dc9832 Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Sat, 9 Sep 2017 12:57:31 -0400 Subject: [PATCH] Add action buttons to timer detail page. --- core/templates/core/timer_detail.html | 9 +++++++-- core/urls.py | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/templates/core/timer_detail.html b/core/templates/core/timer_detail.html index 9c861e2e..90b5d723 100644 --- a/core/templates/core/timer_detail.html +++ b/core/templates/core/timer_detail.html @@ -6,11 +6,12 @@ {% block content %}
-

+ +
{{ object.current_duration|hours }}h {{ object.current_duration|minutes }}m {{ object.current_duration|seconds }}s -

+

Started {{ object.start }} {% if not object.active %} @@ -48,6 +49,10 @@ {% endif %} {% if object.active and perms.core.change_timer %} + + diff --git a/core/urls.py b/core/urls.py index 9f0df7f5..fd73c0fc 100644 --- a/core/urls.py +++ b/core/urls.py @@ -57,6 +57,8 @@ urlpatterns = [ name='timer-delete'), url(r'^timer/(?P[0-9]+)/stop/$', views.TimerStop.as_view(), name='timer-stop'), + url(r'^timer/(?P[0-9]+)/restart/$', views.TimerRestart.as_view(), + name='timer-restart'), url(r'^tummy-time/$', views.TummyTimeList.as_view(), name='tummytime-list'),