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 %}
|
2012-07-20 17:20:18 +02:00
|
|
|
<span class="pull-right">
|
|
|
|
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_overlay" overlay %}">
|
|
|
|
<img src="{{ STATIC_URL}}/img/watch-icon.png" alt="Watch" >
|
|
|
|
</button>
|
|
|
|
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_overlay" overlay %}">
|
|
|
|
<img src="{{ STATIC_URL}}/img/unwatch-icon.png" alt="Unwatch" >
|
|
|
|
</button>
|
|
|
|
</span>
|
2012-07-10 16:15:06 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</h2>
|
|
|
|
|
2011-11-23 18:03:07 +01:00
|
|
|
{% packages packages %}
|
2012-07-10 16:15:06 +02:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
2012-08-10 17:45:43 +02:00
|
|
|
$(document).ready(function () {
|
2012-07-10 16:15:06 +02:00
|
|
|
$(".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");
|
|
|
|
});
|
|
|
|
});
|
2012-08-10 17:45:43 +02:00
|
|
|
});
|
2012-07-10 16:15:06 +02:00
|
|
|
</script>
|
|
|
|
|
2011-11-23 18:03:07 +01:00
|
|
|
{% endblock %}
|