]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/templates/editpage.tmpl
moved toolbar, customized editpage.
[SourceForge/phpwiki.git] / themes / Portland / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.1 2002-01-19 23:38:47 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 (isset($PREVIEW_CONTENT)) { ?>
51       <p><strong><?=_("Preview only!  Changes not saved.")?></strong></p>
52       <div class="wikitext"><?= $PREVIEW_CONTENT ?></div>
53     <?php } ?>
54
55     <?php if (!$IS_CURRENT) { ?>
56       <p><strong><?=_("Warning: You are editing an old revision.")?>
57             <?=_("Saving this page will overwrite the current version.")?></strong></p>
58     <?php } ?>
59 </td>
60   <td align="right"><?= $PreviewB ?><?=$s?><?= $SaveB ?></td></tr>
61 </table>
62 <textarea class="wikiedit"
63           name="content"
64           rows="<?=$EDIT_AREA_HEIGHT?>"
65           cols="<?=$EDIT_AREA_WIDTH?>"
66           wrap="virtual"><?=$FORMVARS['content']?></textarea>
67
68 <div class="toolbar" style="text-align: center;">
69   <?=_("Summary:")?> <?= $SummaryInput ?>
70 </div>
71 <table summary="Toolbar: Page editing options." class="toolbar" width="100%"
72        cellpadding="0" cellspacing="0" border="0"><tr valign="baseline">
73   <td> 
74     <?= $MinorEditCb ?> <?=_("This is a minor change.")?>
75   </td>
76   <td align="right">
77     <?php printf(_("Author will be logged as %s."),
78                  QElement('em', $USERID)); ?>
79   </td>
80 </tr></table>
81
82 <hr />
83
84 <div name="#edit-tips"><?php
85   // FIXME: convert this to use the IncludePage plugin.
86   printf(_("You can change the size of the editing area in %s."),
87          LinkExistingWikiWord(_("UserPreferences")));
88   printf(" " . _("See %s tips for editing."),
89          LinkExistingWikiWord(_("GoodStyle")));
90 ?></div>
91
92 <div class="wiki-edithelp">
93 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
94 </div>
95
96 <input type="hidden" name="action" value="save" />
97 <input type="hidden" name="pagename" value="<?=$FORMVARS['pagename']?>" />
98 <input type="hidden" name="editversion" value="<?=$FORMVARS['editversion']?>" />
99 <input type="hidden" name="version" value="<?=$FORMVARS['version']?>" />
100 </form>
101 <hr />