{% extends 'scipost/base.html' %} {% load scipost_extras %} {% block title %}Merging {{ model_name_plural }}{% endblock %} {% block breadcrumbs %}
  • Home
  • {{ model_name_plural }}
  • Merging {{ model_name_plural }}
  • {% endblock %} {% block content %}

    Merging {{ model_name_plural.title }}

    {{ object_to }} {% include "bi/arrow-left.html" %} {{ object_from }}

    {% for group_name, group in diff_groups.items %}

    {{ group_name|title }}

    {% if group_name == "related_objects_many" %} {% for field_name, field_changes in group.values %}
    {{ field_name|title }}
      {% for change in field_changes %} {% with status=change.0 value=change.1 %} {% if status == "added" %}
    • {{ value }}
    • {% elif status == "removed" %}
    • {{ value }}
    • {% else %}
    • {{ value }}
    • {% endif %} {% endwith %} {% endfor %}
    {% endfor %} {% else %} {% for field_name, changes in group.values %} {% endfor %}
    {{ object_to }} {% include "bi/arrow-left.html" %} {{ object_from }}
    {{ field_name|title }} {% for change in changes %} {% with status=change.0 value=change.1 %} {% if status == "added" %}
    {{ value }}
    {% elif status == "removed" %}
    {{ value }}
    {% else %} {{ value }} {% endif %} {% endwith %} {% endfor %}
    {% endif %} {% endfor %} {% endblock %}