fmartingr
/
shelfzilla
Archived
1
0
Fork 0

Own profile now shows wishlisted and owned volumes. WIP.

This commit is contained in:
Felipe Martin 2014-05-27 21:03:19 +02:00
parent f3c79fb1e9
commit eb9e0abcf8
4 changed files with 48 additions and 26 deletions

View File

@ -35,6 +35,9 @@
{% endcomment %}
</div>
</div>
<div>
<button class="btn btn-normal btn-block">{% trans "Edit my profile" %} <- NOT WORKING</button>
</div>
</div>
<div class="col-sm-9" data-pjax-container="profile">
{% block profile_content %}

View File

@ -4,30 +4,15 @@
{% block page_title %}{{ block.super }} | {% trans "Collection" %}{% endblock %}
{% block profile_content %}
<div class="row text-center">
<div class="col-sm-3">
<div class="well">
<h2 class="no-margin-top">{{ user.have_volumes.count }}</h2>
{% trans "Volumes owned" %}
</div>
<div class="row">
{% for owned_volume in user.have_volumes.all %}
<div class="col-sm-3" data-pjax-container="v{{ volume.pk }}">
{% include "manga/series/includes/volume.html" with volume=owned_volume.volume user=user %}
</div>
<div class="col-sm-3">
<div class="well">
<h2 class="no-margin-top">{{ user.wishlisted_volumes.count }}</h2>
{% trans "Volumes wishlisted" %}
</div>
</div>
<div class="col-sm-3">
<div class="well">
<h2 class="no-margin-top">--</h2>
Other
</div>
</div>
<div class="col-sm-3">
<div class="well">
<h2 class="no-margin-top">--</h2>
Other
</div>
{% if forloop.counter|divisibleby:4 %}
</div>
<div class="row">
{% endif %}
{% endfor %}
</div>
{% endblock %}

View File

@ -1,11 +1,37 @@
{% load i18n %}
{% comment %}
{% extends 'users/profile.html'|pjax:request %}
{% load i18n %}
{% block page_title %}{{ block.super }}{% endblock %}
{% endcomment %}
{% block profile_content %}
<div class="row text-center">
<div class="col-sm-3">
<div class="well">
<h2 class="no-margin-top">{{ user.have_volumes.count }}</h2>
{% trans "Volumes owned" %}
</div>
</div>
<div class="col-sm-3">
<div class="well">
<h2 class="no-margin-top">{{ user.wishlisted_volumes.count }}</h2>
{% trans "Volumes wishlisted" %}
</div>
</div>
<div class="col-sm-3">
<div class="well">
<h2 class="no-margin-top">--</h2>
Other
</div>
</div>
<div class="col-sm-3">
<div class="well">
<h2 class="no-margin-top">--</h2>
Other
</div>
</div>
</div>
<div class="well">
<p>Interesting. No, wait, the other thing: tedious. What are you hacking off? Is it my torso?! 'It is!' My precious torso! Yes, if you make it look like an electrical fire. When you do things right, people won't be sure you've done anything at all. Take me to your leader! Ven ve voke up, ve had zese wodies.</p>
</div>

View File

@ -4,7 +4,15 @@
{% block page_title %}{{ block.super }} | {% trans "Wishlist" %}{% endblock %}
{% block profile_content %}
<div class="well">
Wishlist
<div class="row">
{% for wishlisted_volume in user.wishlisted_volumes.all %}
<div class="col-sm-3" data-pjax-container="v{{ volume.pk }}">
{% include "manga/series/includes/volume.html" with volume=wishlisted_volume.volume user=user %}
</div>
{% if forloop.counter|divisibleby:4 %}
</div>
<div class="row">
{% endif %}
{% endfor %}
</div>
{% endblock %}