fmartingr
/
shelfzilla
Archived
1
0
Fork 0

Merge branch 'master' of github.com:fmartingr/shelfzilla

This commit is contained in:
Juan Manuel Parrilla 2014-05-27 23:54:54 +02:00
commit fa1fdcd5b3
25 changed files with 334 additions and 109 deletions

View File

@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'SocialConfiguration.facebook_url'
db.add_column(u'config_socialconfiguration', 'facebook_url',
self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True),
keep_default=False)
# Adding field 'SocialConfiguration.google_plus_url'
db.add_column(u'config_socialconfiguration', 'google_plus_url',
self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True),
keep_default=False)
# Adding field 'SocialConfiguration.contact_email'
db.add_column(u'config_socialconfiguration', 'contact_email',
self.gf('django.db.models.fields.EmailField')(max_length=75, null=True, blank=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'SocialConfiguration.facebook_url'
db.delete_column(u'config_socialconfiguration', 'facebook_url')
# Deleting field 'SocialConfiguration.google_plus_url'
db.delete_column(u'config_socialconfiguration', 'google_plus_url')
# Deleting field 'SocialConfiguration.contact_email'
db.delete_column(u'config_socialconfiguration', 'contact_email')
models = {
u'config.siteconfiguration': {
'Meta': {'object_name': 'SiteConfiguration'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'maintenance_mode': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
},
u'config.socialconfiguration': {
'Meta': {'object_name': 'SocialConfiguration'},
'contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
'facebook_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
'google_analytics': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'}),
'google_plus_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'twitter_account': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'})
}
}
complete_apps = ['config']

View File

@ -17,7 +17,15 @@ class SiteConfiguration(SingletonModel):
class SocialConfiguration(SingletonModel):
# Social accounts
twitter_account = models.CharField(max_length=64, blank=True, null=True)
facebook_url = models.URLField(blank=True, null=True)
google_plus_url = models.URLField(blank=True, null=True)
# Contact
contact_email = models.EmailField(blank=True, null=True)
# Analytics
google_analytics = models.CharField(max_length=16, blank=True, null=True)
def __unicode__(self):

View File

@ -163,6 +163,9 @@ class UserHaveVolume(models.Model):
self.volume
)
class Meta:
ordering = ('volume__series__name', 'volume__number', )
class UserWishlistVolume(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL,
@ -176,6 +179,9 @@ class UserWishlistVolume(models.Model):
self.volume
)
class Meta:
ordering = ('volume__series__name', 'volume__number', )
#
# SIGNALS
#

View File

@ -0,0 +1,8 @@
from django.conf.urls import patterns, url
from ..views.search import SearchView
urlpatterns = patterns(
'',
url(r'^$', SearchView.as_view(), name='search'),
)

View File

@ -0,0 +1,36 @@
from django.template import RequestContext
from django import forms
from django.utils.translation import ugettext as _
from django.shortcuts import render_to_response, get_object_or_404
from shelfzilla.views import View
from ..models import Series
class SearchForm(forms.Form):
q = forms.CharField(max_length=64, label=_('Search'),
widget=forms.TextInput(
attrs={'placeholder': _('Search')})
)
class SearchView(View):
template = 'manga/search.html'
section = 'search'
def post(self, request):
search_query = ''
items = []
form = SearchForm(request.POST)
if form.is_valid():
search_query = form.cleaned_data['q']
items = Series.objects.filter(name__icontains=search_query)
context = {
'items': items,
'search_query': search_query
}
ctx = RequestContext(request, self.get_context(context))
return render_to_response(self.template, context_instance=ctx)

View File

