From ffc3ac79d7a37d23b9c304e203a824048de8c5de Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Mon, 14 Jul 2014 14:07:54 -0400
Subject: [PATCH] Search tabs on advanced search results.

---
 themes/bootprint3/less/bootprint.less              | 10 +++++++++-
 themes/bootprint3/theme.config.php                 | 10 ++++++----
 themes/bootstrap3/templates/search/searchbox.phtml | 14 ++++++++++++++
 themes/bootstrap3/theme.config.php                 |  2 +-
 4 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/themes/bootprint3/less/bootprint.less b/themes/bootprint3/less/bootprint.less
index ba9f2634c85..923ee21597b 100644
--- a/themes/bootprint3/less/bootprint.less
+++ b/themes/bootprint3/less/bootprint.less
@@ -136,7 +136,15 @@ header {
   }
   .searchbox {
     display:block !important;
-    margin:0;
+    .nav-tabs {
+      padding:0 6px;
+    }
+    .tab-content {
+      border:0;
+      .navbar-text {
+        margin:5px 10px 5px 0;
+      }
+    }
   }
   @media (max-width: 767px) {
     #header-collapse .navbar-right li {
diff --git a/themes/bootprint3/theme.config.php b/themes/bootprint3/theme.config.php
index e4ed0dc1f7d..2b398ae87d3 100644
--- a/themes/bootprint3/theme.config.php
+++ b/themes/bootprint3/theme.config.php
@@ -8,12 +8,14 @@ return array(
         'icons.css'
     ),
     'less' => array(
-        //'compiled.less',
-        //'icons.less'
+        'active' => false,
+        'compiled.less',
+        'icons.less'
     ),
     'scss' => array(
-        //'compiled.scss',
-        //'icons.scss'
+        'active' => false,
+        'compiled.less',
+        'icons.less'
     ),
     'js' => array(
         'vendor/bootstrap.min.js'
diff --git a/themes/bootstrap3/templates/search/searchbox.phtml b/themes/bootstrap3/templates/search/searchbox.phtml
index e5d083673ca..fefd947f4c0 100644
--- a/themes/bootstrap3/templates/search/searchbox.phtml
+++ b/themes/bootstrap3/templates/search/searchbox.phtml
@@ -19,10 +19,24 @@
 ?>
 <? if ($this->searchType == 'advanced'): ?>
   <div id="searchForm">
+    <? $searchTabs = $this->searchtabs($this->searchClassId, $this->lookfor, $this->searchIndex, $this->searchType); ?>
+    <? if (count($searchTabs) > 0): ?>
+      <ul class="nav nav-tabs">
+      <? foreach ($searchTabs as $tab): ?>
+        <li<?=$tab['selected'] ? ' class="active"' : ''?>>
+          <a href="<?=$tab['selected'] ? '' : $this->escapeHtmlAttr($tab['url'])?>"><?=$this->transEsc($tab['label']); ?></a>
+        </li>
+      <? endforeach; ?>
+      </ul>
+      <div class="tab-content clearfix">
+    <? endif; ?>
     <p class="navbar-text"><?=$this->transEsc("Your search terms")?> : "<strong><?=$this->escapeHtml($this->lookfor)?>"</strong></p>
     <a class="navbar-text" href="<?=$this->url($advSearch)?>?edit=<?=$this->escapeHtmlAttr($this->searchId)?>"><?=$this->transEsc("Edit this Advanced Search")?></a>
     <a class="navbar-text" href="<?=$this->url($advSearch)?>"><?=$this->transEsc("Start a new Advanced Search")?></a>
     <a class="navbar-text" href="<?=$this->url($searchHome)?>"><?=$this->transEsc("Start a new Basic Search")?></a>
+    <? if (count($searchTabs) > 0): ?>
+      </div>
+    <? endif; ?>
   </div>
 <? else: ?>
   <form role="search" class="navbar-form navbar-left" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" id="searchForm" autocomplete="off">
diff --git a/themes/bootstrap3/theme.config.php b/themes/bootstrap3/theme.config.php
index c6421cc660f..1bab58c411d 100644
--- a/themes/bootstrap3/theme.config.php
+++ b/themes/bootstrap3/theme.config.php
@@ -20,7 +20,7 @@ return array(
         'lightbox.js',
     ),
     'less' => array(
-        'active' => true,
+        'active' => false,
         'compiled.less'
     ),
     'scss' => array(
-- 
GitLab