update templates

remotes/origin/HEAD
Max Yakovenko 8 years ago
parent c7fa6e53cb
commit 2ae48a641c
  1. 35
      templates/bootstrap/forms/cart_checkout.html
  2. 23
      templates/cart/cart.html
  3. 14
      templates/cart/checkout.html
  4. 5
      templates/cart/confirm.html
  5. 34
      templates/cart/discount_list.html
  6. 2
      templates/common.html
  7. 10
      templates/common_news.html
  8. 1
      templates/components/breadcrumbs.html
  9. 6
      templates/components/footer.html
  10. 2
      templates/components/header.html
  11. 27
      templates/emails/html/admin_order_request.html
  12. 14
      templates/emails/txt/admin_order_request.txt
  13. 31
      templates/pinax/blog/blog_list.html
  14. 169
      templates/pinax/blog/blog_post.html
  15. 42
      templates/products/product_detail.html
  16. 12
      templates/products/product_list.html

@ -1,10 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$Title$</title>
</head>
<body>
$END$
</body>
</html>
{% load crispy_forms_field %}
{% spaceless %}
<div class="row order__item">
<div class="col-sm-4 col-4 col-md-offset-2">
{% if field.label %}
{{ field.label }}{% if field.field.required %}<span class="require">*</span>{% endif %}
{% endif %}
</div>
<div class="col-sm-4 col-4">
<div class="row">
{{ field }}
{% if field.field.help_text %}
<label for="{{ field.html_name|safe }}">{{ field.field.help_text|safe }}</label>
{% endif %}
</div>
{% if field.errors %}
<div class="row text-danger">
{{ field.errors|safe }}
</div>
{% endif %}
</div>
</div>
{% endspaceless %}

@ -10,7 +10,7 @@
<div class="basket">
<div class="basket__title">
<div class="row">
<div class="col-6">
<div class="col-4">
Товар
</div>
<div class="col-2">
@ -22,12 +22,13 @@
<div class="col-2">
Сумма
</div>
<div class="col-2"></div>
</div>
</div>
{% for offer in offer_items %}
<div class="basket__item">
<div class="row align-items-center">
<div class="col-md-6 col-12">
<div class="col-md-4 col-12">
<div class="basket__good d-flex align-items-center">
<div class="basket__image"><img src="./img/item-image-min.png" alt=""></div>
<div class="basket__info">
@ -39,20 +40,30 @@
</div>
</div>
</div>
<div class="col-md-6 col-12 basket__option">
<div class="col-md-8 col-12 basket__option">
<div class="row">
<div class="col-4 align-self-start">
<div class="col-3 align-self-start">
<div class="basket__title-mob">Цена</div>
<div class="basket__price">{{ offer.get_price_with_discount }} {{ offer.currency.sign }}</div>
</div>
<div class="col-4 align-self-start">
<div class="col-3 align-self-start">
<div class="basket__title-mob align-self-start">Количество</div>
<div class="basket__count">{{ request.cart|get_cart_offer_amount:offer}}</div>
</div>
<div class="col-4 align-self-start">
<div class="col-3 align-self-start">
<div class="basket__title-mob ">Сумма</div>
<div class="basket__sum">{{ request.cart|calculate_price:offer }} {{ offer.currency.sign }}</div>
</div>
<div class="col-3 align-self-start">
<div class="basket__title-mob">Действие</div>
<div class="basket__action">
<form action="{% url 'cart:remove' %}" method="post" type="multipart/form-data">
{% csrf_token %}
<input type="hidden" name="offer" value="{{ offer.product_id }}">
<input type="submit" value="Отменить">
</form>
</div>
</div>
</div>
</div>
</div>

@ -1 +1,15 @@
{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% block content %}
<div class="col-12">
<div class="content">
<div class="content__title text-center">Оформление заказа</div>
<div class="row">
<div class="col-12 text-center">
{% crispy form %}
</div>
</div>
</div>
</div>
{% endblock content %}

@ -1 +1,6 @@
{% extends 'base.html' %}
{% block content %}
<div class="col-12 text-center">
Спасибо за заказ. Наши менеджеры скоро с вами свяжуться :))
</div>
{% endblock content %}

@ -0,0 +1,34 @@
{% extends 'base.html' %}
{% block content %}
<div class="col-12">
<div class="content">
<div class="content__title">{{ title }}</div>
<div class="cashback">
<div class="cashback__list">
{% for discount in object_list %}
<div class="cashback__item">
<div class="cashback__image"><img src="./img/test-b.png" alt=""></div>
<div class="cashback__title">Cashback с каждой покупки!</div>
<div class="cashback__text">
<p>It is a long established fact that a reader will be distracted by the readable
content of a page when looking at its layout. The point of using Lorem Ipsum is
that it has a more-or-less normal distribution of letters, as opposed to using
'Content here, content here', making it look like readable English. Many desktop
publishing packages and web page editors now use Lorem Ipsum as their default
model text, and a search for 'lorem ipsum' will uncover many web sites still in
their infancy. Various versions have evolved over the years, sometimes by
accident, sometimes on purpose (injected humour and the like).</p>
</div>
</div>
{% empty %}
<div class="cashback__item">
Сегодня скидок не будет. Приходите завтра :))
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock content %}