@ -2,20 +2,20 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-04-25 17:15+0200\n"
"PO-Revision-Date: 2014-04-25 17:15+0200\n"
"POT-Creation-Date: 2014-05-27 23:20+0200\n"
"PO-Revision-Date: 2014-05-27 23:20+0200\n"
"Last-Translator: <fmartingr@me.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Translated-Using: django-rosetta 0.7.4\n"
@ -39,119 +39,131 @@ msgstr "Serie de los volúmenes cambiada"
msgid "Site Configuration"
msgstr "Configuración del sitio"
#: apps/config/models.py:24 apps/config/models.py:27 apps/config/models.py:28
#: apps/config/models.py:32 apps/config/models.py:35 apps/config/models.py:36
msgid "Social Configuration"
msgstr "Configuración social"
#: apps/manga/admin.py:14
#: apps/manga/admin.py:40
msgid "Items marked for review"
msgstr "Marcar items para revisión"
#: apps/manga/admin.py:18
#: apps/manga/admin.py:45
msgid "Items unmarked for review"
msgstr "Desmarcar items para revisión"
#: apps/manga/admin.py:29 apps/manga/models.py:104 apps/manga/models.py:105
#: themes/bootflat/templates/_layout.html:31
#: apps/manga/admin.py:56 apps/manga/admin.py:92 apps/manga/admin.py:135
#: apps/manga/admin.py:173
msgid "General"
msgstr "General"
#: apps/manga/admin.py:57 apps/manga/admin.py:94 apps/manga/admin.py:136
#: apps/manga/admin.py:174
msgid "Review"
msgstr "Para revisión"
#: apps/manga/admin.py:58 apps/manga/admin.py:95 apps/manga/admin.py:137
#: apps/manga/admin.py:175
msgid "Advanced"
msgstr "Avanzado"
#: apps/manga/admin.py:78 apps/manga/models.py:105 apps/manga/models.py:106
#: themes/bootflat/templates/_layout.html:33
#: themes/bootflat/templates/manga/publishers/detail.html:18
#: themes/bootflat/templates/manga/series/list.html:4
msgid "Series"
msgstr "Series"
#: apps/manga/admin.py:43 apps/manga/models.py:131
#: apps/manga/admin.py:93 apps/manga/admin.py:120 apps/manga/models.py:135
#: themes/bootflat/templates/manga/publishers/detail.html:21
msgid "Volumes"
msgstr "Volúmenes"
#: apps/manga/admin.py:64
#: apps/manga/admin.py:165
#: themes/bootflat/templates/_admin/volumes/change_series.html:4
#: themes/bootflat/templates/_admin/volumes/change_series.html:8
msgid "Change volume series"
msgstr "Cambiar serie de los volúmenes"
#: apps/manga/models.py:13 apps/manga/models.py:50 apps/manga/models.py:110
#: apps/manga/models.py:135
#: apps/manga/models.py:14 apps/manga/models.py:51 apps/manga/models.py:111
#: apps/manga/models.py:139
msgid "Name"
msgstr "Nombre"
#: apps/manga/models.py:14 apps/manga/models.py:51 apps/manga/models.py:136
#: apps/manga/models.py:15 apps/manga/models.py:52 apps/manga/models.py:140
msgid "Slug"
msgstr "Álias"
#: apps/manga/models.py:15
#: apps/manga/models.py:16
msgid "URL"
msgstr "URL"
#: apps/manga/models.py:45
#: apps/manga/models.py:46
msgid "Publisher"
msgstr "Editorial"
#: apps/manga/models.py:46 themes/bootflat/templates/_layout.html:34
#: apps/manga/models.py:47 themes/bootflat/templates/_layout.html:36
#: themes/bootflat/templates/manga/publishers/list.html:4
#: themes/bootflat/templates/manga/series/detail.html:64
msgid "Publishers"
msgstr "Editoriales"
#: apps/manga/models.py:53 themes/bootflat/templates/users/profile.html:27
#: apps/manga/models.py:54 themes/bootflat/templates/users/profile.html:27
msgid "Summary"
msgstr "Resumen"
#: apps/manga/models.py:54
#: apps/manga/models.py:55
#: themes/bootflat/templates/manga/series/detail.html:25
msgid "Finished"
msgstr "Finalizado"
#: apps/manga/models.py:109
#: apps/manga/models.py:110
msgid "Number"
msgstr "Número"
#: apps/manga/models.py:115
#: apps/manga/models.py:116
msgid "ISBN-10"
msgstr "ISBN-10"
#: apps/manga/models.py:117
#: apps/manga/models.py:118
msgid "ISBN-13"
msgstr "ISBN-13"
#: apps/manga/models.py:120
#: apps/manga/models.py:121
msgid "Retail price"
msgstr "Precio recomendado"
#: apps/manga/models.py:122
#: apps/manga/models.py:123
msgid "Pages"
msgstr "Páginas"
#: apps/manga/models.py:123
#: apps/manga/models.py:124
msgid "Release date"
msgstr "Fecha de lanzamiento"
#: apps/manga/models.py:130
#: apps/manga/models.py:134
msgid "Volume"
msgstr "Volumen"
#: apps/manga/models.py:143
#: apps/manga/models.py:147
msgid "Person"
msgstr "Persona"
#: apps/manga/models.py:144
#: apps/manga/models.py:148
msgid "Persons"
msgstr "Personas"
#: apps/manga/models.py:158
#: apps/manga/models.py:162
msgid "have"
msgstr "tiene"
#: apps/manga/models.py:171
#: apps/manga/models.py:178
msgid "wants"
msgstr "quiere"
#: apps/manga/views/series.py:20
msgid "other"
msgstr "otros"
#: apps/manga/views/series.py:21
msgid "all"
msgstr "todos"
#: apps/manga/views/search.py:11 apps/manga/views/search.py:13
#: themes/bootflat/templates/_layout.html:71
msgid "Search"
msgstr "Buscar"
#: apps/manga/views/volumes.py:23
msgid "{} is already on your collection!"
@ -197,39 +209,39 @@ msgstr "Has accedido correctamente."
msgid "Logged out successfully"
msgstr "Sesión finalizada."
#: settings/base.py:120
#: settings/base.py:121
msgid "Spanish"
msgstr "Español"
#: themes/bootflat/templates/_layout.html:19
#: themes/bootflat/templates/_layout.html:20
msgid "Toggle navigation"
msgstr "Mostrar/Ocultar navegación"
#: themes/bootflat/templates/_layout.html:45
#: themes/bootflat/templates/_layout.html:48
#: themes/bootflat/templates/users/profile-pjax.html:4
#: themes/bootflat/templates/users/profile.html:4
msgid "Profile"
msgstr "Perfil"
#: themes/bootflat/templates/_layout.html:47
#: themes/bootflat/templates/_layout.html:51
msgid "My collection"
msgstr "Mi colección"
#: themes/bootflat/templates/_layout.html:48
#: themes/bootflat/templates/_layout.html:52
msgid "My wishlist"
msgstr "Mi lista de deseados"
#: themes/bootflat/templates/_layout.html:50
#: themes/bootflat/templates/_layout.html:55
msgid "Logout"
msgstr "Cerrar sesión"
#: themes/bootflat/templates/_layout.html:56
#: themes/bootflat/templates/_layout.html:61
msgid "Log in"
msgstr "Entrar"
#: themes/bootflat/templates/_layout.html:65
msgid "Search"
msgstr "Buscar"
#: themes/bootflat/templates/_admin/manga/series/includes/volumes.html:13
msgid "Edit"
msgstr "Editar"
#: themes/bootflat/templates/_admin/volumes/change_series.html:9
msgid "You are about to change the series of this volumes:"
@ -243,6 +255,16 @@ msgstr "Cambiar a:"
msgid "Change"
msgstr "Cambiar"
#: themes/bootflat/templates/manga/search.html:8
msgid "Looking for..."
msgstr "Buscando..."
#: themes/bootflat/templates/manga/search.html:20
#: themes/bootflat/templates/manga/series/list.html:38
#: themes/bootflat/templates/manga/series/list.html:58
msgid "No results"
msgstr "Sin resultados"
#: themes/bootflat/templates/manga/publishers/detail.html:14
#: themes/bootflat/templates/manga/publishers/detail.html:43
#: themes/bootflat/templates/manga/series/detail.html:19
@ -274,10 +296,9 @@ msgstr "Historia"
msgid "Original publisher"
msgstr "Editorial original"
#: themes/bootflat/templates/manga/series/list.html:35
#: themes/bootflat/templates/manga/series/list.html:55
msgid "No results"
msgstr "Sin resultados"
#: themes/bootflat/templates/manga/series/list.html:17
msgid "other"
msgstr "otros"
#: themes/bootflat/templates/users/login.html:24
msgid "Access the site"
@ -287,20 +308,34 @@ msgstr "Accede al sitio"
msgid "Login"
msgstr "Entrar"
#: themes/bootflat/templates/users/profile.html:29
#: themes/bootflat/templates/users/profile.html:30
#: themes/bootflat/templates/users/profile/collection.html:4
msgid "Collection"
msgstr "Mi colección"
#: themes/bootflat/templates/users/profile.html:31
#: themes/bootflat/templates/users/profile.html:34
#: themes/bootflat/templates/users/profile/wishlist.html:4
msgid "Wishlist"
msgstr "Lista de deseados"
#: themes/bootflat/templates/users/profile.html:33
#: themes/bootflat/templates/users/profile.html:44
msgid "Edit my profile"
msgstr "Editar mi perfil"
#: themes/bootflat/templates/users/profile/achievements.html:4
msgid "Achievements"
msgstr "Logros"
#: themes/bootflat/templates/users/profile/summary.html:13
msgid "Volumes owned"
msgstr "Volúmenes"
#: themes/bootflat/templates/users/profile/summary.html:19
msgid "Volumes wishlisted"
msgstr "Deseados"
#~ msgid "all"
#~ msgstr "todos"
#~ msgid "Original series"
#~ msgstr "Series originales"

View File

@ -22,3 +22,7 @@ INSTALLED_APPS += (
)
FILER_DUMP_PAYLOAD = True
MEDIA_URL = '/media/'
STATIC_URL = '/static/'

View File

@ -41,8 +41,6 @@ $ ->
# PJAX
if $.support.pjax
$(document).on 'click', 'a[data-pjax]', (event) ->
event.preventDefault()
elem = $(@)
pjax = elem.data('pjax')
push = true
@ -74,8 +72,6 @@ $ ->
if elem.is('[pjax-messages]')
window._updateMessages = true
false
# Tooltips
$('[data-toggle="tooltip"]').tooltip();

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -13,17 +13,26 @@
margin-bottom: 0 !important;
}
.social-bar {
margin-top: 10px;
margin-bottom: -10px;
text-align: right;
}
.volume-item {
&:not(.user-have-it) {
.badges { display: none; }
&:hover .badges {
&:hover .badges .badge {
display: block;
}
}
&
&.user-wishlisted-it .badge-wishlist-it {
display: block !important;
}
&.user-have-it .badge-have-it {
display: block !important;
}
.badges {
position: absolute;
@ -35,7 +44,7 @@
border: #FFF 3px solid;
border-radius: 50%;
display: block;
display: none;
font-size: @size/1.5;
height: @size;
line-height: (@size)-3px;
@ -43,14 +52,6 @@
text-align: center;
width: @size;
}
.badge-haveit, .badge-wishlist {
&:hover {
& > span {
display: block;
}
}
}
}
}

