amiibofindr/amiibofindr/templates/amiibo/amiibo.html

105 lines
4.4 KiB
HTML

{% extends "_layout.html" %}
{% load i18n staticfiles thumbnail %}
{% block page_title %}{% blocktrans with collection=selected_collection.name amiibo=amiibo.name %}{{ amiibo }} amiibo from {{ collection }} in {% endblocktrans %}{{ block.super }}{% endblock %}
{% block meta_twitter_title %}{% blocktrans with collection=selected_collection.name amiibo=amiibo.name %}{{ amiibo }} amiibo from {{ collection }} in {% endblocktrans %}{{ block.super }}{% endblock %}
{% block meta_og_title %}{% blocktrans with collection=selected_collection.name amiibo=amiibo.name %}{{ amiibo }} amiibo from {{ collection }} in {% endblocktrans %}{{ block.super }}{% endblock %}
{% block meta_twitter_image %}{% thumbnail amiibo.statue 300x300 %}{% endblock %}
{% block meta_og_image %}{% thumbnail amiibo.statue 300x300 %}{% endblock %}
{% block meta_twitter_url %}{{ amiibo.get_absolute_url }}{% endblock %}
{% block meta_og_url %}{{ amiibo.get_absolute_url }}{% endblock %}
{% block js_views %}money,time{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<i class="right chevron icon divider"></i>
<a class="section" href="{{ selected_collection.get_absolute_url }}">{{ selected_collection.name }}</a>
<i class="right chevron icon divider"></i>
<span class="active section">{{ amiibo.name }}</span>
{% endblock %}
{% block main_content %}
<div class="ui page grid">
<div class="five wide column">
<div class="ui card">
<a class="image">
<img src="{{ amiibo.statue.url }}" />
</a>
<div class="content">
<!-- <i class="right floated like icon"></i> -->
<!-- <i class="right floated star icon"></i> -->
<div class="header">{{ amiibo.name }}</div>
<div class="meta">
<a href="{{ amiibo.collection.get_absolute_url }}">{{ amiibo.collection.name }}</a>
</div>
<!-- <div class="description">
<p>asd</p>
</div> -->
</div>
<!-- <div class="extra content">
<span class="left floated like">
<i class="like icon"></i>
Like
</span>
<span class="right floated star">
<i class="star icon"></i>
Favorite
</span>
</div> -->
</div>
</div>
<div class="eleven wide column">
{% if amiibo.shops_set.exists %}
<table class="ui celled table">
<thead>
<tr>
<th>{% trans "Shop" %}</th>
<th class="center aligned">{% trans "Price" %}</th>
</tr>
</thead>
<tbody>
{% for relation in amiibo.shops_set.all %}
<tr>
{% with price=relation.last_price.price stock=relation.last_price.stock currency=relation.last_price.currency %}
{% spaceless %}
<td>
<a href="{{ relation.get_url }}" target="_blank">
<i class="{% if relation.shop.flag_code == 'uk' %}gb{% else %}{{ relation.shop.flag_code }}{% endif %} flag"></i> {{ relation.shop.name }}
</a>
{% if relation.last_price.date %}
<i class="ui icon info circle float-right" data-component="silbingPopup"></i>
<div class="ui special popup">
<em>{% trans "Updated " %} <span data-relative="{{ relation.last_price.date.isoformat }}"></span></em>
</div>
{% endif %}
{% if relation.is_pack %}
<i class="icon cube float-right" data-component="silbingPopup"></i>
<div class="ui special popup">
{% trans "This is a pack of various items" %}
</div>
{% endif %}
</td>
{% endspaceless %}
<td class="center aligned {{ stock|yesno:'positive,negative' }}">
{% if stock and price %}
<span data-price="{{ price }}" data-currency="{{ currency }}" data-money>
{{ price }} {{ relation.last_price.currency }}
</span>
{% else %}
{% trans "No stock" %}
{% endif %}
</td>
{% endwith %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
</div>
{% endblock %}