1 {% extends "base.html" %}
9 {% if not current_user.is_authenticated and user.rank == user.rank.NOT_JOINED and user.forums_username %}
10 <div class="alert alert-info">
11 <a class="float-right btn btn-default btn-sm"
12 href="{{ url_for('users.claim', username=user.forums_username) }}">Claim</a>
14 Is this you? Claim your account now!
18 <div class="row mb-3">
19 <div class="col-sm-6">
21 <h2 class="card-header">{{ user.display_name }}</h2>
22 <div class="card-body row">
23 <div class="col-md-2">
24 {% if user.forums_username %}
25 <a href="https://forum.minetest.net/ucp.php?i=profile&mode=avatar">
27 <a href="https://en.gravatar.com/">
29 <img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ user.getProfilePicURL() }}">
30 {% if user.forums_username or user.email %}
39 {{ user.rank.getTitle() }}
45 {% if user.forums_username %}
46 <a href="https://forum.minetest.net/memberlist.php?mode=viewprofile&un={{ user.forums_username }}">
49 {% elif user == current_user %}
53 {% if user.github_username or user == current_user %}
57 {% if user.github_username %}
58 <a href="https://github.com/{{ user.github_username }}">GitHub</a>
59 {% elif user == current_user %}
60 <a href="{{ url_for('github.start') }}">Link Github</a>
63 {% if user.website_url %}
64 | <a href="{{ user.website_url }}" rel="nofollow">Website</a>
67 {% if user == current_user %}
69 <small class="text-muted">
70 <span style="padding-right: 5px;">🌎</span>
76 {% if current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.MODERATOR) %}
81 <a class="btn btn-primary" href="{{ url_for('users.send_email', username=user.username) }}">
85 <a class="btn btn-primary disabled"
86 data-toggle="tooltip" data-placement="bottom"
87 title="No email address for user"
88 style="pointer-events: all;">
95 {% if user == current_user %}
97 <td>Profile Picture:</td>
99 {% if user.forums_username %}
100 <form method="post" action="{{ url_for('users.user_check', username=user.username) }}" class="" style="display:inline-block;">
101 <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
102 <input type="submit" class="btn btn-primary" value="Sync with Forums" />
106 <a class="btn btn-primary" href="https://en.gravatar.com/">
110 <a class="btn btn-primary disabled"
111 data-toggle="tooltip" data-placement="bottom"
112 title="Please add an email address to use Gravatar"
113 style="pointer-events: all;">
122 {% if user.password %}
123 Set | <a href="{{ url_for('user.change_password') }}">Change</a>
125 Not set | <a href="{{ url_for('users.set_password') }}">Set</a>
130 {% if user.checkPerm(current_user, "CREATE_TOKEN") %}
134 <a href="{{ url_for('api.list_tokens', username=user.username) }}">Manage</a>
135 <span class="badge badge-primary">{{ user.tokens.count() }}</span>
146 {% from "macros/forms.html" import render_field, render_submit_field %}
147 <div class="col-sm-6">
149 <div class="card-header">Edit Details</div>
150 <div class="card-body">
151 <form action="" method="POST" class="form box-body" role="form">
152 {{ form.hidden_tag() }}
154 {% if user.checkPerm(current_user, "CHANGE_DNAME") %}
155 {{ render_field(form.display_name, tabindex=230) }}
156 {{ render_field(form.website_url, tabindex=232) }}
157 {{ render_field(form.donate_url, tabindex=233) }}
160 {% if user.checkPerm(current_user, "CHANGE_EMAIL") %}
161 {{ render_field(form.email, tabindex=240) }}
162 <i>We'll send you an email to verify it if changed.</i>
165 {% if user.checkPerm(current_user, "CHANGE_RANK") %}
166 {{ render_field(form.rank, tabindex=250) }}
169 {{ render_submit_field(form.submit, tabindex=280) }}
177 {% from "macros/packagegridtile.html" import render_pkggrid %}
178 {{ render_pkggrid(packages, show_author=False) }}
180 {% if user.donate_url %}
181 <div class="alert alert-secondary">
182 Like {{ user.display_name }}'s work?
183 <a href="{{ user.donate_url }}" rel="nofollow">Donate now!</a>
187 {% if current_user == user or (current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.EDITOR)) %}
188 <div class="card mt-3">
189 <a name="unadded-topics"></a>
190 <h2 class="card-header">Unadded topics</h2>
192 {% if topics_to_add %}
193 <p class="card-body">
194 List of your forum topics which do not have a matching package.
195 Topics with a strikethrough have been marked as discarded.
198 {% from "macros/topics.html" import render_topics_table %}
199 {{ render_topics_table(topics_to_add, show_author=False, show_discard=True, current_user=current_user) }}
201 <p class="card-body">Congrats! You don't have any topics which aren't on CDB.</p>
209 {% block scriptextra %}
211 var csrf_token = "{{ csrf_token() }}";
213 <script src="/static/topic_discard.js"></script>