Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

layout.html 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {% extends "base.html" %}
  2. {% load currency_filters %}
  3. {% load promotion_tags %}
  4. {% load category_tags %}
  5. {% load url from future %}
  6. {% block layout %}
  7. <div id="container">
  8. <div id="header">
  9. <p><a href="{% url 'promotions:home' %}">{% trans "Oscar // Flexible e-commerce for Django" %}</a></p>
  10. <form method="get" action="{% url 'search:search' %}">
  11. {{ search_form.as_p }}
  12. <input type="submit" value="{% trans "Go!" %}" />
  13. </form>
  14. {% if user.is_authenticated %}
  15. <a href="{% url 'customer:summary' %}">{% trans "Profile" %}</a>
  16. <a href="{% url 'customer:logout' %}">{% trans "Logout" %}</a>
  17. {% else %}
  18. <a href="{% url 'customer:login' %}">{% trans "Login" %}</a>
  19. {% endif %}
  20. {% blocktrans with total=basket.total_incl_tax|currency %}Basket total: {{ total }}{% endblocktrans %}
  21. <a href="{% url 'basket:summary' %}">{% trans "View basket" %}</a>
  22. {% category_tree depth=2 as categories %}
  23. {% if categories %}
  24. <ul>
  25. {% for category in categories %}
  26. <li><a href="{{ category.0.get_absolute_url }}">{{ category.0.name }}</a>
  27. {% if category.1 %}
  28. <ul>
  29. {% for subcategory in category.1 %}
  30. <li><a href="{{ subcategory.0.get_absolute_url }}">{{ subcategory.0.name }}</a>
  31. {% endfor %}
  32. </ul>
  33. {% endif %}
  34. </li>
  35. {% endfor %}
  36. </ul>
  37. {% endif %}
  38. {% block header %}
  39. {% endblock %}
  40. </div>
  41. <div id="content">
  42. {% if messages %}
  43. <ul class="messages">
  44. {% for message in messages %}
  45. <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
  46. {% endfor %}
  47. </ul>
  48. {% endif %}
  49. <div id="promotions">
  50. {% for promotion in promotions_page %}
  51. {% render_promotion promotion %}
  52. {% endfor %}
  53. </div>
  54. {% block content %}{% endblock %}
  55. </div>
  56. <div id="footer">{% block footer %}{% endblock %}</div>
  57. </div>
  58. {% endblock %}