diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-03-11 21:01:48 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-03-11 21:01:48 +0100 |
commit | ee4c4a1b5a5840c1b9d2d8c74b3f4298dd52928b (patch) | |
tree | ec7011afc97d0159819e8b334709fe0680cab9b1 /inc/template.php | |
parent | 6d8affe6a4c62d13d1cd6051c23ab305145f9db6 (diff) | |
download | rpg-ee4c4a1b5a5840c1b9d2d8c74b3f4298dd52928b.tar.gz rpg-ee4c4a1b5a5840c1b9d2d8c74b3f4298dd52928b.tar.bz2 |
Automatic draft saving
DokuWiki now automatically creates a draft file of the currently edited
page. In case of an editing interuption (eg. Browsercrash) the draftfile
can be continued later.
darcs-hash:20060311200148-7ad00-919337a51e001136178d175a1755cd26122e9726.gz
Diffstat (limited to 'inc/template.php')
-rw-r--r-- | inc/template.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/inc/template.php b/inc/template.php index 091cd2e56..a74067f8b 100644 --- a/inc/template.php +++ b/inc/template.php @@ -53,8 +53,8 @@ function template($tpl){ * (defined by the global $ACT var) by calling the appropriate * outputfunction(s) from html.php * - * Everything that doesn't use the default template isn't - * handled by this function. ACL stuff is not done either. + * Everything that doesn't use the main template file isn't + * handled by this function. ACL stuff is not done here either. * * @author Andreas Gohr <andi@splitbrain.org> */ @@ -74,9 +74,15 @@ function tpl_content(){ html_edit($TEXT); html_show($TEXT); break; + case 'recover': + html_edit($TEXT); + break; case 'edit': html_edit(); break; + case 'draft': + html_draft(); + break; case 'wordblock': html_edit($TEXT,'wordblock'); break; @@ -203,7 +209,7 @@ function tpl_metaheaders($alt=true){ ptln('<link rel="stylesheet" media="print" type="text/css" href="'.DOKU_BASE.'lib/exe/css.php?print=1" />',$it); // load javascript - $js_edit = ($ACT=='edit' || $ACT=='preview') ? 1 : 0; + $js_edit = ($ACT=='edit' || $ACT=='preview' || $ACT=='recover') ? 1 : 0; $js_write = ($INFO['writable']) ? 1 : 0; if($js_edit && $js_write){ ptln('<script type="text/javascript" charset="utf-8">',$it); @@ -283,7 +289,7 @@ function tpl_getparent($ID){ * * Available Buttons are * - * edit - edit/create/show button + * edit - edit/create/show/draft button * history - old revisions * recent - recent changes * login - login/logout button - if ACL enabled |