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> {% load crispy_forms_field %}
<html lang="en">
<head> {% spaceless %}
<meta charset="UTF-8"> <div class="row order__item">
<title>$Title$</title>
</head> <div class="col-sm-4 col-4 col-md-offset-2">
<body> {% if field.label %}
$END$ {{ field.label }}{% if field.field.required %}<span class="require">*</span>{% endif %}
</body> {% endif %}
</html> </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">
<div class="basket__title"> <div class="basket__title">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-4">
Товар Товар
</div> </div>
<div class="col-2"> <div class="col-2">
@ -22,12 +22,13 @@
<div class="col-2"> <div class="col-2">
Сумма Сумма
</div> </div>
<div class="col-2"></div>
</div> </div>
</div> </div>
{% for offer in offer_items %} {% for offer in offer_items %}
<div class="basket__item"> <div class="basket__item">
<div class="row align-items-center"> <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__good d-flex align-items-center">
<div class="basket__image"><img src="./img/item-image-min.png" alt=""></div> <div class="basket__image"><img src="./img/item-image-min.png" alt=""></div>
<div class="basket__info"> <div class="basket__info">
@ -39,20 +40,30 @@
</div> </div>
</div> </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="row">
<div class="col-4 align-self-start"> <div class="col-3 align-self-start">
<div class="basket__title-mob">Цена</div> <div class="basket__title-mob">Цена</div>
<div class="basket__price">{{ offer.get_price_with_discount }} {{ offer.currency.sign }}</div> <div class="basket__price">{{ offer.get_price_with_discount }} {{ offer.currency.sign }}</div>
</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__title-mob align-self-start">Количество</div>
<div class="basket__count">{{ request.cart|get_cart_offer_amount:offer}}</div> <div class="basket__count">{{ request.cart|get_cart_offer_amount:offer}}</div>
</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__title-mob ">Сумма</div>
<div class="basket__sum">{{ request.cart|calculate_price:offer }} {{ offer.currency.sign }}</div> <div class="basket__sum">{{ request.cart|calculate_price:offer }} {{ offer.currency.sign }}</div>
</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> </div>
</div> </div>

@ -1 +1,15 @@
{% extends 'base.html' %} {% 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' %} {% 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> </div>
{% endif %} {% endif %}
{% if not is_index %} {% if not request.path == '/' %}
{% include 'components/breadcrumbs.html' %} {% include 'components/breadcrumbs.html' %}
{% endif %} {% endif %}
{% block right_common_content %} {% block right_common_content %}

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

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

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

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

@ -1,12 +1,16 @@
{% extends 'email_base.html' %} {% extends 'email_base.html' %}
{% block title %} {% block title %}
Вам пришел заказ У вас новый заказ
{% endblock title %} {% endblock title %}
{% block email_body %} {% block email_body %}
<table border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td> <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> <p>Заказ № {{ order.order_code }} </p>
<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary"> <table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">
<tbody> <tbody>
@ -14,17 +18,19 @@
<td align="left"> <td align="left">
<table border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th> <th>
Товар Товар
</th> </th>
<th>Колличество</th> <th>Колличество</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for buying in order.buyings_set %} {% for buying in order.buyings_set %}
<tr> <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> <td>{{ buying.amount }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -34,6 +40,9 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% if order.comment %}
Комментарий: {{ order.comment }}
{% endif %}
<p>С уважением, Администрация сайта {{ site.name }}</p> <p>С уважением, Администрация сайта {{ site.name }}</p>
</td> </td>
</tr> </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 %} {% for buying in order.buyings_set %}
Либо используйте мобильный номер телефона <a href="tel:{{ phone }}">{{ phone }}</a> . Товар: <a href="{{ site.domain }}{% url 'products:product_details' %}">{{ buying.offer.product.name }}</a>\n
{% endif %} Колличество: {{ 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 %} {% block content %}
<div class="content__title">Новости</div> <div class="content__title">{{ object.title }}</div>
<div class="news"> <div class="news">
<div class="news__item"> <div class="news__item">
<div class="row"> <div class="row">
<div class="col-md-4 col-12"> {% if object.image_set.primary_image %}
<div class="news__image"><img src="./img/test-b.png" alt=""></div> <div class="col-md-4 col-12">
</div> <div class="news__image"><img src="{{ object.image_set.primary_image.url }}"
<div class="col-lg-6 col-md-8 col-12"> alt="{{ object.title }}"></div>
<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>
</div> </div>
</div> {% endif %}
</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="col-lg-6 col-md-8 col-12">
<div class="news__content"> <div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text"> <div class="news__text">
<p>It is a long established fact that a reader will be distracted by the <p>{{ object.description }}</p>
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>

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

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

Loading…
Cancel
Save