diff --git a/themes/bootstrap3/templates/collection/view.phtml b/themes/bootstrap3/templates/collection/view.phtml index 1516360c6c8268a9713a491ebca09ec04b2243be..ef02c420a4b3871977a0d430f5bbb9c94d4ba0ee 100644 --- a/themes/bootstrap3/templates/collection/view.phtml +++ b/themes/bootstrap3/templates/collection/view.phtml @@ -6,10 +6,14 @@ if ($this->syndeticsPlus()->isActive()) { $this->headScript()->appendFile($this->syndeticsPlus()->getScript()); } + // Add any extra scripts the tabs require: + foreach ($this->tabsExtraScripts as $script) { + $this->headScript()->appendFile($script); + } // Add RDF header link if applicable: if ($this->export()->recordSupportsFormat($this->driver, 'RDF')) { - $this->headLink()->appendAlternate($this->recordLink()->getActionUrl($this->driver, 'RDF'), 'application/rdf+xml', 'RDF Representation'); + $this->headLink()->appendAlternate($this->recordLink()->getActionUrl($this->driver, 'RDF'), 'application/rdf+xml', 'RDF Representation'); } // Set flag for special cases relating to full-width hierarchy tree tab: @@ -30,7 +34,7 @@ <?=$this->record($this->driver)->getToolbar()?> -<div class="record"> +<div class="record source<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>"> <div<?php if (!$tree): /* in tree mode, do not constrain width with a class */ ?> class="<?=$this->layoutClass('mainbody') ?> solo"<?php endif; ?>> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId" id="record_id" /> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource" /> @@ -44,27 +48,30 @@ <?php foreach ($this->tabs as $tab => $obj): ?> <?php // add current tab to breadcrumbs if applicable: $desc = $obj->getDescription(); - $tab_classes = []; + $tabName = preg_replace("/\W/", "-", strtolower($tab)); + $tabClasses = [ 'record-tab', $tabName ]; if (0 === strcasecmp($this->activeTab, $tab)) { if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) { - $tab_classes[] = 'active'; + $tabClasses[] = 'active'; } - $tab_classes[] = 'initiallyActive'; + $tabClasses[] = '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'; } + if (!$obj->isVisible()) { $tabClasses[] = 'hidden'; } + if (!$obj->supportsAjax()) { $tabClasses[] = 'noajax'; } ?> - <li<?=count($tab_classes) > 0 ? ' class="' . implode(' ', $tab_classes) . '"' : ''?>> - <a class="<?=strtolower($tab) ?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"<?php if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)):?> data-background<?php endif ?>><?=$this->transEsc($desc)?></a> + <li class="<?=implode(' ', $tabClasses)?>" data-tab="<?=$tabName?>"<?php if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)):?> data-background<?php endif ?>> + <a href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav" data-lightbox-ignore> + <?=$this->transEsc($desc)?> + </a> </li> <?php endforeach; ?> </ul> <div class="tab-content collectionDetails<?=$tree ? 'Tree' : ''?>"> <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> - <div class="tab-pane active <?=$this->activeTab ?>-tab"> + <div class="tab-pane active <?=$this->escapeHtmlAttr($this->activeTab) ?>-tab"> <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : '' ?> </div> <?php endif; ?> diff --git a/themes/bootstrap3/templates/record/view.phtml b/themes/bootstrap3/templates/record/view.phtml index 3587624b6177f2103cd12e22dd1a97b34f2a7330..0ebbf0d5e240a26e5f96b333fa03b5f15caf959c 100644 --- a/themes/bootstrap3/templates/record/view.phtml +++ b/themes/bootstrap3/templates/record/view.phtml @@ -32,7 +32,7 @@ <?php $sidebarList = $this->related()->getList($this->driver); ?> <div class="<?=$this->layoutClass('mainbody')?><?=count($sidebarList) < 1 ? ' solo' : '' ?>"> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId" /> - <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier()) ?>" class="hiddenSource" /> + <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource" /> <?=$this->flashmessages()?> <?=$this->record($this->driver)->getCoreMetadata()?>