1
0
Fork 0

Add new user tab listing only reviews and comments

This commit is contained in:
Christof Dorner 2022-12-10 16:55:45 +01:00
parent 0452731d02
commit fbd8e22b97
6 changed files with 106 additions and 1 deletions

View file

@ -66,6 +66,10 @@
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
<a href="{{ url }}">{% trans "Activity" %}</a>
</li>
{% url 'user-reviews-comments' user|username as url %}
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
<a href="{{ url }}">{% trans "Reviews and Comments" %}</a>
</li>
{% if is_self or user.goal.exists %}
{% now 'Y' as year %}
{% url 'user-goal' user|username year as url %}

View file

@ -0,0 +1,30 @@
{% extends 'user/layout.html' %}
{% load i18n %}
{% load utilities %}
{% block title %}{{ user.display_name }}{% endblock %}
{% block header %}
<div class="columns is-mobile">
<div class="column">
<h1 class="title">{% trans "Reviews and Comments" %}</h1>
</div>
</div>
{% endblock %}
{% block panel %}
<div>
{% for activity in activities %}
<div class="block" id="feed_{{ activity.id }}">
{% include 'snippets/status/status.html' with status=activity %}
</div>
{% endfor %}
{% if not activities %}
<div class="block">
<p>{% trans "No reviews or comments yet!" %}</p>
</div>
{% endif %}
{% include 'snippets/pagination.html' with page=activities path=path %}
</div>
{% endblock %}