forked from Public/pics
TabularData: take control of juxtapositing pager and form
This commit is contained in:
@@ -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 '
|
||||
|
||||
@@ -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>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user