mirror of https://github.com/snachodog/mybuddy.git
Add action buttons to timer detail page.
This commit is contained in:
parent
a9bc52dfff
commit
c38290838b
|
@ -6,11 +6,12 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="jumbotron text-center{% if not object.active %} text-danger{% endif %}">
|
<div class="jumbotron text-center{% if not object.active %} text-danger{% endif %}">
|
||||||
<h1 id="timer-status">
|
|
||||||
|
<div class="h1" id="timer-status">
|
||||||
<span class="timer-hours">{{ object.current_duration|hours }}</span>h
|
<span class="timer-hours">{{ object.current_duration|hours }}</span>h
|
||||||
<span class="timer-minutes">{{ object.current_duration|minutes }}</span>m
|
<span class="timer-minutes">{{ object.current_duration|minutes }}</span>m
|
||||||
<span class="timer-seconds">{{ object.current_duration|seconds }}</span>s
|
<span class="timer-seconds">{{ object.current_duration|seconds }}</span>s
|
||||||
</h1>
|
</div>
|
||||||
<p class="lead text-secondary">
|
<p class="lead text-secondary">
|
||||||
Started {{ object.start }}
|
Started {{ object.start }}
|
||||||
{% if not object.active %}
|
{% if not object.active %}
|
||||||
|
@ -48,6 +49,10 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if object.active and perms.core.change_timer %}
|
{% if object.active and perms.core.change_timer %}
|
||||||
|
<a class="btn btn-secondary"
|
||||||
|
href="{% url 'timer-restart' timer.id %}"
|
||||||
|
role="button"><i class="fa fa-refresh" aria-hidden="true"></i></a>
|
||||||
|
|
||||||
<a class="btn btn-warning"
|
<a class="btn btn-warning"
|
||||||
href="{% url 'timer-stop' timer.id %}"
|
href="{% url 'timer-stop' timer.id %}"
|
||||||
role="button"><i class="fa fa-stop" aria-hidden="true"></i></a>
|
role="button"><i class="fa fa-stop" aria-hidden="true"></i></a>
|
||||||
|
|
|
@ -57,6 +57,8 @@ urlpatterns = [
|
||||||
name='timer-delete'),
|
name='timer-delete'),
|
||||||
url(r'^timer/(?P<pk>[0-9]+)/stop/$', views.TimerStop.as_view(),
|
url(r'^timer/(?P<pk>[0-9]+)/stop/$', views.TimerStop.as_view(),
|
||||||
name='timer-stop'),
|
name='timer-stop'),
|
||||||
|
url(r'^timer/(?P<pk>[0-9]+)/restart/$', views.TimerRestart.as_view(),
|
||||||
|
name='timer-restart'),
|
||||||
|
|
||||||
url(r'^tummy-time/$', views.TummyTimeList.as_view(),
|
url(r'^tummy-time/$', views.TummyTimeList.as_view(),
|
||||||
name='tummytime-list'),
|
name='tummytime-list'),
|
||||||
|
|
Loading…
Reference in New Issue