[%# HTML for rendering a set of deltas. #%]
[% SET diff_current_filename = "" %]
[% FOREACH delta = deltas %]
[% FLUSH IF loop.count() % 10 == 1 %]
[%# Check if a heading for the current diff needs to be output. #%]
[% IF delta.filename != diff_current_filename %]
[%# Close off the previous table from the previous filename. #%]
[% IF loop.count() != 0 %]
[% END %]
[% PROCESS viewdeltaheader.html.tmpl delta = delta render_anchor = 1 %]
[%# Output the diff description if it is present. #%]
[% IF delta.description != "" %]
| [% delta.description | html_entity %] |
[% delta.description | html_entity %] |
[% END %]
[%# Make sure all the diffs are aligned in the same table. #%]
[% END %]
[%# Now output the delta header if its not a new file. #%]
[% SET diff_current_filename = delta.filename %]
| |
[% IF !delta.new_file %]
[% IF delta.view_old_full_url != "" %]
[%# Display heading with links to retrieve the entire file #%]
|
Line [% delta.old_linenumber %]
|
Parallel
|
Line [% delta.new_linenumber %]
|
Parallel
|
[% ELSIF !delta.binary %]
[%# Just display the line numbers for the delta without any links. #%]
Line [% delta.old_linenumber %] |
Line [% delta.new_linenumber %] |
[% END %]
[% END %]
[%# Now output the delta itself. #%]
[% FOREACH line = delta.lines %]
[% FLUSH IF loop.count() % 10 == 1 %]
[% IF delta.new_file %]
| [% line.new_data_line %] |
[% line.new_data %] |
[% ELSE %]
[% line.old_data_line %] |
[% line.old_data %] |
[% line.new_data_line %] |
[% line.new_data %] |
[% END %]
[% END %]
| |
[% END %]
[%# Close off the table from the last file's delta set. #%]
[% IF render_header_in_footer %]
[% PROCESS viewdeltaheader.html.tmpl delta = delta render_anchor = 0 %]
[% END %]