specific display for NewSearch
This commit is contained in:
@@ -41,10 +41,20 @@ class Html extends Formatter {
|
||||
$data = reset($data['result']);
|
||||
$title = $func;
|
||||
|
||||
$content = '';
|
||||
|
||||
if($func == 'NewSearch') {
|
||||
$content .= '<p>Count : '.$data['count'].'</p>';
|
||||
$content .= '<p>Facets : '.print_r($data['facets'], true).'</p>';
|
||||
|
||||
unset($data['count']);
|
||||
unset($data['facets']);
|
||||
}
|
||||
|
||||
$first = reset($data);
|
||||
$single = ! is_array($first);
|
||||
|
||||
$content = '<table class="table table-striped table-hover table-condensed table-responsive"><thead>';
|
||||
$content .= '<table class="table table-striped table-hover table-condensed table-responsive"><thead>';
|
||||
if($single) {
|
||||
$content .= "<tr><th>Field</th><th>Value</th></tr>";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user