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): class SocialConfiguration(SingletonModel):
# Social accounts
twitter_account = models.CharField(max_length=64, blank=True, null=True) 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) google_analytics = models.CharField(max_length=16, blank=True, null=True)
def __unicode__(self): def __unicode__(self):

View File

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

View File

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

View File

@ -41,8 +41,6 @@ $ ->
# PJAX # PJAX
if $.support.pjax if $.support.pjax
$(document).on 'click', 'a[data-pjax]', (event) -> $(document).on 'click', 'a[data-pjax]', (event) ->
event.preventDefault()
elem = $(@) elem = $(@)
pjax = elem.data('pjax') pjax = elem.data('pjax')
push = true push = true
@ -74,8 +72,6 @@ $ ->
if elem.is('[pjax-messages]') if elem.is('[pjax-messages]')
window._updateMessages = true window._updateMessages = true
false
# Tooltips # Tooltips
$('[data-toggle="tooltip"]').tooltip(); $('[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; margin-bottom: 0 !important;
} }
.social-bar {
margin-top: 10px;
margin-bottom: -10px;
text-align: right;
}
.volume-item { .volume-item {
&:not(.user-have-it) { &:not(.user-have-it) {
.badges { display: none; } &:hover .badges .badge {
&:hover .badges {
display: block; display: block;
} }
} }
& &.user-wishlisted-it .badge-wishlist-it {
display: block !important;
}
&.user-have-it .badge-have-it {
display: block !important;
}
.badges { .badges {
position: absolute; position: absolute;
@ -35,7 +44,7 @@
border: #FFF 3px solid; border: #FFF 3px solid;
border-radius: 50%; border-radius: 50%;
display: block; display: none;
font-size: @size/1.5; font-size: @size/1.5;
height: @size; height: @size;
line-height: (@size)-3px; line-height: (@size)-3px;
@ -43,14 +52,6 @@
text-align: center; text-align: center;
width: @size; width: @size;
} }
.badge-haveit, .badge-wishlist {
&:hover {
& > span {
display: block;
}
}
}
} }
} }

View File

