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

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

@ -17,11 +17,12 @@
{{ _("This will delete your account, removing %(threads)d threads and %(replies)d replies.", {{ _("This will delete your account, removing %(threads)d threads and %(replies)d replies.",
threads=user.threads.count(), replies=user.replies.count()) }} threads=user.threads.count(), replies=user.replies.count()) }}
</p> </p>
{% else %} {% else %}
<p> <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.", {{ _("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()) }} threads=user.threads.count(), replies=user.replies.count()) }}
{{ _("See the privacy policy for more information.") }}
</p> </p>
{% endif %} {% endif %}

@ -6,17 +6,23 @@
{% block content %} {% 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"> <article class="row mb-5">
<div class="col-auto image mx-0"> <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>
<div class="col"> <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"> <h1 class="ml-3 my-0">
{{ user.display_name }} {{ user.display_name }}
</h1> </h1>