parent
2bbfba5fa8
commit
b71e756e1d
19 changed files with 258 additions and 161 deletions
@ -1,106 +1,105 @@ |
|||||||
{% extends 'base.jinja' %} |
{% extends 'base.jinja' %} |
||||||
{% block content %} |
{% block content %} |
||||||
|
|
||||||
{% if banners %} |
{% if banners %} |
||||||
|
|
||||||
|
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> |
||||||
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> |
<!-- Indicators --> |
||||||
<!-- Indicators --> |
<ol class="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> |
{% endfor %} |
||||||
<!-- Wrapper for slides --> |
</div> |
||||||
<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> |
|
||||||
|
|
||||||
|
<!-- 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 --> |
<div class="state-yes"> |
||||||
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> |
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар |
||||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> |
есть в наличии |
||||||
<span class="sr-only">Назад</span> |
</div> |
||||||
</a> |
{% else %} |
||||||
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> |
<div class="state-no"> |
||||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> |
{# TODO: Товар на заказ#} |
||||||
<span class="sr-only">Вперед</span> |
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товара |
||||||
</a> |
нет в наличии |
||||||
</div> |
</div> |
||||||
{% endif %} |
{% endif %} |
||||||
|
<div class="in-cart"> |
||||||
<div class="index-goods"> |
{# TODO: Сделать кнопку заказать#} |
||||||
<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() %} |
{% 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 |
||||||
<div class="state-yes"> |
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Добавить в корзину</span></a> |
||||||
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар |
|
||||||
есть в наличии |
|
||||||
</div> |
|
||||||
{% else %} |
{% else %} |
||||||
<div class="state-no"> |
<a class=" btn btn-danger btn-block order-order-link" href="#order-form" |
||||||
{# TODO: Товар на заказ#} |
data-itemid="{{ product.pk }}"><span><span |
||||||
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товара |
class="glyphicon glyphicon-import" |
||||||
нет в наличии |
aria-hidden="true"></span> Заказать</span></a> |
||||||
</div> |
|
||||||
{% endif %} |
{% 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> |
</div> |
||||||
|
</div> |
||||||
{% endfor %} |
{% endfor %} |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
<embed height="188" width="355" bgcolor="#ffffff" name="vishnu" src="http://iii.ru/static/Vishnu3.swf" |
<embed height="188" width="355" bgcolor="#ffffff" name="vishnu" src="http://iii.ru/static/Vishnu3.swf" |
||||||
wmode="transparent" |
wmode="transparent" |
||||||
flashvars="uuid=9a13ee03-be70-459d-b7d4-f3911cd9621f&disableRuOverride=1&home=7d5fe16c606e3884d1b1329a3cfd3dd4&skin_color=0xFFF8C1&vertical_layout=0" |
flashvars="uuid=9a13ee03-be70-459d-b7d4-f3911cd9621f&disableRuOverride=1&home=7d5fe16c606e3884d1b1329a3cfd3dd4&skin_color=0xFFF8C1&vertical_layout=0" |
||||||
type="application/x-shockwave-flash" quality="high" |
type="application/x-shockwave-flash" quality="high" |
||||||
style="position: fixed; bottom: 0; right: 0; z-index:4000"></embed> |
style="position: fixed; bottom: 0; right: 0; z-index:4000"></embed> |
||||||
|
|
||||||
{% endblock %} |
{% endblock %} |
||||||
Loading…
Reference in new issue