fixed and refactored solr search main function

This commit is contained in:
Bachir Soussi Chiadmi
2016-03-29 12:42:22 +02:00
parent 7b11f2794e
commit 39dc81ad14
2 changed files with 50 additions and 64 deletions

View File

@@ -31,37 +31,26 @@
*/
?>
<?php //dsm($index, 'index'); ?>
<?php //dsm($search_performance, 'search_performance'); ?>
<?php //dsm($result_count, 'result_count'); ?>
<?php //if (!empty($result_count)) : ?>
<div class="materiobase-results <?php print ' view-mode-' . $variables['view_mode'];?>">
<?php //if ($result_count) : ?>
<?php if(!$perfascard): ?>
<p class="search-performance"><?php print render($search_performance); ?></P>
<?php endif; ?>
<?php //print render($spellcheck); ?>
<div class="search-results">
<?php if($perfascard): ?>
<article class="search-performance <?php print ' view-mode-' . $variables['view_mode'];?>">
<div class="inner">
<?php if(!$perfascard): ?>
<p class="search-performance"><?php print render($search_performance); ?></P>
<?php endif; ?>
<p><?php print render($search_performance); ?></P>
</div>
</article>
<?php endif; ?>
<?php //dsm($items, '$items'); ?>
<?php
// TODO: use cache system to gain in speed, view http://drupal.org/node/930760
?>
<?php if ($result_count) : ?>
<?php print render(entity_view($index->item_type, $items, $variables['view_mode'])); ?>
<?php endif; ?>
</div>
<?php print $pager; ?>
<?php //else : ?>
<!-- <p class="search-noresults"><?php print t('Your search yielded no results.');?></p> -->
<?php //endif; ?>
<div class="search-results">
<?php if($perfascard): ?>
<article class="search-performance <?php print ' view-mode-' . $variables['view_mode'];?>">
<div class="inner">
<p><?php print render($search_performance); ?></P>
</div>
</article>
<?php endif; ?>
<?php
// TODO: use cache system to gain in speed, view http://drupal.org/node/930760
?>
<?php if ($result_count) : ?>
<?php print render(entity_view('node', $items, $variables['view_mode'])); ?>
<?php endif; ?>
</div>
<?php print $pager; ?>
</div>
<?php //endif; ?>