Replace generic alert, form and table templates with new Bootstrap equivalents

This commit is contained in:
2023-03-11 13:20:59 +01:00
parent daf6b6b264
commit f9eefe7b41
18 changed files with 681 additions and 573 deletions

View File

@@ -18,7 +18,7 @@ class ManageAlbums extends HTMLController
'form' => [
'action' => BASEURL . '/editalbum/',
'method' => 'get',
'class' => 'floatright',
'class' => 'float-end',
'buttons' => [
'add' => [
'type' => 'submit',
@@ -60,7 +60,7 @@ 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' => 'floatleft',
'index_class' => 'float-start',
'base_url' => BASEURL . '/managealbums/',
'get_data' => function($offset = 0, $limit = 9999, $order = '', $direction = 'up') {
if (!in_array($order, ['id_tag', 'tag', 'slug', 'count']))

View File

@@ -29,7 +29,7 @@ class ManageErrors extends HTMLController
'form' => [
'action' => BASEURL . '/manageerrors/?' . Session::getSessionTokenKey() . '=' . Session::getSessionToken(),
'method' => 'post',
'class' => 'floatright',
'class' => 'float-end',
'buttons' => [
'flush' => [
'type' => 'submit',
@@ -99,7 +99,7 @@ class ManageErrors extends HTMLController
'sort_direction' => !empty($_GET['dir']) ? $_GET['dir'] : '',
'no_items_label' => "No errors to display -- we're all good!",
'items_per_page' => 20,
'index_class' => 'floatleft',
'index_class' => 'float-start',
'base_url' => BASEURL . '/manageerrors/',
'get_count' => 'ErrorLog::getCount',
'get_data' => function($offset = 0, $limit = 20, $order = '', $direction = 'down') {

View File

@@ -18,7 +18,7 @@ class ManageTags extends HTMLController
'form' => [
'action' => BASEURL . '/edittag/',
'method' => 'get',
'class' => 'floatright',
'class' => 'float-end',
'buttons' => [
'add' => [
'type' => 'submit',
@@ -65,7 +65,7 @@ class ManageTags extends HTMLController
'title' => 'Manage tags',
'no_items_label' => 'No tags meet the requirements of the current filter.',
'items_per_page' => 30,
'index_class' => 'floatleft',
'index_class' => 'float-start',
'base_url' => BASEURL . '/managetags/',
'get_data' => function($offset = 0, $limit = 30, $order = '', $direction = 'up') {
if (!in_array($order, ['id_tag', 'tag', 'slug', 'kind', 'count']))

View File

@@ -18,7 +18,7 @@ class ManageUsers extends HTMLController
'form' => [
'action' => BASEURL . '/edituser/',
'method' => 'get',
'class' => 'floatright',
'class' => 'float-end',
'buttons' => [
'add' => [
'type' => 'submit',
@@ -94,7 +94,7 @@ 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' => 'floatleft',
'index_class' => 'float-start',
'base_url' => BASEURL . '/manageusers/',
'get_data' => function($offset = 0, $limit = 30, $order = '', $direction = 'down') {
if (!in_array($order, ['id_user', 'surname', 'first_name', 'slug', 'emailaddress', 'last_action_time', 'ip_address', 'is_admin']))

View File

@@ -53,7 +53,7 @@ class ViewPeople extends HTMLController
'base_url' => BASEURL . '/people/',
'page_slug' => 'page/%PAGE%/',
]);
$this->page->adopt(new Pagination($pagination));
$this->page->adopt(new PageIndexWidget($pagination));
$this->page->setCanonicalUrl(BASEURL . '/people/' . ($page > 1 ? 'page/' . $page . '/' : ''));
}

View File

@@ -112,7 +112,7 @@ class ViewPhotoAlbum extends HTMLController
'base_url' => BASEURL . '/' . (isset($_GET['tag']) ? $_GET['tag'] . '/' : ''),
'page_slug' => 'page/%PAGE%/',
]);
$this->page->adopt(new Pagination($index));
$this->page->adopt(new PageIndexWidget($index));
}
// Set the canonical url.

View File

@@ -47,7 +47,7 @@ class ViewTimeline extends HTMLController
'base_url' => BASEURL . '/timeline/',
'page_slug' => 'page/%PAGE%/',
]);
$this->page->adopt(new Pagination($index));
$this->page->adopt(new PageIndexWidget($index));
}
// Set the canonical url.