]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Wordpress/templates/editpage.tmpl
support edit_toolbar in other themes
[SourceForge/phpwiki.git] / themes / Wordpress / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.2 2004-06-03 12:30:38 rurban Exp $ -->
3 <?php
4
5 $WidthI = HTML::input(array('type' => 'text',
6                             'size' => 3,
7                             'maxlength' => 4,
8                             'class' => "numeric",
9                             'name' => 'pref[editWidth]',
10                             'value' => $request->getPref('editWidth'),
11                             'onchange' => 'this.form.submit();'));
12
13 $HeightI = HTML::input(array('type' => 'text',
14                              'size' => 3,
15                              'maxlength' => 4,
16                              'class' => "numeric",
17                              'name' => 'pref[editHeight]',
18                              'value' => $request->getPref('editHeight'),
19                              'onchange' => 'this.form.submit();'));
20
21 $s = $Theme->getButtonSeparator();
22 ?>
23
24 <?php /*
25  * FIXME: Hack! 
26  * The funky URL used for the form action parameter is bogus.
27  * This is needed, otherwise the redirect to the real browser
28  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
29  * a redirect from a page to itself.)
30  */ ?>
31
32 <div class="wikitext" id="editform">
33 <form method="post" name="editpage" id="editpage"
34       action="<?= $request->getPostURL() ?>"
35       accept-charset="<?=CHARSET?>">
36   <?php if (!empty($_GET['start_debug'])) echo '<input type="hidden" name="start_debug" value="1" >'; ?>
37 <table summary="Toolbar: Save, Preview, and edit warnings." class="toolbar" width="100%"
38        cellpadding="0" cellspacing="0" border="0">
39 <tr align="bottom">
40   <td>
41     <?= $PAGE_LOCKED_MESSAGE ?>
42     <?= $CONCURRENT_UPDATE_MESSAGE ?>
43     <?php if (!$IS_CURRENT) { ?>
44       <p><strong><?=_("Warning: You are editing an old revision.")?>
45             <?=_("Saving this page will overwrite the current version.")?></strong></p>
46     <?php } ?>
47   </td>
48   <td>
49     <?= $PREVIEW_B ?>
50     <?php if ($SAVE_B) { ?>
51       <?=$s?> <?= $SAVE_B ?>
52     <?php } ?>
53   </td>
54 </tr>
55 </table>
56 <table width="100%">
57     <tr><td><?= $EDIT_TOOLBAR ?></td>
58         <td align="right"><div id="editarea-size">
59     <?=_("Size").':'?>
60     <b><?=_("H")?></b> <?=$HeightI?>
61     <b><?=_("W")?></b> <?=$WidthI?>
62     <noscript><?=Button("submit:", _("Adjust"), 'wikiaction')?></noscript>
63   </div></td></tr></table>
64 <br />
65   <?=$OLD_MARKUP_CB?>  <?=_("Use old markup")?>
66 </p>
67 <a name="editarea" id="editarea"><?=$EDIT_TEXTAREA?></a>
68 <br />
69 <?=_("Summary")?>: <?= $SUMMARY_INPUT ?>
70 <br />
71 <?= fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
72 <br />
73 <?= $MINOR_EDIT_CB ?>
74 <?= fmt("I'm just doing minor edits. Please divert the usual logging to %s instead.",
75         WikiLink(_("RecentEdits"))) ?>
76 <br />
77
78 <?php if (isset($PREVIEW_CONTENT)) { ?>
79   <hr />
80   <p><strong><?=_("Preview only!  Changes not saved.")?></strong></p>
81   <?= $PREVIEW_CONTENT ?>
82   <hr />
83 <?php } ?>
84
85 <script language="JavaScript1.3" type="text/javascript">
86 <!--
87 function showOldMarkupRules(show) {
88   if (document.getElementById) {
89     if (!show) {
90       document.getElementById('newMarkup').style.display="block";
91       document.getElementById('oldMarkup').style.display="none";
92     } else {
93       document.getElementById('newMarkup').style.display="none";
94       document.getElementById('oldMarkup').style.display="block";
95     }
96   }
97 }
98 // -->
99 </script>
100
101 <div id="oldMarkup" class="wiki-edithelp">
102 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
103 <p><?= fmt("See %s tips for editing.", WikiLink(_("GoodStyle"))) ?></p>
104 <?plugin IncludePage page=_("OldTextFormattingRules") section=_("Synopsis") quiet=1?>
105 </div>
106 <div id="newMarkup" class="wiki-edithelp">
107 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
108 <p><?= fmt("See %s tips for editing.", WikiLink(_("GoodStyle"))) ?></p>
109 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
110 </div>
111 <?=$HIDDEN_INPUTS?>
112 </form>
113 </div>
114
115 <script language="JavaScript1.3" type="text/javascript">
116 <!--
117 if (document.getElementById) {
118   showOldMarkupRules(document.getElementById('useOldMarkup').checked);
119 }
120 // -->
121 </script>
122
123 <hr />