From 2a3c2708fd1f55bd06d0b48a132d487a1745c075 Mon Sep 17 00:00:00 2001 From: "jkeiser%netscape.com" <> Date: Thu, 31 Jul 2003 03:04:48 +0000 Subject: Patch Viewer, a pretty way of viewing and manipulating patches (bug 174942). Requires PatchIterator to be installed, classes uploaded to that bug and will be soon in CPAN. --- template/en/default/attachment/diff-file.html.tmpl | 129 +++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 template/en/default/attachment/diff-file.html.tmpl (limited to 'template/en/default/attachment/diff-file.html.tmpl') diff --git a/template/en/default/attachment/diff-file.html.tmpl b/template/en/default/attachment/diff-file.html.tmpl new file mode 100644 index 000000000..51072269d --- /dev/null +++ b/template/en/default/attachment/diff-file.html.tmpl @@ -0,0 +1,129 @@ + +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): John Keiser + #%] + +[%# This line is really long for a reason: to get rid of any possible textnodes + # between the elements. This is necessary because DOM parent-child-sibling + # relations can change and screw up the javascript for restoring, collapsing + # and expanding. Do not change without testing all three of those. + #%] + + + +[% section_num = 0 %] +[% FOREACH section = sections %] + [% section_num = section_num + 1 %] + + [% FOREACH group = section.groups %] + [% IF group.context %] + [% FOREACH line = group.context %] + + [% END %] + [% END %] + [% IF group.plus.size %] + [% IF group.minus.size %] + [% i = 0 %] + [% WHILE (i < group.plus.size || i < group.minus.size) %] + [% currentloop = 0 %] + [% WHILE currentloop < 500 && (i < group.plus.size || i < group.minus.size) %] + + + + + [% currentloop = currentloop + 1 %] + [% i = i + 1 %] + [% END %] + [% END %] + [% ELSE %] + [% FOREACH line = group.plus %] + [% IF file.is_add %] + + + + [% ELSE %] + + + + + [% END %] + [% END %] + [% END %] + [% ELSE %] + [% IF group.minus.size %] + [% FOREACH line = group.minus %] + [% IF file.is_remove %] + + + + [% ELSE %] + + + + + [% END %] + [% END %] + [% END %] + [% END %] + [% END %] +[% END %] + +
[% collapsed ? '(+)' : '(-)' %] + [% IF lxr_prefix && !file.is_add %] + [% file.filename FILTER html %] + [% ELSE %] + [% file.filename FILTER html %] + [% END %] + [% IF file.plus_lines %] + [% IF file.minus_lines %] + (-[% file.minus_lines %] / +[% file.plus_lines %] lines) + [% ELSE %] + (+[% file.plus_lines %] lines) + [% END %] + [% ELSE %] + [% IF file.minus_lines %] + (-[% file.minus_lines %] lines) + [% END %] + [% END %] +
-- cgit v1.2.3-24-g4f1b