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

layout.html 2.6KB

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