Skip to content
Snippets Groups Projects
Commit b8a111f5 authored by Michael Klier's avatar Michael Klier
Browse files

added draft-feature to tpl_actionlink

darcs-hash:20061006113409-23886-166f573a8ae5c897011282ef22a581cea1dbce86.gz
parent 2f97bef5
No related branches found
No related tags found
No related merge requests found
...@@ -482,14 +482,20 @@ function tpl_actionlink($type,$pre='',$suf=''){ ...@@ -482,14 +482,20 @@ function tpl_actionlink($type,$pre='',$suf=''){
#most complicated type - we need to decide on current action #most complicated type - we need to decide on current action
if($ACT == 'show' || $ACT == 'search'){ if($ACT == 'show' || $ACT == 'search'){
if($INFO['writable']){ if($INFO['writable']){
if($INFO['exists']){ if(!empty($INFO['draft'])) {
tpl_link(wl($ID,'do=edit&rev='.$REV), tpl_link(wl($ID,'do=draft'),
$pre.$lang['btn_edit'].$suf, $pre.$lang['btn_draft'].$suf,
'class="action edit" accesskey="e" rel="nofollow"'); 'class="action edit" acceskey="e" rel="nofollow"');
}else{ } else {
tpl_link(wl($ID,'do=edit&rev='.$REV), if($INFO['exists']){
$pre.$lang['btn_create'].$suf, tpl_link(wl($ID,'do=edit&rev='.$REV),
'class="action create" accesskey="e" rel="nofollow"'); $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{ }else{
if(!actionOK('source')) return false; //pseudo action if(!actionOK('source')) return false; //pseudo action
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment