Skip to content
Snippets Groups Projects
Commit 7ef32c3e authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Collection view ajax tabs fixed. Some style adjustments too.

parent 584cc77a
No related merge requests found
......@@ -57,34 +57,38 @@
<? if (count($this->tabs) > 0): ?>
<a name="tabnav"></a>
<ul class="recordTabs nav nav-tabs">
<? foreach ($this->tabs as $tab => $obj): ?>
<? // add current tab to breadcrumbs if applicable:
$desc = $obj->getDescription();
$tab_classes = array();
if (0 === strcasecmp($this->activeTab, $tab)) {
$tab_classes[] = 'active';
$this->layout()->breadcrumbs .= ' <li class="active">' . $this->transEsc($desc) . '</li>';
$activeTabObj = $obj;
}
if (!$obj->isVisible()) { $tab_classes[] = 'hidden'; }
if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; }
?>
<li<?=count($tab_classes) > 0 ? ' class="' . implode(' ', $tab_classes) . '"' : ''?>>
<a id="<?=strtolower($tab) ?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"><?=$this->transEsc($desc)?></a>
</li>
<? endforeach; ?>
</ul>
<? endif; ?>
<div class="record-tabs">
<ul class="nav nav-tabs">
<? foreach ($this->tabs as $tab => $obj): ?>
<? // add current tab to breadcrumbs if applicable:
$desc = $obj->getDescription();
$tab_classes = array();
if (0 === strcasecmp($this->activeTab, $tab)) {
if (!$this->ajaxTabs || !$obj->supportsAjax()) {
$tab_classes[] = 'active';
}
$tab_classes[] = 'initiallyActive';
$this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>';
$activeTabObj = $obj;
}
if (!$obj->isVisible()) { $tab_classes[] = 'hidden'; }
if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; }
?>
<li<?=count($tab_classes) > 0 ? ' class="' . implode(' ', $tab_classes) . '"' : ''?>>
<a class="<?=strtolower($tab) ?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"><?=$this->transEsc($desc)?></a>
</li>
<? endforeach; ?>
</ul>
<div class="tab-content record-tabs collectionDetails<?=$tree ? 'Tree' : ''?>">
<? if (!$this->ajaxTabs || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?>
<div class="tab-pane active <?=$this->activeTab ?>-tab">
<?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : '' ?>
<div class="tab-content collectionDetails<?=$tree ? 'Tree' : ''?>">
<? if (!$this->ajaxTabs || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?>
<div class="tab-pane active <?=$this->activeTab ?>-tab">
<?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : '' ?>
</div>
<? endif; ?>
</div>
<? endif ?>
</div>
</div>
<? endif; ?>
<?=$this->driver->supportsCoinsOpenURL()?'<span class="Z3988" title="'.$this->escapeHtmlAttr($this->driver->getCoinsOpenURL()).'"></span>':''?>
</div>
......
......@@ -53,28 +53,28 @@
<a name="tabnav"></a>
<div class="record-tabs">
<ul class="nav nav-tabs">
<? foreach ($this->tabs as $tab => $obj): ?>
<? // add current tab to breadcrumbs if applicable:
$desc = $obj->getDescription();
$tab_classes = array();
if (0 === strcasecmp($this->activeTab, $tab)) {
if (!$this->ajaxTabs || !$obj->supportsAjax()) {
$tab_classes[] = 'active';
<? foreach ($this->tabs as $tab => $obj): ?>
<? // add current tab to breadcrumbs if applicable:
$desc = $obj->getDescription();
$tab_classes = array();
if (0 === strcasecmp($this->activeTab, $tab)) {
if (!$this->ajaxTabs || !$obj->supportsAjax()) {
$tab_classes[] = 'active';
}
$tab_classes[] = 'initiallyActive';
$this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>';
$activeTabObj = $obj;
}
$tab_classes[] = 'initiallyActive';
$this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>';
$activeTabObj = $obj;
}
if (!$obj->isVisible()) { $tab_classes[] = 'hidden'; }
if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; }
?>
<li<?=count($tab_classes) > 0 ? ' class="' . implode(' ', $tab_classes) . '"' : ''?>>
<a class="<?=strtolower($tab) ?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"><?=$this->transEsc($desc)?></a>
</li>
<? endforeach; ?>
if (!$obj->isVisible()) { $tab_classes[] = 'hidden'; }
if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; }
?>
<li<?=count($tab_classes) > 0 ? ' class="' . implode(' ', $tab_classes) . '"' : ''?>>
<a class="<?=strtolower($tab) ?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"><?=$this->transEsc($desc)?></a>
</li>
<? endforeach; ?>
</ul>
<div class="tab-content record-tabs">
<div class="tab-content">
<? if (!$this->ajaxTabs || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?>
<div class="tab-pane active <?=$this->activeTab ?>-tab">
<?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : '' ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment