diff options
Diffstat (limited to 'template/en/default/attachment')
16 files changed, 1581 insertions, 0 deletions
diff --git a/template/en/default/attachment/cancel-create-dupe.html.tmpl b/template/en/default/attachment/cancel-create-dupe.html.tmpl new file mode 100644 index 0000000..f838955 --- /dev/null +++ b/template/en/default/attachment/cancel-create-dupe.html.tmpl @@ -0,0 +1,48 @@ +[%# 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 Olav Vitters. + # + # Contributor(s): Olav Vitters <olav@bkor.dhs.org> + # David Lawrence <dkl@redhat.com> + #%] + +[%# INTERFACE: + # bugid: integer. ID of the bug report that this attachment relates to. + # attachid: integer. ID of the previous attachment recently created. + #%] + +[% PROCESS "global/field-descs.none.tmpl" %] + +[% PROCESS global/header.html.tmpl + title = "Already filed attachment" +%] + +[% USE Bugzilla %] + +<table cellpadding="20"> + <tr> + <td bgcolor="#ff0000"> + <font size="+2"> + You already used the form to file + <a href="[% urlbase FILTER html %]attachment.cgi?id=[% attachid FILTER url_quote %]&action=edit">attachment [% attachid FILTER url_quote %]</a>. + </font> + </td> + </tr> +</table> + +<p> + You can either <a href="[% urlbase FILTER html %]attachment.cgi?bugid=[% bugid FILTER url_quote %]&action=enter"> + create a new attachment</a> or [% "go back to $terms.bug $bugid" FILTER bug_link(bugid) FILTER none %]. +<p> + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/choose.html.tmpl b/template/en/default/attachment/choose.html.tmpl new file mode 100644 index 0000000..700abb4 --- /dev/null +++ b/template/en/default/attachment/choose.html.tmpl @@ -0,0 +1,43 @@ +[%# 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): Gavin Shelley <bugzilla@chimpychompy.org> + #%] + +[% PROCESS global/variables.none.tmpl %] + +[% PROCESS global/header.html.tmpl + title = "Locate attachment", + onload = "document.forms['choose-id'].id.focus()" + %] + +<form name="choose-id" method="get" action="attachment.cgi"> + <p>Access an attachment by entering its ID into the form below:</p> + <p>Attachment ID: <input name="id" size="6"> + <button name="action" value="edit" id="edit">Details</button> + <button name="action" value="view" id="view">View</button> + </p> +</form> + +<form method="get" action="show_bug.cgi"> + <p>Or, access it from the list of attachments in its associated [% terms.bug %] report:</p> + <p>[% terms.Bug %] ID: <input name="id" size="6"> + <input type="submit" name="action" value="View" id="action"> + </p> +</form> + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/confirm-delete.html.tmpl b/template/en/default/attachment/confirm-delete.html.tmpl new file mode 100644 index 0000000..14c76c3 --- /dev/null +++ b/template/en/default/attachment/confirm-delete.html.tmpl @@ -0,0 +1,92 @@ +[%# 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. + # + # Contributor(s): Frédéric Buclin <LpSolit@gmail.com> + #%] + +[%# INTERFACE: + # a: attachment object; attachment the user wants to delete. + # token: string; The token used to identify the session. + #%] + +[% PROCESS global/variables.none.tmpl %] + +[% title = BLOCK %] + Delete Attachment [% a.id FILTER html %] of [% terms.Bug %] [%+ a.bug_id FILTER html %] +[% END %] + +[% PROCESS global/header.html.tmpl + title = title + doc_section = "attachments.html" +%] + +<table border="1" cellpadding="4" cellspacing="0"> + <tr bgcolor="#6666FF"> + <th valign="top" align="left">Field</th> + <th valign="top" align="left">Value</th> + </tr> + <tr> + <td valign="top">Attachment ID:</td> + <td valign="top"> + <a href="attachment.cgi?id=[% a.id FILTER html %]">[% a.id FILTER html %]</a> + </td> + </tr> + <tr> + <td valign="top">File name:</td> + <td valign="top">[% a.filename FILTER html %]</td> + </tr> + <tr> + <td valign="top">Description:</td> + <td valign="top">[% a.description FILTER html %]</td> + </tr> + <tr> + <td valign="top">Contained in [% terms.Bug %]:</td> + <td valign="top">[% a.bug_id FILTER bug_link(a.bug_id) FILTER none %]</td> + </tr> + <tr> + <td valign="top">Creator:</td> + <td valign="top">[% a.attacher.identity FILTER html %]</td> + </tr> + <tr> + <td valign="top">Creation Date:</td> + <td valign="top">[% a.attached FILTER time %]</td> + </tr> +</table> + +<h2>Confirmation</h2> + +<table border="0" cellpadding="20" width="70%" bgcolor="red"> + <tr> + <td> + The content of this attachment will be deleted in an <b>irreversible</b> way. + </td> + </tr> +</table> + +<p>Do you really want to delete this attachment?</p> + +<form action="attachment.cgi" method="POST"> + <label for="reason">Reason of the deletion:</label> + <input type="text" id="reason" name="reason" value="" size="80" maxlength="200"> + <br> + <input type="submit" value="Yes, delete" id="delete"> + <input type="hidden" name="action" value="delete"> + <input type="hidden" name="id" value="[% a.id FILTER html %]"> + <input type="hidden" name="token" value="[% token FILTER html %]"> +</form> + +<p> + No, cancel this deletion and return to + [%+ "$terms.bug " _ a.bug_id FILTER bug_link(a.bug_id) FILTER none %]. +</p> + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/content-types.html.tmpl b/template/en/default/attachment/content-types.html.tmpl new file mode 100644 index 0000000..471222a --- /dev/null +++ b/template/en/default/attachment/content-types.html.tmpl @@ -0,0 +1,27 @@ +[%# 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): Myk Melez <myk@mozilla.org> + #%] + + <option value="text/plain">plain text (text/plain)</option> + <option value="text/html">HTML source (text/html)</option> + <option value="application/xml">XML source (application/xml)</option> + <option value="image/gif">GIF image (image/gif)</option> + <option value="image/jpeg">JPEG image (image/jpeg)</option> + <option value="image/png">PNG image (image/png)</option> + <option value="application/octet-stream">binary file (application/octet-stream)</option> diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl new file mode 100644 index 0000000..f00a0ad --- /dev/null +++ b/template/en/default/attachment/create.html.tmpl @@ -0,0 +1,135 @@ +[%# 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): Myk Melez <myk@mozilla.org> + # Joel Peshkin <bugreport@peshkin.net> + # Erik Stambaugh <erik@dasbistro.com> + # Marc Schumann <wurblzap@gmail.com> + #%] + +[% PROCESS "global/field-descs.none.tmpl" %] + +[%# Define strings that will serve as the title and header of this page %] +[% title = BLOCK %]Create New Attachment for [% terms.Bug %] #[% bug.bug_id %][% END %] +[% header = BLOCK %]Create New Attachment for + [%+ "$terms.Bug $bug.bug_id" FILTER bug_link(bug) FILTER none %][% END %] +[% subheader = BLOCK %][% bug.short_desc FILTER html %][% END %] + +[% PROCESS global/header.html.tmpl + title = title + header = header + subheader = subheader + style_urls = [ 'skins/standard/create_attachment.css' ] + javascript_urls = [ "js/attachment.js", "js/util.js" ] + doc_section = "attachments.html" +%] + +<form name="entryform" method="post" action="attachment.cgi" + enctype="multipart/form-data" + onsubmit="return validateAttachmentForm(this)"> + <input type="hidden" name="bugid" value="[% bug.bug_id %]"> + <input type="hidden" name="action" value="insert"> + <input type="hidden" name="token" value="[% token FILTER html %]"> + + <table class="attachment_entry"> + [% PROCESS attachment/createformcontents.html.tmpl %] + + [%# Additional fields for attachments on existing bugs: %] + <tr> + <th>Obsoletes:</th> + <td> + <em>(optional) Check each existing attachment made obsolete by your new attachment.</em><br> + [% IF attachments.size %] + [% FOREACH attachment = attachments %] + [% IF ((attachment.isprivate == 0) || user.is_insider) %] + <input type="checkbox" id="[% attachment.id %]" + name="obsolete" value="[% attachment.id %]"> + <a href="attachment.cgi?id=[% attachment.id %]&action=edit">[% attachment.id %]: [% attachment.description FILTER html %]</a><br> + [% END %] + [% END %] + [% ELSE %] + [no attachments can be made obsolete] + [% END %] + </td> + </tr> + + [% IF (user.id != bug.assigned_to.id) AND user.in_group("editbugs", bug.product_id) %] + <tr> + <th>Reassignment:</th> + <td> + <em>If you want to assign this [% terms.bug %] to yourself, + check the box below.</em><br> + <input type="checkbox" id="takebug" name="takebug" value="1"> + <label for="takebug">take [% terms.bug %]</label> + [% bug_statuses = [] %] + [% FOREACH bug_status = bug.status.can_change_to %] + [% NEXT IF bug_status.name == "UNCONFIRMED" + && !bug.product_obj.allows_unconfirmed %] + [% bug_statuses.push(bug_status) IF bug_status.is_open %] + [% END %] + [% IF bug_statuses.size %] + <label for="takebug">and set the [% terms.bug %] status to</label> + <select id="bug_status" name="bug_status"> + <option value="[% bug.status.name FILTER html %]">[% display_value("bug_status", bug.status.name) FILTER html %] (current)</option> + [% FOREACH bug_status = bug_statuses %] + [% NEXT IF bug_status.id == bug.status.id %] + <option value="[% bug_status.name FILTER html %]">[% display_value("bug_status", bug_status.name) FILTER html %]</option> + [% END %] + </select> + [% END %] + </td> + </tr> + [% END %] + <tr> + <th><label for="comment">Comment:</label></th> + <td> + <em>(optional) Add a comment about this attachment to the [% terms.bug %].</em><br> + [% INCLUDE global/textarea.html.tmpl + name = 'comment' + id = 'comment' + minrows = 6 + maxrows = 15 + cols = constants.COMMENT_COLS + wrap = 'soft' + %] + </td> + </tr> + [% IF user.is_insider %] + <tr> + <th>Privacy:</th> + <td> + <input type="checkbox" name="isprivate" id="isprivate" + value="1" onClick="updateCommentPrivacy(this)"> + <label for="isprivate"> + Make attachment and comment private (visible only to members of + the <strong>[% Param('insidergroup') FILTER html %]</strong> + group) + </label> + </td> + </tr> + [% END %] + <tr> + <th> </th> + <td><input type="submit" id="create" value="Submit"></td> + </tr> + </table> + +</form> + +[% Hook.process('end') %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/created.html.tmpl b/template/en/default/attachment/created.html.tmpl new file mode 100644 index 0000000..da2fec8 --- /dev/null +++ b/template/en/default/attachment/created.html.tmpl @@ -0,0 +1,67 @@ +[%# 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): Myk Melez <myk@mozilla.org> + #%] + +[%# INTERFACE: + # attachment: object of the attachment just created. + # contenttypemethod: string. How we got the content type of the attachment. + # Possible values: autodetect, list, manual. + #%] + +[% PROCESS global/variables.none.tmpl %] +[% bug = bugs.0 %] +[% PROCESS "bug/show-header.html.tmpl" %] +[% PROCESS global/header.html.tmpl + title = "Attachment $attachment.id added to $terms.Bug $attachment.bug_id" +%] + +<dl> + <dt> + <a title="[% attachment.description FILTER html %]" + href="attachment.cgi?id=[% attachment.id %]&action=edit">Attachment #[% attachment.id %]</a> + to [% "$terms.bug $attachment.bug_id" FILTER bug_link(attachment.bug_id) FILTER none %] created + </dt> + <dd> + [% PROCESS "bug/process/bugmail.html.tmpl" mailing_bugid = attachment.bug_id %] + [% IF convertedbmp %] + <p> + <b>Note:</b> [% terms.Bugzilla %] automatically converted your BMP image file to a + compressed PNG format. + </p> + [% END %] + [% IF contenttypemethod == 'autodetect' %] + <p> + <b>Note:</b> [% terms.Bugzilla %] automatically detected the content type + <em>[% attachment.contenttype FILTER html %]</em> for this attachment. If this is + incorrect, correct the value by editing the attachment's + <a href="attachment.cgi?id=[% attachment.id %]&action=edit">details</a>. + </p> + [% END %] + + [%# Links to more information about the changed bug. %] + [% Hook.process("links") %] + </dd> +</dl> + +<p> +<a href="attachment.cgi?bugid=[% attachment.bug_id %]&action=enter">Create + Another Attachment to [% terms.Bug %] [%+ attachment.bug_id %]</a> +</p> + +[% PROCESS bug/show.html.tmpl %] diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl new file mode 100644 index 0000000..2cef632 --- /dev/null +++ b/template/en/default/attachment/createformcontents.html.tmpl @@ -0,0 +1,106 @@ +[%# 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): Myk Melez <myk@mozilla.org> + # Joel Peshkin <bugreport@peshkin.net> + # Erik Stambaugh <erik@dasbistro.com> + # Marc Schumann <wurblzap@gmail.com> + #%] + +<tr> + <th><label for="data">File</label>:</th> + <td> + <em>Enter the path to the file on your computer.</em><br> + <input type="file" id="data" name="data" size="50" + [% IF Param("allow_attach_url") %] + onchange="DataFieldHandler()" + [% END %] + > + </td> +</tr> +[% IF Param("maxlocalattachment") %] +<tr class="expert_fields"> + <th>BigFile:</th> + <td> + <input type="checkbox" id="bigfile" + name="bigfile" value="bigfile"> + <label for="bigfile"> + Big File - Stored locally and may be purged + </label> + </td> +</tr> +[% END %] +[% IF Param("allow_attach_url") %] +<tr class="expert_fields"> + <th><label for="attachurl">AttachURL</label>:</th> + <td> + <em>URL to be attached instead.</em><br> + <input type="text" id="attachurl" name="attachurl" size="60" + maxlength="2000" + onkeyup="URLFieldHandler()" onblur="URLFieldHandler()"> + </td> +</tr> +</tbody> +[% END %] +<tr> + <th><label for="description">Description</label>:</th> + <td> + <em>Describe the attachment briefly.</em><br> + <input type="text" id="description" name="description" size="60" maxlength="200"> + </td> +</tr> +<tr class="expert_fields"> + <th>Content Type:</th> + <td> + <em>If the attachment is a patch, check the box below.</em><br> + <input type="checkbox" id="ispatch" name="ispatch" value="1" + onchange="setContentTypeDisabledState(this.form);"> + <label for="ispatch">patch</label><br><br> + [%# Reset this whenever the page loads so that the JS state is up to date %] + <script type="text/javascript"> + YAHOO.util.Event.onDOMReady(function() { + bz_fireEvent(document.getElementById('ispatch'), 'change'); + }); + </script> + + <em>Otherwise, choose a method for determining the content type.</em><br> + <input type="radio" id="autodetect" + name="contenttypemethod" value="autodetect" checked="checked"> + <label for="autodetect">auto-detect</label><br> + <input type="radio" id="list" + name="contenttypemethod" value="list"> + <label for="list">select from list</label>: + <select name="contenttypeselection" id="contenttypeselection" + onchange="this.form.contenttypemethod[1].checked = true;"> + [% PROCESS "attachment/content-types.html.tmpl" %] + </select><br> + <input type="radio" id="manual" + name="contenttypemethod" value="manual"> + <label for="manual">enter manually</label>: + <input type="text" name="contenttypeentry" id="contenttypeentry" + size="30" maxlength="200" + onchange="if (this.value) this.form.contenttypemethod[2].checked = true;"> + </td> +</tr> +<tr class="expert_fields"> + <td> </td> + <td> + [% IF flag_types && flag_types.size > 0 %] + [% PROCESS "flag/list.html.tmpl" bug_id=bugid attach_id=attachid %]<br> + [% END %] + </td> +</tr> diff --git a/template/en/default/attachment/delete_reason.txt.tmpl b/template/en/default/attachment/delete_reason.txt.tmpl new file mode 100644 index 0000000..e4a1fc4 --- /dev/null +++ b/template/en/default/attachment/delete_reason.txt.tmpl @@ -0,0 +1,32 @@ +[%# 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. + # + # Contributor(s): Frédéric Buclin <LpSolit@gmail.com> + #%] + +[%# INTERFACE: + # attachment: object of the attachment the user wants to delete. + # reason: string; The reason provided by the user. + # date: the date when the request to delete the attachment was made. + #%] + +The content of attachment [% attachment.id %] has been deleted by + [%+ user.identity %] +[% IF reason %] +who provided the following reason: + +[%+ reason %] +[% ELSE %] +without providing any reason. +[% END %] + +The token used to delete this attachment was generated at [% date FILTER time %]. 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 0000000..9392ca1 --- /dev/null +++ b/template/en/default/attachment/diff-file.html.tmpl @@ -0,0 +1,177 @@ +[%# 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> + # Frédéric Buclin <LpSolit@gmail.com> + #%] + +[%# 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. + # Also, the first empty row is required because 'table-layout: fixed' only + # considers the first row to determine column widths. If a colspan is found, + # it then share the width equally among all columns, which we don't want. + #%] +<table class="file_table"><thead><tr><td class="num"></td><td></td><td class="num"></td><td></td></tr><tr><td class="file_head" colspan="4"><a href="#" onclick="return twisty_click(this)">[% collapsed ? '(+)' : '(-)' %]</a><input type="checkbox" name="[% file.filename FILTER html %]"[% collapsed ? '' : ' checked' %] style="display: none"> + [% IF lxr_prefix && !file.is_add %] + <a href="[% lxr_prefix %]">[% file.filename FILTER html %]</a> + [% 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 %] +</td></tr></thead><tbody class="[% collapsed ? 'file_collapse' : 'file' %]"> +<script type="text/javascript"> +incremental_restore() +</script> + +[% section_num = 0 %] +[% FOREACH section = sections %] + [% section_num = section_num + 1 %] + <tr><th colspan="4" class="section_head"> + <table cellpadding="0" cellspacing="0"> + <tr><th width="95%" align="left"> + [% IF file.is_add %] + Added + [% ELSIF file.is_remove %] + [% IF bonsai_prefix %] + <a href="[% bonsai_prefix %]">Removed</a> + [% ELSE %] + Removed + [% END %] + [% ELSE %] + [% IF bonsai_prefix %] + <a href="[% bonsai_prefix %]#[% section.old_start %]"> + [% END %] + [% IF section.old_lines > 1 %] + Lines [% section.old_start %]-[% section.old_start + + section.old_lines - 1 %] + [% ELSE %] + Line [% section.old_start %] + [% END %] + [% IF bonsai_prefix %] + </a> + [% END %] + [% section.func_info FILTER html IF section.func_info %] + [% END %] + </th><th> + <a name="[% file.filename FILTER html %]_sec[% section_num %]" href="#[% file.filename FILTER html %]_sec[% section_num %]">Link Here</a> + </th></tr></table> + </th></tr> + [% current_line_old = section.old_start %] + [% current_line_new = section.new_start %] + [% FOREACH group = section.groups %] + [% IF group.context %] + [% FOREACH line = group.context %] + <tr> + <td class="num">[% current_line_old %]</td> + <td><pre>[% line FILTER html %]</pre></td> + <td class="num">[% current_line_new %]</td> + <td><pre>[% line FILTER html %]</pre></td> + </tr> + [% current_line_old = current_line_old + 1 %] + [% current_line_new = current_line_new + 1 %] + [% END %] + [% END %] + [% IF group.plus.size %] + [% IF group.minus.size %] + [% i = 0 %] + [% WHILE (i < group.plus.size || i < group.minus.size) %] + [%# WHILE cannot loop more than 1000 times by default, so we break it every 500 times. %] + [% currentloop = 0 %] + [% WHILE currentloop < 500 && (i < group.plus.size || i < group.minus.size) %] + <tr> + [% IF i < group.minus.size %] + <td class="num">[% current_line_old + i %]</td> + <td class="changed"><pre>[% group.minus.$i FILTER html %]</pre></td> + [% ELSIF i == group.minus.size %] + [% rowspan = group.plus.size - group.minus.size %] + <td class="num"[% IF rowspan > 1 %] rowspan="[% rowspan FILTER none %]"[% END %]></td> + <td class="changed"[% IF rowspan > 1 %] rowspan="[% rowspan FILTER none %]"[% END %]></td> + [% END %] + + [% IF i < group.plus.size %] + <td class="num">[% current_line_new + i %]</td> + <td class="changed"><pre>[% group.plus.$i FILTER html %]</pre></td> + [% ELSIF i == group.plus.size %] + [% rowspan = group.minus.size - group.plus.size %] + <td class="num"[% IF rowspan > 1 %] rowspan="[% rowspan FILTER none %]"[% END %]></td> + <td class="changed"[% IF rowspan > 1 %] rowspan="[% rowspan FILTER none %]"[% END %]></td> + [% END %] + </tr> + [% currentloop = currentloop + 1 %] + [% i = i + 1 %] + [% END %] + [% END %] + [% current_line_old = current_line_old + group.minus.size %] + [% current_line_new = current_line_new + group.plus.size %] + [% ELSE %] + [% FOREACH line = group.plus %] + [% IF file.is_add %] + <tr> + <td class="num">[% current_line_new %]</td> + <td class="added" colspan="3"><pre>[% line FILTER html %]</pre></td> + </tr> + [% ELSE %] + <tr> + [% IF loop.first %] + <td class="num"[% IF group.plus.size > 1 %] rowspan="[% group.plus.size %]"[% END %]></td> + <td[% IF group.plus.size > 1 %] rowspan="[% group.plus.size %]"[% END %]></td> + [% END %] + <td class="num">[% current_line_new %]</td> + <td class="added"><pre>[% line FILTER html %]</pre></td> + </tr> + [% END %] + [% current_line_new = current_line_new + 1 %] + [% END %] + [% END %] + [% ELSE %] + [% IF group.minus.size %] + [% FOREACH line = group.minus %] + [% IF file.is_remove %] + <tr> + <td class="num">[% current_line_old %]</td> + <td class="removed" colspan="3"><pre>[% line FILTER html %]</pre></td> + </tr> + [% ELSE %] + <tr> + <td class="num">[% current_line_old %]</td> + <td class="removed"><pre>[% line FILTER html %]</pre></td> + [% IF loop.first %] + <td class="num"[% IF group.minus.size > 1 %] rowspan="[% group.minus.size %]"[% END %]></td> + <td[% IF group.minus.size > 1 %] rowspan="[% group.minus.size %]"[% END %]></td> + [% END %] + </tr> + [% END %] + [% current_line_old = current_line_old + 1 %] + [% END %] + [% END %] + [% END %] + [% END %] +[% END %] + +</table> diff --git a/template/en/default/attachment/diff-footer.html.tmpl b/template/en/default/attachment/diff-footer.html.tmpl new file mode 100644 index 0000000..49c662a --- /dev/null +++ b/template/en/default/attachment/diff-footer.html.tmpl @@ -0,0 +1,35 @@ +[%# 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> + #%] + +</form> + +[% IF headers %] + + <br> + + [% PROCESS global/variables.none.tmpl %] + <span>Return to [% "$terms.bug $bugid" FILTER bug_link(bugid) FILTER none %]</span> + + [% PROCESS global/footer.html.tmpl %] + +[% ELSE %] +</body> +</html> +[% END %] diff --git a/template/en/default/attachment/diff-header.html.tmpl b/template/en/default/attachment/diff-header.html.tmpl new file mode 100644 index 0000000..663d9b7 --- /dev/null +++ b/template/en/default/attachment/diff-header.html.tmpl @@ -0,0 +1,153 @@ +[%# 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 %]&action=edit[% END %] +[% BLOCK diffurl %][% PROCESS viewurl %]&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/create_attachment.css'] %] +[% ELSE %] + <html> + <head> + <link href="skins/standard/create_attachment.css" rel="stylesheet" type="text/css"> + <script src="js/attachment.js" 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 %]&context=[% context FILTER url_quote %]&collapsed=[% collapsed FILTER url_quote %]&headers=[% headers FILTER url_quote %]&format=raw">Raw 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 %]&newid=[% newid %]&action=interdiff&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 %]&headers=[% headers FILTER url_quote %]">Patch</a> / + [% END %] + [% IF context == "file" %] + <strong>File</strong> / + [% ELSE %] + <a href="[% PROCESS diffurl id=attachid %]&headers=[% headers FILTER url_quote %]&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"> + + diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl new file mode 100644 index 0000000..fa8a53a --- /dev/null +++ b/template/en/default/attachment/edit.html.tmpl @@ -0,0 +1,289 @@ +[%# 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): Myk Melez <myk@mozilla.org> + # Frédéric Buclin <LpSolit@gmail.com> + #%] + +[% PROCESS global/variables.none.tmpl %] + +[%# Define strings that will serve as the title and header of this page %] +[% title = BLOCK %] + Attachment [% attachment.id %] Details for [% terms.Bug %] [%+ attachment.bug_id %] +[% END %] +[% header = BLOCK %] + Attachment [% attachment.id %] Details for + [%+ "$terms.Bug ${attachment.bug_id}" FILTER bug_link(attachment.bug_id) FILTER none %] +[% END %] +[% subheader = BLOCK %][% attachment.bug.short_desc FILTER html %][% END %] + +[% PROCESS global/header.html.tmpl + title = title + header = header + subheader = subheader + doc_section = "attachments.html" + javascript_urls = ['js/attachment.js'] + style_urls = ['skins/standard/create_attachment.css'] +%] + +[%# No need to display the Diff button and iframe if the attachment is not a patch. %] +[% use_patchviewer = (feature_enabled('patch_viewer') && attachment.ispatch) %] +[% can_edit = attachment.validate_can_edit %] +[% editable_or_hide = can_edit ? "" : " bz_hidden_option" %] + +<form method="post" action="attachment.cgi" onsubmit="normalizeComments();"> + <input type="hidden" name="id" value="[% attachment.id %]"> + <input type="hidden" name="action" value="update"> + <input type="hidden" name="contenttypemethod" value="manual"> + <input type="hidden" name="delta_ts" value="[% attachment.modification_time FILTER html %]"> + [% IF user.id %] + <input type="hidden" name="token" value="[% issue_hash_token([attachment.id, attachment.modification_time]) FILTER html %]"> + [% END %] + + <table class="attachment_info" width="100%"> + + <tr> + <td id="attachment_attributes"> + <div id="attachment_description"> + <label for="description">Description:</label> + [% INCLUDE global/textarea.html.tmpl + id = 'description' + name = 'description' + minrows = 3 + cols = 25 + wrap = 'soft' + classes = 'block' _ editable_or_hide + defaultcontent = attachment.description + %] + [% IF !can_edit %] + [%+ attachment.description FILTER wrap_comment(25) FILTER html %] + [% END %] + </div> + + [% IF attachment.isurl %] + <input type="hidden" name="filename" + value="[% attachment.filename FILTER html %]"> + <input type="hidden" name="contenttypeentry" + value="[% attachment.contenttype FILTER html %]"> + [% ELSE %] + <div id="attachment_filename"> + <label for="filename">Filename:</label> + <input type="text" size="20" class="block[% editable_or_hide %]" + id="filename" name="filename" + value="[% attachment.filename FILTER html %]"> + [% IF !can_edit %] + [%+ attachment.filename FILTER truncate(25) FILTER html %] + [% END %] + </div> + + <div id="attachment_mimetype"> + <label for="contenttypeentry">MIME Type:</label> + <input type="text" size="20" class="block[% editable_or_hide %]" + id="contenttypeentry" name="contenttypeentry" + value="[% attachment.contenttype FILTER html %]"> + [% IF !can_edit %] + [%+ attachment.contenttype FILTER truncate(25) FILTER html %] + [% END %] + </div> + + <div id="attachment_size"> + <span class="label">Size:</span> + [% IF attachment.datasize %] + [%+ attachment.datasize FILTER unitconvert %] + [% ELSE %] + <em>deleted</em> + [% END %] + </div> + + <div id="attachment_creator"> + <span class="label">Creator:</span> + [%+ INCLUDE global/user.html.tmpl who = attachment.attacher %] + </div> + + <div id="attachment_ispatch"> + <input type="checkbox" id="ispatch" name="ispatch" value="1" + [%+ IF !can_edit %]class="bz_hidden_option"[% END %] + [%+ 'checked="checked"' IF attachment.ispatch %]> + [% IF can_edit %] + <label for="ispatch">patch</label> + [% ELSE %] + <span class="label">Is Patch:</span> + [%+ attachment.ispatch ? "yes" : "no" %] + [% END %] + </div> + [% END %] + + <div id="attachment_isobsolete"> + <input type="checkbox" id="isobsolete" name="isobsolete" value="1" + [%+ IF !can_edit %]class="bz_hidden_option"[% END %] + [%+ 'checked="checked"' IF attachment.isobsolete %]> + [% IF can_edit %] + <label for="isobsolete">obsolete</label> + [% ELSE %] + <span class="label">Is Obsolete:</span> + [%+ attachment.isobsolete ? "yes" : "no" %] + [% END %] + </div> + + [% IF user.is_insider %] + <div id="attachment_isprivate"> + <input type="checkbox" id="isprivate" name="isprivate" value="1" + [%+ IF !can_edit %]class="bz_hidden_option"[% END %] + [%+ 'checked="checked"' IF attachment.isprivate %]> + [% IF can_edit %] + <label for="isprivate">private (only visible to + <strong>[% Param('insidergroup') FILTER html %]</strong>) + </label> + [% ELSE %] + <span class="label">Is Private:</span> + [%+ attachment.isprivate ? "yes" : "no" %] + [% END %] + </div> + [% END %] + + [% IF attachment.flag_types.size > 0 %] + <div id="attachment_flags"> + [% PROCESS "flag/list.html.tmpl" bug_id = attachment.bug_id + attach_id = attachment.id + flag_types = attachment.flag_types + read_only_flags = !can_edit + %] + </div> + [% END %] + + [% IF user.id %] + <div id="smallCommentFrame"> + <label for="comment">Comment (on the [% terms.bug %]):</label> + [% INCLUDE global/textarea.html.tmpl + id = 'comment' + name = 'comment' + minrows = 5 + cols = 25 + wrap = 'soft' + classes = 'block' + %] + </div> + + <input type="submit" value="Submit" id="update"><br><br> + [% END %] + </td> + + [% IF !attachment.datasize %] + <td width="75%"><b>The content of this attachment has been deleted.</b></td> + [% ELSIF attachment.isurl %] + <td width="75%"> + <a href="[% attachment.data FILTER html %]"> + [% IF attachment.datasize < 120 %] + [% attachment.data FILTER html %] + [% ELSE %] + [% attachment.data FILTER truncate(80) FILTER html %] + ... + [% attachment.data.match(".*(.{20})$").0 FILTER html %] + [% END %] + </a> + </td> + [% ELSIF !Param("allow_attachment_display") %] + <td id="view_disabled" width="50%"> + <p><b> + The attachment is not viewable in your browser due to security + restrictions enabled by [% terms.Bugzilla %]. + </b></p> + <p><b> + In order to view the attachment, you first have to + <a href="attachment.cgi?id=[% attachment.id %]">download it</a>. + </b></p> + </td> + [% ELSIF attachment.is_viewable %] + <td width="75%"> + [% INCLUDE global/textarea.html.tmpl + id = 'editFrame' + name = 'comment' + style = 'height: 400px; width: 100%; display: none' + minrows = 10 + cols = 80 + wrap = 'soft' + defaultcontent = (attachment.contenttype.match('^text\/')) ? + attachment.data.replace('(.*\n|.+)', '>$1') : undef + %] + <iframe id="viewFrame" src="attachment.cgi?id=[% attachment.id %]" style="height: 400px; width: 100%;"> + <b>You cannot view the attachment while viewing its details because your browser does not support IFRAMEs. + <a href="attachment.cgi?id=[% attachment.id %]">View the attachment on a separate page</a>.</b> + </iframe> + <script type="text/javascript"> + <!-- + var patchviewerinstalled = 0; + var attachment_id = [% attachment.id %]; + if (typeof document.getElementById == "function") { +[% IF use_patchviewer %] + var patchviewerinstalled = 1; + document.write('<iframe id="viewDiffFrame" style="height: 400px; width: 100%; display: none;"><\/iframe>'); +[% END %] + document.write('<button type="button" id="editButton" onclick="editAsComment(patchviewerinstalled);">Edit Attachment As Comment<\/button>'); + document.write('<button type="button" id="undoEditButton" onclick="undoEditAsComment(patchviewerinstalled);" style="display: none;">Undo Edit As Comment<\/button>'); + document.write('<button type="button" id="redoEditButton" onclick="redoEditAsComment(patchviewerinstalled);" style="display: none;">Redo Edit As Comment<\/button>'); +[% IF use_patchviewer %] + document.write('<button type="button" id="viewDiffButton" onclick="viewDiff(attachment_id, patchviewerinstalled);">View Attachment As Diff<\/button>'); +[% END %] + document.write('<button type="button" id="viewRawButton" onclick="viewRaw(patchviewerinstalled);" style="display: none;">View Attachment As Raw<\/button>'); + } + //--> + </script> + </td> + [% ELSE %] + <td id="noview" width="50%"> + <p><b> + Attachment is not viewable in your browser because its MIME type + ([% attachment.contenttype FILTER html %]) is not one that your browser is + able to display. + </b></p> + <p><b> + <a href="attachment.cgi?id=[% attachment.id %]">Download the attachment</a>. + </b></p> + </td> + [% END %] + </tr> + </table> +</form> + +<div id="attachment_actions"> + <span class="label">Actions:</span> + <a href="attachment.cgi?id=[% attachment.id %]">View</a> + [% IF use_patchviewer %] + | <a href="attachment.cgi?id=[% attachment.id %]&action=diff">Diff</a> + [% END %] + [% IF Param("allow_attachment_deletion") + && user.in_group('admin') + && attachment.datasize > 0 %] + | <a href="attachment.cgi?id=[% attachment.id %]&action=delete">Delete</a> + [% END %] +</div> + +<div id="attachment_list"> + Attachments on [% "$terms.bug ${attachment.bug_id}" FILTER bug_link(attachment.bug_id) FILTER none %]: + [% FOREACH a = attachments %] + [% IF a == attachment.id %] + [%+ a %] + [% ELSE %] + <a href="attachment.cgi?id=[% a %]&action=edit">[% a %]</a> + [% END %] + [% " |" UNLESS loop.last() %] + [% END %] +</div> + +[% Hook.process('end') %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl new file mode 100644 index 0000000..6453b4e --- /dev/null +++ b/template/en/default/attachment/list.html.tmpl @@ -0,0 +1,151 @@ +[%# 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): Myk Melez <myk@mozilla.org> + # Frédéric Buclin <LpSolit@gmail.com> + #%] + +<script type="text/javascript"> +<!-- +function toggle_display(link) { + var table = document.getElementById("attachment_table"); + // Store current height for scrolling later + var originalHeight = table.offsetHeight; + var rows = YAHOO.util.Dom.getElementsByClassName( + 'bz_tr_obsolete', 'tr', table); + + for (var i = 0; i < rows.length; i++) { + bz_toggleClass(rows[i], 'bz_default_hidden'); + } + + if (YAHOO.util.Dom.hasClass(rows[0], 'bz_default_hidden')) { + link.innerHTML = "Show Obsolete"; + } + else { + link.innerHTML = "Hide Obsolete"; + } + + var newHeight = table.offsetHeight; + // This scrolling makes the window appear to not move at all. + window.scrollBy(0, newHeight - originalHeight); + + return false; +} +//--> +</script> + +<br> +<table id="attachment_table" cellspacing="0" cellpadding="4"> + <tr> + <th colspan="[% show_attachment_flags ? 3 : 2 %]" align="left"> + <a name="a0" id="a0">Attachments</a> + </th> + </tr> + + [% count = 0 %] + [% obsolete_attachments = 0 %] + + [% FOREACH attachment = attachments %] + [% count = count + 1 %] + [% IF !attachment.isprivate || user.is_insider || attachment.attacher.id == user.id %] + [% IF attachment.isobsolete %] + [% obsolete_attachments = obsolete_attachments + 1 %] + [% END %] + <tr class="[% "bz_contenttype_" _ attachment.contenttype + FILTER css_class_quote UNLESS attachment.isurl %] + [% " bz_patch" IF attachment.ispatch %] + [% " bz_url" IF attachment.isurl %] + [% " bz_private" IF attachment.isprivate %] + [% " bz_tr_obsolete bz_default_hidden" + IF attachment.isobsolete %]"> + <td valign="top"> + [% IF attachment.datasize %] + <a name="a[% count %]" href="attachment.cgi?id=[% attachment.id %]" + title="View the content of the attachment"> + [% END %] + <b>[% attachment.description FILTER html FILTER obsolete(attachment.isobsolete) %]</b> + [% "</a>" IF attachment.datasize %] + + <span class="bz_attach_extra_info"> + [% IF attachment.datasize %] + ([% attachment.datasize FILTER unitconvert %], + [% IF attachment.ispatch %] + patch) + [% ELSIF attachment.isurl %] + url) + [% ELSE %] + [%+ attachment.contenttype FILTER html %]) + [% END %] + [% ELSE %] + (<em>deleted</em>) + [% END %] + + <br> + <a href="#attach_[% attachment.id %]" + title="Go to the comment associated with the attachment"> + [%- attachment.attached FILTER time %]</a>, + + [% INCLUDE global/user.html.tmpl who = attachment.attacher %] + </span> + </td> + + [% IF show_attachment_flags %] + <td class="bz_attach_flags" valign="top"> + [% IF attachment.flags.size == 0 %] + <i>no flags</i> + [% ELSE %] + [% FOREACH flag = attachment.flags %] + [% flag.setter.nick FILTER html %]: + [%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] + [%+ IF flag.status == "?" && flag.requestee %] + ([% flag.requestee.nick FILTER html %]) + [% END %]<br> + [% END %] + [% END %] + </td> + [% END %] + + <td valign="top"> + <a href="attachment.cgi?id=[% attachment.id %]&action=edit">Details</a> + [% IF attachment.ispatch && feature_enabled('patch_viewer') %] + | <a href="attachment.cgi?id=[% attachment.id %]&action=diff">Diff</a> + [% END %] + [% Hook.process("action") %] + </td> + </tr> + [% END %] + [% END %] + + <tr class="bz_attach_footer"> + <td colspan="[% show_attachment_flags ? 3 : 2 %]"> + [% IF attachments.size %] + <span class="bz_attach_view_hide"> + [% IF obsolete_attachments %] + <a href="#a0" onclick="return toggle_display(this);">Show + Obsolete</a> ([% obsolete_attachments %]) + [% END %] + [% IF Param("allow_attachment_display") %] + <a href="attachment.cgi?bugid=[% bugid %]&action=viewall">View All</a> + [% END %] + </span> + [% END %] + <a href="attachment.cgi?bugid=[% bugid %]&action=enter">Add an attachment</a> + (proposed patch, testcase, etc.) + </td> + </tr> +</table> +<br> diff --git a/template/en/default/attachment/midair.html.tmpl b/template/en/default/attachment/midair.html.tmpl new file mode 100644 index 0000000..f0883b5 --- /dev/null +++ b/template/en/default/attachment/midair.html.tmpl @@ -0,0 +1,78 @@ +[%# 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): Myk Melez <myk@mozilla.org> + # Frédéric Buclin <LpSolit@gmail.com> + #%] + +[%# INTERFACE: + # operations: array; bug activity since the user last displayed the attachment form, + # used by bug/activity/table.html.tmpl to display recent changes that will + # be overwritten if the user submits these changes. See that template + # for further documentation. + # attachment: object; the attachment being changed. + #%] + +[%# The global Bugzilla->cgi object is used to obtain form variable values. %] +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS global/variables.none.tmpl %] +[% PROCESS global/header.html.tmpl title = "Mid-air collision!" %] + +<h1>Mid-air collision detected!</h1> + +<p> + Someone else has made changes to + <a href="attachment.cgi?id=[% attachment.id %]&action=edit">attachment [% attachment.id %]</a> + of [% "$terms.bug $attachment.bug_id" FILTER bug_link(attachment.bug_id) FILTER none %] + at the same time you were trying to. The changes made were: +</p> + +<p> + [% PROCESS "bug/activity/table.html.tmpl" incomplete_data=0 %] +</p> + +[% IF cgi.param("comment") %] +<p> + Your comment was:<br> + <blockquote><pre class="bz_comment_text"> + [% cgi.param("comment") FILTER wrap_comment FILTER html %] + </pre></blockquote> +</p> +[% END %] + +<p> +You have the following choices: +</p> + +<ul> + <li> + <form method="post" action="attachment.cgi"> + [% PROCESS "global/hidden-fields.html.tmpl" exclude="^Bugzilla_(login|password)$" %] + <input type="submit" id="process" value="Submit my changes anyway"> + This will cause all of the above changes to be overwritten. + </form> + </li> + <li> + Throw away my changes, and + <a href="attachment.cgi?id=[% attachment.id %]&action=edit">revisit + attachment [% attachment.id %]</a> + </li> +</ul> + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/show-multiple.html.tmpl b/template/en/default/attachment/show-multiple.html.tmpl new file mode 100644 index 0000000..bcc2977 --- /dev/null +++ b/template/en/default/attachment/show-multiple.html.tmpl @@ -0,0 +1,102 @@ +[%# 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): Myk Melez <myk@mozilla.org> + #%] + +[% PROCESS global/variables.none.tmpl %] +[% filtered_summary = bugsummary FILTER html %] +[% header = BLOCK %]View All Attachments for + [%+ "$terms.Bug $bug.id" FILTER bug_link(bug) FILTER none %][% END %] + +[% title = BLOCK %] + View All Attachments for [% terms.Bug %] [%+ bug.bug_id FILTER html %] +[% END %] + +[% PROCESS global/header.html.tmpl + title = title + header = header + subheader = filtered_summary + style_urls = ['skins/standard/create_attachment.css'] +%] + +<br> + +[% FOREACH a = attachments %] + + <div align="center"> + <table class="attachment_info" cellspacing="0" cellpadding="4" border="1" width="75%"> + <tr> + <td valign="top" bgcolor="#cccccc" colspan="6"> + <big><b>Attachment #[% a.id %]</b></big> + </td> + </tr> + <tr> + <td valign="top"> + [% a.description FILTER html FILTER obsolete(a.isobsolete) %] + </td> + + <td valign="top"> + [% IF a.ispatch %] + <i>patch</i> + [% ELSE %] + [% a.contenttype FILTER html %] + [% END %] + </td> + + <td valign="top">[% a.attached FILTER time %]</td> + <td valign="top">[% a.datasize FILTER unitconvert %]</td> + + <td valign="top"> + [% IF a.flags.size == 0 %] + <i>no flags</i> + [% ELSE %] + [% FOREACH flag = a.flags %] + [% flag.setter.nick FILTER html %]: + [%+ flag.type.name FILTER html %][% flag.status %] + [% IF flag.status == "?" && flag.requestee %] + ([% flag.requestee.nick FILTER html %]) + [% END %] + [% ", " IF !loop.last %] + [% END %] + [% END %] + </td> + + <td valign="top"> + <a href="attachment.cgi?id=[% a.id %]&action=edit">Details</a> + </td> + </tr> + </table> + + [% IF a.is_viewable %] + <iframe src="attachment.cgi?id=[% a.id %]" width="75%" height="350"> + <b>You cannot view the attachment on this page because your browser does not support IFRAMEs. + <a href="attachment.cgi?id=[% a.id %]">View the attachment on a separate page</a>.</b> + </iframe> + [% ELSE %] + <p><b> + Attachment cannot be viewed because its MIME type is not text/*, image/*, or application/vnd.mozilla.*. + <a href="attachment.cgi?id=[% a.id %]">Download the attachment instead</a>. + </b></p> + [% END %] + </div> + + <br><br> + +[% END %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/updated.html.tmpl b/template/en/default/attachment/updated.html.tmpl new file mode 100644 index 0000000..9a74f5c --- /dev/null +++ b/template/en/default/attachment/updated.html.tmpl @@ -0,0 +1,46 @@ +[%# 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): Myk Melez <myk@mozilla.org> + # Gervase Markham <gerv@gerv.net> + #%] + +[%# INTERFACE: + # attachment: object of the attachment we just attached. + #%] + +[% PROCESS global/variables.none.tmpl %] +[% bug = bugs.0 %] + +[% PROCESS "bug/show-header.html.tmpl" %] +[% PROCESS global/header.html.tmpl + title = "Changes Submitted to Attachment $attachment.id of $terms.Bug $attachment.bug_id" +%] + +<dl> + <dt>Changes to + <a href="attachment.cgi?id=[% attachment.id %]&action=edit">attachment [% attachment.id %]</a> + of [% "$terms.bug $attachment.bug_id" FILTER bug_link(attachment.bug_id) FILTER none %] submitted + </dt> + <dd> + [% PROCESS "bug/process/bugmail.html.tmpl" mailing_bugid = attachment.bug_id %] + [%# Links to more information about the changed bug. %] + [% Hook.process("links") %] + </dd> +</dl> + +[% PROCESS bug/show.html.tmpl %] |