Источник шаблона: catalog/category.html

{% extends "website/layout.html" %} {% load staticfiles %} {% load cache %} {% block title %}{% if catalog_current %}{{ catalog_current.get_title }}{% else %}{{page_title}}{% endif %}{% endblock %} {% block description %}{% if catalog_current %}{{ catalog_current.get_description }}{% else %}{{page_description}}{% endif %}{% endblock %} {% block content %} <div id="fixContainer"></div> <div id="tabs"></div> {% if catalog_current %}<p>{{ catalog_current.get_breadcrumbs | safe }}</p>{% endif %} <h1>{% if catalog_current %}{{ catalog_current.get_header }}{% else %}{{page_header}}{% endif %}</h1> <div id="catalog"> {% include 'website/elements/div-catalog-line.html' %} {% if page_range %} {% include 'website/elements/div-catalog-pagination.html' %} {% endif %} {% if viewmode == 'squares' %} <div class="items productList" id="list"> {% for item in catalog_items %} <div class="item product parent" id="item{{item.id}}" data-product-id="{{item.id}}" data-iblock-id="" data-prop-id="" data-product-width="220" data-product-height="200" data-hide-measure="" data-price-code="BASE||OPT_1||OPT_2"> <div class="tabloid"> <div class="topSection"> <div class="column"> <a href="#" class="delete" data-id="{{ item.id }}"></a> </div> </div> {% include 'website/elements/markers.html' with item=item %} <a href="{{item.get_url}}" class="picture"> <img src="{% if item.photos.first %} {{ item.photos.first.image_thumb_b_url }} {% else %} {% static 'website/img/empty.png' %} {% endif %}" alt="{{ item.name }}"> {% comment %}<span class="getFastView" data-id="{{item.id}}">Быстрый просмотр</span>{% endcomment %} </a> <a href="{{item.get_url}}" class="name"><span class="middle">{{ item.name }}</span></a> <a class="price">{{ item.get_actual_price }} ₽ <span class="measure"> / шт</span></a> <a href="#" class="addCart" data-id="{{item.id}}"><img src="{% static 'website/img/incart.png' %}" alt="" class="icon">В корзину</a> </div> </div> {% endfor %} </div> {% endif %} {% if viewmode == 'line' %} <div id="catalogLineList"> {% for item in catalog_items %} <div class="itemRow item sku" id="item{{item.id}}" data-product-id="{{item.id}}" data-iblock-id="" data-prop-id="" data-product-width="290" data-product-height="340" data-hide-measure="" data-price-code="BASE||OPT_1||OPT_2"> <div class="column"> <a href="#" class="removeFromWishlist" data-id="{{item.id}}"></a> {% include 'website/elements/markers.html' with item=item %} <a href="{{item.get_url}}" class="picture"> <img src="{% if item.photos.first %} {{ item.photos.first.image_thumb_b_url }} {% else %} {% static 'website/img/empty.png' %} {% endif %}" alt="{{ item.name }}"> {% comment %}<span class="getFastView" data-id="{{item.id}}">Быстрый просмотр</span>{% endcomment %} </a> </div> <div class="column"> <a href="{{item.get_url}}" class="name"><span class="middle">{{ item.name }}</span></a> <table class="prop"> <tbody> {% if item.article %} <tr><td><span>Артикул</span></td><td>{{ item.article }}</td></tr> {% endif %} {% if user.is_staff %} <tr><td><span>Цена розница</span></td><td>{{ item.price }}</td></tr> <tr><td><span>Цена опт</span></td><td>{{ item.price_opt }}</td></tr> <tr><td><span>Цена база</span></td><td>{{ item.price_mopt }}</td></tr> <tr><td><a href="/admin/catalog/catalogitem/{{ item.id }}/change/">редактировать</a></td></tr> {% endif %} </tbody> </table> </div> <div class="column"> <div class="resizeColumn"> <a class="price">{{ item.get_actual_price }} ₽ <span class="measure"> / шт</span></a> </div> <div class="resizeColumn"> <a href="#" class="addCart" data-id="{{item.id}}"><img src="{% static 'website/img/incart.png' %}" alt="" class="icon">В корзину</a> </div> </div> </div> {% endfor %} </div> {% endif %} {% if viewmode == 'table' %} <div id="catalogTableList"> {% for item in catalog_items %} <div class="itemRow item" id="bx_3966226736_{{item.id}}" data-hide-measure="" data-price-code="BASE||OPT_1||OPT_2"> <div class="column"> <a href="{{item.get_url}}" class="picture"> <img src="{% if item.photos.first %} {{ item.photos.first.image_thumb_b_url }} {% else %} {% static 'website/img/empty.png' %} {% endif %}" alt="{{item.name}}"> </a> </div> <div class="column"> <a href="{{item.get_url}}" class="name">{{item.name}}</a> </div> <div class="column"> <div class="rating"> <i class="m" style="width:0%"></i> <i class="h"></i> </div> </div> <div class="column"> </div> <div class="column"> <a class="price">{{ item.get_actual_price }} ₽ <span class="measure"> / шт</span></a> </a> </div> <div class="column"> <a href="#" class="addCart" data-id="{{item.id}}"><img src="{% static 'website/img/incart.png' %}" alt="" class="icon">В корзину</a> </div> </div> {% endfor %} </div> {% endif %} {% if page_range %} {% include 'website/elements/div-catalog-pagination.html' %} {% endif %} </div> {% endblock %} {% block styles %} {% if viewmode == 'line' %}<link href="{% static 'website/css/page_list_line.css' %}" type="text/css" data-template-style="true" rel="stylesheet" /> {% else %}{% if viewmode == 'table' %}<link href="{% static 'website/css/page_list_table.css' %}" type="text/css" data-template-style="true" rel="stylesheet" /> {% else %}<link href="{% static 'website/css/page_list.css' %}" type="text/css" data-template-style="true" rel="stylesheet" />{% endif %}{% endif %} {% endblock %} {% block scripts %} <script type="text/javascript" src="{% static 'website/js/page_list.js' %}"></script> {% endblock %}