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