mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-11 06:10:03 +08:00
Updated activities table format
Renamed some columns to be more generic and applicable. Removed now redundant book_id column. Allowed nullable entity morph columns for non-entity activity. Ran tests and made required changes.
This commit is contained in:
@ -32,7 +32,7 @@ class AuditLogController extends Controller
|
||||
->orderBy($listDetails['sort'], $listDetails['order']);
|
||||
|
||||
if ($listDetails['event']) {
|
||||
$query->where('key', '=', $listDetails['event']);
|
||||
$query->where('type', '=', $listDetails['event']);
|
||||
}
|
||||
|
||||
if ($listDetails['date_from']) {
|
||||
@ -45,12 +45,12 @@ class AuditLogController extends Controller
|
||||
$activities = $query->paginate(100);
|
||||
$activities->appends($listDetails);
|
||||
|
||||
$keys = DB::table('activities')->select('key')->distinct()->pluck('key');
|
||||
$types = DB::table('activities')->select('type')->distinct()->pluck('type');
|
||||
$this->setPageTitle(trans('settings.audit'));
|
||||
return view('settings.audit', [
|
||||
'activities' => $activities,
|
||||
'listDetails' => $listDetails,
|
||||
'activityKeys' => $keys,
|
||||
'activityTypes' => $types,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user