]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/editpage.tmpl
New property in $Theme for customizing the button separator " | ".
[SourceForge/phpwiki.git] / themes / default / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.2 2002-01-18 06:11:38 carstenklapp 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 />
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?>">
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 = Element('input', 
35                           array('type' => 'text',
36                                 'class' => 'wikitext',
37                                 'name' => 'summary',
38                                 'size' => 50,
39                                 'value' => $FORMVARS['summary']));
40
41   $MinorEditCb = Element('input', 
42                          array('type' => 'checkbox',
43                                'name' => 'minor_edit',
44                                'checked' => (bool) $FORMVARS['minor_edit']));
45
46   $PreviewB = Element('input', 
47                       array('type' => 'submit',
48                             'class' => 'button',
49                             'name' => 'preview',
50                             'value' => _("Preview")));
51   $SaveB = Element('input', 
52                    array('type' => 'submit',
53                          'class' => 'button',
54                          'value' => _("Save")));
55
56   if ($user->is_authenticated()) {
57     $UserMsg = sprintf(_("You are signed in as %s."), LinkWikiWord($USERID));
58   } else {
59     $SignInB = $ButtonFactory->makeActionButton('login');         
60     $UserMsg = sprintf(_("Author will be logged as %s."),
61                        QElement('em', $USERID));
62     $UserMsg .= $SignInB->asHTML();
63     $UserMsg .= Element('br');
64     $UserMsg .= QElement('small', '*' . _("backup and reload after signing in"));
65   }
66
67   $s = $Theme->buttonSep
68 ?>
69
70 <div class="toolbar" style="text-align: center;">
71   <?=_("Summary:")?> <?= $SummaryInput ?>
72 </div>
73 <table summary="Toolbar: Page editing options." class="toolbar" width="100%"
74        cellpadding="0" cellspacing="0" border="0"><tr valign="baseline">
75   <td> 
76     <?= $MinorEditCb ?> <?=_("This is a minor change.")?>
77   </td>
78   <td align="center">
79     <?= $PreviewB ?><?=$s?><?= $SaveB ?>
80   </td>
81   <td align="right">
82     <?= $UserMsg ?>
83   </td>
84 </tr></table>
85
86 <div name="#edit-tips"><?php
87   // FIXME: convert this to use the IncludePage plugin.
88   printf(_("You can change the size of the editing area in %s."),
89          LinkExistingWikiWord(_("UserPreferences")));
90   printf(" " . _("See %s tips for editing."),
91          LinkExistingWikiWord(_("GoodStyle")));
92 ?></div>
93
94
95 <hr noshade="noshade" />
96
97 <div class="wiki-edithelp">
98 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
99 </div>
100
101 <input type="hidden" name="action" value="save" />
102 <input type="hidden" name="pagename" value="<?=$FORMVARS['pagename']?>" />
103 <input type="hidden" name="editversion" value="<?=$FORMVARS['editversion']?>" />
104 <input type="hidden" name="version" value="<?=$FORMVARS['version']?>" />
105 </form>
106