diff --git a/controllers/ManageAlbums.php b/controllers/ManageAlbums.php index 248e369..d5176e2 100644 --- a/controllers/ManageAlbums.php +++ b/controllers/ManageAlbums.php @@ -18,8 +18,7 @@ class ManageAlbums extends HTMLController 'form' => [ 'action' => BASEURL . '/editalbum/', 'method' => 'get', - 'class' => 'col-md-6 text-end', - 'buttons' => [ + 'controls' => [ 'add' => [ 'type' => 'submit', 'caption' => 'Add new album', @@ -58,7 +57,6 @@ class ManageAlbums extends HTMLController 'title' => 'Manage albums', 'no_items_label' => 'No albums meet the requirements of the current filter.', 'items_per_page' => 9999, - 'index_class' => 'col-md-6', 'base_url' => BASEURL . '/managealbums/', 'get_data' => function($offset, $limit, $order, $direction) { return Tag::getOffset($offset, $limit, $order, $direction, true); diff --git a/controllers/ManageAssets.php b/controllers/ManageAssets.php index 1d73200..d4461e4 100644 --- a/controllers/ManageAssets.php +++ b/controllers/ManageAssets.php @@ -23,7 +23,6 @@ class ManageAssets extends HTMLController 'form' => [ 'action' => BASEURL . '/manageassets/?' . Session::getSessionTokenKey() . '=' . Session::getSessionToken(), 'method' => 'post', - 'class' => 'col-md-6 text-end', 'is_embed' => true, 'controls' => [ 'deleteChecked' => [ @@ -113,7 +112,6 @@ class ManageAssets extends HTMLController 'title' => 'Manage assets', 'no_items_label' => 'No assets meet the requirements of the current filter.', 'items_per_page' => 30, - 'index_class' => 'col-md-6', 'base_url' => BASEURL . '/manageassets/', 'get_data' => 'Asset::getOffset', 'get_count' => 'Asset::getCount', diff --git a/controllers/ManageErrors.php b/controllers/ManageErrors.php index b8f608c..f0fbb26 100644 --- a/controllers/ManageErrors.php +++ b/controllers/ManageErrors.php @@ -29,7 +29,6 @@ class ManageErrors extends HTMLController 'form' => [ 'action' => BASEURL . '/manageerrors/?' . Session::getSessionTokenKey() . '=' . Session::getSessionToken(), 'method' => 'post', - 'class' => 'col-md-6 text-end', 'controls' => [ 'clear' => [ 'type' => 'submit', @@ -95,7 +94,6 @@ class ManageErrors extends HTMLController 'sort_direction' => $_GET['dir'] ?? '', 'no_items_label' => "No errors to display -- we're all good!", 'items_per_page' => 20, - 'index_class' => 'col-md-6', 'base_url' => BASEURL . '/manageerrors/', 'get_count' => 'ErrorLog::getCount', 'get_data' => 'ErrorLog::getOffset', diff --git a/controllers/ManageTags.php b/controllers/ManageTags.php index 6f79df7..ce937e5 100644 --- a/controllers/ManageTags.php +++ b/controllers/ManageTags.php @@ -20,7 +20,6 @@ class ManageTags extends HTMLController 'form' => [ 'action' => BASEURL . '/edittag/', 'method' => 'get', - 'class' => 'col-md-6 text-end', 'controls' => [ 'add' => [ 'type' => 'submit', @@ -70,8 +69,7 @@ class ManageTags extends HTMLController 'sort_direction' => $_GET['dir'] ?? '', 'title' => 'Manage tags', 'no_items_label' => 'No tags meet the requirements of the current filter.', - 'items_per_page' => 30, - 'index_class' => 'col-md-6', + 'items_per_page' => 9999, 'base_url' => BASEURL . '/managetags/', 'get_data' => function($offset, $limit, $order, $direction) { return Tag::getOffset($offset, $limit, $order, $direction, false); diff --git a/controllers/ManageUsers.php b/controllers/ManageUsers.php index a8c35ee..0f7f419 100644 --- a/controllers/ManageUsers.php +++ b/controllers/ManageUsers.php @@ -20,7 +20,6 @@ class ManageUsers extends HTMLController 'form' => [ 'action' => BASEURL . '/edituser/', 'method' => 'get', - 'class' => 'col-md-6 text-end', 'controls' => [ 'add' => [ 'type' => 'submit', @@ -86,7 +85,6 @@ class ManageUsers extends HTMLController 'title' => 'Manage users', 'no_items_label' => 'No users meet the requirements of the current filter.', 'items_per_page' => 30, - 'index_class' => 'col-md-6', 'base_url' => BASEURL . '/manageusers/', 'get_data' => 'Member::getOffset', 'get_count' => 'Member::getCount', diff --git a/templates/InlineFormView.php b/templates/InlineFormView.php index 779146e..c737ff4 100644 --- a/templates/InlineFormView.php +++ b/templates/InlineFormView.php @@ -12,10 +12,10 @@ class InlineFormView { if (!isset($form['is_embed'])) echo ' -
'; + '; else echo ' -
'; +
'; if (!empty($form['is_group'])) echo ' diff --git a/templates/TabularData.php b/templates/TabularData.php index 099ae4c..5c558fa 100644 --- a/templates/TabularData.php +++ b/templates/TabularData.php @@ -68,19 +68,35 @@ class TabularData extends SubTemplate } } - protected function renderPaginationForm($pager, $form, $class='row') + protected function renderPaginationForm($pager, $form) { echo ' -
'; +
'; // Page index? if (!empty($pager)) + { + echo ' +
'; + PageIndexWidget::paginate($pager); + echo ' +
'; + } + // Form controls? if (isset($form)) + { + echo ' +
'; + InlineFormView::renderInlineForm($form); + echo ' +
'; + } + echo '
'; }