update to bootstrap 4 p1, bugfix for logoLarge, logging cleanup, more

This commit is contained in:
Joey Kimsey
2024-12-08 04:35:25 -05:00
parent 9abd3865f5
commit dcbe7c2ac0
25 changed files with 509 additions and 264 deletions

View File

@ -73,12 +73,12 @@ class Notification extends DatabaseModel {
'expiresAt', '<', time(),
];
if ( empty( $limit ) ) {
$notifications = self::$db->getPaginated( $this->tableName, $whereClause );
$notifications = self::$db->get( $this->tableName, $whereClause );
} else {
$notifications = self::$db->getPaginated( $this->tableName, $whereClause, 'ID', 'DESC', [0, $limit] );
$notifications = self::$db->get( $this->tableName, $whereClause, 'ID', 'DESC', [0, $limit] );
}
if ( !$notifications->count() ) {
Debug::info( 'No Notifications found.' );
Debug::info( 'Notification:getByUser No Notifications found' );
return false;
}
return $this->filter( $notifications->results() );

View File

@ -33,7 +33,7 @@ class Notifications extends Plugin {
];
public $admin_links = [
[
'text' => '<i class="glyphicon glyphicon-bell"></i> Notify',
'text' => '<i class="fa fa-fw fa-bell"></i> Notify',
'url' => '{ROOT_URL}admin/notifications',
],
];
@ -49,14 +49,14 @@ class Notifications extends Plugin {
$messageBadge = '';
}
Components::set( 'NBADGE', $messageBadge );
if ( App::$isLoggedIn ) {
Components::set( 'recentNotifications', Views::simpleView( 'notifications.nav.recentNotificationsDropdown', $notifications->getByUser( 10 ) ) );
} else {
Components::set( 'recentNotifications', '' );
}
if ( ! self::$loaded ) {
if ( App::$isLoggedIn ) {
Components::set( 'recentNotifications', Views::simpleView( 'notifications.nav.recentNotificationsDropdown', $notifications->getByUser( 10 ) ) );
} else {
Components::set( 'recentNotifications', '' );
}
App::$topNavRight .= '{recentNotifications}';
App::$topNavRightDropdown .= '<li><a href="{ROOT_URL}notifications"><i class="glyphicon glyphicon-bell"></i> Notifications {NBADGE}</a></li>';
App::$topNavRightDropdown .= '<li><a href="{ROOT_URL}notifications"><i class="fa fa-fw fa-bell"></i> Notifications {NBADGE}</a></li>';
self::$loaded = true;
}
}