[%# 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 != "" %] [% END %]
[% delta.description | html_entity %] [% delta.description | html_entity %]
[%# 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 #%] [% ELSIF !delta.binary %] [%# Just display the line numbers for the delta without any links. #%] [% END %] [% END %] [%# Now output the delta itself. #%] [% FOREACH line = delta.lines %] [% FLUSH IF loop.count() % 10 == 1 %] [% IF delta.new_file %] [% ELSE %] [% END %] [% END %] [% END %] [%# Close off the table from the last file's delta set. #%]
 
Line [% delta.old_linenumber %] | Parallel Line [% delta.new_linenumber %] | Parallel Line [% delta.old_linenumber %] Line [% delta.new_linenumber %]
[% line.new_data_line %] [% line.new_data %][% line.old_data_line %] [% line.old_data %] [% line.new_data_line %] [% line.new_data %]
 
[% IF render_header_in_footer %] [% PROCESS viewdeltaheader.html.tmpl delta = delta render_anchor = 0 %]
[% END %]