]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
updated options on navigation/tabs
authorcash <cash.costello@gmail.com>
Thu, 5 Jan 2012 02:31:53 +0000 (21:31 -0500)
committercash <cash.costello@gmail.com>
Thu, 5 Jan 2012 02:31:53 +0000 (21:31 -0500)
mod/embed/views/default/navigation/menu/embed.php
views/default/navigation/tabs.php

index 1a6a18f05b4eb1dad3a8beddfd88837f9a1b2c1d..bca673f592c161f8358a9ebc98feeabd52320ab9 100644 (file)
@@ -10,7 +10,7 @@ foreach ($vars['menu']['default'] as $menu_item) {
        $tabs[] = array(
                'title' => $menu_item->getText(),
                'url' => 'embed/tab/' . $menu_item->getName(),
-               'url_class' => 'embed-section',
+               'link_class' => 'embed-section',
                'selected' => $menu_item->getSelected(),
        );
 }
index 6159fbfa5effdabe5e6012c9574c5ba590ec0853..95e3f266946b1f6fbf5037d6ecffafb12af13861 100644 (file)
@@ -5,13 +5,13 @@
  * @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(
- *     'text' => string, // The string between the <a></a> tags. If not set, 'title' parameter will be used instead
+ *     'text' => string, // The string between the <a></a> tags
  *     'href' => string, // URL for the link
  *     'class' => string  // Class of the li element
  *     'id' => string, // ID of the li element
- *     'selected' => bool // if this li element is currently selected
- *     'url_class' => string, // Class to pass to the link
- *     'url_id' => string, // ID to pass to the link
+ *     'selected' => bool // if this tab is currently selected (applied to li element)
+ *     'link_class' => string, // Class to pass to the link
+ *     'link_id' => string, // ID to pass to the link
  * )
  */
 $options = elgg_clean_vars($vars);
@@ -30,11 +30,11 @@ if (isset($vars['class'])) {
 unset($options['tabs']);
 unset($options['type']);
 
-$options = elgg_format_attributes($options);
+$attributes = elgg_format_attributes($options);
 
 if (isset($vars['tabs']) && is_array($vars['tabs']) && !empty($vars['tabs'])) {
        ?>
-       <ul <?php echo $options ?>>
+       <ul <?php echo $attributes; ?>>
                <?php
                foreach ($vars['tabs'] as $info) {
                        $class = elgg_extract('class', $info, '');
@@ -61,14 +61,14 @@ if (isset($vars['tabs']) && is_array($vars['tabs']) && !empty($vars['tabs'])) {
                                $options['text'] = $options['title'];
                                unset($options['title']);
                        }
-                       if (isset($info['url_class'])) {
-                               $options['class'] = $options['url_class'];
-                               unset($options['url_class']);
+                       if (isset($info['link_class'])) {
+                               $options['class'] = $options['link_class'];
+                               unset($options['link_class']);
                        }
 
-                       if (isset($info['url_id'])) {
-                               $options['id'] = $options['url_id'];
-                               unset($options['url_id']);
+                       if (isset($info['link_id'])) {
+                               $options['id'] = $options['link_id'];
+                               unset($options['link_id']);
                        }
 
                        $link = elgg_view('output/url', $options);