aboutsummaryrefslogtreecommitdiffstats
path: root/template/en/default/attachment/diff-header.html.tmpl
blob: c13b2e7ba9e4c57a4f8a3bbf9b994c6fd236560e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
[%# 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 <jkeiser@netscape.com>
  #%]

[%# Define strings that will serve as the title and header of this page %]

[% PROCESS global/variables.none.tmpl %]

[% title = BLOCK %]
  [% IF attachid %]
Attachment #[% attachid %] for [% terms.bug %] #[% bugid %]
  [% ELSE %]
Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %]
  [% END %]
[% END %]

[% onload = 'restore_all(); document.checkboxform.restore_indicator.checked = true' %]

[% BLOCK viewurl %]attachment.cgi?id=[% id %][% END %]
[% BLOCK editurl %][% PROCESS viewurl %]&amp;action=edit[% END %]
[% BLOCK diffurl %][% PROCESS viewurl %]&amp;action=diff[% END %]

[% IF headers %]
  [% header = BLOCK %]
    [% IF attachid %]
      Attachment #[% attachid %]: [% description FILTER html %]
    [% ELSE %]
      Diff Between 
       #[% oldid %]: <a href="[% PROCESS diffurl id=oldid %]">[% old_desc FILTER html %]</a>
      and 
       #[% newid %]: <a href="[% PROCESS diffurl id=newid %]">[% new_desc FILTER html %]</a>
    [% END %]
    for <a href="show_bug.cgi?id=[% bugid %]">[% terms.bug %] #[% bugid %]</a>
  [% END %]
  [% subheader = BLOCK %]
    [% bugsummary FILTER html %]
  [% END %]
  [% PROCESS global/header.html.tmpl doc_section = "attachments.html#patchviewer"
                                     javascript_urls = "js/attachment.js"
                                     style_urls = ['skins/standard/attachment.css'] %]
[% ELSE %]
  <html>
  <head>
  <link href="[% 'skins/standard/attachment.css' FILTER mtime %]" 
        rel="stylesheet" type="text/css">
  <script src="[% 'js/attachment.js' FILTER mtime %]" 
          type="text/javascript"></script>
  </head>
  <body onload="[% onload FILTER html %]">
[% END %]
  
[%# If we have attachid, we are in diff, otherwise we're in interdiff %]
[% IF attachid %]
  [%# HEADER %]
  [% IF headers %]
    <a href="[% PROCESS viewurl id=attachid %]">View</a>
    | <a href="[% PROCESS editurl id=attachid %]">Details</a>
    | <a href="[% PROCESS diffurl id=attachid %]&amp;context=[% context FILTER uri %]&amp;collapsed=[% collapsed FILTER uri %]&amp;headers=[% headers FILTER uri %]&amp;format=raw">Raw&nbsp;Unified</a>
    | Return to [% "$terms.bug $bugid" FILTER bug_link(bugid) FILTER none %]
  [% END %]
  [% IF other_patches.size > 0 %]
    [% IF headers %] |[%END%]
    Differences between
    <form style="display: inline" action="attachment.cgi">
      <select name="oldid">
      [% FOREACH patch = other_patches %]
        <option value="[% patch.id %]"
        [% IF patch.selected %] selected[% END %]
        >[% patch.desc FILTER html %]</option>
      [% END %]
      </select>
      and this patch
      <input type="submit" id="diff" value="Diff">
      <input type="hidden" name="action" value="interdiff">
      <input type="hidden" name="newid" value="[% attachid %]">
      <input type="hidden" name="headers" value="[% headers FILTER html %]">
    </form>
  [% END %]
  <br>
[% ELSE %]
  [% IF headers %]
    <a href="attachment.cgi?oldid=[% oldid %]&amp;newid=[% newid %]&amp;action=interdiff&amp;format=raw">Raw Unified</a>
    | Return to [% "$terms.bug $bugid" FILTER bug_link(bugid) FILTER none %]
    |
  [% END %]
[% END %]
  
[%# Collapse / Expand %]
<a href="#"
   onmouseover="lastStatus = window.status; window.status='Collapse All'; return true"
   onmouseout="window.status = lastStatus; return true"
   onclick="return collapse_all()">Collapse All</a> | 
<a href="#"
   onmouseover="lastStatus = window.status; window.status='Expand All'; return true"
   onmouseout="window.status = lastStatus; return true"
   onclick="return expand_all()">Expand All</a>

[% IF do_context %]
  [%# only happens for normal viewing, not interdiff %]
  | <span style='font-weight: bold'>Context:</span>
  [% IF context == "patch" %]
    (<strong>Patch</strong> / 
  [% ELSE %]
    (<a href="[% PROCESS diffurl id=attachid %]&amp;headers=[% headers FILTER uri %]">Patch</a> / 
  [% END %]
  [% IF context == "file" %]
    <strong>File</strong> /
  [% ELSE %]
    <a href="[% PROCESS diffurl id=attachid %]&amp;headers=[% headers FILTER uri %]&amp;context=file">File</a> / 
  [% END %]

  [% IF context == "patch" || context == "file" %]
    [% context = 3 %]
  [% END %]
  [%# textbox for context %]
  <form style="display: inline" action="attachment.cgi"><input type="hidden" name="action" value="diff"><input type="hidden" name="id" value="[% attachid %]"><input type="hidden" name="collapsed" value="[% collapsed FILTER html %]"><input type="hidden" name="headers" value="[% headers FILTER html %]"><input type="text" name="context" value="[% context FILTER html %]" size="3"></form>)
[% END %]

[% IF warning %]
<h2 class="warning">Warning: 
  [% IF warning == "interdiff1" %]
  this difference between two patches may show things in the wrong places due
  to a limitation in [% terms.Bugzilla %] when comparing patches with different
  sets of files.
  [% END %]
  [% IF warning == "interdiff2" %]
  this difference between two patches may be inaccurate due to a limitation in
  [%+ terms.Bugzilla %] when comparing patches made against different revisions.
  [% END %]
</h2>
[% ELSE %]
    <br><br>
[% END %]
 
[%# Restore Stuff %]
<form name="checkboxform" action="attachment.cgi">
<input type="checkbox" name="restore_indicator" style="display: none">