mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-25 15:31:37 +01:00
Make user list public
This commit is contained in:
parent
950512c2a7
commit
2fbc44bd54
@ -133,7 +133,8 @@
|
|||||||
<a href="https://github.com/minetest/contentdb">GitHub</a> |
|
<a href="https://github.com/minetest/contentdb">GitHub</a> |
|
||||||
<a href="{{ url_for('flatpage', path='help') }}">Help</a> |
|
<a href="{{ url_for('flatpage', path='help') }}">Help</a> |
|
||||||
<a href="{{ url_for('flatpage', path='policy_and_guidance') }}">Policy and Guidance</a> |
|
<a href="{{ url_for('flatpage', path='policy_and_guidance') }}">Policy and Guidance</a> |
|
||||||
<a href="{{ url_for('flatpage', path='help/reporting') }}">Report / DMCA</a>
|
<a href="{{ url_for('flatpage', path='help/reporting') }}">Report / DMCA</a> |
|
||||||
|
<a href="{{ url_for('user_list_page') }}">User List</a>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="/static/jquery.min.js"></script>
|
<script src="/static/jquery.min.js"></script>
|
||||||
|
@ -11,8 +11,10 @@
|
|||||||
<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> -
|
||||||
{{ user.rank.getTitle() }} -
|
{{ user.rank.getTitle() }}
|
||||||
{{ user.packages.count() }} packages.
|
{% if current_user.is_authenticated %}
|
||||||
|
- {{ user.packages.count() }} packages.
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -35,8 +35,8 @@ class UserProfileForm(FlaskForm):
|
|||||||
rank = SelectField("Rank", [Optional()], choices=UserRank.choices(), coerce=UserRank.coerce, default=UserRank.NEW_MEMBER)
|
rank = SelectField("Rank", [Optional()], choices=UserRank.choices(), coerce=UserRank.coerce, default=UserRank.NEW_MEMBER)
|
||||||
submit = SubmitField("Save")
|
submit = SubmitField("Save")
|
||||||
|
|
||||||
|
|
||||||
@app.route("/users/", methods=["GET"])
|
@app.route("/users/", methods=["GET"])
|
||||||
@login_required
|
|
||||||
def user_list_page():
|
def user_list_page():
|
||||||
users = User.query.order_by(db.desc(User.rank), db.asc(User.display_name)).all()
|
users = User.query.order_by(db.desc(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