Commits

Josh Cartmell committed 9594fc8

Added custom change list to allow selecting of a product type to add

Comments (0)

Files changed (1)

cartridge/shop/templates/admin/shop/product/change_list.html

+{% extends "admin/change_list.html" %}
+{% load shop_tags pages_tags i18n adminmedia %}
+
+{% block extrahead %}
+<link rel="stylesheet" href="{{ STATIC_URL }}mezzanine/css/admin/page_tree.css">
+{{ block.super }}
+
+<script src="{{ STATIC_URL }}mezzanine/js/jquery-ui-1.8.14.custom.min.js"></script>
+<script src="{{ STATIC_URL }}mezzanine/js/admin/page_tree.js"></script>
+{% endblock %}
+
+{% block content %}
+{% models_for_products as product_models %}
+<div id="content-main">
+
+    {% if has_add_permission %}
+    <div id="addlist-primary">
+        <select class="addlist">
+            <option value="">{% trans "Add" %} ...</option>
+            {% for model in product_models %}
+                {% set_model_permissions model %}
+                {% if model.perms.add %}
+                <option value="{{ model.add_url }}">{{ model.name }}</option>
+                {% endif %}
+            {% endfor %}
+        </select>
+    </div>
+    {% endif %}
+
+
+</div>
+{{ block.super }}
+{% endblock %}