From 557b98a67799271de5350f4cf4c4616565b61fd1 Mon Sep 17 00:00:00 2001 From: Liam Davis Date: Mon, 30 Apr 2012 13:30:18 +1000 Subject: [PATCH] Show agreed runtime for #47 --- handlers/job.py | 3 ++- templates/jobs/timer.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/handlers/job.py b/handlers/job.py index 547b343..330708d 100644 --- a/handlers/job.py +++ b/handlers/job.py @@ -133,8 +133,9 @@ def get_timer(id): abort(403) elif job.completed: redirect(get_index.url(id)) + h, m = divmod(job.time_reqd, 60) - return dict(job=job, is_poster=job.user == session.user, payment=accepted.amount) + return dict(job=job, is_poster=job.user == session.user, payment=accepted.amount, h=h, m=m) def epoch(dt): return time.mktime(dt.utctimetuple()) + dt.microsecond/1000000. diff --git a/templates/jobs/timer.html b/templates/jobs/timer.html index 0c29440..0abf302 100644 --- a/templates/jobs/timer.html +++ b/templates/jobs/timer.html @@ -7,7 +7,7 @@ {% block content %}

Timer

- Press the start button once you and your Companion are together in your game. Once you both click start, the job will begin.
+ Press the start button once you and your Companion are together in your game. Once you both click start, the job will begin. You have agreed to a total time of {% if h %}{{ h }} hours and {% endif %} {{ m }} minutes for this job.