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