2011-11-23 18:03:07 +01:00
|
|
|
{% extends "euscan/_datatable.html" %}
|
|
|
|
|
2012-07-10 16:15:06 +02:00
|
|
|
{% load url from future %}
|
2012-06-14 10:03:49 +02:00
|
|
|
{% load euscan %}
|
2011-11-23 18:03:07 +01:00
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ block.super }} - Overlay: {{ overlay }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2012-07-10 16:15:06 +02:00
|
|
|
<h2>
|
|
|
|
Overlay: {{ overlay }}
|
|
|
|
{% if user.is_authenticated %}
|
|
|
|
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_overlay" overlay %}">
|
|
|
|
Watch
|
|
|
|
</button>
|
|
|
|
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_overlay" overlay %}">
|
|
|
|
Unwatch
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</h2>
|
|
|
|
|
2011-11-23 18:03:07 +01:00
|
|
|
{% packages packages %}
|
2012-07-10 16:15:06 +02:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(".favourite-button").click(function() {
|
|
|
|
$.post($(this).data("url"), function() {
|
|
|
|
$(".unfavourite-button").removeClass("hide");
|
|
|
|
$(".favourite-button").addClass("hide");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".unfavourite-button").click(function() {
|
|
|
|
$.post($(this).data("url"), function() {
|
|
|
|
$(".favourite-button").removeClass("hide");
|
|
|
|
$(".unfavourite-button").addClass("hide");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2011-11-23 18:03:07 +01:00
|
|
|
{% endblock %}
|