Fix minor things

This commit is contained in:
rubenwardy 2020-12-09 23:59:01 +00:00
parent 5fb01f01bf
commit 7efdf5cfef
3 changed files with 23 additions and 18 deletions

View File

@ -28,8 +28,8 @@
<td>Forums</td>
<td>
{% if user.forums_username %}
<a href="https://forum.minetest.net/memberlist.php?mode=viewprofile&un={{ user.forums_username }}">
Connected
<a class="btn btn-secondary" href="https://forum.minetest.net/memberlist.php?mode=viewprofile&un={{ user.forums_username }}">
Connected [{{ user.forums_username }}]
</a>
{% else %}
Please <a href="https://forum.minetest.net/ucp.php?i=pm&mode=compose&u=2051">PM rubenwardy</a>
@ -41,17 +41,15 @@
<td>GitHub</td>
<td>
{% if user.github_username %}
<p>
<a href="https://github.com/{{ user.github_username }}">Connected</a>
</p>
<a class="btn btn-secondary" href="https://github.com/{{ user.github_username }}">
Connected [{{ user.github_username }}]
</a>
{% if user == current_user %}
<p class="mb-0">
<a href="{{ url_for('github.view_permissions') }}">View ContentDB's GitHub Permissions</a>
</p>
<a class="btn btn-secondary ml-2" href="{{ url_for('github.view_permissions') }}">View ContentDB's GitHub Permissions</a>
{% endif %}
{% elif user == current_user %}
<a href="{{ url_for('github.start') }}">Link Github</a>
<a class="btn btn-secondary" href="{{ url_for('github.start') }}">Link Github</a>
{% else %}
None
{% endif %}

View File

@ -17,11 +17,12 @@
{{ _("This will delete your account, removing %(threads)d threads and %(replies)d replies.",
threads=user.threads.count(), replies=user.replies.count()) }}
</p>
{% else %}
{% else %}
<p>
{{ _("As you have packages and/or forum threads, your account can be fully deleted.") }}
{{ _("As you have packages and/or forum threads, your account cannot be fully deleted.") }}
{{ _("Instead, your account will be deactivated and all personal information wiped - including %(threads)d threads and %(replies)d replies.",
threads=user.threads.count(), replies=user.replies.count()) }}
{{ _("See the privacy policy for more information.") }}
</p>
{% endif %}

View File

@ -6,17 +6,23 @@
{% block content %}
{% if user.can_see_edit_profile(current_user) %}
<a class="btn btn-primary float-right" href="{{ url_for('users.profile_edit', username=user.username) }}">
Edit Profile
</a>
{% endif %}
<article class="row mb-5">
<div class="col-auto image mx-0">
<img class="img-fluid user-photo img-thumbnail img-thumbnail-1" src="{{ user.getProfilePicURL() }}">
<img class="img-fluid user-photo img-thumbnail img-thumbnail-1" src="{{ user.getProfilePicURL() }}" alt="Profile picture">
</div>
<div class="col">
{% if user.can_see_edit_profile(current_user) %}
<a class="btn btn-primary float-right" href="{{ url_for('users.profile_edit', username=user.username) }}">
{{ _("Edit Profile") }}
</a>
{% endif %}
{% if current_user.rank.atLeast(current_user.rank.MODERATOR) and user.email %}
<a class="btn btn-secondary float-right mr-3" href="{{ url_for('admin.send_single_email', username=user.username) }}">
{{ _("Send Email") }}
</a>
{% endif %}
<h1 class="ml-3 my-0">
{{ user.display_name }}
</h1>