summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2011-10-15 17:30:51 +0100
committerAnika Henke <anika@selfthinker.org>2011-10-15 17:30:51 +0100
commitc7e90e3f2f3b7cddce01cc73132e2a168b3b696a (patch)
treeda553cfa6cf701c496b5c7030be34473ff6e9330 /inc/template.php
parentf53795891c8f08acc7ad03adf236f82d6e108c38 (diff)
downloadrpg-c7e90e3f2f3b7cddce01cc73132e2a168b3b696a.tar.gz
rpg-c7e90e3f2f3b7cddce01cc73132e2a168b3b696a.tar.bz2
show accesskey also on actionlink title and add accesskey parameter only if a key is defined (FS#2226)
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/inc/template.php b/inc/template.php
index b56d6c718..f98385adb 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -480,10 +480,15 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){
$linktarget = wl($id, $params);
}
$caption = $lang['btn_' . $type];
+ $akey = $addTitle = '';
+ if($accesskey){
+ $akey = 'accesskey="'.$accesskey.'" ';
+ $addTitle = ' ['.strtoupper($accesskey).']';
+ }
$out = tpl_link($linktarget, $pre.(($inner)?$inner:$caption).$suf,
'class="action ' . $type . '" ' .
- 'accesskey="' . $accesskey . '" rel="nofollow" ' .
- 'title="' . hsc($caption) . '"', 1);
+ $akey . 'rel="nofollow" ' .
+ 'title="' . hsc($caption).$addTitle . '"', 1);
}
if ($return) return $out;
echo $out;