Browse Source

Improve order history templates

Smooth out a few creases and ensure displayed messages make sense.
master
David Winterbottom 11 years ago
parent
commit
71763dbcfa

+ 6
- 8
oscar/templates/oscar/customer/order/order_detail.html View File

@@ -34,7 +34,7 @@
34 34
                                 </p>
35 35
                                 {% iffeature "reviews" %}
36 36
                                     {% if product|is_review_permitted:user %}
37
-                                        <a class="btn" href="{% url 'catalogue:reviews-add' product_slug=product.slug product_pk=product.id %}">{% trans 'Write a review' %}</a>
37
+                                        <a class="btn" href="{% url 'catalogue:reviews-add' product_slug=product.slug product_pk=product.id %}#addreview">{% trans 'Write a review' %}</a>
38 38
                                     {% endif %}
39 39
                                 {% endiffeature %}
40 40
                             {% else %}
@@ -152,20 +152,18 @@
152 152
 
153 153
     <table class="table table-striped table-bordered">
154 154
         <tr>
155
-            <th>{% trans 'Address:' %}</th>
156
-            <th>{% trans 'Contact Number:' %}</th>
157
-            <th>{% trans 'Shipping Notes:' %}</th>
155
+            <th>{% trans 'Address' %}</th>
156
+            <th>{% trans 'Contact Number' %}</th>
157
+            <th>{% trans 'Shipping Notes' %}</th>
158 158
         </tr>
159 159
         <tr>
160 160
             <td>
161
-                <p>
162 161
                     {% for field in order.shipping_address.active_address_fields %}
163 162
                         {{ field }}<br/>
164 163
                     {% endfor %}
165
-                </p>
166 164
             </td>
167
-            <td><p>{{ order.shipping_address.phone_number }}</p></td>
168
-            <td><p>{{ order.shipping_address.notes|linebreaks }}</p></td>
165
+            <td>{{ order.shipping_address.phone_number|default:"-" }}</td>
166
+            <td>{{ order.shipping_address.notes|linebreaks }}</td>
169 167
         </tr>
170 168
     </table>
171 169
 {% endblock tabcontent %}

+ 5
- 1
oscar/templates/oscar/customer/order/order_list.html View File

@@ -52,7 +52,11 @@
52 52
         </table>
53 53
         {% include "partials/pagination.html" %}
54 54
     {% else %}
55
-        <p>{% trans "You haven't placed any orders." %}</p>
55
+        {% if form.is_bound %}
56
+            <p>{% trans "No orders match your search." %}</p>
57
+        {% else %}
58
+            <p>{% trans "You haven't placed any orders." %}</p>
59
+        {% endif %}
56 60
     {% endif %}
57 61
 
58 62
 {% endblock tabcontent %}

Loading…
Cancel
Save