@ -115,7 +115,7 @@
</div>
{% endif %}
{% if not is_index %}
{% if not request.path == '/' %}
{% include 'components/breadcrumbs.html' %}
{% endif %}
{% block right_common_content %}

@ -1,5 +1,9 @@
{% extends 'base.html'%}
{% extends 'base.html' %}
{% block content %}
{% include 'components/breadcrumbs.html' %}
{% endblock content%}
{% if not request.path == '/' %}
{% include 'components/breadcrumbs.html' %}
{% endif %}
{% block news_content %}
{% endblock news_content %}
{% endblock content %}

@ -1,4 +1,3 @@
{% load mptt_tags %}
<ul class="breadcrumbs">
<li>

@ -10,9 +10,9 @@
<div class="col-md col-md-2 col-5">
<ul class="footer__menu">
<li><a href="{% url 'products:product_list' %}">Каталог</a></li>
<li><a href="news.html">Новости</a></li>
<li><a href="cashback.html">Акции</a></li>
<li><a href="about.html">О компании</a></li>
<li><a href="{% url 'news:blog' %}">Новости</a></li>
<li><a href="{% url 'cart:discounts' %}">Акции</a></li>
<li><a href="{% url 'django.contrib.flatpages.views.flatpage' url='about-us/' %}">О компании</a></li>
</ul>
</div>
<div class="col-lg-4 col-md-6 col-7">

@ -18,7 +18,7 @@
<a href="{% url 'news:blog' %}">Новости</a>
</li>
<li>
<a href="{% url 'django.contrib.flatpages.views.flatpage' url='sales/' %}">Акции</a>
<a href="{% url 'cart:discounts' %}">Акции</a>
</li>
<li>
<a href="{% url 'django.contrib.flatpages.views.flatpage' url='about-us/' %}">О компании</a>

@ -1,12 +1,16 @@
{% extends 'email_base.html' %}
{% block title %}
Вам пришел заказ
У вас новый заказ
{% endblock title %}
{% block email_body %}
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<p>Пользователь <a href="mailto:{{ order.user.email }}">{{ order.user.profile.full_name|default_if_none:order.user.username }}</a> сделал вам заказ</p>
<p>
Пользователь
<a href="mailto:{{ order.user.email }}">{{ order.user.profile.full_name|default_if_none:order.user.username }}</a>
сделал вам заказ
</p>
<p>Заказ № {{ order.order_code }} </p>
<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">
<tbody>
@ -14,17 +18,19 @@
<td align="left">
<table border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>
Товар
</th>
<th>Колличество</th>
</tr>
<tr>
<th>
Товар
</th>
<th>Колличество</th>
</tr>
</thead>
<tbody>
{% for buying in order.buyings_set %}
<tr>
<td><a href="{{ site.domain }}{% url 'products:product_details' %}">{{ buying.offer.product.name }}</a></td>
<td><a href="
{{ site.domain }}{% url 'products:product_details' %}">{{ buying.offer.product.name }}</a>
</td>
<td>{{ buying.amount }}</td>
</tr>
{% endfor %}
@ -34,6 +40,9 @@
</tr>
</tbody>
</table>
{% if order.comment %}
Комментарий: {{ order.comment }}
{% endif %}
<p>С уважением, Администрация сайта {{ site.name }}</p>
</td>
</tr>

@ -1,17 +1,17 @@
=====================================================================
Запрос на обратную связь от пользователя
Вам пришел заказ
=====================================================================
----------------------------------------------------------------------
Пользователь {{ name }} отправил вам запрос по продукту {{ subject }}.
Пользователь <a href="mailto:{{ order.user.email }}">{{ order.user.profile.full_name|default_if_none:order.user.username }}</a> сделал вам заказ.\n
Чтобы связаяться для уточнения информации.
Используйте следующий почтовый ящик <a href="mailto:{{ email }}">{{ email }}</a> для ответа.
Заказ № {{ order.order_code }}.\n
{% if phone %}
Либо используйте мобильный номер телефона <a href="tel:{{ phone }}">{{ phone }}</a> .
{% endif %}
{% for buying in order.buyings_set %}
Товар: <a href="{{ site.domain }}{% url 'products:product_details' %}">{{ buying.offer.product.name }}</a>\n
Колличество: {{ buying.amount }}.\n
{% endfor %}
----------------------------------------------------------------------

@ -1 +1,30 @@
{% extends 'base.html' %}
{% extends 'common_news.html' %}
{% load static %}
{% block news_content %}
<div class="content__title">{{ "Новости" }}</div>
<div class="news">
{% for news in object_list %}
<div class="news__item">
<div class="row">
{% if news.image_set.primary_image %}
<div class="col-md-4 col-12">
<div class="news__image"><img src="{{ news.image_set.primary_image.url }}" alt="{{ news.title }}"></div>
</div>
{% endif %}
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title">
<a href="{% url 'news:blog_post_secret' post_secret_key=news.secret_key %}">{{ news.title }}</a>
</div>
<div class="news__text">
{{ news.teaser_html|safe }}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock news_content %}

