UI fixes and composer bump
This commit is contained in:
@ -17,8 +17,10 @@ use TheTempusProject\Classes\AdminController;
|
||||
use TheTempusProject\Models\User;
|
||||
use TheTempusProject\Models\Comments;
|
||||
use TheTempusProject\Models\Posts;
|
||||
use TheTempusProject\Models\Contact;
|
||||
use TheTempusProject\Plugins\Comments as CommentPlugin;
|
||||
use TheTempusProject\Plugins\Blog as BlogPlugin;
|
||||
use TheTempusProject\Plugins\Contact as ContactPlugin;
|
||||
use TheTempusProject\Canary\Bin\Canary as Debug;
|
||||
|
||||
class Home extends AdminController {
|
||||
@ -58,6 +60,19 @@ class Home extends AdminController {
|
||||
}
|
||||
}
|
||||
|
||||
if ( class_exists( 'TheTempusProject\Plugins\Contact' ) ) {
|
||||
$plugin = new ContactPlugin;
|
||||
|
||||
if ( ! $plugin->checkEnabled() ) {
|
||||
Debug::info( 'Contact Plugin is disabled in the control panel.' );
|
||||
Components::set( 'contactDash', '' );
|
||||
} else {
|
||||
$posts = new Contact;
|
||||
$postsList = Views::simpleView( 'contact.admin.dashboard', $posts->listPaginated( 5 ) );
|
||||
Components::set( 'contactDash', $postsList );
|
||||
}
|
||||
}
|
||||
|
||||
self::$user = new User;
|
||||
$users = Views::simpleView( 'admin.dashboard.users', self::$user->recent( 5 ) );
|
||||
Components::set( 'userDash', $users );
|
||||
|
Reference in New Issue
Block a user