Commits

Kai Diefenbach committed 6d37985 Merge
  • Participants
  • Parent commits 6fa5fb3, 92a02f0

Comments (0)

Files changed (12)

lfstheme/static/css/main.css

     margin-top: 10px;
 }
 
+.padding-top-middle {
+    margin-top: 15px;
+}
+
 .padding-top-large {
     margin-top: 20px;
 }
     padding-right: 5px;
 }
 
+.navigation-body a {
+    padding: 2px 0;
+    display: block;
+    text-decoration: none;
+}
+
+.site-actions {
+    padding-bottom: 10px;
+}
+
+.site-actions a {
+    text-transform: uppercase;
+    font-weight: bold;
+    color: #aaa;
+    text-decoration: none;
+}
+
 /* Header */
 #header {
     padding: 20px 0 10px 0;
     padding-bottom: 0.8em;
 }
 
+.my-orders td.label {
+    font-weight: bold;
+}
+
+.my-orders td.last {
+    padding-bottom: 20px;
+}
+
 /* Login / Register
 ___________________________________________________________________________ */
 
     background: url("../img/portlet-bullet.gif") left center no-repeat;
 }
 
+.portlet .for-sale-standard-price {
+    padding-right: 20px;
+    text-decoration: line-through;
+}
+
+.portlet .for-sale-price {
+    font-weight:bold;
+    font-size: 100%;
+}
+
 /* Cart portlet
 ___________________________________________________________________________ */
 
     padding-top: 10px;
 }
 
+/* slideshow portlets
+___________________________________________________________________________ */
+
+.featured-products-portlet,
+.forsale-products-portlet {
+    min-height: 220px;
+}
+
+.featured-products-portlet .ui-widget-content,
+.forsale-products-portlet .ui-widget-content {
+    border: none;
+}
+
+.featured-products-portlet .product-image img,
+.forsale-products-portlet .product-image img {
+    width: 120px;
+}
+
 /* Footer
 ___________________________________________________________________________ */
 

lfstheme/templates/lfs/base.html

 {% load lfs_tags %}
 {% load lfs_theme_tags %}
 {% load lfs_portlets_tags %}
+{% load compress %}
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     <head>
         <title>{% block title %}{{ SHOP.name }}{% endblock %}</title>
+        <link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico" type="image/ico" />
+
         {% block head %}{% endblock %}
         <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
         <meta name="generator" content="LFS - http://www.getlfs.com" />
-        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}jquery/lightbox/jquery.lightbox-0.5.css" />
-        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}jquery/jquery.jgrowl.css" />
 
-        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}yui/reset-fonts.css">
-        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}blueprint/src/grid.css">
-        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/main.css" />
-
+        {% compress css %}
+            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}jquery/lightbox/jquery.lightbox-0.5.css" />
+            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}jquery-ui-1.8.13.custom/css/smoothness/jquery-ui-1.8.13.custom.css" />
+            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}jquery/jquery.jgrowl.css" />
+            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}yui/reset-fonts.css">
+            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}blueprint/src/grid.css">
+            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/main.css" />
+        {% endcompress %}
         <!--[if IE]>
-            <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}/css/iefixes.css" />
+            {% compress css %}
+                <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/iefixes.css" />
+            {% endcompress %}
         <![endif]-->
 
-        <script type="text/javascript" src="{{ STATIC_URL }}jquery/jquery-1.6.1.min.js"></script>
-        <script type="text/javascript" src="{{ STATIC_URL }}jquery/jquery.form.pack.js"></script>
-        <script type="text/javascript" src="{{ STATIC_URL }}jquery/jquery.jgrowl_minimized.js"></script>
-        <script type="text/javascript" src="{{ STATIC_URL }}jquery/jquery.cookie.pack.js"></script>
-        <script type="text/javascript" src="{{ STATIC_URL }}jquery/lightbox/jquery.lightbox-0.5.js"></script>
-        <script type="text/javascript" src="{{ STATIC_URL }}js/lfs.js"></script>
+        {% compress js %}
+            <script type="text/javascript" src="{{ STATIC_URL }}jquery/jquery-1.6.1.min.js"></script>
+            <script type="text/javascript" src="{{ STATIC_URL }}jquery-ui-1.8.13.custom/js/jquery-ui-1.8.13.custom.min.js"></script>
+            <script type="text/javascript" src="{{ STATIC_URL }}jquery/jquery.form.pack.js"></script>
+            <script type="text/javascript" src="{{ STATIC_URL }}jquery/jquery.jgrowl_minimized.js"></script>
+            <script type="text/javascript" src="{{ STATIC_URL }}jquery/jquery.cookie.js"></script>
+            <script type="text/javascript" src="{{ STATIC_URL }}jquery/lightbox/jquery.lightbox-0.5.js"></script>
+            <script type="text/javascript" src="{{ STATIC_URL }}js/lfs.js"></script>
+        {% endcompress %}
+
     </head>
     <body class="{% block section %}lfs{% endblock %}">
 

