aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-25 21:25:42 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-25 21:25:42 +0000
commit6a64b7d0b595c97c4bef9a8fa22d567611fb3fd1 (patch)
tree257d543127de6b5136460ea13023b23ca416fe89 /views/default
parent756dff5e2a7c94a7821012869225efb2c0eb32e7 (diff)
downloadelgg-6a64b7d0b595c97c4bef9a8fa22d567611fb3fd1.tar.gz
elgg-6a64b7d0b595c97c4bef9a8fa22d567611fb3fd1.tar.bz2
Navigation/tabs uses output/url for the links.
git-svn-id: http://code.elgg.org/elgg/trunk@6219 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/navigation/tabs.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/views/default/navigation/tabs.php b/views/default/navigation/tabs.php
index 8a51c7f3d..38a85dca2 100644
--- a/views/default/navigation/tabs.php
+++ b/views/default/navigation/tabs.php
@@ -6,6 +6,8 @@
* @uses array $vars['tabs'] A multi-dimensional array of tab entries in the format array(
* 'title' => string, // Title of link
* 'url' => string, // URL for the link
+ * 'url_js' => string, // JS to pass to the link
+ * 'url_class' => string, // Class to pass to the link
* 'class' => string // Class of the li element.
* 'selected' => bool // if this link is currently selected
* )
@@ -34,7 +36,23 @@ if (isset($vars['tabs'])) {
$title = htmlentities($info['title'], ENT_QUOTES, 'UTF-8');
$url = htmlentities($info['url'], ENT_QUOTES, 'UTF-8');
- echo "<li $class_str $js><a href=\"$url\" title=\"$title\"><span>$title</span></a></li>";
+ $options = array(
+ 'href' => $url,
+ 'title' => $title,
+ 'text' => $title
+ );
+
+ if (isset($info['url_js'])) {
+ $options['js'] = $info['url_js'];
+ }
+
+ if (isset($info['url_class'])) {
+ $options['class'] = $info['url_class'];
+ }
+
+ $link = elgg_view('output/url', $options);
+
+ echo "<li $class_str $js>$link</li>";
}
?>
</ul>