]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/editpage.tmpl
edit_toolbar fixes
[SourceForge/phpwiki.git] / themes / default / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.44 2004-06-01 15:23:10 rurban Exp $ -->
3 <?php
4 $WidthI = HTML::input(array('type' => 'text',
5                             'size' => 3,
6                             'maxlength' => 4,
7                             'class' => "numeric",
8                             'name' => 'pref[editWidth]',
9                             'value' => $request->getPref('editWidth'),
10                             'onchange' => 'this.form.submit();'));
11
12 $HeightI = HTML::input(array('type' => 'text',
13                              'size' => 3,
14                              'maxlength' => 4,
15                              'class' => "numeric",
16                              'name' => 'pref[editHeight]',
17                              'value' => $request->getPref('editHeight'),
18                              'onchange' => 'this.form.submit();'));
19
20 $s = $Theme->getButtonSeparator();
21 ?>
22
23 <?php if (isset($PREVIEW_CONTENT)) { ?>
24   <p><strong><?=_("Preview only!  Changes not saved.")?></strong>
25 <!-- FIXME: it would be nice to put a link to the #editarea anchor below,
26      but it does not work currently with the <base> declared in top.tmpl.
27      I think we need to do away with using <base> altogether... -->
28      <?= fmt("Please continue editing.  (You'll find your %s at the bottom of the page.)",
29           /* HTML::a(array("href" => "#editarea"), */ _("edit area") /*)  */) ?>
30   </p>
31   <hr class="printer" noshade="noshade" />
32   <?= $PREVIEW_CONTENT ?>
33   <hr class="printer" noshade="noshade" />
34 <?php } ?>
35
36 <?= $PAGE_LOCKED_MESSAGE ?>
37 <?= $CONCURRENT_UPDATE_MESSAGE ?>
38
39 <?php if (! $IS_CURRENT) { ?>
40   <p><strong><?=_("Warning: You are editing an old revision.")?>
41         <?=_("Saving this page will overwrite the current version.")?></strong></p>
42 <?php } ?>
43 <?php /*
44  * FIXME: Hack! 
45  * The funky URL used for the form action parameter is bogus.
46  * This is needed, otherwise the redirect to the real browser
47  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
48  * a redirect from a page to itself.)
49  *
50  * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it
51  * to wrap long lines.
52  *
53  */ ?>
54
55 <form method="post" id="editpage" name="editpage"
56       action="<?= $request->getPostURL() ?>"
57       accept-charset="<?=CHARSET?>">
58   <?php if (!empty($_GET['start_debug'])) echo '<input type="hidden" name="start_debug" value="1" >'; ?>
59   <?php /* To clear beyond a larger logo, such as in the Hawaiian theme */ ?>
60   <br clear="all" class="clear-floats" />
61   <table width="100%"><tr><td><?= $EDIT_TOOLBAR ?></td>
62   <?php if (isset($JS_SEARCHREPLACE)) { ?>
63     <td align="left"><div id="search-replace">
64 <?php $undo_btn = $Theme->_findData("images/ed_undo.gif"); 
65       $redo_btn = $Theme->_findData("images/ed_redo.gif"); 
66       $sr_btn   = $Theme->_findData("images/ed_replace.gif"); 
67 ?>
68 <?php /*TODO: replace this with Template('toolbar') */ ?>
69 <input name="rck" type="image" src="<?= $undo_btn ?>" onfocus="if(this.blur && pretxt_anzahl==0) this.blur()" onclick="rueck()"><input type="image" src="<?= $redo_btn ?>" onclick="speich()">
70 <input type="image" src="<?= $sr_btn ?>" onclick="replace()">
71 </div></td>
72   <?php } ?>
73     <td align="right"><div id="editarea-size">
74     <?=_("Edit Area Size:")?>
75     <b><?=_("H")?></b> <?=$HeightI?>
76     <b><?=_("W")?></b> <?=$WidthI?>
77     <noscript><?=Button("submit:", _("Adjust"), 'wikiaction')?></noscript>
78   </div></td></tr></table>
79   <a name="editarea"></a><?=$EDIT_TEXTAREA?>
80
81 <!-- FIXME: fix layout, move CSS to CSS -->
82 <div class="toolbar" style="text-align: center;">
83   <?=_("Summary").':'?> <?=$SUMMARY_INPUT?>
84 </div>
85 <table summary="Toolbar: Page editing options." class="toolbar" width="100%"
86        cellpadding="0" cellspacing="0" border="0">
87 <tr valign="middle">
88   <td> 
89     <?=$MINOR_EDIT_CB ?> <?=_("This is a minor change.")?><br />
90     <?=$OLD_MARKUP_CB?>  <?=_("Use old markup")?>
91   </td>
92   <td align="center">
93     <?= $PREVIEW_B ?>
94     <?php if ($SAVE_B)  { ?> 
95       <?=$s?><?= $SAVE_B ?>
96     <?php } ?>
97   </td>
98   <td align="right">
99     <?= $user->isSignedIn()
100         ? ''
101         : fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
102     <?= Template('signin', array('FORMNAME' => 'editpage')) ?>
103   </td>
104 </tr>
105 <?php if ($user->isadmin()) { ?>
106   <tr>
107     <td><?= $LOCKED_CB ?> <?=_("Locked")?></td>
108   </tr>
109 <?php } ?>
110 </table>
111
112 <hr noshade="noshade" />
113
114 <script language="JavaScript1.3" type="text/javascript">
115 <!--
116 function showOldMarkupRules(show) {
117   if (document.getElementById) {
118     if (!show) {
119       document.getElementById('newMarkup').style.display="block";
120       document.getElementById('oldMarkup').style.display="none";
121     } else {
122       document.getElementById('newMarkup').style.display="none";
123       document.getElementById('oldMarkup').style.display="block";
124     }
125   }
126 }
127 // -->
128 </script>
129
130 <div id="oldMarkup" class="wiki-edithelp">
131 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
132 <p><?= fmt("See %s tips for editing.", WikiLink(_("GoodStyle"))) ?></p>
133 <?plugin IncludePage page=_("OldTextFormattingRules") section=_("Synopsis") quiet=1?>
134 </div>
135 <div id="newMarkup" class="wiki-edithelp">
136 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
137 <p><?= fmt("See %s tips for editing.", WikiLink(_("GoodStyle"))) ?></p>
138 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
139 </div>
140 <?=$HIDDEN_INPUTS?>
141 </form>
142
143 <script language="JavaScript1.3" type="text/javascript">
144 <!--
145 if (document.getElementById) {
146   showOldMarkupRules(document.getElementById('useOldMarkup').checked);
147 }
148 // -->
149 </script>