+ {% if content_blocked -%} title="{{ _('Filtered: ') }}{{ content_blocked }}"{% else %} title="Post: {{ post.title }}" aria-label="Post: {{ post.title }}"{% endif %} tabindex="0">
{% if post.type == POST_TYPE_ARTICLE %}
{% include "post/post_teaser/_article.html" -%}
diff --git a/app/templates/user/show_profile.html b/app/templates/user/show_profile.html
index 5c536d8f..a3aad723 100644
--- a/app/templates/user/show_profile.html
+++ b/app/templates/user/show_profile.html
@@ -119,7 +119,7 @@
{% if current_user.is_authenticated and current_user.is_admin() and user.reputation %}{{ _('Reputation') }}:
{{ user.reputation | round | int }}{% endif %}
{{ _('Posts') }}: {{ user.post_count }}
{{ _('Comments') }}: {{ user.post_reply_count }}
- {% if current_user.is_authenticated %}{{ _('User note') }}: {{ user.get_note(current_user) }}
{% endif %}
+ {% if current_user.is_authenticated %}{{ _('Note') }}: {{ user.get_note(current_user) }}
{% endif %}
{{ user.about_html|safe }}
diff --git a/app/templates/user/user_preview.html b/app/templates/user/user_preview.html
new file mode 100644
index 00000000..cdb7208a
--- /dev/null
+++ b/app/templates/user/user_preview.html
@@ -0,0 +1,42 @@
+
+
+
+ {% if user.avatar_id -%}
+
+
+
+ {% endif -%}
+
+
+
+
+
{{ _('Instance') }}: {{ user.instance_domain() }}
+ {% if user.is_instance_admin() or (user.is_local() and user.is_admin()) %}({{ _('Admin') }}){% endif %}
+ {% if user.is_admin() or user.is_staff() %}{{ _('Role permissions') }}: {% if user.is_admin() %}{{ _('Admin') }}{% endif %} {% if user.is_staff() %}{{ _('Staff') }}{% endif %}
{% endif %}
+ {{ _('Joined') }}: {{ arrow.get(user.created).humanize(locale=locale) }}
+ {% if current_user.is_authenticated and current_user.is_admin() %}{{ _('Referer') }}: {{ user.referrer if user.referrer }}
{% endif %}
+ {% if current_user.is_authenticated and current_user.is_admin() %}{{ _('IP and country code') }}: {{ user.ip_address if user.ip_address }}{% if user.ip_address_country %} ({{ user.ip_address_country }}){% endif %}
{% endif %}
+ {% if current_user.is_authenticated and current_user.is_admin() and user.last_seen %}{{ _('Active') }}: {{ arrow.get(user.last_seen).humanize(locale=locale) }}
{% endif %}
+ {% if user.bot %}
+ {{ _('Bot Account') }}
+ {% endif %}
+ {{ _('Attitude') }}: {{ (user.attitude * 100) | round | int }}%
+ {% if current_user.is_authenticated and current_user.is_admin() and user.reputation %}{{ _('Reputation') }}: {{ user.reputation | round | int }}
{% endif %}
+ {{ _('Posts') }}: {{ user.post_count }}
+ {{ _('Comments') }}: {{ user.post_reply_count }}
+ {% if current_user.is_authenticated %}{{ _('Note') }}: {{ user.get_note(current_user) }}
{% endif %}
+
+
+ {{ user.about_html|safe }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/user/routes.py b/app/user/routes.py
index fe7235fc..bae7f1c4 100644
--- a/app/user/routes.py
+++ b/app/user/routes.py
@@ -1379,3 +1379,11 @@ def edit_user_note(actor):
return render_template('user/edit_note.html', title=_('Edit note'), form=form, user=user,
menu_topics=menu_topics(), site=g.site)
+
+
+@bp.route('/user/
/preview')
+def user_preview(user_id):
+ user = User.query.get_or_404(user_id)
+ if (user.deleted or user.banned) and current_user.is_anonymous:
+ abort(404)
+ return render_template('user/user_preview.html', user=user)