Bugfixes and Bootstrap 5 finalized

This commit is contained in:
Joey Kimsey
2024-12-17 22:57:55 -05:00
parent 2220c6cda3
commit a859fb7ace
79 changed files with 2011 additions and 1597 deletions

View File

@ -15,8 +15,11 @@ use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Houdini\Classes\Components;
use TheTempusProject\Classes\AdminController;
use TheTempusProject\Models\User;
use TheTempusProject\Plugins\Comments;
use TheTempusProject\Plugins\Blog;
use TheTempusProject\Models\Comments;
use TheTempusProject\Models\Posts;
use TheTempusProject\Plugins\Comments as CommentPlugin;
use TheTempusProject\Plugins\Blog as BlogPlugin;
use TheTempusProject\Canary\Bin\Canary as Debug;
class Home extends AdminController {
public static $user;
@ -30,17 +33,29 @@ class Home extends AdminController {
public function index() {
if ( class_exists( 'TheTempusProject\Plugins\Comments' ) ) {
$comments = new Comments;
self::$comments = $comments->getModel();
$comments = Views::simpleView( 'comments.admin.dashboard', self::$comments->recent( 'all', 5 ) );
Components::set( 'commentDash', $comments );
$plugin = new CommentPlugin;
if ( ! $plugin->checkEnabled() ) {
Debug::info( 'Comments Plugin is disabled in the control panel.' );
Components::set( 'commentDash', '' );
} else {
$comments = new Comments;
$commentList = Views::simpleView( 'comments.admin.dashboard', $comments->recent( 'all', 5 ) );
Components::set( 'commentDash', $commentList );
}
}
if ( class_exists( 'TheTempusProject\Plugins\Blog' ) ) {
$blog = new Blog;
self::$posts = $blog->posts;
$posts = Views::simpleView( 'blog.admin.dashboard', self::$posts->recent( 5 ) );
Components::set( 'blogDash', $posts );
$plugin = new BlogPlugin;
if ( ! $plugin->checkEnabled() ) {
Debug::info( 'Blog Plugin is disabled in the control panel.' );
Components::set( 'blogDash', '' );
} else {
$posts = new Posts;
$postsList = Views::simpleView( 'blog.admin.dashboard', $posts->recent( 5 ) );
Components::set( 'blogDash', $postsList );
}
}
self::$user = new User;