euscanwww: Added account profile page
* Added an account profile page * Added a button to favourite packages * Implemented models to favourite categories, herds, maintainers but still to implement Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
@ -27,10 +27,13 @@
|
||||
<h2>
|
||||
{{ package.category }}/{{ package.name }}
|
||||
|
||||
{% if user.is_superuser %}
|
||||
{% if user.is_authenticated %}
|
||||
<button class="refresh-button" data-package="{{ package.category }}/{{ package.name }}">
|
||||
Refresh
|
||||
</button>
|
||||
<button class="favourite-button" data-url="{% url "favourite_package" package.category package.name %}">
|
||||
Add to favourites
|
||||
</button>
|
||||
{% endif %}
|
||||
</h2>
|
||||
<dl>
|
||||
@ -145,6 +148,12 @@
|
||||
alert("Submitted!");
|
||||
});
|
||||
});
|
||||
|
||||
$(".favourite-button").click(function() {
|
||||
$.post($(this).data("url"), function() {
|
||||
alert("Favourited!");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user