Fixes #35
This commit is contained in:
parent
79a209fb99
commit
fe113bbcc1
|
@ -68,7 +68,8 @@ class UserProfileView(View):
|
|||
|
||||
def get(self, request, username, section='summary'):
|
||||
data = {
|
||||
'item': get_object_or_404(User, username=username)
|
||||
'item': get_object_or_404(User, username=username),
|
||||
'section': section
|
||||
}
|
||||
if section != 'summary':
|
||||
template = self.template_section.format(section)
|
||||
|
|
|
@ -23,18 +23,18 @@
|
|||
<img src="{{ item.avatar }}" class="max-width-100" />
|
||||
</div>
|
||||
<div class="list-group">
|
||||
<a data-pjax-nav href="{% url 'profile' item.username %}" data-pjax class="list-group-item active">
|
||||
<a data-pjax-nav href="{% url 'profile' item.username %}" data-pjax class="list-group-item {% if section == 'summary' %}active{% endif %}">
|
||||
{% trans "Summary" %}</a>
|
||||
{% if user.have_volumes.count > 0 %}
|
||||
<a data-pjax-nav href="{% url 'profile' item.username 'collection' %}" data-pjax="profile" class="list-group-item">
|
||||
<a data-pjax-nav href="{% url 'profile' item.username 'collection' %}" data-pjax="profile" class="list-group-item {% if section == 'collection' %}active{% endif %}">
|
||||
{% trans "Collection" %}</a>
|
||||
{% endif %}
|
||||
{% if user.wishlisted_volumes.count > 0 %}
|
||||
<a data-pjax-nav href="{% url 'profile' item.username 'wishlist' %}" data-pjax="profile" class="list-group-item">
|
||||
<a data-pjax-nav href="{% url 'profile' item.username 'wishlist' %}" data-pjax="profile" class="list-group-item {% if section == 'wishlist' %}active{% endif %}">
|
||||
{% trans "Wishlist" %}</a>
|
||||
{% endif %}
|
||||
{% comment %}
|
||||
<a data-pjax-nav href="{% url 'profile' item.username 'achievements' %}" data-pjax="profile" class="list-group-item">
|
||||
<a data-pjax-nav href="{% url 'profile' item.username 'achievements' %}" data-pjax="profile" class="list-group-item {% if section == 'achievements' %}active{% endif %}">
|
||||
{% trans "Achievements" %}</a>
|
||||
{% endcomment %}
|
||||
</div>
|
||||
|
|
Reference in New Issue