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:
11
euscanwww/djeuscan/templates/euscan/accounts/categories.html
Normal file
11
euscanwww/djeuscan/templates/euscan/accounts/categories.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "_base.html" %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - My categories
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h2>Welcome {{ user }}</h2>
|
||||
{% endblock %}
|
11
euscanwww/djeuscan/templates/euscan/accounts/herds.html
Normal file
11
euscanwww/djeuscan/templates/euscan/accounts/herds.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "_base.html" %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - My herds
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h2>Welcome {{ user }}</h2>
|
||||
{% endblock %}
|
11
euscanwww/djeuscan/templates/euscan/accounts/index.html
Normal file
11
euscanwww/djeuscan/templates/euscan/accounts/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "_base.html" %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - Welcome {{ user }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h2>Welcome {{ user }}</h2>
|
||||
{% endblock %}
|
@ -0,0 +1,11 @@
|
||||
{% extends "_base.html" %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - My maintainer profiles
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h2>Welcome {{ user }}</h2>
|
||||
{% endblock %}
|
16
euscanwww/djeuscan/templates/euscan/accounts/packages.html
Normal file
16
euscanwww/djeuscan/templates/euscan/accounts/packages.html
Normal file
@ -0,0 +1,16 @@
|
||||
{% extends "euscan/_datatable.html" %}
|
||||
{% load url from future %}
|
||||
|
||||
{% load packages %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - My packages
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h2>My Packages</h2>
|
||||
|
||||
{% packages packages %}
|
||||
|
||||
{% endblock %}
|
@ -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