Rename replies to comments

This commit is contained in:
rubenwardy 2022-01-03 01:44:12 +00:00
parent 933d8ebfe7
commit 122e1a4677
3 changed files with 6 additions and 6 deletions

View File

@ -355,10 +355,10 @@ def new():
return render_template("threads/new.html", form=form, allow_private_change=allow_change, package=package)
@bp.route("/users/<username>/replies/")
def user_replies(username):
@bp.route("/users/<username>/comments/")
def user_comments(username):
user = User.query.filter_by(username=username).first()
if user is None:
abort(404)
return render_template("threads/user_replies.html", user=user, replies=user.replies)
return render_template("threads/user_comments.html", user=user, replies=user.replies)

View File

@ -6,11 +6,11 @@
{% endblock %}
{% block title %}
{{ _("Replies by %(user)s", user=user.display_name) }}
{{ _("Comments by %(user)s", user=user.display_name) }}
{% endblock %}
{% block content %}
<h1>{{ _("Replies by %(user)s", user=self.link()) }}</h1>
<h1>{{ _("Comments by %(user)s", user=self.link()) }}</h1>
<ul class="comments mt-5 mb-0">

View File

@ -101,7 +101,7 @@
</span>
</a>
<a class="btn" href="{{ url_for('threads.user_replies', username=user.username) }}">
<a class="btn" href="{{ url_for('threads.user_comments', username=user.username) }}">
<i class="fas fa-comment"></i>
<span class="count">
<strong>{{ user.replies.count() }}</strong>