diff --git a/amiibofindr/apps/amiibo/views.py b/amiibofindr/apps/amiibo/views.py index 2bbf0d2..dfd0f3b 100644 --- a/amiibofindr/apps/amiibo/views.py +++ b/amiibofindr/apps/amiibo/views.py @@ -6,7 +6,8 @@ from django.views.generic.base import View from .models import ( Collection, Amiibo, - AmiiboFigure, AmiiboCard + AmiiboFigure, AmiiboCard, + UserAmiibo ) from . import services @@ -34,7 +35,7 @@ class CollectionView(View): 'selected_collection': collection, 'amiibo_list': amiibo_list, 'item': collection, - 'section': self.section + 'section': self.section, }) @@ -62,6 +63,7 @@ class AmiiboView(View): 'amiibo': amiibo_obj, 'item': amiibo_obj, 'section': self.section, + 'users_trading': UserAmiibo.objects.filter(trade=True, _amiibo_id=amiibo_obj.pk) }) class AmiiboFigureView(AmiiboView): diff --git a/amiibofindr/locale/es/LC_MESSAGES/django.po b/amiibofindr/locale/es/LC_MESSAGES/django.po index 84b8f80..edb1cf8 100644 --- a/amiibofindr/locale/es/LC_MESSAGES/django.po +++ b/amiibofindr/locale/es/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-11 21:22+0200\n" -"PO-Revision-Date: 2015-09-11 21:25+0200\n" +"POT-Creation-Date: 2015-09-22 21:08+0200\n" +"PO-Revision-Date: 2015-09-22 21:09+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: es\n" @@ -257,7 +257,7 @@ msgid "all" msgstr "todas" #: templates/_layout.html:36 templates/_layout.html.py:105 -#: templates/profile/main.html:35 +#: templates/profile/main.html:37 msgid "Figures" msgstr "Figuras" @@ -267,7 +267,7 @@ msgid "All" msgstr "Todas" #: templates/_layout.html:47 templates/_layout.html.py:114 -#: templates/profile/main.html:36 +#: templates/profile/main.html:38 msgid "Cards" msgstr "Tarjetas" @@ -671,30 +671,38 @@ msgstr "%(amiibo)s amiibo de %(collection)s en " msgid "Shops" msgstr "Tiendas" -#: templates/amiibo/amiibo-figure.html:73 +#: templates/amiibo/amiibo-figure.html:60 +msgid "Users trading" +msgstr "Usuarios para cambio" + +#: templates/amiibo/amiibo-figure.html:74 msgid "Buy now for" msgstr "Comprar ahora por" -#: templates/amiibo/amiibo-figure.html:80 +#: templates/amiibo/amiibo-figure.html:81 msgid "No stock" msgstr "Sin stock" -#: templates/amiibo/amiibo-figure.html:88 +#: templates/amiibo/amiibo-figure.html:89 msgid "Updated" msgstr "Actualizado" -#: templates/amiibo/amiibo-figure.html:91 +#: templates/amiibo/amiibo-figure.html:92 msgid "This item had never been in stock" msgstr "Este articulo nunca ha estado en stock" -#: templates/amiibo/amiibo-figure.html:97 +#: templates/amiibo/amiibo-figure.html:98 msgid "This is a pack of various items" msgstr "Este es un pack que contiene varios artículos" -#: templates/amiibo/amiibo-figure.html:107 +#: templates/amiibo/amiibo-figure.html:108 msgid "No shops :(" msgstr "Sin tiendas :(" +#: templates/amiibo/amiibo-figure.html:128 +msgid "No user have this amiibo available for trade :(" +msgstr "Ningún usuario tiene disponible este amiibo para cambio :(" + #: templates/amiibo/collection-cards.html:9 templates/amiibo/collection.html:29 msgid "Search..." msgstr "Buscar…" @@ -886,32 +894,32 @@ msgstr "" "favorita añadida? ¿Nos falta algo muy importante que te hará la vida mas " "fácil? ¿Solo quieres hablar un rato? ¡Contacta con nosotros!" -#: templates/profile/main.html:11 +#: templates/profile/main.html:13 #, python-format msgid "Here you can browse over %(username)s's collection" msgstr "Aquí puedes ver la colección de %(username)s" -#: templates/profile/main.html:19 +#: templates/profile/main.html:21 msgid "Want everyone to see your collection? Spread the word!" msgstr "¿Quieres presumir de colección? ¡Difunde la palabra!" -#: templates/profile/main.html:21 +#: templates/profile/main.html:23 msgid "Look at my amiibo collection!" msgstr "¡Mira mi colección de #amiibo!" -#: templates/profile/main.html:28 +#: templates/profile/main.html:30 msgid "Have it" msgstr "Lo tiene" -#: templates/profile/main.html:29 +#: templates/profile/main.html:31 msgid "Want it" msgstr "Lo quiere" -#: templates/profile/main.html:30 +#: templates/profile/main.html:32 msgid "Trade it" msgstr "Lo cambia" -#: templates/profile/main.html:48 +#: templates/profile/main.html:50 msgid "Oooops, seems this user have nothing for that." msgstr "Ups, ¡parece que no tiene nada por aquí!" diff --git a/amiibofindr/static/app/global.js b/amiibofindr/static/app/global.js index 4ca0a17..a522f3f 100644 --- a/amiibofindr/static/app/global.js +++ b/amiibofindr/static/app/global.js @@ -16,6 +16,9 @@ $(function(){ position: 'left center' }); + // Tabs + $('.tabular.menu .item').tab(); + $(document).on('click', '[data-toggle]', function(event) { var $el = event.target; var $target = $($el.getAttribute('data-toggle')); diff --git a/amiibofindr/static/images/avatar-female.png b/amiibofindr/static/images/avatar-female.png new file mode 100644 index 0000000..48df324 Binary files /dev/null and b/amiibofindr/static/images/avatar-female.png differ diff --git a/amiibofindr/static/images/avatar-male.png b/amiibofindr/static/images/avatar-male.png new file mode 100644 index 0000000..5593710 Binary files /dev/null and b/amiibofindr/static/images/avatar-male.png differ diff --git a/amiibofindr/static/less/style.less b/amiibofindr/static/less/style.less index e2a80c8..31a731f 100644 --- a/amiibofindr/static/less/style.less +++ b/amiibofindr/static/less/style.less @@ -46,4 +46,8 @@ z-index: 30; } -.menu.fixzindex { z-index: 61 !important; } \ No newline at end of file +.menu.fixzindex { z-index: 61 !important; } + +.ui.tabular.menu .item { + cursor: pointer; +} \ No newline at end of file diff --git a/amiibofindr/templates/amiibo/amiibo-figure.html b/amiibofindr/templates/amiibo/amiibo-figure.html index fcc1caa..62735ec 100644 --- a/amiibofindr/templates/amiibo/amiibo-figure.html +++ b/amiibofindr/templates/amiibo/amiibo-figure.html @@ -34,9 +34,9 @@ AMIIBO FIGURE
{% block amiibo_header %} -

- {{ amiibo.collection.name }}: {{ amiibo.name }} -

+

+ {{ amiibo.collection.name }}: {{ amiibo.name }} +

{% endblock %}
@@ -56,10 +56,11 @@ AMIIBO FIGURE
-
- + +
{% if amiibo.shops_set.exists %}
{% for shop_item in amiibo.shops_set.all %} @@ -107,6 +108,27 @@ AMIIBO FIGURE {% trans "No shops :(" %} {% endif %}
+ +
+
+ {% for relation in users_trading %} + + {% empty %} + {% trans "No user have this amiibo available for trade :(" %} + {% endfor %} +
+
{% endblock %}