euscanwww: Watch/unwatch packages, categories, maintainers, overlays
Added a button for watch/unwatch and a dashboard with user selected stuff only Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
@ -18,7 +18,17 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Maintainer: {{ maintainer.name }} <{{ maintainer.email }}></h2>
|
||||
<h2>
|
||||
Maintainer: {{ maintainer.name }} <{{ maintainer.email }}>
|
||||
{% if user.is_authenticated %}
|
||||
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_maintainer" maintainer.id %}">
|
||||
Watch
|
||||
</button>
|
||||
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_maintainer" maintainer.id %}">
|
||||
Unwatch
|
||||
</button>
|
||||
{% endif %}
|
||||
</h2>
|
||||
{% packages packages %}
|
||||
|
||||
<h3>Statistics</h2>
|
||||
@ -38,11 +48,28 @@
|
||||
<img src="{% url "chart_maintainer" maintainer.id 'packages-weekly' %}" />
|
||||
<img src="{% url "chart_maintainer" maintainer.id 'packages-monthly' %}" />
|
||||
</p>
|
||||
|
||||
<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>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block menus %}
|
||||
{{ block.super }}
|
||||
<div class="menu">
|
||||
<div class="menu rounded notfirst-menu">
|
||||
<dl>
|
||||
<dt>Versions</dt>
|
||||
<dd><img src="{% url "chart_maintainer" maintainer.id 'versions-monthly-small' %}" /></dd>
|
||||
@ -52,4 +79,3 @@
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
5A
|
||||
|
Reference in New Issue
Block a user