mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 20:17:37 +00:00
131 lines
5.4 KiB
Cheetah
131 lines
5.4 KiB
Cheetah
[%#
|
|
# 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 Doctor.
|
|
#
|
|
# The Initial Developer of the Original Code is Netscape
|
|
# Communications Corporation. Portions created by Netscape
|
|
# are Copyright (C) 2002 Netscape Communications Corporation.
|
|
# All Rights Reserved.
|
|
#
|
|
# Contributor(s): Myk Melez <myk@mozilla.org>
|
|
# %]
|
|
|
|
[% is_new = (file.version == "new" ? 1 : 0) %]
|
|
[% wysiwyg = file.content.search('<\?doctor enable_wysiwyg_mode \?>') %]
|
|
|
|
<html>
|
|
|
|
<head>
|
|
<title>Doctor - [% is_new ? "create" : "edit" %] [%+ file.relative_spec FILTER html %]</title>
|
|
[% IF wysiwyg %]
|
|
<script type="text/javascript">
|
|
_editor_url = "/htmlarea/";
|
|
_editor_lang = "en";
|
|
wysiwyg = true;
|
|
</script>
|
|
<script type="text/javascript" src="htmlarea/htmlarea.js"></script>
|
|
<script type="text/javascript">
|
|
HTMLArea.loadPlugin("FullPage");
|
|
</script>
|
|
[% ELSE %]
|
|
<script type="text/javascript">
|
|
wysiwyg = false;
|
|
</script>
|
|
[% END %]
|
|
<script type="text/javascript" src="doctor.js"></script>
|
|
<link rel="stylesheet" href="doctor.css" type="text/css"></link>
|
|
</head>
|
|
|
|
<body bgcolor="white" color="black" onload="onLoad();" class="[% "new" IF is_new %]">
|
|
|
|
<form id="form" method="post" action="doctor.cgi" enctype="multipart/form-data">
|
|
<input id="file" type="hidden" name="file" value="[% file.spec FILTER html %]">
|
|
<input id="version" type="hidden" name="version" value="[% file.version %]">
|
|
|
|
<h1>
|
|
Doctor - [% is_new ? "create" : "edit" %]
|
|
[%+ IF file.url %]
|
|
<a href="[% file.url FILTER html %]">[% file.relative_spec FILTER html %]</a>
|
|
[% ELSE %]
|
|
[% file.relative_spec FILTER html %]
|
|
[% END %]
|
|
|
|
[% IF !is_new %]
|
|
v[% file.version FILTER html %]
|
|
| <a href="doctor.cgi?file=[% file.spec | uri | html %]&action=download">download</a>
|
|
[% END %]
|
|
| <label for="content_file">upload:</label>
|
|
<input id="content_file" type="file" name="content_file">
|
|
</h1>
|
|
|
|
<div id="tabs">
|
|
<button id="editTab" class="tab [% "wysiwyg" IF wysiwyg %]"
|
|
type="button" onclick="switchToTab('edit');" disabled="disabled">Edit</button>
|
|
<button id="hackTab" class="tab" type="button" onclick="switchToTab('hack');" disabled="disabled">Edit Source</button>
|
|
<button id="originalTab" class="tab" type="button" onclick="switchToTab('original');" disabled="disabled">View Original</button>
|
|
<button id="modifiedTab" class="tab" type="button" onclick="switchToTab('modified');" disabled="disabled">View Edited</button>
|
|
<button id="diffTab" class="tab" type="button" onclick="switchToTab('diff');" disabled="disabled">Show Diff</button>
|
|
<button id="saveTab" class="tab" type="button" onclick="switchToTab('save');" disabled="disabled">Save Changes</button>
|
|
</div>
|
|
|
|
<div id="panels">
|
|
<div id="editPanel" class="panel">
|
|
<textarea id="content" name="content" rows="16" cols="100">[% file.content FILTER html %]</textarea><br>
|
|
</div>
|
|
<iframe id="originalPanel" class="panel" src="doctor.cgi?file=[% file.spec | uri | html %]&action=display"></iframe>
|
|
<div id="modifiedPanel" class="panel"></div>
|
|
<iframe id="diffPanel" class="panel" name="diffPanel"></iframe>
|
|
<div id="savePanel" class="panel">
|
|
<p>
|
|
<button type="submit" name="action" value="download-diff">Download Diff</button>
|
|
or commit changes to the repository:
|
|
</p>
|
|
<label for="comment">Comment:</label><br>
|
|
<textarea rows="5" cols="80" name="comment"></textarea>
|
|
<table id="submit-changes">
|
|
<tr>
|
|
<th><label for="username">Username:</label></th>
|
|
<td><input type="text" name="username" size="20"></td>
|
|
</tr>
|
|
<tr>
|
|
<th><label for="password">Password:</label></th>
|
|
<td><input type="password" name="password" size="20"></td>
|
|
</tr>
|
|
<tr>
|
|
<th> </th>
|
|
<td><button type="submit" name="action" value="[% is_new ? "create" : "commit" %]">Commit</button></td>
|
|
</tr>
|
|
</table>
|
|
[% IF config.EDITOR_EMAIL %]
|
|
<table id="submit-review">
|
|
<tr>
|
|
<td colspan="2">Don't have commit privileges?</td>
|
|
</tr>
|
|
<tr>
|
|
<th><label for="email">Your Email:</label></th>
|
|
<td><input type="text" name="email" size="30"></td>
|
|
</tr>
|
|
<tr>
|
|
<th> </th>
|
|
<td><button type="submit" name="action" value="queue">Submit for Review</button></td>
|
|
</tr>
|
|
</table>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</body>
|
|
|
|
</html>
|