]> git.lizzy.rs Git - cheatdb.git/blob - app/templates/users/user_profile_page.html
Add claim call to action on unclaimed accounts
[cheatdb.git] / app / templates / users / user_profile_page.html
1 {% extends "base.html" %}
2
3 {% block title %}
4         {{ user.username }}
5 {% endblock %}
6
7 {% block content %}
8
9 {% if not current_user.is_authenticated and user.rank == user.rank.NOT_JOINED and user.forums_username %}
10 <div class="box box_grey alert alert-info">
11         Is this you? Claim your account now!
12
13         <a class="alert_right button" href="{{ url_for('user_claim_page', username=user.forums_username) }}">Claim</a>
14 </div>
15 {% endif %}
16
17 <div class="box box_grey">
18         <h2>{{ user.display_name }}</h2>
19
20         <table class="box-body">
21                 <tr>
22                         <td>Rank:</td>
23                         <td>
24                                 {{ user.rank.getTitle() }}
25                         </td>
26                 </tr>
27                 <tr>
28                         <td>Accounts:</td>
29                         <td>
30                                 {% if user.forums_username %}
31                                         <a href="https://forum.minetest.net/memberlist.php?mode=viewprofile&un={{ user.forums_username }}">
32                                                 Minetest Forum
33                                         </a>
34                                 {% elif user == current_user %}
35                                         <a href="">Link Forums Account</a>
36                                 {% endif %}
37
38                                 {% if (user.forums_username and user.github_username) or user == current_user %}
39                                         |
40                                 {% endif %}
41
42                                 {% if user.github_username %}
43                                         <a href="https://github.com/{{ user.github_username }}">GitHub</a>
44                                 {% elif user == current_user %}
45                                         <a href="{{ url_for('github_signin_page') }}">Link Github</a>
46                                 {% endif %}
47
48                                 {% if user == current_user %}
49                                         &#x1f30e;
50                                 {% endif %}
51                         </td>
52                 </tr>
53                 {% if user == current_user %}
54                         <tr>
55                                 <td>Password:</td>
56                                 <td>
57                                         {% if user.password %}
58                                                 Set | <a href="{{ url_for('user.change_password') }}">Change</a>
59                                         {% else %}
60                                                 Not set | <a href="{{ url_for('set_password_page') }}">Set</a>
61                                         {% endif %}
62                                 </td>
63                         </tr>
64                 {% endif %}
65         </table>
66 </div>
67
68 <div class="box box_grey">
69         <h2>Packages</h2>
70         <div class="box-body">
71                 <ul>
72                         {% for p in packages %}
73                                 <li><a href="{{ p.getDetailsURL() }}">
74                                         {{ p.title }} by {{ p.author.display_name }}
75                                 </a></li>
76                         {% else %}
77                                 <li><i>No packages available</i></ul>
78                         {% endfor %}
79                 </ul>
80                 {% if user == current_user or user.checkPerm(current_user, "CHANGE_AUTHOR") %}
81                         <p><a class="button" href="{{ url_for('create_edit_package_page', author=user.username) }}">
82                                 Create
83                         </a></p>
84                 {% endif %}
85         </div>
86 </div>
87
88 {% if form %}
89         {% from "macros/forms.html" import render_field, render_submit_field %}
90         <div class="box box_grey">
91                 <h2>Edit Details</h2>
92
93                 <form action="" method="POST" class="form box-body" role="form">
94                         <div class="row">
95                                 <div class="col-sm-6 col-md-5 col-lg-4">
96                                         {{ form.hidden_tag() }}
97
98                                         {% if user.checkPerm(current_user, "CHANGE_DNAME") %}
99                                                 {{ render_field(form.display_name, tabindex=230) }}
100                                         {% endif %}
101
102                                         {% if user.checkPerm(current_user, "CHANGE_EMAIL") %}
103                                                 {{ render_field(form.email, tabindex=240) }}
104                                                 <i>We'll send you an email to verify it if changed.</i>
105                                         {% endif %}
106
107                                         {% if user.checkPerm(current_user, "CHANGE_RANK") %}
108                                                 {{ render_field(form.rank, tabindex=250) }}
109                                         {% endif %}
110
111                                         {{ render_submit_field(form.submit, tabindex=280) }}
112                                 </div>
113                         </div>
114                 </form>
115         </div>
116 {% endif %}
117 {% endblock %}