From: Guillaume Pellerin Date: Mon, 21 Sep 2015 23:10:37 +0000 (+0200) Subject: mv user panel in header, fix styles and colums X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7c48430289b1bb9be1945f7b80ba07fb627bb4ee;p=diggersdigest.git mv user panel in header, fix styles and colums --- diff --git a/diggersdigest/static/css/dig2.css b/diggersdigest/static/css/dig2.css index 3585fe6..c59f60e 100644 --- a/diggersdigest/static/css/dig2.css +++ b/diggersdigest/static/css/dig2.css @@ -44,3 +44,20 @@ hr { display: block; font-weight: bold; } + +.navbar-collapse { + margin-top: 50px; +} + +#logo { + float: left; +} + +#user_panel_header { + float: right; + margin-top: -90px; +} + +.audio { + margin-top: 2em; +} diff --git a/diggersdigest/templates/base.html b/diggersdigest/templates/base.html index 449b7c0..2e0ecc1 100644 --- a/diggersdigest/templates/base.html +++ b/diggersdigest/templates/base.html @@ -66,13 +66,23 @@ + - @@ -116,15 +126,12 @@ {% endcomment %} -
+
{% block main %}{% endblock %}
+{% comment %}
- {% nevercache %} - {% include "includes/language_selector.html" %} - {% include "includes/user_panel.html" %} - {% endnevercache %}
{% block right_panel %} @@ -135,6 +142,7 @@
+{% endcomment %}
@@ -143,7 +151,7 @@
-
+

{% trans "Coded by" %} Parisson diff --git a/diggersdigest/templates/includes/user_panel_header.html b/diggersdigest/templates/includes/user_panel_header.html new file mode 100644 index 0000000..0150d9e --- /dev/null +++ b/diggersdigest/templates/includes/user_panel_header.html @@ -0,0 +1,10 @@ +{% load mezzanine_tags %} +

+{% ifinstalled cartridge.shop %} +{% include "shop/includes/user_panel_header.html" %} +{% endifinstalled %} +{% ifinstalled mezzanine.accounts %} +{% ifinstalled cartridge.shop %}
{% endifinstalled %} +{% include "accounts/includes/user_panel.html" %} +{% endifinstalled %} +
diff --git a/diggersdigest/templates/index.html b/diggersdigest/templates/index.html index 6ef2789..56360cf 100644 --- a/diggersdigest/templates/index.html +++ b/diggersdigest/templates/index.html @@ -22,7 +22,7 @@
{% if product.image %} - + {% else %}
{% endif %} diff --git a/diggersdigest/templates/shop/includes/user_panel_header.html b/diggersdigest/templates/shop/includes/user_panel_header.html new file mode 100644 index 0000000..db8f64c --- /dev/null +++ b/diggersdigest/templates/shop/includes/user_panel_header.html @@ -0,0 +1,18 @@ +{% load i18n shop_tags mezzanine_tags %} +{% spaceless %} +
+ +{% blocktrans count request.cart.total_quantity as cart_quantity %}1 item{% plural %}{{ cart_quantity }} items{% endblocktrans %} +{% trans "in cart" %}: +{{ request.cart.total_price|currency }}
+{% if request.cart.total_quantity != 0 %} + + {% if request.session.order.step %}{% trans "Return to Checkout" %}{% else %}{% trans "Go to Checkout" %}{% endif %} +
+{% endif %} +{% if settings.SHOP_USE_WISHLIST %} + + +{% blocktrans count request.wishlist|length as wishlist_count %}Wishlist contains 1 item{% plural %} Wishlist contains {{ wishlist_count }} items{% endblocktrans %} +{% endif %} +{% endspaceless %} diff --git a/diggersdigest/templates/shop/product.html b/diggersdigest/templates/shop/product.html index 3bb21b0..6e53529 100644 --- a/diggersdigest/templates/shop/product.html +++ b/diggersdigest/templates/shop/product.html @@ -54,7 +54,9 @@ $(function () { {% endblock %} {% block title %} + {% editable product.title %}{{ product.title }}{% endeditable %} + {% endblock %} {% block main %} @@ -131,10 +133,12 @@ $(function () {
  • {% include "shop/includes/price.html" %}
  • +
    {% if product.record.audio_file %} +
    {% endif %}