[%- PROCESS 'edit/details/macros.tt' -%]
[%- MACRO format_length(length) BLOCK;
      length | format_length;
    END -%]

<table class="details edit-recording">
  <tr>
    <th>[% l('Recording:') %]</th>
    <td colspan="2">[% descriptive_link(edit.display_data.recording) %]</td>
  </tr>

  [% display_diff(l('Name:'),
                  html_escape(edit.display_data.name.old),
                  html_escape(edit.display_data.name.new),
                  '\s+') %]

  [% display_diff(l('Disambiguation:'),
                  html_escape(edit.display_data.comment.old),
                  html_escape(edit.display_data.comment.new),
                  '\s+') %]

  [% display_diff(l('Length:'),
                  format_length(edit.display_data.length.old),
                  format_length(edit.display_data.length.new)) %]

  [% display_diff(l('Video:'),
                  yesno(edit.display_data.video.old),
                  yesno(edit.display_data.video.new),
                  '-') %]

  [%- IF edit.display_data.artist_credit -%]
  <tr>
    <th>[% l('Artist:') %]</th>
    <td class="old">[% expanded_artist_credit(edit.display_data.artist_credit.old) %]</td>
    <td class="new">[% expanded_artist_credit(edit.display_data.artist_credit.new) %]</td>
  </tr>
  [%- END -%]
</table>
