From 01f178253668e9c67267cf9eee2e2811f398624f Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 May 2009 19:38:58 +0200 Subject: added tpl_action() (wrapper around tpl_button and tpl_actionlink) darcs-hash:20090516173858-f7d6d-60a553963e6d0428acfeed693797b9abcea87b91.gz --- inc/template.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index 985dd946f..e582e67b5 100644 --- a/inc/template.php +++ b/inc/template.php @@ -395,8 +395,7 @@ function _tpl_metaheaders_action($data){ * @author Andreas Gohr */ function tpl_link($url,$name,$more='',$return=false){ - $out = ''; - $out .= ' + */ +function tpl_action($type,$link=0,$wrapper=false,$return=false,$pre='',$suf='',$inner='') { + $out = ''; + if ($link) $out .= tpl_actionlink($type,$pre,$suf,$inner,1); + else $out .= tpl_button($type,1); + if ($out && $wrapper) $out = "<$wrapper>$out"; + + if ($return) return $out; + print $out; + return $out ? true : false; +} + /** * Print the search form * -- cgit v1.2.3