mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 01:23:48 +01:00
Add user rank colors, sort user list
This commit is contained in:
parent
f79c14ece8
commit
e669b18062
@ -198,3 +198,23 @@ table tfoot {
|
|||||||
table tfoot td {
|
table tfoot td {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.userlist li.NOT_JOINED {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.NOT_JOINED a, a.NOT_JOINED {
|
||||||
|
color: #7ac;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ADMIN a, a.ADMIN{
|
||||||
|
color: #e30;
|
||||||
|
}
|
||||||
|
|
||||||
|
.MODERATOR a, a.MODERATOR {
|
||||||
|
color: #e90;
|
||||||
|
}
|
||||||
|
|
||||||
|
.EDITOR a, a.EDITOR {
|
||||||
|
color: #b6f;
|
||||||
|
}
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Author</td>
|
<td>Author</td>
|
||||||
<td>
|
<td class="{{ package.author.rank }}">
|
||||||
<a href="{{ url_for('user_profile_page', username=package.author.username) }}">
|
<a href="{{ url_for('user_profile_page', username=package.author.username) }}">
|
||||||
{{ package.author.display_name }}
|
{{ package.author.display_name }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<ul>
|
<ul class="userlist">
|
||||||
{% for user in users %}
|
{% for user in users %}
|
||||||
<li>
|
<li class="{{ user.rank }}">
|
||||||
<a href="{{ url_for('user_profile_page', username=user.username) }}">
|
<a href="{{ url_for('user_profile_page', username=user.username) }}">
|
||||||
{{ user.display_name }}
|
{{ user.display_name }}
|
||||||
</a> -
|
</a> -
|
||||||
|
@ -22,7 +22,7 @@ class UserProfileForm(FlaskForm):
|
|||||||
@app.route("/users/", methods=["GET"])
|
@app.route("/users/", methods=["GET"])
|
||||||
@rank_required(UserRank.MODERATOR)
|
@rank_required(UserRank.MODERATOR)
|
||||||
def user_list_page():
|
def user_list_page():
|
||||||
users = User.query.all()
|
users = User.query.order_by(db.asc(User.rank), db.asc(User.display_name)).all()
|
||||||
return render_template("users/list.html", users=users)
|
return render_template("users/list.html", users=users)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user