Issue #2473877 by Lendude, quietone, pefferen: Views UI progress indicator styled as pager and placed on strange location
(cherry picked from commit 46e744326c
)
merge-requests/2505/head
parent
4f3b578c27
commit
388393e860
|
@ -222,8 +222,8 @@ function views_ui_standard_display_dropdown(&$form, FormStateInterface $form_sta
|
||||||
|
|
||||||
// Add the "2 of 3" progress indicator.
|
// Add the "2 of 3" progress indicator.
|
||||||
if ($form_progress = $view->getFormProgress()) {
|
if ($form_progress = $view->getFormProgress()) {
|
||||||
$form['progress']['#markup'] = '<div id="views-progress-indicator" class="views-progress-indicator">' . t('@current of @total', ['@current' => $form_progress['current'], '@total' => $form_progress['total']]) . '</div>';
|
$arguments = $form['#title']->getArguments() + ['@current' => $form_progress['current'], '@total' => $form_progress['total']];
|
||||||
$form['progress']['#weight'] = -1001;
|
$form['#title'] = t('Configure @type @current of @total: @item', $arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The dropdown should not be added when :
|
// The dropdown should not be added when :
|
||||||
|
|
|
@ -78,6 +78,7 @@ class ConfigHandler extends ViewsFormBase {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$types = ViewExecutable::getHandlerTypes();
|
$types = ViewExecutable::getHandlerTypes();
|
||||||
|
$form['#title'] = $this->t('Configure @type: @item', ['@type' => $types[$type]['lstitle'], '@item' => $handler->adminLabel()]);
|
||||||
|
|
||||||
// If this item can come from the default display, show a dropdown
|
// If this item can come from the default display, show a dropdown
|
||||||
// that lets the user choose which display the changes should apply to.
|
// that lets the user choose which display the changes should apply to.
|
||||||
|
@ -150,8 +151,6 @@ class ConfigHandler extends ViewsFormBase {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$form['#title'] = $this->t('Configure @type: @item', ['@type' => $types[$type]['lstitle'], '@item' => $handler->adminLabel()]);
|
|
||||||
|
|
||||||
if (!empty($handler->definition['help'])) {
|
if (!empty($handler->definition['help'])) {
|
||||||
$form['options']['form_description'] = [
|
$form['options']['form_description'] = [
|
||||||
'#markup' => $handler->definition['help'],
|
'#markup' => $handler->definition['help'],
|
||||||
|
|
Loading…
Reference in New Issue