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">
20 <div class="col-sm-6">
22 <h2 class="card-header">{{ user.display_name }}</h2>
23 <div class="card-body row">
24 <div class="col-md-2">
25 {% if user.forums_username %}
26 <a href="https://forum.minetest.net/ucp.php?i=profile&mode=avatar">
28 <a href="https://en.gravatar.com/">
30 <img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ user.getProfilePicURL() }}">
31 {% if user.forums_username or user.email %}
40 {{ user.rank.getTitle() }}
46 {% if user.forums_username %}
47 <a href="https://forum.minetest.net/memberlist.php?mode=viewprofile&un={{ user.forums_username }}">
50 {% elif user == current_user %}
54 {% if user.github_username or user == current_user %}
58 {% if user.github_username %}
59 <a href="https://github.com/{{ user.github_username }}">GitHub</a>
60 {% elif user == current_user %}
61 <a href="{{ url_for('github.start') }}">Link Github</a>
64 {% if user.website_url %}
65 | <a href="{{ user.website_url }}" rel="nofollow">Website</a>
69 {% if user == current_user %}
71 <small class="text-muted">
72 <span style="padding-right: 5px;">🌎</span>
79 {% if user == current_user and user.github_username %}
83 <a href="{{ url_for('github.view_permissions') }}">View ContentDB's GitHub Permissions</a>
88 {% if current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.MODERATOR) %}
93 <a class="btn btn-primary" href="{{ url_for('users.send_email', username=user.username) }}">
97 <a class="btn btn-primary disabled"
98 data-toggle="tooltip" data-placement="bottom"
99 title="No email address for user"
100 style="pointer-events: all;">
107 {% if user == current_user %}
109 <td>Profile Picture:</td>
111 {% if user.forums_username %}
112 <form method="post" action="{{ url_for('users.user_check', username=user.username) }}" class="" style="display:inline-block;">
113 <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
114 <input type="submit" class="btn btn-primary" value="Sync with Forums" />
118 <a class="btn btn-primary" href="https://en.gravatar.com/">
122 <a class="btn btn-primary disabled"
123 data-toggle="tooltip" data-placement="bottom"
124 title="Please add an email address to use Gravatar"
125 style="pointer-events: all;">
134 {% if user.password %}
135 Set | <a href="{{ url_for('user.change_password') }}">Change</a>
137 Not set | <a href="{{ url_for('users.set_password') }}">Set</a>
142 {% if user.checkPerm(current_user, "CREATE_TOKEN") %}
146 <a href="{{ url_for('api.list_tokens', username=user.username) }}">Manage</a>
147 <span class="badge badge-primary">{{ user.tokens.count() }}</span>
158 {% from "macros/forms.html" import render_field, render_submit_field %}
159 <div class="col-sm-6">
161 <div class="card-header">Edit Details</div>
162 <div class="card-body">
163 <form action="" method="POST" class="form box-body" role="form">
164 {{ form.hidden_tag() }}
166 {% if user.checkPerm(current_user, "CHANGE_USERNAMES") %}
167 {{ render_field(form.display_name, tabindex=230) }}
168 {{ render_field(form.forums_username, tabindex=230) }}
169 {{ render_field(form.github_username, tabindex=230) }}
172 {% if user.checkPerm(current_user, "CHANGE_PROFILE_URLS") %}
173 {{ render_field(form.website_url, tabindex=232) }}
174 {{ render_field(form.donate_url, tabindex=233) }}
177 {% if user.checkPerm(current_user, "CHANGE_EMAIL") %}
178 {{ render_field(form.email, tabindex=240) }}
179 <i>We'll send you an email to verify it if changed.</i>
182 {% if user.checkPerm(current_user, "CHANGE_RANK") %}
183 {{ render_field(form.rank, tabindex=250) }}
187 {{ render_submit_field(form.submit, tabindex=280) }}
196 {% if current_user == user or (current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.EDITOR)) %}
197 <a class="float-right btn btn-sm btn-primary"
198 href="{{ url_for('todo.tags', author=user.username) }}">
203 <h2 class="my-3">{{ _("Packages") }}</h2>
205 {% from "macros/packagegridtile.html" import render_pkggrid %}
206 {{ render_pkggrid(packages, show_author=False) }}
208 {% if user.donate_url %}
209 <div class="alert alert-secondary">
210 Like {{ user.display_name }}'s work?
211 <a href="{{ user.donate_url }}" rel="nofollow">Donate now!</a>
216 <h2 class="my-3">{{ _("Reviews") }}</h2>
217 {% from "macros/reviews.html" import render_reviews %}
218 {{ render_reviews(user.reviews, current_user, True) }}
221 {% if current_user == user or (current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.EDITOR)) %}
222 <div class="card mt-5">
223 <a name="unadded-topics"></a>
224 <h2 class="card-header">Unadded topics</h2>
226 {% if topics_to_add %}
227 <p class="card-body">
228 List of your forum topics which do not have a matching package.
229 Topics with a strikethrough have been marked as discarded.
232 {% from "macros/topics.html" import render_topics_table %}
233 {{ render_topics_table(topics_to_add, show_author=False, show_discard=True, current_user=current_user) }}
235 <p class="card-body">Congrats! You don't have any topics which aren't on CDB.</p>
243 {% block scriptextra %}
245 var csrf_token = "{{ csrf_token() }}";
247 <script src="/static/topic_discard.js"></script>