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-07-20 09:04:15 +02:00
|
|
|
{% load djeuscan_helpers %}
|
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 %}">
|
2012-07-20 17:10:12 +02:00
|
|
|
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" >
|
2012-07-10 16:15:06 +02:00
|
|
|
</button>
|
|
|
|
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_overlay" overlay %}">
|
2012-07-20 17:10:12 +02:00
|
|
|
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" >
|
2012-07-10 16:15:06 +02:00
|
|
|
</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 %}
|