|
|
|
@ -41,10 +41,20 @@ class Html extends Formatter {
|
|
|
|
$data = reset($data['result']);
|
|
|
|
$data = reset($data['result']);
|
|
|
|
$title = $func;
|
|
|
|
$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);
|
|
|
|
$first = reset($data);
|
|
|
|
$single = ! is_array($first);
|
|
|
|
$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) {
|
|
|
|
if($single) {
|
|
|
|
$content .= "<tr><th>Field</th><th>Value</th></tr>";
|
|
|
|
$content .= "<tr><th>Field</th><th>Value</th></tr>";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|