]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/editpage.tmpl
Added comment by a UpLoad button withint editpage
[SourceForge/phpwiki.git] / themes / default / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.50 2004-12-04 11:14:18 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 = $WikiTheme->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 <form method="post" id="editpage" name="editpage"
51       action="<?= $request->getPostURL() ?>"
52       accept-charset="<?=CHARSET?>">
53   <?php if (!empty($_GET['start_debug'])) echo '<input type="hidden" name="start_debug" value="1" >'; ?>
54   <?php /* To clear beyond a larger logo, such as in the Hawaiian theme */ ?>
55   <br clear="all" class="clear-floats" />
56   <table width="100%">
57     <tr><td><?= $EDIT_TOOLBAR ?></td>
58         <td align="right"><div id="editarea-size">
59         <?=_("Size").':'?><b><?=_("H")?></b> <?=$HeightI?><b><?=_("W")?></b> <?=$WidthI?>
60     <noscript><?=Button("submit:", _("Adjust"), 'wikiaction')?></noscript>
61   </div></td></tr></table>
62   <a name="editarea"></a><?=$EDIT_TEXTAREA?>
63 <!-- FIXME: fix layout, move CSS to CSS -->
64 <div class="toolbar" style="text-align: center;">
65   <?=_("Summary").':'?> <?=$SUMMARY_INPUT?>
66 </div>
67 <table summary="Toolbar: Page editing options." class="toolbar" width="100%"
68        cellpadding="0" cellspacing="0" border="0">
69 <tr valign="middle">
70   <td> 
71     <?=$MINOR_EDIT_CB ?> <?=_("This is a minor change.")?><br />
72     <?=$OLD_MARKUP_CB?>  <?=_("Use old markup")?>
73   </td>
74   <td align="center">
75     <?= $PREVIEW_B ?>
76     <?php if ($SAVE_B)  { ?> 
77       <?=$s?><?= $SAVE_B ?>
78     <?php } ?>
79   </td>
80   <td align="right">
81     <?= $user->isSignedIn()
82         ? ''
83         : fmt("Author will be logged as %s.", HTML::em($user->getId())) ?>
84     <?= Template('signin', array('FORMNAME' => 'editpage')) ?>
85   </td>
86 </tr>
87 <?php if ($user->isadmin()) { ?>
88   <tr>
89     <td><?= $LOCKED_CB ?> <?=_("Locked")?></td>
90   </tr>
91 <?php } ?>
92 <?php if (0) {
93 // Not yet supported within the same request. 
94 // Better use a button to the external UpLoad page. 
95 // Or fix action=edit to handle the uploaded filename within the same request.
96 ?>
97   <tr>
98     <td><?plugin UpLoad ?></td>
99   </tr>
100 <?php } ?>
101 </table>
102
103 <hr noshade="noshade" />
104
105 <script language="JavaScript1.3" type="text/javascript">
106 <!--
107 function showOldMarkupRules(show) {
108   if (document.getElementById) {
109     if (!show) {
110       document.getElementById('newMarkup').style.display="block";
111       document.getElementById('oldMarkup').style.display="none";
112     } else {
113       document.getElementById('newMarkup').style.display="none";
114       document.getElementById('oldMarkup').style.display="block";
115     }
116   }
117 }
118 // -->
119 </script>
120
121 <div id="oldMarkup" class="wiki-edithelp">
122 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
123 <p><?= fmt("See %s tips for editing.", WikiLink(_("GoodStyle"))) ?></p>
124 <?plugin IncludePage page=_("OldTextFormattingRules") section=_("Synopsis") quiet=1?>
125 </div>
126 <div id="newMarkup" class="wiki-edithelp">
127 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
128 <p><?= fmt("See %s tips for editing.", WikiLink(_("GoodStyle"))) ?></p>
129 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>
130 </div>
131 <?=$HIDDEN_INPUTS?>
132 </form>
133
134 <script language="JavaScript1.3" type="text/javascript">
135 <!--
136 if (document.getElementById) {
137   showOldMarkupRules(document.getElementById('useOldMarkup').checked);
138 }
139 // -->
140 </script>