You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

layout.html 2.0KB

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