[%- PROCESS 'edit/details/macros.tt' -%]

<table class="details set-track-lengths">
  <tr>
    <th>[% l('Mediums:') %]</th>
    <td colspan="2">
      <ul>
        [%- FOR medium=edit.display_data.mediums -%]
          <li>[% medium_link(medium) %]</li>
        [%- END -%]
      </ul>
    </td>
  </tr>
  <tr>
    <th>[% l('Disc ID:') %]</th>
    <td colspan="2">[% link_cdtoc(edit.display_data.cdtoc) %]</td>
  </tr>

  [% old_lengths = BLOCK;
       FOR length=edit.display_data.length.old;
         length | format_length;
         ' ';
       END;
     END;
     new_lengths = BLOCK;
       FOR length=edit.display_data.length.new;
         length | format_length;
         ' ';
       END;
     END %]

  <tr>
    <th>[% l('Track lengths:') %]</th>
    <td>
        [%- track_duration_changes(edit.display_data.length.old, edit.display_data.length.old, edit.display_data.length.new) -%]
    </td>
  </tr>

  [% IF old_lengths == new_lengths %]
  <tr>
    <th>[% l('Note:') %]</th>
    <td colspan="2">[% l('This edit makes subsecond changes to track lengths') %]</td>
  </tr>
  [% END %]
</table>
