From 5453b82fbc0f7e0ced833d874838e6c488d79c27 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Sun, 28 Jan 2024 02:56:04 -0400 Subject: [PATCH] Move lists partials views to their own folder --- app/views/admin/partials/{ => lists}/links.php | 0 app/views/admin/partials/{ => lists}/media.php | 0 app/views/admin/partials/{ => lists}/pages.php | 0 app/views/admin/partials/{ => lists}/posts.php | 0 app/views/admin/partials/{ => lists}/tags.php | 0 app/views/admin/partials/{ => lists}/users.php | 0 bootstrap/routes.php | 12 ++++++------ 7 files changed, 6 insertions(+), 6 deletions(-) rename app/views/admin/partials/{ => lists}/links.php (100%) rename app/views/admin/partials/{ => lists}/media.php (100%) rename app/views/admin/partials/{ => lists}/pages.php (100%) rename app/views/admin/partials/{ => lists}/posts.php (100%) rename app/views/admin/partials/{ => lists}/tags.php (100%) rename app/views/admin/partials/{ => lists}/users.php (100%) diff --git a/app/views/admin/partials/links.php b/app/views/admin/partials/lists/links.php similarity index 100% rename from app/views/admin/partials/links.php rename to app/views/admin/partials/lists/links.php diff --git a/app/views/admin/partials/media.php b/app/views/admin/partials/lists/media.php similarity index 100% rename from app/views/admin/partials/media.php rename to app/views/admin/partials/lists/media.php diff --git a/app/views/admin/partials/pages.php b/app/views/admin/partials/lists/pages.php similarity index 100% rename from app/views/admin/partials/pages.php rename to app/views/admin/partials/lists/pages.php diff --git a/app/views/admin/partials/posts.php b/app/views/admin/partials/lists/posts.php similarity index 100% rename from app/views/admin/partials/posts.php rename to app/views/admin/partials/lists/posts.php diff --git a/app/views/admin/partials/tags.php b/app/views/admin/partials/lists/tags.php similarity index 100% rename from app/views/admin/partials/tags.php rename to app/views/admin/partials/lists/tags.php diff --git a/app/views/admin/partials/users.php b/app/views/admin/partials/lists/users.php similarity index 100% rename from app/views/admin/partials/users.php rename to app/views/admin/partials/lists/users.php diff --git a/bootstrap/routes.php b/bootstrap/routes.php index 0651dc2..0e703f1 100644 --- a/bootstrap/routes.php +++ b/bootstrap/routes.php @@ -198,7 +198,7 @@ return json_encode([ 'next_page' => $page_mod->isNextPageAvailable($_GET['page'], ITEMS_PER_PAGE, $where), 'count' => $page_mod->count($where), - 'html' => $view->get('admin/partials/pages.php', [ + 'html' => $view->get('admin/partials/lists/pages.php', [ 'pages' => $page_mod->getPage($_GET['page'], ITEMS_PER_PAGE, $where, $_GET['order'] ?? ''), ]), ]); @@ -283,7 +283,7 @@ return json_encode([ 'next_page' => $post_mod->isNextPageAvailable($_GET['page'], ITEMS_PER_PAGE, $where), 'count' => $post_mod->count($where), - 'html' => $view->get('admin/partials/posts.php', [ + 'html' => $view->get('admin/partials/lists/posts.php', [ 'posts' => $post_mod->getPage($_GET['page'], ITEMS_PER_PAGE, $where, $_GET['order'] ?? ''), ]), ]); @@ -375,7 +375,7 @@ return json_encode([ 'next_page' => $user_mod->isNextPageAvailable($_GET['page'], ITEMS_PER_PAGE, $where), 'count' => $user_mod->count($where), - 'html' => $view->get('admin/partials/users.php', [ + 'html' => $view->get('admin/partials/lists/users.php', [ 'users' => $user_mod->getPage($_GET['page'], ITEMS_PER_PAGE, $where, $_GET['order'] ?? ''), ]), ]); @@ -463,7 +463,7 @@ return json_encode([ 'next_page' => $link_mod->isNextPageAvailable($_GET['page'], ITEMS_PER_PAGE, $where), 'count' => $link_mod->count($where), - 'html' => $view->get('admin/partials/links.php', [ + 'html' => $view->get('admin/partials/lists/links.php', [ 'links' => $link_mod->getPage($_GET['page'], ITEMS_PER_PAGE, $where, $_GET['order'] ?? ''), ]), ]); @@ -526,7 +526,7 @@ return json_encode([ 'next_page' => $tag_mod->isNextPageAvailable($_GET['page'], ITEMS_PER_PAGE, $where), 'count' => $tag_mod->count($where), - 'html' => $view->get('admin/partials/tags.php', [ + 'html' => $view->get('admin/partials/lists/tags.php', [ 'tags' => $tag_mod->getPage($_GET['page'], ITEMS_PER_PAGE, $where, $_GET['order'] ?? ''), ]), ]); @@ -591,7 +591,7 @@ return json_encode([ 'next_page' => false, 'count' => count($files), - 'html' => $view->get('admin/partials/media.php', [ + 'html' => $view->get('admin/partials/lists/media.php', [ 'files' => $files ? $files : [], ]), ]);