Browse Source

Added UserReadVolume model and behaviour to the site.

crawlers/norma
Felipe Martín 7 years ago
parent
commit
601d8b229b
  1. 2
      .gitignore
  2. 13
      shelfzilla/apps/manga/context_processors.py
  3. 222
      shelfzilla/apps/manga/migrations/0029_auto__add_userreadvolume.py
  4. 18
      shelfzilla/apps/manga/models.py
  5. 5
      shelfzilla/apps/manga/urls/volumes.py
  6. 32
      shelfzilla/apps/manga/views/volumes.py
  7. BIN
      shelfzilla/locale/es/LC_MESSAGES/django.mo
  8. 161
      shelfzilla/locale/es/LC_MESSAGES/django.po
  9. 1
      shelfzilla/settings/base.py
  10. 4
      shelfzilla/themes/bootflat/static/less/fixes.less
  11. 9
      shelfzilla/themes/bootflat/templates/manga/series/includes/volume-badges.html
  12. 5
      shelfzilla/themes/bootflat/templates/users/profile/summary.html

2
.gitignore

@ -30,3 +30,5 @@ django.pot
# Fixtures
fixtures/
tmp/

13
shelfzilla/apps/manga/context_processors.py

@ -1,4 +1,4 @@
from .models import UserHaveVolume, UserWishlistVolume
from .models import UserHaveVolume, UserWishlistVolume, UserReadVolume
def user_have_volumes(request):
@ -17,3 +17,14 @@ def user_wishlisted_volumes(request):
user=request.user).values_list('volume', flat=True)
return {'user_wishlisted_volumes': result}
def user_read_volumes(request):
result = []
if request.user.is_authenticated():
result = UserReadVolume.objects.filter(
user=request.user).values_list('volume', flat=True)
return {'user_read_volumes': result}

222
shelfzilla/apps/manga/migrations/0029_auto__add_userreadvolume.py

