]> git.parisson.com Git - diggersdigest.git/commitdiff
mv user panel in header, fix styles and colums
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 21 Sep 2015 23:10:37 +0000 (01:10 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 21 Sep 2015 23:10:37 +0000 (01:10 +0200)
diggersdigest/static/css/dig2.css
diggersdigest/templates/base.html
diggersdigest/templates/includes/user_panel_header.html [new file with mode: 0644]
diggersdigest/templates/index.html
diggersdigest/templates/shop/includes/user_panel_header.html [new file with mode: 0644]
diggersdigest/templates/shop/product.html

index 3585fe6b7209f4192266c0a2a3eede58e23996a7..c59f60e8bccc996a1d4b341f2524db31583ab1af 100644 (file)
@@ -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;
+}
index 449b7c078a08e9048f8d19d2bcd8c9a3268aff99..2e0ecc1c4a14c890e5239fc0198959df6d2fee65 100644 (file)
         <span class="icon-bar"></span>
         <span class="icon-bar"></span>
       </button>
+      <div id="logo">
       {% if settings.SITE_TITLE %}<a class="navbar-brand" href="/"><img class="pull-left" width="180" src="{% static "img/diggersdigest_400.png" %}"alt={{ settings.SITE_TITLE }}  ></a>{% endif %}
       {% if settings.SITE_TAGLINE %}<p class="navbar-text visible-lg">{{ settings.SITE_TAGLINE }}</p>{% endif %}
+      </div>
     </div>
-    <div class="navbar-collapse collapse">
+    <div>
       {% search_form "all" %}
+    </div>
+    <div class="navbar-collapse collapse">
       {% page_menu "pages/menus/dropdown.html" %}
     </div>
+    <div id="user_panel_header">
+    {% nevercache %}
+    {% include "includes/language_selector.html" %}
+    {% include "includes/user_panel_header.html" %}
+    {% endnevercache %}
+    </div>
     <hr>
 </div>
 
 </div>
 {% endcomment %}
 
-<div class="col-md-9 middle">
+<div class="col-md-12 middle">
     {% block main %}{% endblock %}
 </div>
 
+{% comment %}
 <div class="col-md-3 right">
-    {% nevercache %}
-    {% include "includes/language_selector.html" %}
-    {% include "includes/user_panel.html" %}
-    {% endnevercache %}
     <div class="panel panel-default">
     <div class="panel-body">
     {% block right_panel %}
     </div>
     </div>
 </div>
+{% endcomment %}
 
 </div>
 </div>
 <div>
 <!-- {% page_menu "pages/menus/footer.html" %} -->
 
-<div class="row">
+<div>
 <p class="site-info text-center">
     {% trans "Coded by" %}
     <a href="http://www.parisson.com">Parisson</a>
diff --git a/diggersdigest/templates/includes/user_panel_header.html b/diggersdigest/templates/includes/user_panel_header.html
new file mode 100644 (file)
index 0000000..0150d9e
--- /dev/null
@@ -0,0 +1,10 @@
+{% load mezzanine_tags %}
+<div class="">
+{% ifinstalled cartridge.shop %}
+{% include "shop/includes/user_panel_header.html" %}
+{% endifinstalled %}
+{% ifinstalled mezzanine.accounts %}
+{% ifinstalled cartridge.shop %}<br>{% endifinstalled %}
+{% include "accounts/includes/user_panel.html" %}
+{% endifinstalled %}
+</div>
index 6ef27895aa196b16e4b4e514f60292da509a82e0..56360cfaf8917678f419e8a9b6ee1f1e1de4e6e0 100644 (file)
@@ -22,7 +22,7 @@
     <div class="col-xs-12 col-md-12 product-thumb ">
     <a href="{{ product.get_absolute_url }}" class="thumbnail">
         {% if product.image %}
-          <img src="{{ MEDIA_URL }}{% thumbnail product.image 256 256 %}">
+          <img src="{{ MEDIA_URL }}{% thumbnail product.image 512 512 %}">
         {% else %}
           <div class="placeholder"></div>
         {% 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 (file)
index 0000000..db8f64c
--- /dev/null
@@ -0,0 +1,18 @@
+{% load i18n shop_tags mezzanine_tags %}
+{% spaceless %}
+<a href="{% url "shop_cart" %}">
+<span class="glyphicon glyphicon-shopping-cart"></span>
+{% blocktrans count request.cart.total_quantity as cart_quantity %}1 item{% plural %}{{ cart_quantity }} items{% endblocktrans %}
+{% trans "in cart" %}:
+{{ request.cart.total_price|currency }}</a><br>
+{% if request.cart.total_quantity != 0 %}
+<a href="{% url "shop_checkout" %}" class="btn btn-primary">
+    {% if request.session.order.step %}{% trans "Return to Checkout" %}{% else %}{% trans "Go to Checkout" %}{% endif %}
+</a><br>
+{% endif %}
+{% if settings.SHOP_USE_WISHLIST %}
+<a href="{% url "shop_wishlist" %}" class="btn-wishlist">
+<span class="glyphicon glyphicon-star"></span>
+{% blocktrans count request.wishlist|length as wishlist_count %}Wishlist contains 1 item{% plural %} Wishlist contains {{ wishlist_count }} items{% endblocktrans %}</a>
+{% endif %}
+{% endspaceless %}
index 3bb21b0d63df70fefc383884863db3f6e7bbb668..6e5352968fdbe665137374cec57d05e5c903bbe8 100644 (file)
@@ -54,7 +54,9 @@ $(function () {
 {% endblock %}
 
 {% block title %}
+<span class="bg-white">
 {% editable product.title %}{{ product.title }}{% endeditable %}
+</span>
 {% endblock %}
 
 {% block main %}
@@ -131,10 +133,12 @@ $(function () {
   <li>{% include "shop/includes/price.html" %}</li>
 </ul>
 
+<div class="audio">
 {% if product.record.audio_file %}
 <audio controls>
     <source src="{{ MEDIA_URL }}{{ product.record.audio_file }}">
 </audio>
+</div>
 {% endif %}
 
 </div>