{% extends "admin/change_form.html" %}
{% load i18n actions static merge %}
{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
  <a href="../../">{% trans "Home" %}</a> &rsaquo;
  <a href="../">{{ app_label|capfirst|escape }}</a> &rsaquo;
  <a href=".">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
  <a href="javascript:history.back();">{% trans "Merge records" %}</a> &rsaquo;
  {% trans "Preview" %}
</div>
{% endif %}{% endblock %}
{% block content %}
<form method="post">{% csrf_token %}
  {% for f in adminform.form.hidden_fields %}{{ f }}{% endfor %}
  {% for f in adminform.form.action_fields %}{{ f }}{% endfor %}
  <table class="mergetable">
    <tr class="row1">
      <th>{% trans "Key" %}</th>
      <td colspan="2">{{ master.pk }}</td>
    </tr>
    <tr class="row1">
      <th></th>
      <th>{% trans "Original" %}</th>
      <th>{% trans "After Merging" %}</th>
    </tr>
    {% for field in fields %}
    <tr class="{% cycle ' row2' 'row1' %} preview-row">
    <th class="column label">{{ master|verbose_name:field.name }}</th>
    <td class="column original">
      <span class="display">{{ original|field_display:field.name }}</span>
    </td>
    <td class="column result">
      {{ adminform.form|widget:field.name }}
      <span class="display">{{ master|field_display:field.name }}</span>

    </td>
    {% endfor %}
  </table>
  <input style="margin: 5px;" type="submit" value="{% trans ' Merge' %}" name="apply">
</form>
{% endblock %}