@ -0,0 +1,222 @@
# -*- 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 model 'UserReadVolume'
db.create_table(u'manga_userreadvolume', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='read_volumes', to=orm['auth.User'])),
('volume', self.gf('django.db.models.fields.related.ForeignKey')(related_name='read_by', to=orm['manga.Volume'])),
('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
))
db.send_create_signal(u'manga', ['UserReadVolume'])
def backwards(self, orm):
# Deleting model 'UserReadVolume'
db.delete_table(u'manga_userreadvolume')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'filer.file': {
'Meta': {'object_name': 'File'},
'_file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'folder': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'all_files'", 'null': 'True', 'to': "orm['filer.Folder']"}),
'has_all_mandatory_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}),
'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'polymorphic_filer.file_set'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}),
'sha1': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '40', 'blank': 'True'}),
'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
},
'filer.folder': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('parent', 'name'),)", 'object_name': 'Folder'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['filer.Folder']"}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
},
'filer.image': {
'Meta': {'object_name': 'Image', '_ormbases': ['filer.File']},
'_height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'_width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'author': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'date_taken': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'default_alt_text': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'default_caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
u'file_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['filer.File']", 'unique': 'True', 'primary_key': 'True'}),
'must_always_publish_author_credit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'must_always_publish_copyright': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'subject_location': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '64', 'null': 'True', 'blank': 'True'})
},
u'manga.language': {
'Meta': {'ordering': "['name']", 'object_name': 'Language'},
'code': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
},
u'manga.person': {
'Meta': {'ordering': "['name']", 'object_name': 'Person'},
'for_review': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'for_review_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'})
},
u'manga.publisher': {
'Meta': {'ordering': "['name']", 'object_name': 'Publisher'},
'for_review': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'for_review_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
},
u'manga.series': {
'Meta': {'ordering': "['name']", 'object_name': 'Series'},
'art': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'artist_of'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['manga.Person']"}),
'cover': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}),
'finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'folder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Folder']", 'null': 'True', 'blank': 'True'}),
'for_review': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'for_review_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'original_publisher': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'original_series'", 'null': 'True', 'to': u"orm['manga.Publisher']"}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
'status': ('django.db.models.fields.CharField', [], {'default': "'open'", 'max_length': '16'}),
'story': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'scriptwriter_of'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['manga.Person']"}),
'summary': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
},
u'manga.seriespublisher': {
'Meta': {'object_name': 'SeriesPublisher'},
'actual_publisher': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'for_review': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'for_review_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'publisher': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'series_published'", 'to': u"orm['manga.Publisher']"}),
'series': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publishers'", 'to': u"orm['manga.Series']"}),
'status': ('django.db.models.fields.CharField', [], {'default': "'open'", 'max_length': '16'})
},
u'manga.seriessummary': {
'Meta': {'unique_together': "(('series', 'language'),)", 'object_name': 'SeriesSummary'},
'for_review': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'for_review_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['manga.Language']"}),
'series': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'summaries'", 'to': u"orm['manga.Series']"}),
'summary': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
},
u'manga.userhavevolume': {
'Meta': {'ordering': "('volume__series__name', 'volume__number')", 'object_name': 'UserHaveVolume'},
'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'have_volumes'", 'to': u"orm['auth.User']"}),
'volume': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_by'", 'to': u"orm['manga.Volume']"})
},
u'manga.userreadvolume': {
'Meta': {'ordering': "('volume__series__name', 'volume__number')", 'object_name': 'UserReadVolume'},
'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'read_volumes'", 'to': u"orm['auth.User']"}),
'volume': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'read_by'", 'to': u"orm['manga.Volume']"})
},
u'manga.userwishlistvolume': {
'Meta': {'ordering': "('volume__series__name', 'volume__number')", 'object_name': 'UserWishlistVolume'},
'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'wishlisted_volumes'", 'to': u"orm['auth.User']"}),
'volume': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'wishlisted_by'", 'to': u"orm['manga.Volume']"})
},
u'manga.volume': {
'Meta': {'ordering': "['series__name', 'language', 'number']", 'object_name': 'Volume'},
'collection': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'volumes'", 'null': 'True', 'to': u"orm['manga.VolumeCollection']"}),
'cover': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}),
'for_review': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'for_review_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'isbn_10': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
'isbn_13': ('django.db.models.fields.CharField', [], {'max_length': '13', 'null': 'True', 'blank': 'True'}),
'language': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['manga.Language']", 'null': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
'number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'pages': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'publisher': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'volumes'", 'to': u"orm['manga.Publisher']"}),
'release_date': ('django.db.models.fields.DateField', [], {'null': 'True'}),
'retail_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '5', 'decimal_places': '2', 'blank': 'True'}),
'series': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'volumes'", 'to': u"orm['manga.Series']"})
},
u'manga.volumecollection': {
'Meta': {'ordering': "['name']", 'object_name': 'VolumeCollection'},
'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'for_review': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'for_review_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'series': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'collections'", 'to': u"orm['manga.Series']"})
}
}
complete_apps = ['manga']

18
shelfzilla/apps/manga/models.py

@ -276,6 +276,24 @@ class UserWishlistVolume(models.Model):
class Meta:
ordering = ('volume__series__name', 'volume__number', )
class UserReadVolume(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL,
related_name='read_volumes')
volume = models.ForeignKey(Volume, related_name='read_by')
date = models.DateTimeField(_('Date'), auto_now_add=True)
def __unicode__(self):
return "{} {} {}".format(
self.user.username,
_('have read'),
self.volume
)
class Meta:
ordering = ('volume__series__name', 'volume__number', )
#
# SIGNALS
#

5
shelfzilla/apps/manga/urls/volumes.py