View File

@ -1,6 +1,6 @@
body {
background-color: rgb(241, 242, 246) !important;
background-image: url('/backgrounds/triangify.png');
background-image: url('../backgrounds/triangify.png');
background-position: center top;
background-attachment: fixed;
}

View File

@ -0,0 +1,17 @@
{% load staticfiles solo_tags %}
{% get_solo 'config.SocialConfiguration' as social %}
<div class="social-bar">
{% if social.twitter_account %}
<a href="https://twitter.com/{{ social.twitter_account }}" target="_blank"><img src="{% static "icons/twitter.png" %}" /></a>
{% endif %}
{% if social.facebook_url %}
<a href="{{ social.facebook_url }}" target="_blank"><img src="{% static "icons/facebook.png" %}" /></a>
{% endif %}
{% if social.google_plus_url %}
<a href="{{ social.google_plus_url }}" target="_blank"><img src="{% static "icons/googleplus.png" %}" /></a>
{% endif %}
{% if social.contact_email %}
<a href="mailto:{{ social.contact_email }}"><img src="{% static "icons/email.png" %}" /></a>
{% endif %}
</div>

View File

@ -1,17 +1,18 @@
{% load i18n solo_tags %}
{% load i18n solo_tags staticfiles %}
{% get_solo 'config.SiteConfiguration' as site_config %}
{% get_solo 'config.SocialConfiguration' as social_config %}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ STATIC_URL }}/css/style.css" />
<link rel="stylesheet" href="{% static "css/style.css" %}" />
{% block extra_css %}{% endblock %}
<title>{% block page_title %}ShelfZilla{% endblock %}</title>
</head>
<body>
{% block navigation_bar %}
<div class="container">
{% include "_includes/social_bar.html" %}
<nav class="navbar navbar-alternative" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
@ -45,9 +46,11 @@
<li><a data-pjax-unnav href="/admin/">Admin</a></li>
{% endif %}
<li><a data-pjax-unnav href="{% url 'profile' %}" data-pjax>{% trans "Profile" %}</a></li>
<!--
<li class="divider"></li>
<li><a data-pjax-unnav href="#">{% trans "My collection" %}</a></li>
<li><a data-pjax-unnav href="#">{% trans "My wishlist" %}</a></li>
-->
<li class="divider"></li>
<li><a data-pjax-unnav href="{% url "logout" %}">{% trans "Logout" %}</a></li>
</ul>
@ -60,14 +63,15 @@
</li>
{% endif %}
</ul>
<!--
<form class="navbar-form navbar-right" role="search">
{% if user.is_authenticated %}
<form class="navbar-form navbar-right" role="search" method="post" action="{% url "search" %}">
{% csrf_token %}
<div class="form-search search-only">
<i class="search-icon glyphicon glyphicon-search"></i>
<input type="text" class="form-control search-query" placeholder="{% trans 'Search' %}">
<input type="text" value="{{ search_query }}" name="q" class="form-control search-query" placeholder="{% trans 'Search' %}">
</div>
</form>
-->
{% endif %}
</div>
</div>
</nav>
@ -82,7 +86,7 @@
{% block footer %}{% endblock %}
<script src="{{ STATIC_URL }}/js/site.js"></script>
<script src="{% static "js/site.js" %}"></script>
{% block extra_js %}{% endblock %}
{% if social_config.google_analytics %}

