Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Discuss Data Project
Discuss Data
Commits
ab62d694
Commit
ab62d694
authored
May 30, 2020
by
felix.herrmann
Browse files
fix(UIUX): add links to sidebar follow information numbers
parent
3a875b50
Changes
2
Hide whitespace changes
Inline
Side-by-side
discuss_data/ddusers/models.py
View file @
ab62d694
...
...
@@ -158,6 +158,9 @@ class User(AbstractUser):
datasets
.
append
(
dsmo
.
get_top_version_published_dataset
())
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
))
...
...
discuss_data/templates/ddusers/_user_sidebar_followers.html
View file @
ab62d694
{% 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>
<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>
<div
class=
"col"
>
<a
href=
"
#"
>
200
</a><br>
<a
href=
"
{% url 'dddatasets:prep_listing' %}"
>
{{ request.user.get_published_datasets_count }}
</a><br>
{% trans 'Datasets' %}
</div>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment