Browse Source

Adjust product dashboard list view

Make title a link to update page and the left-most column.
master
David Winterbottom 12 years ago
parent
commit
c1905d37f1
1 changed files with 116 additions and 116 deletions
  1. 116
    116
      oscar/templates/oscar/dashboard/catalogue/product_list.html

+ 116
- 116
oscar/templates/oscar/dashboard/catalogue/product_list.html View File

@@ -7,137 +7,137 @@
7 7
 {% block body_class %}catalogue{% endblock %}
8 8
 
9 9
 {% block title %}
10
-{% trans "Product management" %} | {{ block.super }}
10
+    {% trans "Product management" %} | {{ block.super }}
11 11
 {% endblock %}
12 12
 
13 13
 {% block breadcrumbs %}
14
-<ul class="breadcrumb">
15
-    <li>
16
-        <a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a>
17
-        <span class="divider">/</span>
18
-    </li>
19
-    <li class="active">{% trans "Product management" %}</li>
20
-</ul>
14
+    <ul class="breadcrumb">
15
+        <li>
16
+            <a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a>
17
+            <span class="divider">/</span>
18
+        </li>
19
+        <li class="active">{% trans "Product management" %}</li>
20
+    </ul>
21 21
 {% endblock %}
22 22
 
23 23
 {% block header %}
24
-<div class="page-header action">
25
-    <h1>{% trans "Product management" %}</h1>
26
-</div>
24
+    <div class="page-header action">
25
+        <h1>{% trans "Product management" %}</h1>
26
+    </div>
27 27
 {% endblock header %}
28 28
 
29 29
 {% block dashboard_content %}
30
-<div class="table-header">
31
-    <h3><i class="icon-search icon-large"></i>{% trans "Search Products" %}</h3>
32
-</div>
33
-<div class="well">
34
-    <form action="." method="get" class="form-inline">
35
-        {% include "partials/form_fields_inline.html" with form=form %}
36
-        <button type="submit" class="btn btn-primary">{% trans "Search" %}</button>
37
-    </form>
38
-</div>
30
+    <div class="table-header">
31
+        <h3><i class="icon-search icon-large"></i>{% trans "Search Products" %}</h3>
32
+    </div>
33
+    <div class="well">
34
+        <form action="." method="get" class="form-inline">
35
+            {% include "partials/form_fields_inline.html" with form=form %}
36
+            <button type="submit" class="btn btn-primary">{% trans "Search" %}</button>
37
+        </form>
38
+    </div>
39 39
 
40
-<div class="table-header">
41
-    <h3><i class="icon-sitemap icon-large"></i> {% trans "Create new product" %}</h3>
42
-</div>
43
-<div class="well">
44
-    <form action="{% url 'dashboard:catalogue-product-create' %}" method="get" class="form-inline">
45
-        <span class="control-group">
46
-            <label for="id_promotion_type">{% trans "Create a new product of type" %}</label>
47
-            <select id="id_promotion_type" name="product_class">
48
-                <option> -- {% trans "Choose type" %} --</option>
49
-                {% for product_class in product_classes %}
50
-                <option value="{{ product_class.id }}">{{ product_class.name }}</option>
51
-                {% endfor %}
52
-            </select>
53
-        </span>
54
-        <button class="btn btn-primary" type="submit"><i class="icon-plus"></i> {% trans "New Product" %}</button>
55
-    </form>
56
-</div>
40
+    <div class="table-header">
41
+        <h3><i class="icon-sitemap icon-large"></i> {% trans "Create new product" %}</h3>
42
+    </div>
43
+    <div class="well">
44
+        <form action="{% url 'dashboard:catalogue-product-create' %}" method="get" class="form-inline">
45
+            <span class="control-group">
46
+                <label for="id_promotion_type">{% trans "Create a new product of type" %}</label>
47
+                <select id="id_promotion_type" name="product_class">
48
+                    <option> -- {% trans "Choose type" %} --</option>
49
+                    {% for product_class in product_classes %}
50
+                        <option value="{{ product_class.id }}">{{ product_class.name }}</option>
51
+                    {% endfor %}
52
+                </select>
53
+            </span>
54
+            <button class="btn btn-primary" type="submit"><i class="icon-plus"></i> {% trans "New Product" %}</button>
55
+        </form>
56
+    </div>
57 57
 
