From abd483cec114d67992c89e72caa9ef53ac662c5f Mon Sep 17 00:00:00 2001
From: "kiko%async.com.br" <>
Date: Fri, 10 Sep 2004 05:19:48 +0000
Subject: Fix for bug 232659: Fix inconsistent attachment links (and clean up
diff viewer UI while we're at it). Do just that. r=myk, a=myk.
---
template/en/default/attachment/diff-file.html.tmpl | 4 +-
.../en/default/attachment/diff-header.html.tmpl | 76 ++++++++++++----------
template/en/default/attachment/edit.html.tmpl | 7 +-
template/en/default/filterexceptions.pl | 3 +-
4 files changed, 49 insertions(+), 41 deletions(-)
(limited to 'template/en/default')
diff --git a/template/en/default/attachment/diff-file.html.tmpl b/template/en/default/attachment/diff-file.html.tmpl
index a25c1125a..11fdc6136 100644
--- a/template/en/default/attachment/diff-file.html.tmpl
+++ b/template/en/default/attachment/diff-file.html.tmpl
@@ -24,7 +24,7 @@
# relations can change and screw up the javascript for restoring, collapsing
# and expanding. Do not change without testing all three of those.
#%]
-
[% collapsed ? '(+)' : '(-)' %]
+
|
[% FOREACH group = section.groups %]
diff --git a/template/en/default/attachment/diff-header.html.tmpl b/template/en/default/attachment/diff-header.html.tmpl
index 3d96d0f70..e3ca1ac41 100644
--- a/template/en/default/attachment/diff-header.html.tmpl
+++ b/template/en/default/attachment/diff-header.html.tmpl
@@ -25,60 +25,77 @@
[% title = BLOCK %]
[% IF attachid %]
-Attachment #[% attachid %] for [% terms.Bug %] #[% bugid %]
+Attachment #[% attachid %] for [% terms.bug %] #[% bugid %]
[% ELSE %]
-Interdiff of #[% oldid %] and #[% newid %] for #[% terms.Bug %] #[% bugid %]
+Interdiff of #[% oldid %] and #[% newid %] for #[% terms.bug %] #[% bugid %]
[% END %]
[% END %]
[% style = BLOCK %]
.file_head {
- font-size: x-large;
font-weight: bold;
- background-color: #d3d3d3;
+ font-size: 1em;
+ background-color: #c3c3c3;
border: 1px solid black;
width: 100%;
}
+
+.file_head a {
+ text-decoration: none;
+ font-family: monospace;
+ font-size: 1.1em;
+}
+
.file_collapse {
display: none;
}
+
.section_head {
width: 100%;
- font-weight: bold;
- background-color: #d3d3d3;
+ background-color: #f0f0f0;
border: 1px solid black;
text-align: left;
}
+
table.file_table {
table-layout: fixed;
width: 100%;
empty-cells: show;
border-spacing: 0px;
border-collapse: collapse;
+ /* draw border below last open context section in listing */
+ border-bottom: 1px solid black;
}
+
tbody.file td {
border-left: 1px dashed black;
border-right: 1px dashed black;
width: 50%;
}
+
tbody.file pre {
display: inline;
white-space: -moz-pre-wrap;
font-size: 0.9em;
}
+
tbody.file pre:empty {
display: block;
height: 1em;
}
+
.changed {
background-color: lightblue;
}
+
.added {
background-color: lightgreen;
}
+
.removed {
background-color: #FFCC99;
}
+
.warning {
color: red
}
@@ -186,22 +203,21 @@ tbody.file pre:empty {
[% onload = 'restore_all(); document.checkboxform.restore_indicator.checked = true' %]
+[% BLOCK viewurl %]attachment.cgi?id=[% id %][% END %]
+[% BLOCK editurl %][% PROCESS viewurl %]&action=edit[% END %]
+[% BLOCK diffurl %][% PROCESS viewurl %]&action=diff[% END %]
+
[% IF headers %]
[% h1 = BLOCK %]
[% IF attachid %]
- [% description FILTER html %] (#[% attachid %])
+ Attachment #[% attachid %]: [% description FILTER html %]
[% ELSE %]
- [% USE url %]
- [% old_url = url('attachment.cgi', action = 'diff', id = oldid) %]
- [% new_url = url('attachment.cgi', action = 'diff', id = newid) %]
Diff Between
- [% old_desc FILTER html %]
- (#[% oldid %])
+ #[% oldid %]: [% old_desc FILTER html %]
and
- [% new_desc FILTER html %]
- (#[% newid %])
+ #[% newid %]: [% new_desc FILTER html %]
[% END %]
- for [% terms.Bug %] #[% bugid %]
+ for [% terms.bug %] #[% bugid %]
[% END %]
[% h2 = BLOCK %]
[% bugsummary FILTER html %]
@@ -226,18 +242,14 @@ tbody.file pre:empty {
[% IF attachid %]
[%# HEADER %]
[% IF headers %]
- [% USE url('attachment.cgi', id = attachid) %]
- View
- | Edit
- [% USE url('attachment.cgi', id = attachid, context = context,
- collapsed = collapsed, headers = headers,
- action = 'diff') %]
- | Raw Unified
+ View
+ | Edit
+ | Raw Unified
[% END %]
[% IF other_patches %]
[% IF headers %] |[%END%]
Differences between
-