]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/editpage.tmpl
updated changed pgsrc structure
[SourceForge/phpwiki.git] / themes / default / templates / editpage.tmpl
1 <!-- -*-html-*- -->
2 <!-- $Id: editpage.tmpl,v 1.59 2006-09-06 06:10:49 rurban Exp $ -->
3 <?php if (isset($PREVIEW_CONTENT)) { ?>
4   <p><strong><?=_("Preview only!  Changes not saved.")?></strong>
5 <!-- FIXME: it would be nice to put a link to the #editarea anchor below,
6      but it does not work currently with the <base> declared in top.tmpl.
7      I think we need to do away with using <base> altogether... -->
8      <?= fmt("Please continue editing.  (You'll find your %s at the bottom of the page.)",
9           /* HTML::a(array("href" => "#editarea"), */ _("edit area") /*)  */) ?>
10   </p>
11   <hr class="printer" noshade="noshade" />
12   <?= $PREVIEW_CONTENT ?>
13   <hr class="printer" noshade="noshade" />
14 <?php } ?>
15
16 <?= $PAGE_LOCKED_MESSAGE ?>
17 <?= $CONCURRENT_UPDATE_MESSAGE ?>
18
19 <?php if (! $IS_CURRENT) { ?>
20   <p><strong><?=_("Warning: You are editing an old revision.")?>
21         <?=_("Saving this page will overwrite the current version.")?></strong></p>
22 <?php } ?>
23 <?php /*
24  * FIXME: Hack! 
25  * The funky URL used for the form action parameter is bogus.
26  * This is needed, otherwise the redirect to the real browser
27  * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept
28  * a redirect from a page to itself.)
29  */ ?>
30 <form method="post" id="editpage" name="editpage"
31       action="<?= $request->getPostURL() ?>"
32       accept-charset="<?=CHARSET?>">
33   <?php if (!empty($_GET['start_debug'])) echo '<input type="hidden" name="start_debug" value="1" >'; ?>
34   <?php /* To clear beyond a larger logo, such as in the Hawaiian theme */ ?>
35   <br clear="all" class="clear-floats" />
36   <table width="100%">
37     <tr><td><?= $EDIT_TOOLBAR ?></td>
38         <td align="right"><div id="editarea-size">
39     <?=_("Size").':'?>
40     <label for="pref:editHeight"><b><?=_("H")?></b></label> <?=$HEIGHT_PREF?> 
41     <label for="pref:editWidth"><b><?=_("W")?></b></label> <?=$WIDTH_PREF?>
42     <noscript><?=Button("submit:", _("Adjust"), 'wikiaction')?></noscript>
43   </div></td></tr></table>
44   <a name="editarea"></a><?=$EDIT_TEXTAREA?>
45 <!-- FIXME: fix layout, move CSS to CSS -->
46 <div class="toolbar" style="text-align: center;">
47   <label for="edit:summary"><?=_("Summary").':'?></label> <?=$SUMMARY_INPUT?>
48 </div>
49 <?php if (ENABLE_CAPTCHA) { ?>
50 <div class="toolbar" style="text-align: center;">
51   <?php echo $CAPTCHA_IMAGE ?><br/>
52   <?php echo $CAPTCHA_LABEL ?><?= $CAPTCHA_INPUT ?>
53 </div> 
54 <?php } ?>
55 <table summary="Toolbar: Page editing options." class="toolbar" width="100%"
56        cellpadding="0" cellspacing="0" border="0">
57 <tr valign="middle">
58   <td> 
59     <?=$MINOR_EDIT_CB ?> <label for="edit:minor_edit"><?=_("This is a minor change.")?></label><br />
60     <?=$OLD_MARKUP_CB?>  <label for="useOldMarkup"><?=_("Use old markup")?></label> <?=$OLD_MARKUP_CONVERT?>
61   </td>
62   <td align="center">
63     <?= $PREVIEW_B ?>
64     <?php if ($SAVE_B)  { ?> 
65       <?=$SEP?><?= $SAVE_B ?>
66     <?php } ?>
67   </td>
68   <td>&nbsp; <?=$AUTHOR_MESSAGE?></td>
69 </tr>
70 <tr>
71   <td>
72     <?php if ($user->isAdmin()) { ?> 
73     <?= $LOCKED_CB ?> <label for="edit:lock"><?=_("Locked")?></label>
74     <?php } ?>
75   </td>
76   <td colspan="2" align="right">
77     <?php if (!$user->isAuthenticated()) { ?>
78     <?= Template('signin', array('FORMNAME' => 'editpage')) ?>
79     <?php } ?>
80   </td>
81 </tr>
82 <?php if (0) {
83 // Not yet supported within the same request. 
84 // Better use a button to the external UpLoad page. 
85 // Or fix action=edit to handle the uploaded filename within the same request.
86 ?>
87 <tr>
88   <td colspan="3"><?plugin UpLoad ?></td>
89 </tr>
90 <?php } ?>
91 </table>
92
93 <hr noshade="noshade" />
94
95 <script language="JavaScript1.3" type="text/javascript">
96 <!--
97 function showOldMarkupRules(show) {
98   if (document.getElementById) {
99     if (!show) {
100       document.getElementById('newMarkup').style.display="block";
101       document.getElementById('oldMarkup').style.display="none";
102     } else {
103       document.getElementById('newMarkup').style.display="none";
104       document.getElementById('oldMarkup').style.display="block";
105     }
106   }
107 }
108 // -->
109 </script>
110
111 <div id="oldMarkup" class="wiki-edithelp">
112 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
113 <p><?= fmt("See %s tips for editing.", WikiLink(_("Help/GoodStyle"))) ?></p>
114 <?plugin IncludePage page=_("Help/OldTextFormattingRules") section=_("Synopsis") quiet=1?>
115 </div>
116 <div id="newMarkup" class="wiki-edithelp">
117 <!-- FIXME: do we need this at all?  If so, it could probably be moved to TextFormattingRules -->
118 <p><?= fmt("See %s tips for editing.", WikiLink(_("Help/GoodStyle"))) ?></p>
119 <?plugin IncludePage page=_("Help/TextFormattingRules") section=_("Synopsis") quiet=1?>
120 </div>
121 <?=$HIDDEN_INPUTS?>
122 </form>
123
124 <script language="JavaScript1.3" type="text/javascript">
125 <!--
126 if (document.getElementById) {
127   showOldMarkupRules(document.getElementById('useOldMarkup').checked);
128 }
129 // -->
130 </script>