]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
supporting adding a class to navigation tabs
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 27 Jan 2011 04:08:16 +0000 (04:08 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 27 Jan 2011 04:08:16 +0000 (04:08 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7947 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/navigation/tabs.php

index 4e9d1ee17ee7f20f4559f6d1dbf6721ca18cc6e3..4a5a5e7a9a130631aeec76d4f6c2dc46383cd1be 100644 (file)
@@ -3,6 +3,7 @@
  * Tab navigation
  *
  * @uses string $vars['type'] horizontal || vertical - Defaults to horizontal
+ * @uses string $vars['class'] Additional class to add to ul
  * @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
 
 $type = elgg_get_array_value('type', $vars, 'horizontal');
 if ($type == 'horizontal') {
-       $type_class = "elgg-tabs elgg-htabs mtm";
+       $type_class = "elgg-tabs elgg-htabs";
 } else {
        $type_class = "elgg-tabs elgg-vtabs";
 }
 
+if (isset($vars['class'])) {
+       $type_class = "$type_class {$vars['class']}";
+}
+
 if (isset($vars['tabs']) && is_array($vars['tabs']) && !empty($vars['tabs'])) {
 ?>
        <ul class="<?php echo $type_class; ?>">