Skip to content

Commit 59d3958

Browse files
Merge pull request #79 from Promptly-Technologies-LLC/67-show-the-users-profile-picture-as-a-thumbnail-in-the-upper-right-corner-of-the-page
Display user avatar thumbnail instead of silhouette if available
2 parents 52ed410 + b1aa87a commit 59d3958

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

templates/components/header.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
<li class="nav-item dropdown">
2525
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
2626
<button class="profile-button btn p-0 border-0 bg-transparent">
27-
{{ render_silhouette() }}
27+
{% if user.avatar_data %}
28+
<img src="{{ url_for('get_avatar') }}" alt="User Avatar" class="d-inline-block align-top" width="30" height="30" style="border-radius: 50%;">
29+
{% else %}
30+
{{ render_silhouette() }}
31+
{% endif %}
2832
</button>
2933
</a>
3034
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">

templates/users/organization.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ <h1 class="mb-4">{{ organization.name }}</h1>
6363
{% for user in role.users %}
6464
<tr>
6565
<td class="text-center" style="width: 50px;">
66-
{{ render_silhouette(width=40, height=40) }}
66+
{% if user.avatar_data %}
67+
<img src="{{ url_for('get_avatar') }}" alt="User Avatar" class="d-inline-block align-top" width="40" height="40" style="border-radius: 50%;">
68+
{% else %}
69+
{{ render_silhouette(width=40, height=40) }}
70+
{% endif %}
6771
</td>
6872
<td>{{ user.name }}</td>
6973
<td>{{ user.email }}</td>

0 commit comments

Comments
 (0)