{% load i18n %}{% comment %}Renders a PlanDiff (context var `diff`) as indented node rows. Shared by the snapshot A/B compare and the scale simulation.{% endcomment %}
{% for r in diff.rows %}
{% if r.kind == 'changed' %}
{{ r.summary_before }}→{{ r.summary }}
{% elif r.kind == 'added' %}
+{{ r.summary }}
{% elif r.kind == 'removed' %}
−{{ r.summary }}
{% else %}
{{ r.summary }}
{% endif %}
{% if r.rows_before is not None and r.rows_after is not None %}
{% blocktrans with before=r.rows_before|floatformat:0 after=r.rows_after|floatformat:0 %}rows {{ before }}→{{ after }}{% endblocktrans %}
{% if r.rows_factor and r.rows_factor >= 2 %}
×{{ r.rows_factor|floatformat:0 }}
{% endif %}
{% elif r.rows_after is not None %}
{% blocktrans with after=r.rows_after|floatformat:0 %}rows {{ after }}{% endblocktrans %}
{% elif r.rows_before is not None %}
{% blocktrans with before=r.rows_before|floatformat:0 %}rows {{ before }}{% endblocktrans %}
{% endif %}
{% if r.cost_factor and r.cost_factor >= 2 %}
{% blocktrans with factor=r.cost_factor|floatformat:0 %}cost ×{{ factor }}{% endblocktrans %}
{% endif %}