fmartingr
/
shelfzilla
Archived
1
0
Fork 0
This commit is contained in:
Felipe Martín 2014-08-26 18:46:23 +02:00
parent 79a209fb99
commit fe113bbcc1
2 changed files with 6 additions and 5 deletions

View File

@ -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)

View File

@ -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>