+++ /dev/null
-[%# 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 %]
-
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>Rietveld review patch #[% attachment.id %] for [% terms.Bug %] #[% attachment.bug_id %]: [% bugsummary FILTER html %]</title>
-<script type="text/javascript">
-<!--
-/**
- * Handle the postMessage response from Rietveld.
- * The response will be the comments to combine with those left in the
- * comments box.
- */
-function updateComments(e)
-{
- if (e.origin == 'http://wkrietveld.appspot.com') {
- var reviewFormDoc = document.getElementById('reviewFormFrame').
- contentDocument;
- // Add the Rietveld comments to the comments field.
- if (e.data) {
- var commentBox = reviewFormDoc.getElementById('comment');
-
- if (commentBox.value)
- commentBox.value += '\n---------------------------------\n';
- commentBox.value += e.data;
- }
- reviewFormDoc.forms[0].submit();
- }
-}
-
-/**
- * Fetch comments from Rietveld via postMessage.
- */
-function getComments()
-{
- document.getElementById('rietveldFrame').contentWindow.
- postMessage('publish', 'http://wkrietveld.appspot.com');
-}
-
-// Listen for messages from Rietveld.
-if (window.postMessage)
- window.addEventListener("message", updateComments, false);
-else
- alert('Error: Please load this page in a browser that supports postMessage');
-//-->
-</script>
-
-[% IF !user.login %]
-[%# We shouldn't ever hit this, since all links to this page use GoAheadAndLogIn.
- This is just here as a safeguard if anyone directly navigates to it. %]
-Please log in and refresh this page.
-[% ELSE %]
-<frameset rows="80%,20%">
-<frame id=rietveldFrame src="http://wkrietveld.appspot.com/[% attachment.bug_id %]?email=[% user.login %]">
-<frame id=reviewFormFrame src="attachment.cgi?id=[% attachment.id %]&action=reviewform&rietveldreview=true">
-</frameset>
-[% END %]
+++ /dev/null
-[%# 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>
- #%]
-
-[% IF user.id AND !read_only_flags %]
-
-[%# We list flags by looping twice over the flag types relevant for the bug.
- # In the first loop, we display existing flags and then, for active types,
- # we display UI for adding new flags. In the second loop, we display UI
- # for adding additional new flags for those types for which a flag already
- # exists but which are multiplicable (can have multiple flags of the type
- # on a single bug/attachment).
- #%]
-
-[% DEFAULT flag_table_id = "flags" %]
-
-<script src="[% 'js/flag.js' FILTER mtime %]" type="text/javascript"></script>
-
-<table id="[% flag_table_id FILTER html %]">
- [% UNLESS flag_no_header %]
- <tr>
- <th colspan="3">
- Flags:
- </th>
- [% IF any_flags_requesteeble %]
- <th>
- Requestee:
- </th>
- [% END %]
- </tr>
- [% END %]
-
- [%# Step 1: Display every flag type (except inactive types with no flags). %]
- [% FOREACH type = flag_types -%]
-
- [%-# Step 1a: Display existing flag(s). %]
- [% FOREACH flag = type.flags %]
-[%# if WEBKIT_CHANGES %]
- [% IF type.name == 'in-rietveld' %]
- <tr style='display:none'>
- [% ELSE %]
- <tr>
- [% END %]
-[%# endif // WEBKIT_CHANGES %]
- <td>
- <span title="[% flag.setter.identity FILTER html %]">[% flag.setter.nick FILTER html %]</span>:
- </td>
- <td>
- <label title="[% type.description FILTER html %]"
- for="flag-[% flag.id %]">
- [%- type.name FILTER html FILTER no_break -%]</label>
- </td>
- <td>
- <select id="flag-[% flag.id %]" name="flag-[% flag.id %]"
- title="[% type.description FILTER html %]"
- onchange="toggleRequesteeField(this);"
- class="flag_select flag_type-[% type.id %]">
- [%# Only display statuses the user is allowed to set. %]
- [% IF user.can_request_flag(type) || flag.setter_id == user.id %]
- <option value="X"></option>
- [% END %]
- [% IF type.is_active %]
- [% IF (type.is_requestable && user.can_request_flag(type)) || flag.status == "?" %]
- <option value="?" [% "selected" IF flag.status == "?" %]>?</option>
- [% END %]
- [% IF user.can_set_flag(type) || flag.status == "+" %]
- <option value="+" [% "selected" IF flag.status == "+" %]>+</option>
- [% END %]
- [% IF user.can_set_flag(type) || flag.status == "-" %]
- <option value="-" [% "selected" IF flag.status == "-" %]>-</option>
- [% END %]
- [% ELSE %]
- <option value="[% flag.status %]" selected="selected">[% flag.status %]</option>
- [% END %]
- </select>
- </td>
- [% IF any_flags_requesteeble %]
- <td>
- [% IF (type.is_active && type.is_requestable && type.is_requesteeble) || flag.requestee %]
- <span style="white-space: nowrap;">
- [% SET flag_custom_list = [] %]
- [% IF Param('usemenuforusers') %]
- [% flag_custom_list = flag.type.grant_list %]
- [% IF !(type.is_active && type.is_requestable && type.is_requesteeble) %]
- [%# We are here only because there was already a requestee. In this case,
- the only valid action is to remove the requestee or leave it alone;
- nothing else. %]
- [% flag_custom_list = [flag.requestee] %]
- [% END %]
- [% END %]
- [% INCLUDE global/userselect.html.tmpl
- name => "requestee-$flag.id"
- id => "requestee-$flag.id"
- value => flag.requestee.login
- multiple => 0
- emptyok => 1
- classes => ["requestee"]
- custom_userlist => flag_custom_list
- %]
- </span>
- [% END %]
- </td>
- [% END %]
- </tr>
- [% END -%]
-
- [%-# Step 1b: Display UI for setting flag. %]
- [% IF (!type.flags || type.flags.size == 0) && type.is_active %]
-
- [% PROCESS flag_row first_cell_empty = 1 addl_text = "" %]
- [% END %]
- [% END %]
-
- [%# Step 2: Display flag type again (if type is multiplicable). %]
- [% FOREACH type = flag_types %]
- [% NEXT UNLESS type.flags && type.flags.size > 0 && type.is_multiplicable && type.is_active %]
- [% IF !separator_displayed %]
- <tr><td colspan="3"><hr></td></tr>
- [% separator_displayed = 1 %]
- [% END %]
-
- [% PROCESS flag_row first_cell_empty = 0 addl_text = "addl." %]
- [% END %]
-</table>
-
-[% ELSE %]
- [%# The user is logged out. Display flags as read-only. %]
- [% header_displayed = 0 %]
- [% FOREACH type = flag_types %]
- [% FOREACH flag = type.flags %]
- [% IF !flag_no_header AND !header_displayed %]
- <p><b>Flags:</b></p>
- [% header_displayed = 1 %]
- [% END %]
- [% IF flag.setter.name %]
- <span title="[% flag.setter.name FILTER html %]">[% flag.setter.nick FILTER html %]</span>:
- [% ELSE %]
- [% flag.setter.nick FILTER html %]:
- [% END %]
- [%+ type.name FILTER html FILTER no_break %][% flag.status %]
- [% IF flag.requestee %]
- [% IF flag.requestee.name %]
- (<span title="[% flag.requestee.name FILTER html %]">[% flag.requestee.nick FILTER html %]</span>)
- [% ELSE %]
- ([% flag.requestee.nick FILTER html %])
- [% END %]
- [% END %]<br>
- [% END %]
- [% END %]
-[% END %]
-
-[%# Display a table row for unset flags %]
-
-[% BLOCK flag_row %]
-[%# if WEBKIT_CHANGES %]
- [% IF type.name == 'in-rietveld' %]
- <tr style='display:none'>
- [% ELSE %]
- <tr>
- [% END %]
-[%# endif // WEBKIT_CHANGES %]
- [% IF first_cell_empty %]
- <td> </td>
- <td>
- [% ELSE %]
- <td colspan="2">
- [% END %]
-
- [% addl_text FILTER html %]
- <label title="[% type.description FILTER html %]" for="flag_type-[% type.id %]">
- [%- type.name FILTER html FILTER no_break %]</label>
- </td>
- <td>
- <select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
- title="[% type.description FILTER html %]"
- [% " disabled=\"disabled\"" UNLESS (type.is_requestable && user.can_request_flag(type)) || user.can_set_flag(type) %]
- onchange="toggleRequesteeField(this);"
- class="flag_select flag_type-[% type.id %]">
- <option value="X"></option>
- [% IF type.is_requestable && user.can_request_flag(type) %]
- <option value="?">?</option>
- [% END %]
- [% IF user.can_set_flag(type) %]
- <option value="+">+</option>
- <option value="-">-</option>
- [% END %]
- </select>
- </td>
- [% IF any_flags_requesteeble %]
- <td>
- [% IF type.is_requestable && type.is_requesteeble %]
- <span style="white-space: nowrap;">
- [% SET grant_list = [] %]
- [% IF Param('usemenuforusers') %]
- [% grant_list = type.grant_list %]
- [% END %]
- [% INCLUDE global/userselect.html.tmpl
- name => "requestee_type-$type.id"
- id => "requestee_type-$type.id"
- multiple => type.is_multiplicable * 3
- emptyok => !type.is_multiplicable
- value => ""
- custom_userlist => grant_list
- classes => ["requestee"]
- %]
-
- </span>
- [% END %]
- </td>
- [% END %]
- </tr>
-[% END %]