{% load i18n %} {% get_current_language as LANGUAGE_CODE %} {% get_available_languages as LANGUAGES %} {% if product.get_combinations %} {% trans "Variant products and their attributes for a group" %} {{ product }}.
{% for combo in product.get_combinations %} {% if forloop.first %} {% for attr in combo.attributes.values %} {% endfor %} {% endif %} {% for attr in combo.attributes.values %} {% endfor %} {% if forloop.last %} {% endif %} {% endfor %}
{% trans "Name" %}{{ attr.name }}{% trans "Price" %} {% trans "Code" %} {% trans "Quantity" %} {% trans "Languages" %} {% trans "Actions" %}
{{ combo.name }} {{ attr.label|default:"-" }}{{ combo.price|safe|default:"-" }} {{ combo.code|default:"-" }} {% if combo.quantity != None %}{{ combo.quantity }}{% else %}~{% endif %} {% for lang in LANGUAGES %} {% if lang.0 in combo.languages %} {{ lang.0 }} {% else %} {{ lang.0 }} {% endif %} {% endfor %} {% if combo.pk %} {% if LANGUAGE_CODE not in combo.languages %} {% trans "Translate" %} {% endif %} {% trans "Change" %} {% trans "Delete" %} {% else %} {% trans "Create" %} {% endif %}
{% trans "Create all" %}
{% else %}{% trans "No variants." %}{% endif %} {% if product.get_invalid_variants %}

{% trans "There are invalid variants that exist (Their attributes don't match Available attributes)." %}

{% for invalid in product.get_invalid_variants %} {% if forloop.first %} {% endif %} {% if forloop.last %} {% endif %} {% endfor %}
{% trans "Name" %} {% trans "Attributes" %} {% trans "Actions" %}
{{ invalid.name }} {% for x in invalid.get_attributes.values %}{{ x.name }}: {{ x.label }}{% if not forloop.last %} | {% endif %}{% endfor %} {% trans "Change" %} {% trans "Delete" %}
{% trans "Delete all" %}
{% endif %}