diff --git a/themes/blueprint/css/combined.css b/themes/blueprint/css/combined.css index 30b9f0b9eadd41777914171f08195caaf53ade21..ca97db52e517bd1a47f2dc500fb7d5bfbc04f947 100644 --- a/themes/blueprint/css/combined.css +++ b/themes/blueprint/css/combined.css @@ -1,4 +1,5 @@ .main {padding:0;} .main .combined-list {margin:0 2px;} .main .combined-list .result [class^=span-] {width:100%;} -.main .combined-list .result .summcover {display:block;margin:0 auto;} \ No newline at end of file +.main .combined-list .result .summcover {display:block;margin:0 auto;} +.main .combined-list .result .span-15 {margin-left:5px;width:80%} \ No newline at end of file diff --git a/themes/blueprint/templates/combined/results-list.phtml b/themes/blueprint/templates/combined/results-list.phtml index 6726e21f57dfa959f575393920c5c93113cddc6d..96011c439145d47bfdb046e4c42df50afab3e910 100644 --- a/themes/blueprint/templates/combined/results-list.phtml +++ b/themes/blueprint/templates/combined/results-list.phtml @@ -64,8 +64,18 @@ <?=$this->recommend($current)?> <? endforeach; ?> <? else: ?> - <? $viewType = in_array('list', array_keys($params->getViewList())) ? 'list' : $params->getView(); ?> - <?=$this->render('search/list-' . $viewType . '.phtml', array('results' => $results, 'params' => $params))?> + <? + $viewType = in_array('list', array_keys($params->getViewList())) + ? 'list' : $params->getView(); + $viewParams = array( + 'results' => $results, + 'params' => $params + ); + if(isset($this->showCartControls) && !$this->showCartControls) { + $viewParams['hideCartControls'] = true; + } + ?> + <?=$this->render('search/list-' . $viewType . '.phtml', $viewParams)?> <? if ($currentSearch['more_link']): ?> <p class="more_link"><a href="<?=$moreUrl?>"><?=$this->transEsc($currentSearch['more_link'])?></a></p> <? endif; ?> diff --git a/themes/blueprint/templates/combined/results.phtml b/themes/blueprint/templates/combined/results.phtml index ca6f722f128d6389a2c0068afb49c338fa955c47..750911d08784251a34f6b77f47b9385f35440b3d 100644 --- a/themes/blueprint/templates/combined/results.phtml +++ b/themes/blueprint/templates/combined/results.phtml @@ -34,6 +34,9 @@ $this->escapeHtml($lookfor) . '</em>'; } + // Enable cart if appropriate: + $this->showCartControls = $this->supportsCart && $this->cart()->isActive(); + // Load Javascript dependencies into header: $this->headScript()->appendFile("check_item_statuses.js"); $this->headScript()->appendFile("check_save_statuses.js"); @@ -49,7 +52,15 @@ </div> <? endif; ?> <?=$this->flashmessages()?> - <?=$this->context($this)->renderInContext('combined/stack-'.$placement.'.phtml', array('searchClassId' => $searchClassId, 'combinedResults' => $this->combinedResults))?> + <? + $viewParams = array( + 'searchClassId' => $searchClassId, + 'combinedResults' => $this->combinedResults, + 'supportsCartOptions' => $this->supportsCartOptions, + 'showCartControls' => $this->showCartControls + ); + ?> + <?=$this->context($this)->renderInContext('combined/stack-'.$placement.'.phtml', $viewParams)?> </div> <? /* End Main Listing */ ?> diff --git a/themes/blueprint/templates/combined/stack-distributed.phtml b/themes/blueprint/templates/combined/stack-distributed.phtml index 8d4172bc89a27607d46eb085d78aa11c36ae35d2..840177f676c2a1a6121a53234195c1bd898003e6 100644 --- a/themes/blueprint/templates/combined/stack-distributed.phtml +++ b/themes/blueprint/templates/combined/stack-distributed.phtml @@ -14,10 +14,17 @@ <? $currentSearch = $searches[$columnIndex]; ?> <? if ((!isset($currentSearch['ajax']) || !$currentSearch['ajax']) && isset($currentSearch['hide_if_empty']) && $currentSearch['hide_if_empty'] && $currentSearch['view']->results->getResultTotal() == 0) { $columnIndex += $columns; continue; } ?> <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> - <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> - <?=$this->render('combined/results-' . $templateSuffix . '.phtml', array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch))?> + <? + $viewParams = array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch); + // Enable cart if appropriate: + $viewParams['showCartControls'] = $this->supportsCartOptions[$columnIndex] && $this->showCartControls; + ?> + <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> + <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> + <?=$this->render('combined/results-' . $templateSuffix . '.phtml', $viewParams)?> + </div> </div> <? $columnIndex += $columns ?> <? endwhile; ?> </div> -<? endfor; ?> \ No newline at end of file +<? endfor; ?> diff --git a/themes/blueprint/templates/combined/stack-left.phtml b/themes/blueprint/templates/combined/stack-left.phtml index bd3d72e33565168f37220e0c97ba31300a3ffa5b..012ed3507d017f34f7dff69e6d89127503ecc881 100644 --- a/themes/blueprint/templates/combined/stack-left.phtml +++ b/themes/blueprint/templates/combined/stack-left.phtml @@ -21,8 +21,15 @@ <? $currentSearch = $searches[$columnIndex]; ?> <div class="span-<?=$span ?> combined-list"> <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> - <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> - <?=$this->render('combined/results-' . $templateSuffix . '.phtml', array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch))?> + <? + $viewParams = array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch); + // Enable cart if appropriate: + $viewParams['showCartControls'] = $this->supportsCartOptions[$columnIndex] && $this->showCartControls; + ?> + <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> + <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> + <?=$this->render('combined/results-' . $templateSuffix . '.phtml', $viewParams)?> + </div> </div> </div> -<? endfor; ?> \ No newline at end of file +<? endfor; ?> diff --git a/themes/blueprint/templates/combined/stack-right.phtml b/themes/blueprint/templates/combined/stack-right.phtml index 8f8031d0bbab3e652be954f1f21e18846b7bae69..90195563ffc754e6ec01d15118be10e7295cbdca 100644 --- a/themes/blueprint/templates/combined/stack-right.phtml +++ b/themes/blueprint/templates/combined/stack-right.phtml @@ -7,11 +7,18 @@ <div class="span-<?=$span ?> combined-list"> <? endif; ?> <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> - <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> - <?=$this->render('combined/results-' . $templateSuffix . '.phtml', array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch))?> + <? + $viewParams = array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch); + // Enable cart if appropriate: + $viewParams['showCartControls'] = $this->supportsCartOptions[$columnIndex] && $this->showCartControls; + ?> + <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> + <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> + <?=$this->render('combined/results-' . $templateSuffix . '.phtml', $viewParams)?> + </div> </div> <? ++$columnIndex ?> <? if($columnIndex < $columns || $columnIndex == $sectionCount): ?> </div> <? endif; ?> -<? endforeach; ?> \ No newline at end of file +<? endforeach; ?> diff --git a/themes/bootstrap/css/combined.css b/themes/bootstrap/css/combined.css index 03e6f28ce06b5c83bf5c7b8ba34b11712350527a..7c3bb4e6a04b1280623d9c0f9d2d9b5354f7ceda 100644 --- a/themes/bootstrap/css/combined.css +++ b/themes/bootstrap/css/combined.css @@ -1,3 +1,7 @@ -.combined-list .result .left {width:23.0769%} -.combined-list .result .middle {width:65.812%} +.combined-list .result .left {margin:0;width:25%} +.combined-list .result .middle {margin:0;width:65%} .combined-list .result .right {display:none} +.result {padding-right:0} +.result > .checkbox {padding-right:0;width:10%} +.result > .span11 {margin:0;width:85%} +.form-inline > .clearfix {margin-left:7px} diff --git a/themes/bootstrap/templates/combined/results-list.phtml b/themes/bootstrap/templates/combined/results-list.phtml index 0c796a2d755fa1c2ef8dc88fa07f055c3b99ed98..fd9f8eb3218b5df0d15c902e74ad3be370bfd05e 100644 --- a/themes/bootstrap/templates/combined/results-list.phtml +++ b/themes/bootstrap/templates/combined/results-list.phtml @@ -66,8 +66,11 @@ <? $viewType = in_array('list', array_keys($params->getViewList())) ? 'list' : $params->getView(); - $viewParams = array('results' => $results, 'params' => $params); - if (!$params->getOptions()->supportsCart()) { + $viewParams = array( + 'results' => $results, + 'params' => $params + ); + if(isset($this->showCartControls) && !$this->showCartControls) { $viewParams['hideCartControls'] = true; } ?> diff --git a/themes/bootstrap/templates/combined/results.phtml b/themes/bootstrap/templates/combined/results.phtml index 8e275c03c418908a8b9d11a36e729225e247c241..d20c3f85ec4fed8ca2c9fabe5d0f7c71dca169ba 100644 --- a/themes/bootstrap/templates/combined/results.phtml +++ b/themes/bootstrap/templates/combined/results.phtml @@ -34,6 +34,9 @@ $this->escapeHtml($lookfor) . '</li>'; } + // Enable cart if appropriate: + $this->showCartControls = $this->supportsCart && $this->cart()->isActive(); + // Load Javascript dependencies into header: $this->headScript()->appendFile("check_item_statuses.js"); $this->headScript()->appendFile("check_save_statuses.js"); @@ -49,12 +52,20 @@ <? endforeach; ?> </div> <? endif; ?> - <? if ($this->supportsCart && $this->cart()->isActive()): ?> + <? if ($this->showCartControls): ?> <div class="clearfix"> <?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', array('idPrefix' => ''))?> </div> <? endif; ?> - <?=$this->context($this)->renderInContext('combined/stack-'.$placement.'.phtml', array('searchClassId' => $searchClassId, 'combinedResults' => $this->combinedResults))?> + <? + $viewParams = array( + 'searchClassId' => $searchClassId, + 'combinedResults' => $this->combinedResults, + 'supportsCartOptions' => $this->supportsCartOptions, + 'showCartControls' => $this->showCartControls + ); + ?> + <?=$this->context($this)->renderInContext('combined/stack-'.$placement.'.phtml', $viewParams)?> <? $recs = $combinedResults->getRecommendations('bottom'); if (!empty($recs)): ?> <div> <? foreach ($recs as $current): ?> diff --git a/themes/bootstrap/templates/combined/stack-distributed.phtml b/themes/bootstrap/templates/combined/stack-distributed.phtml index f6edf5c9ab0e11219b493dba5205188c9c45a6e4..5b498a8c2a557ace75de898592cbbfcaf78b4f16 100644 --- a/themes/bootstrap/templates/combined/stack-distributed.phtml +++ b/themes/bootstrap/templates/combined/stack-distributed.phtml @@ -14,9 +14,14 @@ <? $searchClassId = $keys[$columnIndex]; ?> <? $currentSearch = $searches[$columnIndex]; ?> <? if ((!isset($currentSearch['ajax']) || !$currentSearch['ajax']) && isset($currentSearch['hide_if_empty']) && $currentSearch['hide_if_empty'] && $currentSearch['view']->results->getResultTotal() == 0) { $columnIndex += $columns; continue; } ?> + <? + $viewParams = array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch); + // Enable cart if appropriate: + $viewParams['showCartControls'] = $this->supportsCartOptions[$columnIndex] && $this->showCartControls; + ?> <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> - <?=$this->render('combined/results-' . $templateSuffix . '.phtml', array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch))?> + <?=$this->render('combined/results-' . $templateSuffix . '.phtml', $viewParams)?> </div> <? $columnIndex += $columns ?> <? endwhile; ?> diff --git a/themes/bootstrap/templates/combined/stack-left.phtml b/themes/bootstrap/templates/combined/stack-left.phtml index 7e1bc8e6c8c2577f3dc2ba5aba3c881ac1e5acfa..6aa2a320d60d5b70006dafb0d85479093bff45e5 100644 --- a/themes/bootstrap/templates/combined/stack-left.phtml +++ b/themes/bootstrap/templates/combined/stack-left.phtml @@ -11,9 +11,14 @@ <? for ($columnIndex = $columns-1;$columnIndex < $sectionCount;$columnIndex++): ?> <? $searchClassId = $keys[$columnIndex]; ?> <? $currentSearch = $searches[$columnIndex]; ?> + <? + $viewParams = array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch); + // Enable cart if appropriate: + $viewParams['showCartControls'] = $this->supportsCartOptions[$columnIndex] && $this->showCartControls; + ?> <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> - <?=$this->render('combined/results-' . $templateSuffix . '.phtml', array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch))?> + <?=$this->render('combined/results-' . $templateSuffix . '.phtml', $viewParams)?> </div> <? endfor; ?> </div> diff --git a/themes/bootstrap/templates/combined/stack-right.phtml b/themes/bootstrap/templates/combined/stack-right.phtml index 8240eb5668df8f97d24aa46a94401133ddfbb1f7..d163a33f118766a294f6b6df32b1b5193a244190 100644 --- a/themes/bootstrap/templates/combined/stack-right.phtml +++ b/themes/bootstrap/templates/combined/stack-right.phtml @@ -7,10 +7,15 @@ <? if ($columnIndex < $columns): ?> <div class="span<?=$span ?> combined-list"> <? endif; ?> - <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> - <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> - <?=$this->render('combined/results-' . $templateSuffix . '.phtml', array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch))?> - </div> + <? + $viewParams = array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch); + // Enable cart if appropriate: + $viewParams['showCartControls'] = $this->supportsCartOptions[$columnIndex] && $this->showCartControls; + ?> + <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> + <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> + <?=$this->render('combined/results-' . $templateSuffix . '.phtml', $viewParams)?> + </div> <? ++$columnIndex ?> <? if($columnIndex < $columns || $columnIndex == $sectionCount): ?> </div> diff --git a/themes/bootstrap3/templates/combined/results-list.phtml b/themes/bootstrap3/templates/combined/results-list.phtml index 678ee6f7013d24ee699cd8dfb2375b3b57da795a..de2d54fa7c112f3f56449f23b37909ab3b2c0a13 100644 --- a/themes/bootstrap3/templates/combined/results-list.phtml +++ b/themes/bootstrap3/templates/combined/results-list.phtml @@ -68,9 +68,11 @@ ? 'list' : $params->getView(); $viewParams = array( 'results' => $results, - 'params' => $params, - 'showCartControls' => $this->showCartControls + 'params' => $params ); + if(isset($this->showCartControls) && !$this->showCartControls) { + $viewParams['hideCartControls'] = true; + } ?> <?=$this->render('search/list-' . $viewType . '.phtml', $viewParams)?> <? if ($currentSearch['more_link']): ?>