]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/templates/editpage.tmpl
Generalized "ActionPages". To get LikePage for SomePage, now,
[SourceForge/phpwiki.git] / themes / Portland / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.10 2002-01-28 01:01:27 dairiki Exp $ -->
3 <?php
4 $SummaryInput = HTML::input(array('type' => 'text',
5                                   'class' => 'wikitext',
6                                   'name' => 'summary',
7                                   'size' => 50,
8                                   'value' => $FORMVARS['summary']));
9
10 $MinorEditCb = HTML::input(array('type' => 'checkbox',
11                                  'name' => 'minor_edit',
12                                  'checked' => (bool) $FORMVARS['minor_edit']));
13
14 $PreviewB = HTML::input(array('type' => 'submit',
15                               'class' => 'button',
16                               'name' => 'preview',
17                               'value' => _("Preview")));
18 $SaveB = HTML::input(array('type' => 'submit',
19                            'class' => 'button',
20                            'name' => 'save',
21                            'value' => _("Save")));
22
23 $WidthI = HTML::input(array('type' => 'text',
24                             'size' => 3,
25                             'name' => 'pref[editWidth]',
26                             'value' => $request->getPref('editWidth'),
27                             'onchange' => 'this.form.submit();'));
28
29 $HeightI = HTML::input(array('type' => 'text',
30                              'size' => 3,
31                              'name' => 'pref[editHeight]',
32                              'value' => $request->getPref('editHeight'),
33                              'onchange' => 'this.form.submit();'));
34
35 $AdjustB = $Theme->makeButton(_("Adjust"), "submit:");
36
37
38 $GoodStyleB = $Theme->makeLinkButton(_("GoodStyle"));
39
40
41 $Markup['old'] = new HtmlElement('option', array('value' => 'old'),
42                                 _("Old"));
43 $Markup['new'] = new HtmlElement('option', array('value' => 'new'),
44                                  _("New"));
45 $selected = $FORMVARS['markup'] == 'new' ? 'new' : 'old';
46 $Markup[$selected]->setAttr('selected', true);
47 $MarkupSelect = new HtmlElement('select', array('name' => 'markup'),
48                                 $Markup);
49
50   $s = $Theme->getButtonSeparator();
51 ?>
52
53 <?php /*
54  * FIXME: Hack! 
55  * The funky URL used for the form action parameter is bogus.
56  * This is needed, otherwise the redirect to the real browser
57  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
58  * a redirect from a page to itself.)
59  *
60  * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
61  * to wrap long lines.
62  *
63  */ ?>
64
65 <form method="post" name="editpage"
66       action="<?=WikiURL($page,array('action'=>'edit'))?>"
67       accept-charset="<?=CHARSET?>">
68 <table summary="Toolbar: Save, Preview, and edit warnings." class="toolbar" width="100%"
69        cellpadding="0" cellspacing="0" border="0"><tr align="baseline">
70   <td>
71     <?php if (!$revision->isCurrent()) { ?>
72       <p><strong><?=_("Warning: You are editing an old revision.")?>
73             <?=_("Saving this page will overwrite the current version.")?></strong></p>
74     <?php } ?>
75     <?php if (isset($PREVIEW_CONTENT)) { ?>
76       <p><strong><?=_("Preview only!  Changes not saved.")?></strong></p>
77     <?php } ?>
78   </td>
79   <td align="right"><?= $PreviewB ?><?=$s?><?= $SaveB ?></td></tr>
80   <?php if (isset($PREVIEW_CONTENT)) { ?>
81     <tr><td colspan="2">
82       <hr />
83       <div class="wikitext"><?= $PREVIEW_CONTENT ?></div>
84     </td></tr>
85   <?php } ?>
86 </table>
87 <textarea class="wikiedit"
88           name="content"
89           rows="<?=$request->getPref('editHeight')?>"
90           cols="<?=$request->getPref('editWidth')?>"
91           wrap="virtual"><?=$FORMVARS['content']?></textarea>
92 <br />
93 <?=_("Summary:")?> <?= $SummaryInput ?>
94 <br />
95 <?= fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
96 <br />
97 <?= $MinorEditCb ?>
98 <?= fmt("I'm just doing minor edits. Please divert the usual logging to %s instead.",
99         $Theme->linkExistingWikiWord(_("RecentEdits"))) ?>
100 <br />
101 <p>
102   <?=_("Edit Area Size:")?> <b><?=_("H")?></b>
103   <?=$HeightI?>
104   <b><?=_("W")?></b>
105   <?=$WidthI?>
106   <?=$AdjustB?>
107   <br />
108   Markup Style: <?=$MarkupSelect?>
109 </p>
110 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
111 <p><?= fmt("See %s tips for editing.", $GoodStyleB) ?></p>
112 <div class="wiki-edithelp">
113 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
114 </div>
115 <input type="hidden" name="action" value="save" />
116 <input type="hidden" name="pagename" value="<?=$FORMVARS['pagename']?>" />
117 <input type="hidden" name="editversion" value="<?=$FORMVARS['editversion']?>" />
118 <input type="hidden" name="version" value="<?=$FORMVARS['version']?>" />
119 </form>
120 <hr />