This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(apps/users): improve profile page
- Loading branch information
1 parent
af183f9
commit 9dbb1c6
Showing
3 changed files
with
28 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
{% extends "base.html" %} | ||
{% extends "base.html" %} | ||
|
||
{% block title %}User{% endblock title %} | ||
{% block title %}{{ user.username }}{% endblock title %} | ||
|
||
{% block content %} | ||
<div class="user-profile"> | ||
<h2>{{ user.username }}</h2> | ||
|
||
{% if is_own_profile %} | ||
<p>Email: {{ user.email }}</p> | ||
{% endif %} | ||
<p>Score: {{ user.score }}</p> | ||
<p>Contests: {{ user.contest }}</p> | ||
</div> | ||
{% endblock content %} | ||
{% block content %} | ||
<div class="card"> | ||
<div | ||
class="card-header" | ||
style="display: flex; align-items: center; justify-content: space-between;" | ||
> | ||
<h2>{{ user.username }}</h2> | ||
{% if user.is_staff %} | ||
<span class="badge bg-primary float-end mt-1"> | ||
Staff | ||
</span> | ||
{% endif %} | ||
</div> | ||
<div class="card-body"> | ||
{% if request.user.is_authenticated and request.user == user %} | ||
<p>E-mail: {{ user.email }}</p> | ||
{% endif %} | ||
<p>Score: 0</p> | ||
<p>Contests: {{ user.contests|length }}</p> | ||
</div> | ||
</div> | ||
{% endblock content %} |