58
-{% if products %}
59
-<div class="table-header">
60
-    <h2><i class="icon-sitemap icon-large"></i>{{ queryset_description }}</h2>
61
-</div>
62
-<form action="." method="post">
63
-    {% csrf_token %}
64
-    <table class="table table-striped table-bordered">
65
-        <tr>
66
-            <th>{% trans "UPC" %}</th>
67
-            <th>{% trans "Image" %}</th>
68
-            <th>{% trans "Title" %}</th>
69
-            <th>{% trans "Product class" %}</th>
70
-            <th>{% trans "Status" %}</th>
71
-            <th>{% trans "Parent" %}</th>
72
-            <th>{% trans "Children" %}</th>
73
-            <th>{% trans "Stock records" %}</th>
74
-            <th></th>
75
-        </tr>
76
-        {% for product in products %}
77
-        <tr>
78
-                <td>{{ product.upc|default:"-" }}</td>
79
-                <td>
80
-                {% if product.primary_image.original.url %}
81
-                {% with image=product.primary_image %}
82
-                    {% thumbnail image.original "70x70" upscale=False as thumb %}
83
-                        <a href="{{ image.original.url }}" rel="lightbox_{{ product.upc|default:"-" }}" class="sub-image">
84
-                            <img src="{{ thumb.url }}" alt="{{ product.get_title }}" data-description="{% if image.caption %}{{ image.caption }}{% endif %}">
85
-                        </a>
86
-                    {% endthumbnail %}
87
-                {% endwith %}
88
-                {% else %}
89
-                -
90
-                {% endif %}
91
-                </td>
92
-                <td>{{ product.get_title }}</td>
93
-                <td>{{ product.get_product_class.name }}</td>
94
-                <td>{{ product.status|default:"-" }}</td>
95
-                <td>
96
-                    {% if product.parent.id %}
97
-                    <a href="{% url 'dashboard:catalogue-product' product.parent.id %}">{{ product.parent.title }}</a>
98
-                    {% else %}
99
-                    -
100
-                    {% endif %}
101
-                </td>
102
-                <td>{{ product.variants.count }}</td>
103
-                <td>{{ product.stockrecords.count }}</td>
104
-                <td>
105
-                    <div class="btn-toolbar">
106
-                        <div class="btn-group">
107
-                            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
108
-                                {% trans "Actions" %}
109
-                                <span class="caret"></span>
110
-                            </a>
111
-                            <ul class="dropdown-menu pull-right">
112
-                                <li>
113
-                                    <a href="{% url 'dashboard:catalogue-product' product.id %}{% if request.GET.urlencode %}?{{ request.GET.urlencode }}{% endif %}">
114
-                                        {% trans "Edit" %}
115
-                                    </a>
116
-                                </li>
117
-                                <li>
118
-                                    <a href="{{ product.get_absolute_url }}">
119
-                                        {% trans "View on site" %}
58
+    {% if products %}
59
+        <div class="table-header">
60
+            <h2><i class="icon-sitemap icon-large"></i>{{ queryset_description }}</h2>
61
+        </div>
62
+        <form action="." method="post">
63
+            {% csrf_token %}
64
+            <table class="table table-striped table-bordered">
65
+                <tr>
66
+                    <th>{% trans "Title" %}</th>
67
+                    <th>{% trans "UPC" %}</th>
68
+                    <th>{% trans "Image" %}</th>
69
+                    <th>{% trans "Product class" %}</th>
70
+                    <th>{% trans "Status" %}</th>
71
+                    <th>{% trans "Parent" %}</th>
72
+                    <th>{% trans "Children" %}</th>
73
+                    <th>{% trans "Stock records" %}</th>
74
+                    <th></th>
75
+                </tr>
76
+                {% for product in products %}
77
+                    <tr>
78
+                        <td><a href="{% url 'dashboard:catalogue-product' product.id %}">{{ product.get_title }}</a></td>
79
+                        <td>{{ product.upc|default:"-" }}</td>
80
+                        <td>
81
+                            {% if product.primary_image.original.url %}
82
+                                {% with image=product.primary_image %}
83
+                                    {% thumbnail image.original "70x70" upscale=False as thumb %}
84
+                                    <a href="{{ image.original.url }}" rel="lightbox_{{ product.upc|default:"-" }}" class="sub-image">
85
+                                        <img src="{{ thumb.url }}" alt="{{ product.get_title }}" data-description="{% if image.caption %}{{ image.caption }}{% endif %}">
120 86
                                     </a>
121
-                                </li>
122
-                                <li>
123
-                                    <a href="{% url 'dashboard:catalogue-product-delete' product.id %}">
124
-                                        {% trans "Delete" %}
87
+                                    {% endthumbnail %}
88
+                                {% endwith %}
89
+                            {% else %}
90
+                                -
91
+                            {% endif %}
92
+                        </td>
93
+                        <td>{{ product.get_product_class.name }}</td>
94
+                        <td>{{ product.status|default:"-" }}</td>
95
+                        <td>
96
+                            {% if product.parent.id %}
97
+                                <a href="{% url 'dashboard:catalogue-product' product.parent.id %}">{{ product.parent.title }}</a>
98
+                            {% else %}
99
+                                -
100
+                            {% endif %}
101
+                        </td>
102
+                        <td>{{ product.variants.count }}</td>
103
+                        <td>{{ product.stockrecords.count }}</td>
104
+                        <td>
105
+                            <div class="btn-toolbar">
106
+                                <div class="btn-group">
107
+                                    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
108
+                                        {% trans "Actions" %}
109
+                                        <span class="caret"></span>
125 110
                                     </a>
126
-                                </li>
127
-                            </ul>
128
-                        </div>
129
-                    </div>
130
-                </td>
131
-        </tr>
132
-        {% endfor %}
133
-    </table>
134
-    {% include "partials/pagination.html" %}
135
-</form>
111
+                                    <ul class="dropdown-menu pull-right">
112
+                                        <li>
113
+                                            <a href="{% url 'dashboard:catalogue-product' product.id %}{% if request.GET.urlencode %}?{{ request.GET.urlencode }}{% endif %}">
114
+                                                {% trans "Edit" %}
115
+                                            </a>
116
+                                        </li>
117
+                                        <li>
118
+                                            <a href="{{ product.get_absolute_url }}">
119
+                                                {% trans "View on site" %}
120
+                                            </a>
121
+                                        </li>
122
+                                        <li>
123
+                                            <a href="{% url 'dashboard:catalogue-product-delete' product.id %}">
124
+                                                {% trans "Delete" %}
125
+                                            </a>
126
+                                        </li>
127
+                                    </ul>
128
+                                </div>
129
+                            </div>
130
+                        </td>
131
+                    </tr>
132
+                {% endfor %}
133
+            </table>
134
+            {% include "partials/pagination.html" %}
135
+        </form>
136 136
 
137
-{% else %}
137
+    {% else %}
138 138
 
139
-<p>{% trans "No products found." %}</p>
139
+        <p>{% trans "No products found." %}</p>
140 140
 
141
-{% endif %}
141
+    {% endif %}
142 142
 
143 143
 {% endblock dashboard_content %}

Loading…
Cancel
Save