Permalink
Browse files

Replace "Add Product" button with a select box of Product subclasses.

  • Loading branch information...
1 parent f62da50 commit 53d1b0af3b1e0905629df9ac0676c8857f51906e @AlexHill committed Sep 5, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 cartridge/shop/templates/admin/shop/product/change_list.html
@@ -0,0 +1,26 @@
+{% extends "admin/change_list.html" %}
+{% load shop_tags pages_tags i18n adminmedia %}
+
+{% block extrahead %}
+{{ 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 object-tools-items %}
+ <li>
+ <div id="addlist-primary">
+ <select class="addlist">
+ <option value="">{% trans "Add" %} ...</option>
+ {% models_for_products as product_models %}
+ {% 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>
+ </li>
+{% endblock %}

0 comments on commit 53d1b0a

Please sign in to comment.