View File

@ -6,6 +6,7 @@
{% block main_content %}
{% regroup items by first_letter as letter_list %}
<div class="container">
<!--
<div class="pull-right">
<ul class="pagination">
{% for letter in letter_list %}
@ -15,6 +16,7 @@
{% endfor %}
</ul>
</div>
-->
<div class="clearfix"></div>
{% for letter in letter_list %}
<div class="panel panel-default">

View File

@ -0,0 +1,25 @@
{% extends '_layout.html'|pjax:request %}
{% load i18n %}
{% block main_content %}
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">{% trans "Looking for..." %} "<strong>{{ search_query }}</strong>"</h3>
</div>
<ul class="list-group">
{% for item in items %}
<li class="list-group-item">
{% if item.slug %}
<a href="{% url "series.detail" item.pk item.slug %}" data-pjax>{{ item.name }}</a>
{% else %}
<a href="{% url "series.detail" item.pk %}" data-pjax>{{ item.name }}</a>
{% endif %}
</li>
{% empty %}
<li class="list-group-item">{% trans "No results" %}</li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}

View File

@ -1,20 +1,20 @@
{% load i18n thumbnail %}
<div class="well text-center volume-item {% if volume.pk in user_have_volumes %}user-have-it{% endif %}">
<div class="well text-center volume-item {% if volume.pk in user_have_volumes %}user-have-it{% endif %} {% if volume.pk in user_wishlisted_volumes %}user-wishlisted-it{% endif %}">
<div class="badges">
{% if volume.pk in user_have_volumes %}
<a href="{% url "volume.have_it" volume.pk %}" data-pjax="v{{ volume.pk }}" pjax-nopush pjax-messages>
<span class="badge badge-success">
<span class="badge badge-success badge-have-it">
<i class="glyphicon glyphicon-ok"></i>
</span>
</a>
{% else %}
<a href="{% url "volume.have_it" volume.pk %}" data-pjax="v{{ volume.pk }}" pjax-nopush pjax-messages>
<span class="badge">
<span class="badge badge-have-it">
<i class="glyphicon glyphicon-ok"></i>
</span>
</a>
<a href="{% url "volume.wishlist" volume.pk %}" data-pjax="v{{ volume.pk }}" pjax-messages pjax-nopush>
<span class="badge {% if volume.pk in user_wishlisted_volumes %}badge-warning{% endif %}">
<span class="badge badge-wishlist-it {% if volume.pk in user_wishlisted_volumes %}badge-warning{% endif %}">
<i class="glyphicon glyphicon-star"></i>
</span>
</a>

View File

@ -25,16 +25,23 @@
<div class="list-group">
<a data-pjax-nav href="{% url 'profile' %}" data-pjax class="list-group-item active">
{% trans "Summary" %}</a>
{% if user.have_volumes.count > 0 %}
<a data-pjax-nav href="{% url 'profile' 'collection' %}" data-pjax="profile" class="list-group-item">
{% trans "Collection" %}</a>
{% endif %}
{% if user.wishlisted_volumes.count > 0 %}
<a data-pjax-nav href="{% url 'profile' 'wishlist' %}" data-pjax="profile" class="list-group-item">
{% trans "Wishlist" %}</a>
{% endif %}
{% comment %}
<a data-pjax-nav href="{% url 'profile' 'achievements' %}" data-pjax="profile" class="list-group-item">
{% trans "Achievements" %}</a>
{% 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 %}

View File

@ -15,6 +15,7 @@ urlpatterns = patterns(
url(r'^series/', include('shelfzilla.apps.manga.urls.series')),
url(r'^volumes/', include('shelfzilla.apps.manga.urls.volumes')),
url(r'^publishers/', include('shelfzilla.apps.manga.urls.publishers')),
url(r'^search/', include('shelfzilla.apps.manga.urls.search')),
url(r'^$', include('shelfzilla.apps.homepage.urls')),
url(r'^_admin/', include('shelfzilla.apps._admin.urls')),
url(r'^admin/', include(admin.site.urls)),