euscan-ng/euscanwww/djeuscan/templates/euscan/world_scan.html
volpino 9f5402f896 euscanwww: Favourite/Unfavourite template code refactored
* Now is more DRY, the JS code and the HTML code are in one place
* It works even without JS

Signed-off-by: volpino <fox91@anche.no>
2012-11-08 18:57:29 +01:00

42 lines
850 B
HTML

{% extends "euscan/_datatable.html" %}
{% load url from future %}
{% load djeuscan_helpers %}
{% load euscan_accounts_helpers %}
{% block title %}
{{ block.super }} - World Scan
{% endblock %}
{% block menu_feed %}
{{ block.super }}
<li>
<img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
<a title="World scan Feed"
href="{% url "world_scan_feed" %}?p={{ packages|join:"&p=" }}">
World scan feed
</a>
</li>
{% endblock %}
{% block content %}
<h2>
World scan:
{% if user.is_authenticated %}
<span class="pull-right padding-bottom10">
{% favourite_buttons "world" %}
</span>
{% endif %}
</h2>
{% packages packages %}
<script type="text/javascript">
window.packages = [{{ packages_ids|join:"," }}];
</script>
<script src="{{ STATIC_URL }}js/favourite.js" type="text/javascript"></script>
{% endblock %}