lfstheme/templates/lfs/customer/account.html

 {% block breadcrumbs %}
     {% breadcrumbs _("Your Account") %}
 {% endblock %}
+
+{% block content %}
+<h1>{% trans "Welcome!" %}</h1>
+
+{% trans "Welcome to your account. Here you can find your orders, you can change your addresses, email address and your password." %}
+
+{% endblock %}

lfstheme/templates/lfs/customer/base.html

     <div class="span-5">
         {% block left-slot %}
             <h1>{% trans 'My account' %}</h1>
-            <ul>
+            <ul class="navigation-body">
                 <li>
                     <a href="{% url lfs_my_account %}">{% trans 'Overview' %}</a>
                 </li>

lfstheme/templates/lfs/customer/order.html

 {% load i18n %}
 {% load lfs_tags %}
 
+{% block title %}
+    {% trans 'Order' %} - {{ block.super }}
+{% endblock %}
+
+{% block section %}my-orders{% endblock %}
+
+{% block breadcrumbs %}
+    {% breadcrumbs _("Order") %}
+{% endblock %}
+
 {% block content %}
-    <div class="site-actions">
-        <a href="{% url lfs_my_orders %}">{% trans 'Overview' %}</a>
-    </div>
-    
-    <h1>{% trans 'Ordernumber:' %} {{current_order.id}}</h1>
-    
+    <h1>{% trans 'Ordernumber:' %} {{ current_order.id }}</h1>
+
+    <p class="site-actions">
+        <a href="{% url lfs_my_orders %}">{% trans "Back to overview" %}</a>
+    </p>
+
     {% include "lfs/order/lfs_order_tmpl.html" %}
-{% endblock %}
+{% endblock %}

lfstheme/templates/lfs/customer/orders.html

 {% block content %}
     <h1>{% trans 'Your orders' %}</h1>
 
-    {% if orders %}
+    {% if not date_filter and not orders %}
+        <p>
+            {% trans "You haven't any orders yet." %}
+        </p>
+    {% else %}
         <div class="site-actions">
             <form action="{% url lfs_my_orders %}"
                   method="post">
                 {% csrf_token %}
-                <select>
-                    <option>{% trans 'Recent orders' %}</option>
-                    <option>{% trans '2009' %}</option>
+                <select name="date-filter">
+                    <option value="">{% trans 'All' %}</option>
+                    {% for option in options %}
+                        <option value="{{ option.value }}" {% if option.selected %}selected="selected"{% endif %}>{{ option.value }} {% trans "months" %}</option>
+                    {% endfor %}
                 </select>
                 <input type="submit"
                        value="{% trans 'Filter' %}">
                         {{order.get_state_display}}
                     </td>
                 </tr>
+            {% empty %}
+                <tr colspan="3">
+                    <td>
+                        {% trans "There are no orders for this time range." %}
+                    </td>
+                </tr>
             {% endfor %}
         </table>
-    {% else %}
-        <p>
-            {% trans "You haven't any orders yet." %}
-        </p>
     {% endif %}
 {% endblock %}

lfstheme/templates/lfs/customer/shipping_address_inline.html

File contents unchanged.

lfstheme/templates/lfs/order/lfs_order_tmpl.html

 {% load lfs_tags %}
 <table class="order lfs-default">
     <tr>
-        <td>
-            {% trans 'Ordernumber' %}
-        </td>
-        <td>
-            {{ current_order.uuid }}
-        </td>
-    </tr>
-    <tr>
         <th colspan="4">
             {% trans 'General' %}
         </th>
     </tr>
     <tr>
-        <td class="label">
+        <td class="label" width="25%">
             {% trans 'Customer name' %}:
         </td>
-        <td>
+        <td width="25%">
             {{ current_order.customer_firstname }} {{ current_order.customer_lastname }}
         </td>
-        <td class="label">
+        <td class="label" width="25%">
             {% trans 'Date' %}:
         </td>
-        <td>
+        <td width="25%">
             {{ current_order.created|date:_("DATETIME_FORMAT") }}
         </td>
     </tr>
         <td>
             <a href="mailto:{{ current_order.customer_email }}">
                 {{ current_order.customer_email }}
-            </a>                
+            </a>
         </td>
         <td class="label">
             {% trans 'State' %}:
             {{ current_order.price|currency }}
         </td>
     </tr>
-    
+
 </table>
-<table class="order">
+<table class="order lfs-default padding-top-middle">
     <tr>
         <th width="25%">
             {% trans 'Invoice address' %}
             </div>
             <div>
                 {{ current_order.shipping_country }}
-            </div>                
+            </div>
             <div>
                 {{ current_order.shipping_phone }}
             </div>
-        </td>        
+        </td>
         <td>
             <div>
                 {{ current_order.shipping_method }}
 
 </table>
 
-<table class="order">
+<table class="order lfs-default padding-top-middle">
     <tr>
         <th width="25%">
             {% trans 'SKU' %}
     {% for item in current_order.items.all %}
         <tr>
             <td>
-               {{ item.product_sku }} 
+               {{ item.product_sku }}
             </td>
             <td>
-                {{ item.product_name }} 
+                {{ item.product_name }}
                 {% for property in item.product.get_variant_properties %}
                     <div>
                         {{ property.title }} : {{ property.value }} {{ property.unit|safe }}
                         {{ property.title }} : {{ property.value }} {{ property.unit|safe }}
                     </div>
                 {% endfor %}
-                
+
                 {% if item.product.is_configurable_product %}
                     {% for property in item.get_properties %}
                         <div>
                         </div>
                     {% endfor %}
                 {% endif %}
-                
+
             </td>
             <td class="number">
-               {{ item.product_amount }} 
+               {{ item.product_amount }}
             </td>
             <td class="number">
-               {{ item.product_price_gross|currency }} 
+               {{ item.product_price_gross|currency }}
             </td>
             <td class="number">
                {{ item.price_gross|currency }}
             </td>
         </tr>
-    {% endfor %}        
+    {% endfor %}
     <tr>
         <td></td>
         <td>
             <span class="total-label">{% trans 'Inclusive VAT' %}:</span>
             {{ current_order.tax|currency }}
         </td>
-    </tr>        
+    </tr>
 </table>
 {% if current_order.message %}
-    <table class="order">
+    <table class="order lfs-default padding-top-middle">
         <tr>
-            <th colspan="5">
+            <th>
                 {% trans 'Message from the customer' %}
             </th>
         </tr>
         <tr>
-            <td colspan="5">
+            <td>
                 {{ current_order.message }}
             </td>
         </tr>

lfstheme/templates/lfs/portlets/featured.html

+{% load i18n %}
+{% load lfs_tags %}
+
+{% if products %}
+    <div class="featured-products-portlet portlet">
+        <div class="portlet-header">
+            {{ title }}
+        </div>
+        <div class="portlet-body">
+            {% if not slideshow %}
+                {% for product in products %}
+                <div class="portlet-item {% if forloop.last %}last{% endif %}">
+                    <a href="{{ product.get_absolute_url }}">
+                        {{ product.get_name }}
+                    </a>
+                    <div class="product-price">
+                        {{ product.price|currency }}*
+                        <div class="price-disclaimer">
+                            {% if product.price_includes_tax %}
+                                {% trans '*inc. VAT' %}
+                            {% else  %}
+                                {% trans '*exc. VAT' %}
+                            {% endif %}
+                        </div>
+                    </div>
+                </div>
+                {% endfor %}
+            {% else %}
+            <div class="products-wrapper slideshow">
+                {% for product in products %}
+                    <div id="tab-{{ forloop.counter }}"class="portlet-item">
+                        <div class="product-data">
+                            <div class="product-image">
+                                <a href="{{ product.get_absolute_url }}">
+                                    {% if product.get_image %}
+                                        <img alt="{{ product.get_name }}"
+                                            src="{{ product.get_image.image.url_100x100 }}" />
+                                    {% endif %}
+                                </a>
+                            </div>
+                            <div>
+                                <div class="product-title">{{ product.get_name }}</div>
+                            </div>
+
+                            <div class="product-price">
+                                {{ product.price|currency }}*
+                                <div class="price-disclaimer">
+                                    {% if product.price_includes_tax %}
+                                        {% trans '*inc. VAT' %}
+                                    {% else  %}
+                                        {% trans '*exc. VAT' %}
+                                    {% endif %}
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                {% endfor %}{# slideshow products #}
+                {# tabs #}
+                <ul style="display:none">
+                {% for product in products %}
+                    <li><a href="#tab-{{ forloop.counter }}">{{ forloop.counter }}</a></li>
+                {% endfor %}
+                </ul>
+            </div>
+            <script type="text/javascript">
+                $('.slideshow').tabs({ fx: { opacity: 'toggle', duration: 'fast' } }).tabs('rotate', 3000);
+            </script>
+            {% endif %}{# slideshow check #}
+        </div>{# portlet-body #}
+    </div>
+{% endif %}

lfstheme/templates/lfs/portlets/forsale.html

+{% load i18n %}
+{% load lfs_tags %}
+
+{% if products %}
+    <div class="forsale-products-portlet portlet">
+        <div class="portlet-header">
+            {{ title }}
+        </div>
+        <div class="portlet-body">
+            {% if not slideshow %}
+                {% for product in products %}
+                <div class="portlet-item {% if forloop.last %}last{% endif %}">
+                    <a href="{{ product.get_absolute_url }}">
+                        {{ product.get_name }}
+                    </a>
+                    <div class="product-price">
+                        <span class="for-sale-standard-price">{{ product|get_standard_price:request|currency }}*</span>
+                        <span class="for-sale-price">{{ product.for_sale_price|currency }}*</span>
+                        <div class="price-disclaimer">
+                            {% if product.price_includes_tax %}
+                                {% trans '*inc. VAT' %}
+                            {% else  %}
+                                {% trans '*exc. VAT' %}
+                            {% endif %}
+                        </div>
+                    </div>
+                </div>
+                {% endfor %}
+            {% else %}
+            <div class="products-wrapper slideshow">
+                {% for product in products %}
+                    <div id="tab-{{ forloop.counter }}" class="portlet-item">
+                        <div class="product-data">
+                            <div class="product-image">
+                                <a href="{{ product.get_absolute_url }}">
+                                    {% if product.get_image %}
+                                        <img alt="{{ product.get_name }}"
+                                             src="{{ product.get_image.image.url_200x200 }}" />
+                                    {% endif %}
+                                </a>
+                            </div>
+                            <div>
+                                <div class="product-title">{{ product.get_name }}</div>
+                            </div>
+
+                            <div class="product-price">
+                                <span class="for-sale-standard-price">{{ product|get_standard_price:request|currency }}*</span>
+                                <span class="for-sale-price">{{ product.for_sale_price|currency }}*</span>
+                                <div class="price-disclaimer">
+                                    {% if product.price_includes_tax %}
+                                        {% trans '*inc. VAT' %}
+                                    {% else  %}
+                                        {% trans '*exc. VAT' %}
+                                    {% endif %}
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                {% endfor %}{# slideshow products #}
+                {# tabs #}
+                <ul style="display:none">
+                {% for product in products %}
+                    <li><a href="#tab-{{ forloop.counter }}">{{ forloop.counter }}</a></li>
+                {% endfor %}
+                </ul>
+            </div>
+            <script type="text/javascript">
+                $('.slideshow').tabs({ fx: { opacity: 'toggle', duration: 'fast' } }).tabs('rotate', 3000);
+            </script>
+            {% endif %}{# slideshow check #}
+        </div>{# portlet-body #}
+    </div>
+{% endif %}

lfstheme/templatetags/lfs_theme_tags.py

 
     return SlotsInformationNode()
 
-register.tag('slots_information', do_slots_information)
+register.tag('slots_information', do_slots_information)
 from setuptools import setup, find_packages
 import os
 
-version = '0.6.0b3'
+version = 'dev'
 
 here = os.path.abspath(os.path.dirname(__file__))
 README = open(os.path.join(here, 'README.txt')).read()