Skip to content

Commit

Permalink
Show agreed runtime for #47
Browse files Browse the repository at this point in the history
  • Loading branch information
Trezoid committed Apr 30, 2012
1 parent efcf28b commit 557b98a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion handlers/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion templates/jobs/timer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% block content %}
<h2 id="job" data-id="{{ job.id }}">Timer</h2>
<div id="first" class="timer-panel">
Press the start button once you and your Companion are together in your game. Once you both click start, the job will begin.<br>
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.<br>
<br>
<button id="start">Start</button>
</div>
Expand Down

0 comments on commit 557b98a

Please sign in to comment.