Commit e5d8fced authored by alexpott's avatar alexpott

Issue #2178651 by ianthomas_uk: Fixed Consider UX implications of indexed vs...

Issue #2178651 by ianthomas_uk: Fixed Consider UX implications of indexed vs non-indexed search pages.
parent 8b45d212
......@@ -97,7 +97,10 @@ public function buildHeader() {
);
$header['status'] = array(
'data' => $this->t('Status'),
'class' => array(RESPONSIVE_PRIORITY_LOW),
);
$header['progress'] = array(
'data' => $this->t('Indexing progress'),
'class' => array(RESPONSIVE_PRIORITY_MEDIUM),
);
return $header + parent::buildHeader();
}
......@@ -131,6 +134,18 @@ public function buildRow(EntityInterface $entity) {
$status = $this->t('Disabled');
}
$row['status']['#markup'] = $status;
if ($entity->isIndexable()) {
$status = $entity->getPlugin()->indexStatus();
$row['progress']['#markup'] = $this->t('%num_indexed of %num_total indexed', array(
'%num_indexed' => $status['total'] - $status['remaining'],
'%num_total' => $status['total']
));
}
else {
$row['progress']['#markup'] = $this->t('Does not use index');
}
return $row + parent::buildRow($entity);
}
......@@ -158,7 +173,7 @@ public function buildForm(array $form, array &$form_state) {
$status = '<p><strong>' . $this->t('%percentage of the site has been indexed.', array('%percentage' => $percentage)) . ' ' . $count . '</strong></p>';
$form['status'] = array(
'#type' => 'details',
'#title' => $this->t('Indexing status'),
'#title' => $this->t('Indexing progress'),
'#open' => TRUE,
);
$form['status']['status'] = array('#markup' => $status);
......
Markdown is supported
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