@ -1,6 +1,6 @@
from django.conf.urls import patterns, url
from ..views.volumes import WishlistVolumeView, HaveVolumeView
from ..views.volumes import WishlistVolumeView, HaveVolumeView, ReadVolumeView
urlpatterns = patterns(
'',
@ -10,4 +10,7 @@ urlpatterns = patterns(
url(r'^(?P<vid>\d+)/have_it/$',
HaveVolumeView.as_view(),
name='volume.have_it'),
url(r'^(?P<vid>\d+)/read_it/$',
ReadVolumeView.as_view(),
name='volume.read_it'),
)

32
shelfzilla/apps/manga/views/volumes.py

@ -5,7 +5,7 @@ from django.contrib import messages
from django.shortcuts import render_to_response, get_object_or_404
from django.core.urlresolvers import reverse
from ..models import Volume, UserWishlistVolume, UserHaveVolume
from ..models import Volume, UserWishlistVolume, UserHaveVolume, UserReadVolume
from .series import SeriesView
@ -81,3 +81,33 @@ class HaveVolumeView(SeriesView):
return HttpResponseRedirect(
reverse('series.detail', args=[volume.series.pk])
)
class ReadVolumeView(SeriesView):
template = 'manga/series/volumes/volume-pjax.html'
def get(self, request, vid):
volume = get_object_or_404(Volume, pk=vid)
# Try to add to the read list
try:
user_read = UserReadVolume.objects.get(
volume=volume, user=request.user)
user_read.delete()
messages.info(request,
_('{} marked as not read').format(volume))
except UserReadVolume.DoesNotExist:
# Or remove it if already in it!
user_read = UserReadVolume(
volume=volume, user=request.user)
user_read.save()
messages.success(request, _('{} marked as read!').format(volume))
context = RequestContext(request, {'volume': volume})
if context.get('is_pjax'):
return render_to_response(self.template, context_instance=context)
else:
return HttpResponseRedirect(
reverse('series.detail', args=[volume.series.pk])
)

BIN
shelfzilla/locale/es/LC_MESSAGES/django.mo

Binary file not shown.

161
shelfzilla/locale/es/LC_MESSAGES/django.po

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-08-25 20:12+0200\n"
"PO-Revision-Date: 2014-08-25 20:12+0200\n"
"POT-Creation-Date: 2014-09-08 17:46+0200\n"
"PO-Revision-Date: 2014-09-08 17:46+0200\n"
"Last-Translator: Felipe Martin <fmartingr@me.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
@ -51,63 +51,63 @@ msgstr "Configuración del sitio"
msgid "Social Configuration"
msgstr "Configuración social"
#: apps/manga/admin.py:41
#: apps/manga/admin.py:44
msgid "Items marked for review"
msgstr "Marcar items para revisión"
#: apps/manga/admin.py:46
#: apps/manga/admin.py:49
msgid "Items unmarked for review"
msgstr "Desmarcar items para revisión"
#: apps/manga/admin.py:58 apps/manga/admin.py:94 apps/manga/admin.py:137
#: apps/manga/admin.py:184
#: apps/manga/admin.py:61 apps/manga/admin.py:109 apps/manga/admin.py:154
#: apps/manga/admin.py:202 apps/manga/admin.py:229 apps/manga/admin.py:254
msgid "General"
msgstr "General"
#: apps/manga/admin.py:59 apps/manga/admin.py:96 apps/manga/admin.py:139
#: apps/manga/admin.py:185
#: apps/manga/admin.py:62 apps/manga/admin.py:111 apps/manga/admin.py:156
#: apps/manga/admin.py:203 apps/manga/admin.py:255
msgid "Review"
msgstr "Para revisión"
#: apps/manga/admin.py:60 apps/manga/admin.py:97 apps/manga/admin.py:140
#: apps/manga/admin.py:186
#: apps/manga/admin.py:63 apps/manga/admin.py:112 apps/manga/admin.py:157
#: apps/manga/admin.py:204 apps/manga/admin.py:256
msgid "Advanced"
msgstr "Avanzado"
#: apps/manga/admin.py:80 apps/manga/models.py:145 apps/manga/models.py:146
#: apps/manga/admin.py:83 apps/manga/models.py:134 apps/manga/models.py:135
#: themes/bootflat/templates/_layout.html:40
#: themes/bootflat/templates/homepage/home.html:94
#: themes/bootflat/templates/manga/publishers/detail.html:24
#: themes/bootflat/templates/homepage/home.html:72
#: themes/bootflat/templates/manga/publishers/detail.html:19
#: themes/bootflat/templates/manga/series/list.html:4
msgid "Series"
msgstr "Series"
#: apps/manga/admin.py:95 apps/manga/admin.py:122 apps/manga/models.py:211
#: themes/bootflat/templates/homepage/home.html:97
#: themes/bootflat/templates/manga/publishers/detail.html:27
#: apps/manga/admin.py:110 apps/manga/admin.py:137 apps/manga/models.py:200
#: themes/bootflat/templates/homepage/home.html:75
#: themes/bootflat/templates/manga/publishers/detail.html:22
msgid "Volumes"
msgstr "Volúmenes"
#: apps/manga/admin.py:138
#: apps/manga/admin.py:155
msgid "Cover"
msgstr "Carátula"
#: apps/manga/admin.py:176
#: apps/manga/admin.py:194
#: 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/admin.py:214
#: apps/manga/admin.py:243
msgid "Flag"
msgstr "Bandera"
#: apps/manga/models.py:15 apps/manga/models.py:65 apps/manga/models.py:183
#: apps/manga/models.py:215 apps/manga/models.py:229 apps/manga/models.py:242
#: apps/manga/models.py:15 apps/manga/models.py:65 apps/manga/models.py:172
#: apps/manga/models.py:204 apps/manga/models.py:218 apps/manga/models.py:231
msgid "Name"
msgstr "Nombre"
#: apps/manga/models.py:16 apps/manga/models.py:66 apps/manga/models.py:230
#: apps/manga/models.py:16 apps/manga/models.py:66 apps/manga/models.py:219
msgid "Slug"
msgstr "Álias"
@ -116,13 +116,13 @@ msgid "URL"
msgstr "URL"
#: apps/manga/models.py:53
#: themes/bootflat/templates/manga/series/detail.html:126
#: themes/bootflat/templates/manga/series/detail.html:120
msgid "Publisher"
msgstr "Editorial"
#: apps/manga/models.py:54 themes/bootflat/templates/_layout.html:43
#: themes/bootflat/templates/manga/publishers/list.html:4
#: themes/bootflat/templates/manga/series/detail.html:66
#: themes/bootflat/templates/manga/series/detail.html:55
msgid "Publishers"
msgstr "Editoriales"
@ -142,98 +142,101 @@ msgstr "Cancelada"
msgid "On-hold"
msgstr "Parada"
#: apps/manga/models.py:68 apps/manga/models.py:152
#: apps/manga/models.py:68 apps/manga/models.py:141
#: themes/bootflat/templates/users/profile.html:27
msgid "Summary"
msgstr "Resumen"
#: apps/manga/models.py:70 apps/manga/models.py:161
#: themes/bootflat/templates/manga/series/detail.html:29
#: apps/manga/models.py:70 apps/manga/models.py:150
msgid "Status"
msgstr "Estado"
#: apps/manga/models.py:163
#: apps/manga/models.py:152
msgid "Current publisher"
msgstr "Editorial original"
#: apps/manga/models.py:182
#: apps/manga/models.py:171
msgid "Number"
msgstr "Número"
#: apps/manga/models.py:188
#: apps/manga/models.py:177
msgid "ISBN-10"
msgstr "ISBN-10"
#: apps/manga/models.py:190
#: apps/manga/models.py:179
msgid "ISBN-13"
msgstr "ISBN-13"
#: apps/manga/models.py:195
#: apps/manga/models.py:184
msgid "Retail price"
msgstr "Precio recomendado"
#: apps/manga/models.py:197
#: apps/manga/models.py:186
msgid "Pages"
msgstr "Páginas"
#: apps/manga/models.py:198
#: apps/manga/models.py:187
msgid "Release date"
msgstr "Fecha de lanzamiento"
#: apps/manga/models.py:210
#: apps/manga/models.py:199
msgid "Volume"
msgstr "Volumen"
#: apps/manga/models.py:217
#: apps/manga/models.py:206
msgid "Default"
msgstr "Por defecto"
#: apps/manga/models.py:224
#: themes/bootflat/templates/manga/series/detail.html:136
#: apps/manga/models.py:213
#: themes/bootflat/templates/manga/series/detail.html:134
#: themes/bootflat/templates/users/profile.html:30
#: themes/bootflat/templates/users/profile/collection.html:4
msgid "Collection"
msgstr "Colección"
#: apps/manga/models.py:225
#: apps/manga/models.py:214
msgid "Collections"
msgstr "Colecciones"
#: apps/manga/models.py:237
#: apps/manga/models.py:226
msgid "Person"
msgstr "Persona"
#: apps/manga/models.py:238
#: apps/manga/models.py:227
msgid "Persons"
msgstr "Personas"
#: apps/manga/models.py:243
#: apps/manga/models.py:232
msgid "Code"
msgstr "Código"
#: apps/manga/models.py:250
#: themes/bootflat/templates/manga/series/detail.html:116
#: apps/manga/models.py:239
#: themes/bootflat/templates/manga/series/detail.html:106
msgid "Language"
msgstr "Idioma"
#: apps/manga/models.py:251
#: apps/manga/models.py:240
msgid "Languages"
msgstr "Idiomas"
#: apps/manga/models.py:261 apps/manga/models.py:278
#: apps/manga/models.py:250 apps/manga/models.py:267 apps/manga/models.py:284
msgid "Date"
msgstr "Fecha"
#: apps/manga/models.py:266
#: apps/manga/models.py:255
msgid "have"
msgstr "tiene"
#: apps/manga/models.py:283
#: apps/manga/models.py:272
msgid "wants"
msgstr "quiere"
#: apps/manga/models.py:289
msgid "have read"
msgstr "ha leído"
#: apps/manga/views/search.py:11 apps/manga/views/search.py:13
#: themes/bootflat/templates/_layout.html:79
#: themes/bootflat/templates/_layout.html:80
#: themes/bootflat/templates/_admin/volumes/includes/cover.html:6
#: themes/bootflat/templates/_admin/volumes/includes/cover.html:15
msgid "Search"
@ -259,6 +262,14 @@ msgstr "{} eliminado de tu colección."
msgid "{} added to collection!"
msgstr "¡{} añadido a tu colección!"
#: apps/manga/views/volumes.py:98
msgid "{} marked as not read"
msgstr "{} marcado como no leído"
#: apps/manga/views/volumes.py:104
msgid "{} marked as read!"
msgstr "¡{} marcado como leído!"
#: apps/users/forms.py:7
msgid "Username"
msgstr "Usuario"
@ -283,7 +294,7 @@ msgstr "Has accedido correctamente."
msgid "Logged out successfully"
msgstr "Sesión finalizada."
#: settings/base.py:127
#: settings/base.py:128
msgid "Spanish"
msgstr "Español"
@ -350,24 +361,24 @@ msgstr "Actualizar con esta"
msgid "Upcoming volumes"
msgstr "Futuros lanzamientos"
#: themes/bootflat/templates/homepage/home.html:36
#: themes/bootflat/templates/homepage/home.html:25
msgid "Latest releases"
msgstr "Últimos lanzamientos"
#: themes/bootflat/templates/homepage/home.html:67
#: themes/bootflat/templates/homepage/home.html:45
msgid "Biggest collections"
msgstr "Mayores colecciones"
#: themes/bootflat/templates/homepage/home.html:76
#: themes/bootflat/templates/homepage/home.html:54
#, python-format
msgid "%(count)s volumes"
msgstr "%(count)s volumenes"
#: themes/bootflat/templates/homepage/home.html:85
#: themes/bootflat/templates/homepage/home.html:63
msgid "Stats"
msgstr "Estadísticas"
#: themes/bootflat/templates/homepage/home.html:90
#: themes/bootflat/templates/homepage/home.html:68
msgid "Users"
msgstr "Usuarios"
@ -383,43 +394,37 @@ msgstr "Sin resultados"
#: themes/bootflat/templates/manga/publishers/detail.html:10
#: themes/bootflat/templates/manga/series/detail.html:10
#: themes/bootflat/templates/manga/series/includes/volume.html:51
#: themes/bootflat/templates/manga/series/includes/volume.html:47
msgid "Edit in admin"
msgstr "Editar en el admin"
#: themes/bootflat/templates/manga/publishers/detail.html:20
#: themes/bootflat/templates/manga/series/detail.html:25
#: themes/bootflat/templates/manga/series/includes/volume.html:44
msgid "Requires review"
msgstr "Requiere revisión"
#: themes/bootflat/templates/manga/publishers/detail.html:31
#: themes/bootflat/templates/manga/publishers/detail.html:26
msgid "Homepage"
msgstr "Página principal"
#: themes/bootflat/templates/manga/series/detail.html:37
#: themes/bootflat/templates/manga/series/detail.html:26
msgid "Art"
msgstr "Arte"
#: themes/bootflat/templates/manga/series/detail.html:52
#: themes/bootflat/templates/manga/series/detail.html:41
msgid "Story"
msgstr "Historia"
#: themes/bootflat/templates/manga/series/detail.html:71
#: themes/bootflat/templates/manga/series/detail.html:60
msgid "Original publisher"
msgstr "Editorial original"
#: themes/bootflat/templates/manga/series/detail.html:85
#: themes/bootflat/templates/manga/series/detail.html:74
msgid "More info"
msgstr "Más información"
#: themes/bootflat/templates/manga/series/detail.html:118
#: themes/bootflat/templates/manga/series/detail.html:128
#: themes/bootflat/templates/manga/series/detail.html:138
#: themes/bootflat/templates/manga/series/detail.html:108
#: themes/bootflat/templates/manga/series/detail.html:122
#: themes/bootflat/templates/manga/series/detail.html:136
msgid "All"
msgstr "Todos"
#: themes/bootflat/templates/manga/series/detail.html:144
#: themes/bootflat/templates/manga/series/detail.html:146
msgid "Filter"
msgstr "Filtrar"
@ -427,7 +432,7 @@ msgstr "Filtrar"
msgid "other"
msgstr "otros"
#: themes/bootflat/templates/manga/series/includes/volume.html:41
#: themes/bootflat/templates/manga/series/includes/volume.html:39
#, python-format
msgid "%(pages)s pages"
msgstr "%(pages)s páginas"
@ -457,14 +462,22 @@ msgstr "Mis preferencias"
msgid "Achievements"
msgstr "Logros"
#: themes/bootflat/templates/users/profile/summary.html:13
#: themes/bootflat/templates/users/profile/summary.html:14
#, python-format
msgid "(%(count)s read)"
msgstr "(%(count)s leídos)"
#: themes/bootflat/templates/users/profile/summary.html:16
msgid "Volumes owned"
msgstr "Volúmenes"
#: themes/bootflat/templates/users/profile/summary.html:19
#: themes/bootflat/templates/users/profile/summary.html:22
msgid "Volumes wishlisted"
msgstr "Deseados"
#~ msgid "Requires review"
#~ msgstr "Requiere revisión"
#~ msgid "My collection"
#~ msgstr "Mi colección"

1
shelfzilla/settings/base.py

@ -82,6 +82,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'shelfzilla.apps.pjax.context_processors.pjax',
'shelfzilla.apps.manga.context_processors.user_have_volumes',
'shelfzilla.apps.manga.context_processors.user_wishlisted_volumes',
'shelfzilla.apps.manga.context_processors.user_read_volumes',
'shelfzilla.apps.users.context_processors.auth',
'shelfzilla.apps.users.context_processors.user_is_staff',
'shelfzilla.apps.users.context_processors.user_configuration',

4
shelfzilla/themes/bootflat/static/less/fixes.less

@ -53,6 +53,10 @@
display: block !important;
}
&.user-read-it .badge-read-it {
display: block !important;
}
.badge {
@size: 34px;

9
shelfzilla/themes/bootflat/templates/manga/series/includes/volume-badges.html

@ -1,4 +1,6 @@
<div class="badges {% 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 %}user-have-it{% endif %}
{% if volume.pk in user_wishlisted_volumes %}user-wishlisted-it{% endif %}
{% if volume.pk in user_read_volumes %}user-read-it{% endif %}">
{% 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 badge-have-it">
@ -17,4 +19,9 @@
</span>
</a>
{% endif %}
<a href="{% url "volume.read_it" volume.pk %}" data-pjax="v{{ volume.pk }}" pjax-messages pjax-nopush>
<span class="badge badge-read-it {% if volume.pk in user_read_volumes %}badge-primary{% endif %}">
<i class="glyphicon glyphicon-eye-open"></i>
</span>
</a>
</div>

5
shelfzilla/themes/bootflat/templates/users/profile/summary.html

@ -9,7 +9,10 @@
<div class="row text-center">
<div class="col-sm-6">
<div class="well">
<h2 class="no-margin-top">{{ item.have_volumes.count }}</h2>
<h2 class="no-margin-top">
{{ item.have_volumes.count }}
<small>{% blocktrans with count=item.read_volumes.count %}({{ count }} read){% endblocktrans %}</small>
</h2>
{% trans "Volumes owned" %}
</div>
</div>