@ -1,6 +1,6 @@
body { body {
background-color: rgb(241, 242, 246) !important; background-color: rgb(241, 242, 246) !important;
background-image: url('/backgrounds/triangify.png'); background-image: url('../backgrounds/triangify.png');
background-position: center top; background-position: center top;
background-attachment: fixed; 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.SiteConfiguration' as site_config %}
{% get_solo 'config.SocialConfiguration' as social_config %} {% get_solo 'config.SocialConfiguration' as social_config %}
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1"> <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 %} {% block extra_css %}{% endblock %}
<title>{% block page_title %}ShelfZilla{% endblock %}</title> <title>{% block page_title %}ShelfZilla{% endblock %}</title>
</head> </head>
<body> <body>
{% block navigation_bar %} {% block navigation_bar %}
<div class="container"> <div class="container">
{% include "_includes/social_bar.html" %}
<nav class="navbar navbar-alternative" role="navigation"> <nav class="navbar navbar-alternative" role="navigation">
<div class="container-fluid"> <div class="container-fluid">
<div class="navbar-header"> <div class="navbar-header">
@ -45,9 +46,11 @@
<li><a data-pjax-unnav href="/admin/">Admin</a></li> <li><a data-pjax-unnav href="/admin/">Admin</a></li>
{% endif %} {% endif %}
<li><a data-pjax-unnav href="{% url 'profile' %}" data-pjax>{% trans "Profile" %}</a></li> <li><a data-pjax-unnav href="{% url 'profile' %}" data-pjax>{% trans "Profile" %}</a></li>
<!--
<li class="divider"></li> <li class="divider"></li>
<li><a data-pjax-unnav href="#">{% trans "My collection" %}</a></li> <li><a data-pjax-unnav href="#">{% trans "My collection" %}</a></li>
<li><a data-pjax-unnav href="#">{% trans "My wishlist" %}</a></li> <li><a data-pjax-unnav href="#">{% trans "My wishlist" %}</a></li>
-->
<li class="divider"></li> <li class="divider"></li>
<li><a data-pjax-unnav href="{% url "logout" %}">{% trans "Logout" %}</a></li> <li><a data-pjax-unnav href="{% url "logout" %}">{% trans "Logout" %}</a></li>
</ul> </ul>
@ -60,14 +63,15 @@
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
<!-- {% if user.is_authenticated %}
<form class="navbar-form navbar-right" role="search"> <form class="navbar-form navbar-right" role="search" method="post" action="{% url "search" %}">
{% csrf_token %}
<div class="form-search search-only"> <div class="form-search search-only">
<i class="search-icon glyphicon glyphicon-search"></i> <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> </div>
</form> </form>
--> {% endif %}
</div> </div>
</div> </div>
</nav> </nav>
@ -82,7 +86,7 @@
{% block footer %}{% endblock %} {% block footer %}{% endblock %}
<script src="{{ STATIC_URL }}/js/site.js"></script> <script src="{% static "js/site.js" %}"></script>
{% block extra_js %}{% endblock %} {% block extra_js %}{% endblock %}
{% if social_config.google_analytics %} {% if social_config.google_analytics %}

View File

@ -6,6 +6,7 @@
{% block main_content %} {% block main_content %}
{% regroup items by first_letter as letter_list %} {% regroup items by first_letter as letter_list %}
<div class="container"> <div class="container">
<!--
<div class="pull-right"> <div class="pull-right">
<ul class="pagination"> <ul class="pagination">
{% for letter in letter_list %} {% for letter in letter_list %}
@ -15,6 +16,7 @@
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
-->
<div class="clearfix"></div> <div class="clearfix"></div>
{% for letter in letter_list %} {% for letter in letter_list %}
<div class="panel panel-default"> <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 %} {% 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"> <div class="badges">
{% if volume.pk in user_have_volumes %} {% if volume.pk in user_have_volumes %}
<a href="{% url "volume.have_it" volume.pk %}" data-pjax="v{{ volume.pk }}" pjax-nopush pjax-messages> <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> <i class="glyphicon glyphicon-ok"></i>
</span> </span>
</a> </a>
{% else %} {% else %}
<a href="{% url "volume.have_it" volume.pk %}" data-pjax="v{{ volume.pk }}" pjax-nopush pjax-messages> <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> <i class="glyphicon glyphicon-ok"></i>
</span> </span>
</a> </a>
<a href="{% url "volume.wishlist" volume.pk %}" data-pjax="v{{ volume.pk }}" pjax-messages pjax-nopush> <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> <i class="glyphicon glyphicon-star"></i>
</span> </span>
</a> </a>

View File

@ -25,16 +25,23 @@
<div class="list-group"> <div class="list-group">
<a data-pjax-nav href="{% url 'profile' %}" data-pjax class="list-group-item active"> <a data-pjax-nav href="{% url 'profile' %}" data-pjax class="list-group-item active">
{% trans "Summary" %}</a> {% trans "Summary" %}</a>
{% if user.have_volumes.count > 0 %}
<a data-pjax-nav href="{% url 'profile' 'collection' %}" data-pjax="profile" class="list-group-item"> <a data-pjax-nav href="{% url 'profile' 'collection' %}" data-pjax="profile" class="list-group-item">
{% trans "Collection" %}</a> {% 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"> <a data-pjax-nav href="{% url 'profile' 'wishlist' %}" data-pjax="profile" class="list-group-item">
{% trans "Wishlist" %}</a> {% trans "Wishlist" %}</a>
{% endif %}
{% comment %} {% comment %}
<a data-pjax-nav href="{% url 'profile' 'achievements' %}" data-pjax="profile" class="list-group-item"> <a data-pjax-nav href="{% url 'profile' 'achievements' %}" data-pjax="profile" class="list-group-item">
{% trans "Achievements" %}</a> {% trans "Achievements" %}</a>
{% endcomment %} {% endcomment %}
</div> </div>
</div> </div>
<div>
<button class="btn btn-normal btn-block">{% trans "Edit my profile" %} <- NOT WORKING</button>
</div>
</div> </div>
<div class="col-sm-9" data-pjax-container="profile"> <div class="col-sm-9" data-pjax-container="profile">
{% block profile_content %} {% block profile_content %}

View File

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

View File

@ -1,11 +1,37 @@
{% load i18n %}
{% comment %} {% comment %}
{% extends 'users/profile.html'|pjax:request %} {% extends 'users/profile.html'|pjax:request %}
{% load i18n %}
{% block page_title %}{{ block.super }}{% endblock %} {% block page_title %}{{ block.super }}{% endblock %}
{% endcomment %} {% endcomment %}
{% block profile_content %} {% 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"> <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> <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> </div>

View File

@ -4,7 +4,15 @@
{% block page_title %}{{ block.super }} | {% trans "Wishlist" %}{% endblock %} {% block page_title %}{{ block.super }} | {% trans "Wishlist" %}{% endblock %}
{% block profile_content %} {% block profile_content %}
<div class="well"> <div class="row">
Wishlist {% 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> </div>
{% endblock %} {% endblock %}

View File

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