diff --git a/app/controllers/admin/home.php b/app/controllers/admin/home.php index 6d5fbdd..dedddb1 100644 --- a/app/controllers/admin/home.php +++ b/app/controllers/admin/home.php @@ -22,6 +22,7 @@ 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; +use TheTempusProject\Bedrock\Functions\Input; class Home extends AdminController { public static $user; @@ -77,6 +78,11 @@ class Home extends AdminController { $users = Views::simpleView( 'admin.dashboard.users', self::$user->recent( 5 ) ); Components::set( 'userDash', $users ); + if ( Input::exists( 'submit' ) ) { + $results = Views::simpleView( 'admin.dashboard.users', self::$user->search( Input::post('searchTerm') ) ); + Components::set( 'searchResults', $results ); + } + Views::view( 'admin.dashboard.dash' ); } } diff --git a/app/controllers/usercp.php b/app/controllers/usercp.php index c35ad0d..12b162d 100644 --- a/app/controllers/usercp.php +++ b/app/controllers/usercp.php @@ -104,6 +104,10 @@ class Usercp extends Controller { $userPrefs = App::$activePrefs; if ( Input::exists( 'submit' ) ) { $fields = $prefs->convertFormToArray( true, false ); + // @TODO now i may need to rework the form checker to work with this.... + // if (!Forms::check('userPrefs')) { + // Issues::add( 'error', [ 'There was an error with your request.' => Check::userErrors() ] ); + // } self::$user->updatePrefs( $fields, App::$activeUser->ID ); Issues::add( 'success', 'Your preferences have been updated.' ); // if the image upload fails, need to fall back on original diff --git a/app/models/group.php b/app/models/group.php index 759dae7..f5331a3 100644 --- a/app/models/group.php +++ b/app/models/group.php @@ -38,6 +38,9 @@ class Group extends DatabaseModel { [ 'name', 'varchar', '32' ], [ 'permissions', 'text', '' ], ]; + public $searchFields = [ + 'name', + ]; public $permissionMatrix = [ 'adminAccess' => [ 'pretty' => 'Access Administrator Areas', diff --git a/app/models/log.php b/app/models/log.php index efd7b4a..135758b 100644 --- a/app/models/log.php +++ b/app/models/log.php @@ -46,6 +46,9 @@ class Log extends DatabaseModel { [ 'source', 'varchar', '64' ], [ 'action', 'text', '' ], ]; + public $searchFields = [ + 'source', + ]; /** * The model constructor. diff --git a/app/models/routes.php b/app/models/routes.php index 8333692..a48b834 100644 --- a/app/models/routes.php +++ b/app/models/routes.php @@ -24,6 +24,9 @@ class Routes extends DatabaseModel { [ 'original_url', 'varchar', '32' ], [ 'forwarded_url', 'text', '' ], ]; + public $searchFields = [ + 'nickname', + ]; public $resourceMatrix = [ [ 'original_url' => 'fb', diff --git a/app/models/sessions.php b/app/models/sessions.php index 9edde85..427d573 100644 --- a/app/models/sessions.php +++ b/app/models/sessions.php @@ -36,6 +36,9 @@ class Sessions extends DatabaseModel { [ 'username', 'varchar', '20' ], [ 'token', 'varchar', '120' ], ]; + public $searchFields = [ + 'username', + ]; public static $activeSession = false; /** diff --git a/app/models/token.php b/app/models/token.php index fe9198a..59cb422 100644 --- a/app/models/token.php +++ b/app/models/token.php @@ -31,6 +31,10 @@ class Token extends DatabaseModel { [ 'createdBy', 'int', '10' ], [ 'expiresAt', 'int', '10' ], ]; + public $searchFields = [ + 'name', + 'token', + ]; public $permissionMatrix = [ 'addAppToken' => [ 'pretty' => 'Add Application Tokens', diff --git a/app/models/user.php b/app/models/user.php index 62012fa..0c520d6 100644 --- a/app/models/user.php +++ b/app/models/user.php @@ -44,6 +44,9 @@ class User extends DatabaseModel { [ 'confirmationCode', 'varchar', '80' ], [ 'prefs', 'text', '' ], ]; + public $searchFields = [ + 'username', + ]; public $permissionMatrix = [ 'uploadImages' => [ 'pretty' => 'Upload images (such as avatars)', diff --git a/app/views/about.html b/app/views/about.html index 6a1a1c9..8de7d66 100644 --- a/app/views/about.html +++ b/app/views/about.html @@ -1,7 +1,14 @@
- {SITENAME} was built out of a need to create and manage my own web applications. + {SITENAME} was built out of a need to create and manage web applications. + At the time, I had used wordpress but I didn't want or even need any of the blog functionality. + No matter what plugins you add, no matter how you customize layout, wordpress is still a blog at its core. + There is nothing inherently wrong with a blog, but when you start from a blog, everything is a post, or a plugin. + Under the hood, wordpress is going to run how wordpress wants, as a web interface for accessing text records. +
++ The Tempus Project was always intended to be a web application, not a blog.
Right now, this entire system was built and managed by myself. As stated, I have used my own version of this for years, but translating it to a publicly available product is not a 1-to-1 job. There may be bugs or issues encountered while you use the product. I can't guarantee a fix for every need in every case immediately, but I do actively keep track of bugs and work hard to ensure everyone has a great experience using the app. diff --git a/app/views/admin/dashboard/dash.html b/app/views/admin/dashboard/dash.html index 240d46a..7f0d4c0 100644 --- a/app/views/admin/dashboard/dash.html +++ b/app/views/admin/dashboard/dash.html @@ -18,4 +18,28 @@ {blogDash}