diff options
author | Michael Klier <chi@chimeric.de> | 2006-10-06 13:34:09 +0200 |
---|---|---|
committer | Michael Klier <chi@chimeric.de> | 2006-10-06 13:34:09 +0200 |
commit | b8a111f5605b82b5765cc4bde1826c7e1134c56e (patch) | |
tree | 8495a6eeb68587eb4ae14afa7bbaf76b57e3f7d2 /inc | |
parent | 2f97bef57380be40f94e827485d88329ebc18887 (diff) | |
download | rpg-b8a111f5605b82b5765cc4bde1826c7e1134c56e.tar.gz rpg-b8a111f5605b82b5765cc4bde1826c7e1134c56e.tar.bz2 |
added draft-feature to tpl_actionlink
darcs-hash:20061006113409-23886-166f573a8ae5c897011282ef22a581cea1dbce86.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/template.php | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/inc/template.php b/inc/template.php index 94ccd2d2c..f601ce620 100644 --- a/inc/template.php +++ b/inc/template.php @@ -482,14 +482,20 @@ function tpl_actionlink($type,$pre='',$suf=''){ #most complicated type - we need to decide on current action if($ACT == 'show' || $ACT == 'search'){ if($INFO['writable']){ - if($INFO['exists']){ - tpl_link(wl($ID,'do=edit&rev='.$REV), - $pre.$lang['btn_edit'].$suf, - 'class="action edit" accesskey="e" rel="nofollow"'); - }else{ - tpl_link(wl($ID,'do=edit&rev='.$REV), - $pre.$lang['btn_create'].$suf, - 'class="action create" accesskey="e" rel="nofollow"'); + if(!empty($INFO['draft'])) { + tpl_link(wl($ID,'do=draft'), + $pre.$lang['btn_draft'].$suf, + 'class="action edit" acceskey="e" rel="nofollow"'); + } else { + if($INFO['exists']){ + tpl_link(wl($ID,'do=edit&rev='.$REV), + $pre.$lang['btn_edit'].$suf, + 'class="action edit" accesskey="e" rel="nofollow"'); + }else{ + tpl_link(wl($ID,'do=edit&rev='.$REV), + $pre.$lang['btn_create'].$suf, + 'class="action create" accesskey="e" rel="nofollow"'); + } } }else{ if(!actionOK('source')) return false; //pseudo action |