Modified table layout

This commit is contained in:
Felipe Martín 2015-06-25 17:49:53 +02:00
parent 1614b1ecea
commit 7d0dae9a34
1 changed files with 5 additions and 9 deletions

View File

@ -48,7 +48,6 @@
<thead>
<tr>
<th>{% trans "Shop" %}</th>
<th class="center aligned" width="10">{% trans "Country" %}</th>
<th class="center aligned">{% trans "Stock" %}</th>
<th class="center aligned">{% trans "Price" %}</th>
</tr>
@ -57,19 +56,16 @@
{% for relation in amiibo.shops_set.all %}
<tr>
{% with price=relation.last_price.price stock=relation.last_price.stock %}
<td><a href="{{ relation.get_url }}">{{ relation.shop.name }}</a> <i class="info icon" title="{{ relation.last_price.date }}"></i></td>
<td class="center aligned">{% if relation.shop.flag_code %}<i class="{% if relation.shop.flag_code == 'uk' %}gb{% else %}{{ relation.shop.flag_code }}{% endif %} flag"></i>{% endif %}</td>
<td class="center aligned {{ stock|yesno:'positive,negative' }}">
<td><a href="{{ relation.get_url }}"><i class="{% if relation.shop.flag_code == 'uk' %}gb{% else %}{{ relation.shop.flag_code }}{% endif %} flag"></i> {{ relation.shop.name }}</a></td>
<td class="center aligned {{ stock|yesno:'positive,negative' }}" {% if not price %}colspan="2"{% endif %}>
<i class="icon {{ stock|yesno:'checkmark,close' }}"></i>
{{ stock|yesno|capfirst }}
</td>
{% if price %}
<td class="center aligned">
{% if price %}
{{ price }} {{ relation.last_price.currency }}
{% else %}
--
{% endif %}
{{ price }} {{ relation.last_price.currency }}
</td>
{% endif %}
{% endwith %}
</tr>
{% endfor %}