parent
2bbfba5fa8
commit
b71e756e1d
19 changed files with 258 additions and 161 deletions
@ -1,106 +1,105 @@ |
||||
{% extends 'base.jinja' %} |
||||
{% block content %} |
||||
|
||||
{% if banners %} |
||||
|
||||
|
||||
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> |
||||
<!-- Indicators --> |
||||
<ol class="carousel-indicators"> |
||||
{% if banners %} |
||||
|
||||
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> |
||||
<!-- Indicators --> |
||||
<ol class="carousel-indicators"> |
||||
|
||||
{% for c in range(banners.count()) %} |
||||
<li data-target="#carousel-example-generic" data-slide-to="{{ c }}" class="{% if loop.first %}active{% endif %}"></li> |
||||
{% endfor %} |
||||
|
||||
</ol> |
||||
<!-- Wrapper for slides --> |
||||
<div class="carousel-inner" role="listbox"> |
||||
{% for b in banners %} |
||||
<div class="item {% if loop.first %}active{% endif %}"> |
||||
<a href="{{ b.link }}"> |
||||
<img src="/static/{{ b.image }}" alt="{{ b.title }}" title="{{ b.title }}"> |
||||
</a> |
||||
</div> |
||||
|
||||
{% for c in range(banners.count()) %} |
||||
<li data-target="#carousel-example-generic" data-slide-to="{{ c }}" class="{% if loop.first %}active{% endif %}"></li> |
||||
{% endfor %} |
||||
|
||||
</ol> |
||||
<!-- Wrapper for slides --> |
||||
<div class="carousel-inner" role="listbox"> |
||||
{% for b in banners %} |
||||
<div class="item {% if loop.first %}active{% endif %}"> |
||||
<a href="{{ b.link }}"> |
||||
<img src="/static/{{ b.image }}" alt="{{ b.title }}" title="{{ b.title }}"> |
||||
</a> |
||||
</div> |
||||
{% endfor %} |
||||
</div> |
||||
|
||||
<!-- Controls --> |
||||
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> |
||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> |
||||
<span class="sr-only">Назад</span> |
||||
</a> |
||||
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> |
||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> |
||||
<span class="sr-only">Вперед</span> |
||||
</a> |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<div class="index-goods"> |
||||
<div class="row"> |
||||
{% for product in products %} |
||||
|
||||
|
||||
|
||||
<div class="col-md-3 col-xs-3 col-sm-3 col-lg-3"> |
||||
<div class="thumbnail"> |
||||
{% set im = product.main_image()|thumbnail("420x420") %} |
||||
<a href="{{ product.get_absolute_url() }}"><img src="/static/{{ im.url }}" |
||||
class="img-responsive" |
||||
alt="Купить {{ product.title }}" |
||||
title="Купить {{ product.title }}"></a> |
||||
|
||||
<div class="caption"> |
||||
<div class="title"> |
||||
<a href="{{ product.get_absolute_url() }}"> |
||||
{{ product.title }} |
||||
</a> |
||||
</div> |
||||
<div class="price"> |
||||
{{ product.min_price() }} ₸ |
||||
</div> |
||||
{% if product.in_stock() %} |
||||
|
||||
{% endfor %} |
||||
</div> |
||||
|
||||
<!-- Controls --> |
||||
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> |
||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> |
||||
<span class="sr-only">Назад</span> |
||||
</a> |
||||
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> |
||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> |
||||
<span class="sr-only">Вперед</span> |
||||
</a> |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<div class="index-goods"> |
||||
<div class="row"> |
||||
{% for product in products %} |
||||
|
||||
|
||||
|
||||
<div class="col-md-3 col-xs-3 col-sm-3 col-lg-3"> |
||||
<div class="thumbnail"> |
||||
{% set im = product.main_image()|thumbnail("420x420") %} |
||||
<a href="{{ product.get_absolute_url() }}"><img src="/static/{{ im.url }}" |
||||
class="img-responsive" |
||||
alt="Купить {{ product.title }}" |
||||
title="Купить {{ product.title }}"></a> |
||||
|
||||
<div class="caption"> |
||||
<div class="title"> |
||||
<a href="{{ product.get_absolute_url() }}"> |
||||
{{ product.title }} |
||||
</a> |
||||
</div> |
||||
<div class="price"> |
||||
{{ product.min_price() }} ₸ |
||||
</div> |
||||
<div class="state-yes"> |
||||
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар |
||||
есть в наличии |
||||
</div> |
||||
{% else %} |
||||
<div class="state-no"> |
||||
{# TODO: Товар на заказ#} |
||||
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товара |
||||
нет в наличии |
||||
</div> |
||||
{% endif %} |
||||
<div class="in-cart"> |
||||
{# TODO: Сделать кнопку заказать#} |
||||
{% if product.in_stock() %} |
||||
|
||||
|
||||
<div class="state-yes"> |
||||
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар |
||||
есть в наличии |
||||
</div> |
||||
<a class="btn btn-warning btn-block" |
||||
href="/store/cart/add/?pk={{ product.variations.filter(in_stock__gt=0).order_by('price').first().pk }}&count=1&next={{ request.get_full_path()|urlencode }}"><span><span |
||||
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Добавить в корзину</span></a> |
||||
{% else %} |
||||
<div class="state-no"> |
||||
{# TODO: Товар на заказ#} |
||||
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товара |
||||
нет в наличии |
||||
</div> |
||||
<a class=" btn btn-danger btn-block order-order-link" href="#order-form" |
||||
data-itemid="{{ product.pk }}"><span><span |
||||
class="glyphicon glyphicon-import" |
||||
aria-hidden="true"></span> Заказать</span></a> |
||||
{% endif %} |
||||
<div class="in-cart"> |
||||
{# TODO: Сделать кнопку заказать#} |
||||
{% if product.in_stock() %} |
||||
<a class="btn btn-warning btn-block" |
||||
href="/store/cart/add/?pk={{ product.variations.filter(in_stock__gt=0).order_by('price').first().pk }}&count=1&next={{ request.get_full_path()|urlencode }}"><span><span |
||||
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Добавить в корзину</span></a> |
||||
{% else %} |
||||
<a class=" btn btn-danger btn-block order-order-link" href="#order-form" |
||||
data-itemid="{{ product.pk }}"><span><span |
||||
class="glyphicon glyphicon-import" |
||||
aria-hidden="true"></span> Заказать</span></a> |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% endfor %} |
||||
</div> |
||||
|
||||
</div> |
||||
<embed height="188" width="355" bgcolor="#ffffff" name="vishnu" src="http://iii.ru/static/Vishnu3.swf" |
||||
wmode="transparent" |
||||
flashvars="uuid=9a13ee03-be70-459d-b7d4-f3911cd9621f&disableRuOverride=1&home=7d5fe16c606e3884d1b1329a3cfd3dd4&skin_color=0xFFF8C1&vertical_layout=0" |
||||
type="application/x-shockwave-flash" quality="high" |
||||
style="position: fixed; bottom: 0; right: 0; z-index:4000"></embed> |
||||
wmode="transparent" |
||||
flashvars="uuid=9a13ee03-be70-459d-b7d4-f3911cd9621f&disableRuOverride=1&home=7d5fe16c606e3884d1b1329a3cfd3dd4&skin_color=0xFFF8C1&vertical_layout=0" |
||||
type="application/x-shockwave-flash" quality="high" |
||||
style="position: fixed; bottom: 0; right: 0; z-index:4000"></embed> |
||||
|
||||
{% endblock %} |
||||
{% endblock %} |
||||
Loading…
Reference in new issue