2002-03-29 01:13:55 +00:00
|
|
|
[%#
|
|
|
|
# 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>
|
|
|
|
# %]
|
|
|
|
|
2004-04-30 01:40:40 +00:00
|
|
|
[% is_new = (file.version == "new" ? 1 : 0) %]
|
2005-12-14 16:56:18 +00:00
|
|
|
[% wysiwyg = file.content.search('<\?doctor enable_wysiwyg_mode \?>') %]
|
2002-08-24 01:56:50 +00:00
|
|
|
|
2002-03-29 01:13:55 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
2004-04-30 01:40:40 +00:00
|
|
|
<title>Doctor - [% is_new ? "create" : "edit" %] [%+ file.relative_spec FILTER html %]</title>
|
2004-04-23 01:36:27 +00:00
|
|
|
[% 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>
|
2002-03-29 01:13:55 +00:00
|
|
|
</head>
|
|
|
|
|
2004-04-27 20:52:54 +00:00
|
|
|
<body bgcolor="white" color="black" onload="onLoad();" class="[% "new" IF is_new %]">
|
2002-03-29 01:13:55 +00:00
|
|
|
|
2004-04-27 20:52:54 +00:00
|
|
|
<form id="form" method="post" action="doctor.cgi" enctype="multipart/form-data">
|
2004-04-30 01:40:40 +00:00
|
|
|
<input id="file" type="hidden" name="file" value="[% file.spec FILTER html %]">
|
2004-05-07 02:30:25 +00:00
|
|
|
<input id="version" type="hidden" name="version" value="[% file.version %]">
|
2004-04-27 20:52:54 +00:00
|
|
|
|
2004-05-05 01:32:14 +00:00
|
|
|
<h1>
|
2004-04-27 20:52:54 +00:00
|
|
|
Doctor - [% is_new ? "create" : "edit" %]
|
2004-04-30 01:40:40 +00:00
|
|
|
[%+ IF file.url %]
|
|
|
|
<a href="[% file.url FILTER html %]">[% file.relative_spec FILTER html %]</a>
|
2004-04-27 20:52:54 +00:00
|
|
|
[% ELSE %]
|
2004-04-30 01:40:40 +00:00
|
|
|
[% file.relative_spec FILTER html %]
|
2004-04-27 20:52:54 +00:00
|
|
|
[% END %]
|
2002-05-08 01:49:07 +00:00
|
|
|
|
2004-04-27 20:52:54 +00:00
|
|
|
[% IF !is_new %]
|
2006-04-30 21:03:32 +00:00
|
|
|
v[% file.version FILTER html %]
|
2006-05-02 17:46:07 +00:00
|
|
|
| <a href="doctor.cgi?file=[% file.spec | uri | html %]&action=download">download</a>
|
2004-04-27 20:52:54 +00:00
|
|
|
[% END %]
|
|
|
|
| <label for="content_file">upload:</label>
|
|
|
|
<input id="content_file" type="file" name="content_file">
|
2004-05-05 01:32:14 +00:00
|
|
|
</h1>
|
2004-04-23 01:36:27 +00:00
|
|
|
|
2004-04-27 20:52:54 +00:00
|
|
|
<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>
|
2006-05-10 00:51:04 +00:00
|
|
|
<button id="saveTab" class="tab" type="button" onclick="switchToTab('save');" disabled="disabled">Save Changes</button>
|
2004-04-23 01:36:27 +00:00
|
|
|
</div>
|
2004-04-27 20:52:54 +00:00
|
|
|
|
|
|
|
<div id="panels">
|
|
|
|
<div id="editPanel" class="panel">
|
2004-04-30 01:40:40 +00:00
|
|
|
<textarea id="content" name="content" rows="16" cols="100">[% file.content FILTER html %]</textarea><br>
|
2004-04-27 20:52:54 +00:00
|
|
|
</div>
|
2006-05-02 17:46:07 +00:00
|
|
|
<iframe id="originalPanel" class="panel" src="doctor.cgi?file=[% file.spec | uri | html %]&action=display"></iframe>
|
2004-04-27 20:52:54 +00:00
|
|
|
<div id="modifiedPanel" class="panel"></div>
|
|
|
|
<iframe id="diffPanel" class="panel" name="diffPanel"></iframe>
|
|
|
|
<div id="savePanel" class="panel">
|
2006-05-10 00:51:04 +00:00
|
|
|
<p>
|
|
|
|
<button type="submit" name="action" value="download-diff">Download Diff</button>
|
|
|
|
or commit changes to the repository:
|
|
|
|
</p>
|
2004-04-27 20:52:54 +00:00
|
|
|
<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>
|
2004-04-23 01:36:27 +00:00
|
|
|
</div>
|
2004-04-27 20:52:54 +00:00
|
|
|
|
|
|
|
</form>
|
2002-03-29 01:13:55 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|