Commit ab62d694 authored by felix.herrmann's avatar felix.herrmann
Browse files

fix(UIUX): add links to sidebar follow information numbers

parent 3a875b50
......@@ -158,6 +158,9 @@ class User(AbstractUser):
return datasets
def get_published_datasets_count(self):
return len(self.get_published_datasets())
def get_projects(self):
return Project.objects.filter(user=self).order_by("name")
# projects_list = list()
......@@ -175,7 +178,7 @@ class User(AbstractUser):
return followers(self)
def get_following_count(self):
return len(following(self, User))
return len(following(self))
def get_followers_count(self):
return len(followers(self))
{% load static i18n %}
<div class="col">
<a href="#">{{ request.user.get_followers_count }}</a><br>
<a href="{% url 'ddusers.dashboard_page' %}">{{ request.user.get_followers_count }}</a><br>
{% trans 'Followers' %}
<div class="col">
<a href="#">{{ request.user.get_following_count }}</a><br>
<a href="{% url 'ddusers:user_feed' %}">{{ request.user.get_following_count }}</a><br>
{% trans 'Following' %}
<div class="col">
<a href="#">200</a><br>
<a href="{% url 'dddatasets:prep_listing' %}">{{ request.user.get_published_datasets_count }}</a><br>
{% trans 'Datasets' %}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment