]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/templates/editpage.tmpl
Big Template cleanup and refactor.
[SourceForge/phpwiki.git] / themes / Portland / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.8 2002-01-24 00:45:28 dairiki Exp $ -->
3 <?php
4 $SummaryInput = HTML::input(array('type' => 'text',
5                                   'class' => 'wikitext',
6                                   'name' => 'summary',
7                                   'size' => 50,
8                                   'value' => $FORMVARS['summary']));
9
10 $MinorEditCb = HTML::input(array('type' => 'checkbox',
11                                  'name' => 'minor_edit',
12                                  'checked' => (bool) $FORMVARS['minor_edit']));
13
14 $PreviewB = HTML::input(array('type' => 'submit',
15                               'class' => 'button',
16                               'name' => 'preview',
17                               'value' => _("Preview")));
18 $SaveB = HTML::input(array('type' => 'submit',
19                            'class' => 'button',
20                            'name' => 'save',
21                            'value' => _("Save")));
22
23
24
25   $s = $Theme->getButtonSeparator();
26 ?>
27
28 <?php /*
29  * FIXME: Hack! 
30  * The funky URL used for the form action parameter is bogus.
31  * This is needed, otherwise the redirect to the real browser
32  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
33  * a redirect from a page to itself.)
34  *
35  * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
36  * to wrap long lines.
37  *
38  */ ?>
39
40 <form method="post" name="editpage"
41       action="<?=WikiURL($page,array('action'=>'edit'))?>"
42       accept-charset="<?=CHARSET?>">
43 <table summary="Toolbar: Save, Preview, and edit warnings." class="toolbar" width="100%"
44        cellpadding="0" cellspacing="0" border="0"><tr align="baseline">
45   <td>
46     <?php if (!$revision->isCurrent()) { ?>
47       <p><strong><?=_("Warning: You are editing an old revision.")?>
48             <?=_("Saving this page will overwrite the current version.")?></strong></p>
49     <?php } ?>
50     <?php if (isset($PREVIEW_CONTENT)) { ?>
51       <p><strong><?=_("Preview only!  Changes not saved.")?></strong></p>
52     <?php } ?>
53   </td>
54   <td align="right"><?= $PreviewB ?><?=$s?><?= $SaveB ?></td></tr>
55   <?php if (isset($PREVIEW_CONTENT)) { ?>
56     <tr><td colspan="2">
57       <hr />
58       <div class="wikitext"><?= $PREVIEW_CONTENT ?></div>
59     </td></tr>
60   <?php } ?>
61 </table>
62 <textarea class="wikiedit"
63           name="content"
64           rows="<?=$request->getPref('editHeight')?>"
65           cols="<?=$request->getPref('editWidth')?>"
66           wrap="virtual"><?=$FORMVARS['content']?></textarea>
67   <br />
68   <?=_("Summary:")?> <?= $SummaryInput ?>
69   <br />
70   <?= fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
71   <br />
72   <?= $MinorEditCb ?>
73   <?= fmt("I'm just doing minor edits. Please divert the usual logging to %s instead.",
74           $Theme->linkExistingWikiWord(_("RecentEdits"))) ?>
75   <br /><br />
76 <div name="#edit-tips"><?php
77   // FIXME: convert this to use the IncludePage plugin. ?>
78 <?= fmt("See %s tips for editing.",
79         $Theme->linkExistingWikiWord(_("GoodStyle"))) ?>
80 <br />
81 <?= fmt("You can change the size of the editing area in %s.",
82         $Theme->linkExistingWikiWord(_("UserPreferences"))) ?>
83 </div>
84
85 <div class="wiki-edithelp">
86 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
87 </div>
88 <input type="hidden" name="action" value="save" />
89 <input type="hidden" name="pagename" value="<?=$FORMVARS['pagename']?>" />
90 <input type="hidden" name="editversion" value="<?=$FORMVARS['editversion']?>" />
91 <input type="hidden" name="version" value="<?=$FORMVARS['version']?>" />
92 </form>
93 <hr />