aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-12-25 19:28:32 +0000
committerrubenwardy <rw@rubenwardy.com>2018-12-25 19:28:32 +0000
commit21960f24047bdf64eff99ec955ff2229c49eff50 (patch)
treee5bafd280407fabe863f4d1fbf5b667f02c607e3 /app/templates
parentf94885a58f05864682af5394c1b0c3733d46a305 (diff)
downloadcheatdb-21960f24047bdf64eff99ec955ff2229c49eff50.tar.xz
Add support for using forum profile pictures
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/users/user_profile_page.html23
1 files changed, 17 insertions, 6 deletions
diff --git a/app/templates/users/user_profile_page.html b/app/templates/users/user_profile_page.html
index 46881fd..26988ba 100644
--- a/app/templates/users/user_profile_page.html
+++ b/app/templates/users/user_profile_page.html
@@ -21,11 +21,13 @@
<h2 class="card-header">{{ user.display_name }}</h2>
<div class="card-body row">
<div class="col-md-2">
- {% if user.email %}
+ {% if user.forums_username %}
+ <a href="https://forum.minetest.net/ucp.php?i=profile&mode=avatar">
+ {% elif user.email %}
<a href="https://en.gravatar.com/">
{% endif %}
- <img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ (user.email or '') | gravatar }}">
- {% if user.email %}
+ <img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ user.getProfilePicURL() }}">
+ {% if user.forums_username or user.email %}
</a>
{% endif %}
</div>
@@ -67,14 +69,23 @@
<tr>
<td>Profile Picture:</td>
<td>
+ {% if user.forums_username %}
+ <form method="post" action="{{ url_for('user_check', username=user.username) }}" class="" style="display:inline-block;">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
+ <input type="submit" class="btn btn-primary" value="Sync with Forums" />
+ </form>
+ {% endif %}
{% if user.email %}
<a class="btn btn-primary" href="https://en.gravatar.com/">
Gravatar
</a>
{% else %}
- <p>
- Please add an email to your profile.
- </p>
+ <a class="btn btn-primary disabled"
+ data-toggle="tooltip" data-placement="bottom"
+ title="Please add an email address to use Gravatar"
+ style="pointer-events: all;">
+ Gravatar
+ </a>
{% endif %}
</td>
</tr>