This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new 39c361b74 [#8446] reverted changes on members.html template to keep
tests happy
39c361b74 is described below
commit 39c361b746a57b312c324c423d5ef66cb3a940f4
Author: Guillermo Cruz <[email protected]>
AuthorDate: Thu Jul 21 12:52:16 2022 -0600
[#8446] reverted changes on members.html template to keep tests happy
---
Allura/allura/templates/jinja_master/lib.html | 4 +---
Allura/allura/templates/members.html | 3 ++-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Allura/allura/templates/jinja_master/lib.html
b/Allura/allura/templates/jinja_master/lib.html
index 34f4dc5ba..0af3f490e 100644
--- a/Allura/allura/templates/jinja_master/lib.html
+++ b/Allura/allura/templates/jinja_master/lib.html
@@ -109,15 +109,13 @@
{% endif %}
{%- endmacro %}
-{% macro user_link(user, avatar=False, size=16, nofollow=False,
show_username=False) -%}
+{% macro user_link(user, avatar=False, size=16, nofollow=False) -%}
{% if user %}
{% if not user.is_anonymous() %}
{% set profile_path = user.url() + 'profile/' if
g.user_profile_urls_with_profile_path else user.url() %}
<a href="{{profile_path}}" class="user-mention" {% if nofollow
%}rel="nofollow" {% endif %}>
{% if avatar %}
{{ gravatar_or_name(user, size) }}
- {% elif show_username %}
- {{ h.really_unicode(user.username) }}
{% else %}
{{ h.really_unicode(user.display_name) }}
{% endif %}
diff --git a/Allura/allura/templates/members.html
b/Allura/allura/templates/members.html
index ff81cfb1d..72e4f33c4 100644
--- a/Allura/allura/templates/members.html
+++ b/Allura/allura/templates/members.html
@@ -19,6 +19,7 @@
{% import 'allura:templates/jinja_master/lib.html' as lib with context %}
{% set hide_left_bar = True %}
{% set h1_text = c.project.name ~ ' ' ~ 'Project' ~ ' ' ~ 'Member List' %}
+{% set profile_path = 'profile/' if g.user_profile_urls_with_profile_path else
'' %}
{% extends g.theme.master %}
{% block title %}{{ h1_text }}{% endblock %}
{% block header %}Members{% endblock %}
@@ -36,7 +37,7 @@
{%for user in users%}
<tr>
<td>{{ user.display_name }}</td>
- <td>{{ lib.user_link(user, show_username=True) }}</td>
+ <td><a href="{{ user.url() ~ profile_path }}">{{ user.username
}}</a></td>
<td>{{user.roles}}</td>
</tr>
{%endfor%}