TabularData: take control of juxtapositing pager and form

This commit is contained in:
2025-09-23 15:04:57 +02:00
parent 77fa33730a
commit 2af4e865e0
7 changed files with 22 additions and 16 deletions

View File

@@ -12,10 +12,10 @@ class InlineFormView
{
if (!isset($form['is_embed']))
echo '
<form action="', $form['action'], '" method="', $form['method'], '" class="', $form['class'], '">';
<form action="', $form['action'], '" method="', $form['method'], '" class="', $form['class'] ?? '', '">';
else
echo '
<div class="', $form['class'], '">';
<div class="', $form['class'] ?? '', '">';
if (!empty($form['is_group']))
echo '

View File

@@ -68,19 +68,35 @@ class TabularData extends SubTemplate
}
}
protected function renderPaginationForm($pager, $form, $class='row')
protected function renderPaginationForm($pager, $form)
{
echo '
<div class="', $class, ' clearfix justify-content-end">';
<div class="row clearfix justify-content-end">';
// Page index?
if (!empty($pager))
{
echo '
<div class="col-md">';
PageIndexWidget::paginate($pager);
echo '
</div>';
}
// Form controls?
if (isset($form))
{
echo '
<div class="col-md-auto">';
InlineFormView::renderInlineForm($form);
echo '
</div>';
}
echo '
</div>';
}