@ -1,172 +1,19 @@
{% extends 'base.html' %}
{% extends 'common_news.html' %}
{% block content %}
<div class="content__title">Новости</div>
<div class="content__title">{{ object.title }}</div>
<div class="news">
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
</div>
</div>
</div>
</div>
</div>
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
</div>
</div>
</div>
</div>
</div>
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
</div>
</div>
</div>
</div>
</div>
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
</div>
{% if object.image_set.primary_image %}
<div class="col-md-4 col-12">
<div class="news__image"><img src="{{ object.image_set.primary_image.url }}"
alt="{{ object.title }}"></div>
</div>
</div>
</div>
</div>
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
{% endif %}
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
<p>{{ object.description }}</p>
</div>
</div>
</div>

@ -2,11 +2,17 @@
{% load static %}
{% load core_tags %}
{% load products_filters %}
{% load mptt_tags %}
{% block breacrumbs %}
{% breadcrumb_url 'Каталог' 'products:product_list' %}
{# {% breadcrumb_mptt_url product.get_ancestors %}#}
{# {% breadcrum_url product.name 'products:product_details' product.get_path %}#}
{% recursetree product.parent.get_ancestors %}
<li><a href="{{ node.get_absolute_url }}">{{ node.name }}</a></li>
{% if not node.is_leaf_node %}
{{ children }}
{% endif %}
{% endrecursetree %}
{% breadcrumb_url product.name 'products:product_details' product.get_path %}
{% endblock breacrumbs %}
{% block right_common_content %}
@ -22,7 +28,7 @@
</div>
<ul class="slider__list">
{% for product_image in product.productimage_set.get_all_images %}
<li> <img src="{{ product_image.image.url }}" alt="{{ product_image.name }}"></li>
<li><img src="{{ product_image.image.url }}" alt="{{ product_image.name }}"></li>
{% endfor %}
</ul>
</div>
@ -49,28 +55,30 @@
{% endif %}
</div>
</div>
<div class="col text-right">
<form action="{% url 'cart:add' %}" method="post" type="multipart/form-data">
{% csrf_token %}
<input type="hidden" name="offer" value="{{ product.id }}">
<div class="good__count">
Количество <input type="number" value="1" min="1" max="{{ product.offer.amount }}">
</div>
<input class="good__btn-basket" type="submit" value="В корзину">
</form>
</div>
{% if request.user.is_authenticated %}
<div class="col text-right">
<form action="{% url 'cart:add' %}" method="post" type="multipart/form-data">
{% csrf_token %}
<input type="hidden" name="offer" value="{{ product.id }}">
<div class="good__count">
Количество <input type="number" value="1" min="1" max="{{ product.offer.amount }}">
</div>
<input class="good__btn-basket" type="submit" value="В корзину">
</form>
</div>
{% endif %}
</div>
<div class="row">
<div class="good__dec">
<div class="good__dec-title">Описание</div>
<div class="good__dec-info">
{% if product.description > 0 %}
{{ product.description|apply_desc_preview }}
{% if product.description|length > 0 %}
{{ product.description|apply_desc_preview|safe }}
{% else %}
У данного товара описание отсутсвует
{% endif %}
</div>
{% if product.description > 0 %}
{% if product.description|length > 0 %}
<a href="#" data-toggle="modal" data-target="#product-description" class="good__dec-next">
Читать полностью
</a>
@ -89,7 +97,7 @@
<h5 class="modal-title" id="exampleModalLongTitle">{{ product.name }}</h5>
</div>
<div class="modal-body">
{{ product.description }}
{{ product.description|safe }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary btn-danger" data-dismiss="modal">Закрыть</button>

@ -4,11 +4,19 @@
{% load core_tags %}
{% load products_filters %}
{% load product_tags %}
{% load mptt_tags %}
{% block breadcrums %}
{% breadcrumb_url 'Каталог' 'products:product_list' %}
{% if the_product_category.get_ancestors.exists %}{% endif %}
{% if the_product_category.get_ancestors.exists %}
{% recursetree the_product_category.get_ancestors %}
<li><a href="{{ node.get_absolute_url }}">{{ node.name }}</a></li>
{% if not node.is_leaf_node %}
{{ children }}
{% endif %}
{% endrecursetree %}
{% endif %}
{% breadcrumb_url the_product_category.name 'products:product_list' the_product_category.get_path %}
{% endblock breadcrums %}
@ -84,6 +92,7 @@
</div>
</div>
</div>
{% if request.user.is_authenticated %}
<div class="catalog__btn">
<form action="{% url 'cart:add' %}" method="post" type="multipart/form-data">
{% csrf_token %}
@ -92,6 +101,7 @@
<input type="submit" value="Купить">
</form>
</div>
{% endif %}
</div>
{% empty %}
<div class="catalog__item">

Loading…
Cancel
Save