summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraritra.ghosh2012-11-18 03:10:36 (GMT)
committer aritra ghosh2012-11-18 03:10:36 (GMT)
commit1b692d7cad3a4f6b165532fc55da27cc5d8ab593 (patch)
treeab5be055fe5f6714ed6b063f0abd26c0d9e35a71
parentc25cc6f5f2f1db8981e5a508fa63f2aff4125f01 (diff)
fixed faulty title issye for vertical tabs option of tabs style plugin
-rw-r--r--plugins/styles/tabs.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/styles/tabs.inc b/plugins/styles/tabs.inc
index ac80f92..2920a7c 100644
--- a/plugins/styles/tabs.inc
+++ b/plugins/styles/tabs.inc
@@ -85,12 +85,23 @@ function theme_panels_style_pack_tabs_style_render_region($vars) {
'#type' => 'vertical_tabs',
'#tree' => TRUE,
);
- $delta = 1;
+
+ $items = array();
+ $delta = 1;
+ foreach ($display->panels[$region_id] as $pane_id) {
+ // Make sure the pane exists.
+ if (!empty($panes[$pane_id])) {
+ $title = panels_style_pack_pane_titles($display->did, $pane_id);
+ $title = $title ? $title : t('Tab @delta', array('@delta' => $delta));
+ $items[] = $title;
+ ++$delta;
+ }
+ }
foreach($panes as $pane_id => $item) {
$pane = $display->content[$pane_id];
$form['vertical_tabs'][$pane_id] = array(
'#type' => 'fieldset',
- '#title' => $pane->type,
+ '#title' => $items[$pane_id-1],
'#group' => 'vertical_tabs',
'#tree' => TRUE,
);