2018-03-18 19:14:55 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ user.username }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2020-12-05 02:20:00 +01:00
|
|
|
<article class="row mb-5">
|
|
|
|
<div class="col-auto image mx-0">
|
2020-12-10 00:59:01 +01:00
|
|
|
<img class="img-fluid user-photo img-thumbnail img-thumbnail-1" src="{{ user.getProfilePicURL() }}" alt="Profile picture">
|
2020-12-05 02:20:00 +01:00
|
|
|
</div>
|
|
|
|
<div class="col">
|
2020-12-10 00:59:01 +01:00
|
|
|
{% 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 %}
|
|
|
|
|
2020-12-10 23:43:02 +01:00
|
|
|
{% if current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.MODERATOR) and user.email %}
|
2020-12-10 00:59:01 +01:00
|
|
|
<a class="btn btn-secondary float-right mr-3" href="{{ url_for('admin.send_single_email', username=user.username) }}">
|
|
|
|
{{ _("Send Email") }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-12-15 20:05:29 +01:00
|
|
|
<h1 class="ml-3 my-0 {{ user.rank.name }}">
|
2020-12-05 02:20:00 +01:00
|
|
|
{{ user.display_name }}
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
<div class="info-row mx-0 mt-2 mb-0">
|
|
|
|
<div class="btn-group-horizontal">
|
|
|
|
<span class="btn">
|
|
|
|
<i class="fas fa-user"></i>
|
|
|
|
<span class="count">
|
|
|
|
{{ user.rank.getTitle() }}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
{% if user.forums_username %}
|
|
|
|
<a class="btn" href="https://forum.minetest.net/memberlist.php?mode=viewprofile&un={{ user.forums_username }}">
|
|
|
|
<i class="fas fa-comments"></i>
|
|
|
|
<span class="count">
|
2020-12-05 02:24:27 +01:00
|
|
|
{{ _("Forums") }}
|
2020-12-05 02:20:00 +01:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if user.github_username %}
|
|
|
|
<a class="btn" href="https://github.com/{{ user.github_username }}">
|
|
|
|
<i class="fas fa-code-branch"></i>
|
|
|
|
<span class="count">
|
|
|
|
{{ _("GitHub") }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if user.website_url %}
|
2020-12-05 02:24:27 +01:00
|
|
|
<a class="btn" href="{{ user.website_url }}" rel="nofollow">
|
|
|
|
<i class="fas fa-globe-europe"></i>
|
|
|
|
<span class="count">
|
|
|
|
{{ _("Website") }}
|
|
|
|
</span>
|
|
|
|
</a>
|
2020-12-05 02:20:00 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if user.donate_url %}
|
2020-12-05 02:24:27 +01:00
|
|
|
<a class="btn" href="{{ user.donate_url }}" rel="nofollow">
|
|
|
|
<i class="fas fa-donate"></i>
|
|
|
|
<span class="count">
|
|
|
|
{{ _("Donate") }}
|
|
|
|
</span>
|
|
|
|
</a>
|
2020-12-05 02:20:00 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<a class="btn" href="{{ url_for('packages.list_all', author=user.username) }}">
|
|
|
|
<i class="fas fa-box"></i>
|
|
|
|
<span class="count">
|
|
|
|
<strong>{{ user.packages.count() }}</strong>
|
|
|
|
{{ _("packages") }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a class="btn" href="#reviews">
|
|
|
|
<i class="fas fa-star-half-alt"></i>
|
|
|
|
<span class="count">
|
|
|
|
<strong>{{ user.reviews | length }}</strong>
|
|
|
|
{{ _("reviews") }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<span>
|
|
|
|
<i class="fas fa-comment"></i>
|
|
|
|
<span class="count">
|
|
|
|
<strong>{{ user.replies.count() }}</strong>
|
|
|
|
{{ _("comments") }}
|
|
|
|
</span>
|
|
|
|
</span>
|
2018-12-22 21:13:43 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-12-22 13:36:49 +01:00
|
|
|
</div>
|
2020-12-05 02:20:00 +01:00
|
|
|
</article>
|
2018-03-18 19:14:55 +01:00
|
|
|
|
2020-12-05 02:20:00 +01:00
|
|
|
|
|
|
|
{% if not current_user.is_authenticated and user.rank == user.rank.NOT_JOINED and user.forums_username %}
|
|
|
|
<div class="alert alert-secondary mb-5">
|
|
|
|
<a class="float-right btn btn-default btn-sm"
|
2020-12-22 11:58:43 +01:00
|
|
|
href="{{ url_for('users.claim_forums', username=user.forums_username) }}">Claim</a>
|
2020-12-05 02:20:00 +01:00
|
|
|
|
|
|
|
Is this you? Claim your account now!
|
2018-05-18 05:06:27 +02:00
|
|
|
</div>
|
2018-03-18 19:14:55 +01:00
|
|
|
{% endif %}
|
2020-12-05 02:20:00 +01:00
|
|
|
|
2018-05-29 23:58:46 +02:00
|
|
|
|
2020-07-15 01:54:26 +02:00
|
|
|
{% if current_user == user or (current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.EDITOR)) %}
|
|
|
|
<a class="float-right btn btn-sm btn-primary"
|
|
|
|
href="{{ url_for('todo.tags', author=user.username) }}">
|
|
|
|
View list of tags
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2020-07-10 20:10:36 +02:00
|
|
|
|
|
|
|
<h2 class="my-3">{{ _("Packages") }}</h2>
|
|
|
|
|
2018-05-29 23:58:46 +02:00
|
|
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
|
|
|
{{ render_pkggrid(packages, show_author=False) }}
|
|
|
|
|
2020-07-10 20:10:36 +02:00
|
|
|
|
2020-12-05 02:20:00 +01:00
|
|
|
<h2 class="my-3" id="reviews">{{ _("Reviews") }}</h2>
|
2020-07-10 20:10:36 +02:00
|
|
|
{% from "macros/reviews.html" import render_reviews %}
|
|
|
|
{{ render_reviews(user.reviews, current_user, True) }}
|
|
|
|
|
|
|
|
|
2018-12-25 20:49:17 +01:00
|
|
|
{% if current_user == user or (current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.EDITOR)) %}
|
2020-07-10 20:10:36 +02:00
|
|
|
<div class="card mt-5">
|
2018-12-25 19:32:23 +01:00
|
|
|
<a name="unadded-topics"></a>
|
|
|
|
<h2 class="card-header">Unadded topics</h2>
|
|
|
|
|
|
|
|
{% if topics_to_add %}
|
|
|
|
<p class="card-body">
|
|
|
|
List of your forum topics which do not have a matching package.
|
|
|
|
Topics with a strikethrough have been marked as discarded.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
{% from "macros/topics.html" import render_topics_table %}
|
|
|
|
{{ render_topics_table(topics_to_add, show_author=False, show_discard=True, current_user=current_user) }}
|
|
|
|
{% else %}
|
2018-12-25 20:49:17 +01:00
|
|
|
<p class="card-body">Congrats! You don't have any topics which aren't on CDB.</p>
|
2018-12-25 19:32:23 +01:00
|
|
|
{% endif %}
|
2018-06-02 19:22:57 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2018-03-18 19:14:55 +01:00
|
|
|
{% endblock %}
|
2018-12-25 18:51:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
{% block scriptextra %}
|
|
|
|
<script>
|
2020-12-04 03:34:08 +01:00
|
|
|
const csrf_token = "{{ csrf_token() }}";
|
2018-12-25 18:51:29 +01:00
|
|
|
</script>
|
|
|
|
<script src="/static/topic_discard.js"></script>
|
|
|
|
{% endblock %}
|