Skip to content
Snippets Groups Projects
Commit 950c77a7 authored by André Lahmann's avatar André Lahmann
Browse files

* simplified AI staffview

* reverted getRawData to AbstractBase default in RecordDriver SolrAI
parent 616a811a
No related merge requests found
......@@ -679,27 +679,6 @@ class SolrAI extends SolrDefault implements
return $params;
}
/**
* Retrieve raw data from object (primarily for use in staff view and
* autocomplete; avoid using whenever possible).
*
* @return mixed
*/
public function getRawData()
{
$tmp = [];
$i = 0;
$record = $this->getAIRecord();
if (!empty($record)) {
foreach ($record as $key => $value) {
$tmp[$i]['key'] = $key;
$tmp[$i]['value'] = $value;
$i++;
}
}
return $tmp;
}
/**
* Retrieve data from ai-blobserver
*
......
......@@ -3,23 +3,17 @@
// Set page title.
$this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb());
?>
<table class="citation table table-striped">
<? foreach ($this->driver->getRawData() as $data): ?>
<tr>
<th><?=$this->escapeHtml($data['key'])?></th>
<td>
<? if (!is_array($data['value'])) { $data['value'] = array($data['value']); } ?>
<? foreach ($data['value'] as $values): ?>
<? if (is_array($values)): ?>
<? foreach ($values as $value): ?>
<?=$this->escapeHtml($value)?><br />
<table class="citation table table-striped">
<? foreach ($this->driver->getAIRecord() as $field => $values): ?>
<tr>
<th><?=$this->escapeHtml($field)?></th>
<td>
<? if (!is_array($values)) { $values = array($values); } ?>
<? foreach ($values as $value): ?>
<?=$this->escapeHtml(is_array($value) ? print_r($value, true) : $value)?><br />
<? endforeach; ?>
</td>
</tr>
<? endforeach; ?>
<? else: ?>
<?=$this->escapeHtml($values)?><br />
<? endif; ?>
<? endforeach; ?>
</td>
</tr>
<? endforeach; ?>
</table>
</table>
<!-- recordtab - staffviewarray - END -->
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment