{% with has_normal_canceled_parts=canceled_parts.is_normal.exists has_normal_ordered_parts=ordered_parts.is_normal.exists %} {% with has_extra_canceled_parts=canceled_parts.is_extra.exists has_extra_ordered_parts=ordered_parts.is_extra.exists %} {% if not has_normal_canceled_parts and not has_normal_ordered_parts %}show-extra{% endif %} {% if not has_extra_canceled_parts and not has_extra_ordered_parts %}show-normal{% endif %} {% endwith %} {% endwith %}