mirror of
https://github.com/minetest/contentdb.git
synced 2025-03-14 14:22:30 +01:00
Add user rank colors, sort user list
This commit is contained in:
@ -198,3 +198,23 @@ table tfoot {
|
||||
table tfoot td {
|
||||
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>
|
||||
<td>Author</td>
|
||||
<td>
|
||||
<td class="{{ package.author.rank }}">
|
||||
<a href="{{ url_for('user_profile_page', username=package.author.username) }}">
|
||||
{{ package.author.display_name }}
|
||||
</a>
|
||||
|
@ -5,9 +5,9 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<ul>
|
||||
<ul class="userlist">
|
||||
{% for user in users %}
|
||||
<li>
|
||||
<li class="{{ user.rank }}">
|
||||
<a href="{{ url_for('user_profile_page', username=user.username) }}">
|
||||
{{ user.display_name }}
|
||||
</a> -
|
||||
|
@ -22,7 +22,7 @@ class UserProfileForm(FlaskForm):
|
||||
@app.route("/users/", methods=["GET"])
|
||||
@rank_required(UserRank.MODERATOR)
|
||||
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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user