2020-02-29 10:39:42 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% load i18n static %}
|
|
|
|
|
2020-02-29 10:57:19 +00:00
|
|
|
{% block extracss %}
|
|
|
|
<meta name="turbolinks-cache-control" content="no-preview">
|
|
|
|
{% endblock %}
|
2020-02-29 10:39:42 +00:00
|
|
|
|
|
|
|
{% block content %}
|
2020-02-29 11:32:24 +00:00
|
|
|
Old:
|
|
|
|
{% for reward in old_rewards %}
|
|
|
|
{{ reward.name }} (won by {{ previous_reward.rewarded_by.note }}, ticket n°{{ previous_reward.rewarded_by.number }})<br />
|
|
|
|
{% endfor %}
|
|
|
|
Previous: {{ previous_reward.name }} (won by {{ previous_reward.rewarded_by.note }}, ticket n°{{ previous_reward.rewarded_by.number }})<br />
|
|
|
|
Current: {{ current_reward.name }}<br />
|
|
|
|
Next:
|
|
|
|
{% for reward in next_rewards %}
|
|
|
|
{{ reward.name }}<br />
|
|
|
|
{% endfor %}
|
2020-02-29 10:39:42 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2020-02-29 10:57:19 +00:00
|
|
|
{% block extrajavascript %}
|
|
|
|
<script>
|
|
|
|
var reloadWithTurbolinks = (function () {
|
|
|
|
var scrollPosition
|
|
|
|
|
|
|
|
function reload () {
|
|
|
|
scrollPosition = [window.scrollX, window.scrollY]
|
|
|
|
Turbolinks.visit(window.location.toString(), { action: 'replace' })
|
|
|
|
}
|
|
|
|
|
|
|
|
document.addEventListener('turbolinks:load', function () {
|
|
|
|
if (scrollPosition) {
|
|
|
|
window.scrollTo.apply(window, scrollPosition)
|
|
|
|
scrollPosition = null
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
return reload
|
|
|
|
})()
|
|
|
|
|
|
|
|
setTimeout(function(){ reloadWithTurbolinks(); }, 2000);
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|