]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/editpage.tmpl
Beginning of major template code clean-up and refactor.
[SourceForge/phpwiki.git] / themes / default / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.1 2002-01-17 20:41:13 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 />
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
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="center">
77     <?= $PreviewB ?> | <?= $SaveB ?>
78   </td>
79   <td align="right">
80     <?= $UserMsg ?>
81   </td>
82 </tr></table>
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
93 <hr noshade="noshade" />
94
95 <div class="wiki-edithelp">
96 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
97 </div>
98
99 <input type="hidden" name="action" value="save" />
100 <input type="hidden" name="pagename" value="<?=$FORMVARS['pagename']?>" />
101 <input type="hidden" name="editversion" value="<?=$FORMVARS['editversion']?>" />
102 <input type="hidden" name="version" value="<?=$FORMVARS['version']?>" />
103 </form>
104