Fix bug with zero-dimensional items

This commit is contained in:
Raphael Michel
2014-10-17 16:55:22 +02:00
parent 23cd98050f
commit 49c93f95af
2 changed files with 11 additions and 1 deletions
@@ -0,0 +1,8 @@
{% extends "tixlcontrol/item/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block inside %}
<h2>{% trans "Variations" %}</h2>
<em>{% trans "You have to define and select propreties to be able to configure variations." %}
{% endblock %}
+3 -1
View File
@@ -624,7 +624,9 @@ class ItemVariations(ItemDetailMixin, EventPermissionRequiredMixin, TemplateView
return self.render_to_response(context)
def get_template_names(self):
if self.dimension == 1:
if self.dimension == 0:
return ['tixlcontrol/item/variations_0d.html']
elif self.dimension == 1:
return ['tixlcontrol/item/variations_1d.html']
elif self.dimension == 2:
return ['tixlcontrol/item/variations_2d.html']