mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
April 9 update v2
This commit is contained in:
@@ -330,6 +330,10 @@ class GoogleDriveFile extends Model
|
||||
|
||||
public static function getSidebarFile()
|
||||
{
|
||||
if (!\App\GoogleDriveFile::checkConfig())
|
||||
{
|
||||
return [];
|
||||
}
|
||||
$user = \Auth::user();
|
||||
$sidebarArray = [];
|
||||
$dirList = \App\GoogleDriveFile::all();
|
||||
|
||||
@@ -85,38 +85,67 @@ class FilesController extends Controller
|
||||
|
||||
public function guide()
|
||||
{
|
||||
$dirID = \App\GoogleDriveFile::findByPath('.Privé/.Staff/.Guide');
|
||||
$dir = collect(\Storage::cloud()->listContents($dirID->id,false))->sortBy('name');
|
||||
return view('admin.files.guide',['dir' => $dir]);
|
||||
if (\App\GoogleDriveFile::checkConfig())
|
||||
{
|
||||
$dirID = \App\GoogleDriveFile::findByPath('.Privé/.Staff/.Guide');
|
||||
$dir = collect(\Storage::cloud()->listContents($dirID->id,false))->sortBy('name');
|
||||
return view('admin.files.guide',['dir' => $dir]);
|
||||
}
|
||||
return redirect('/admin')->with('error','Google Drive n\'est pas configuré');
|
||||
}
|
||||
|
||||
public function instruction()
|
||||
{
|
||||
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Staff/.Instruction')->first()->id, 'mode' => 'folder']);
|
||||
if (\App\GoogleDriveFile::checkConfig())
|
||||
{
|
||||
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Staff/.Instruction')->first()->id, 'mode' => 'folder']);
|
||||
}
|
||||
return redirect('/admin')->with('error','Google Drive n\'est pas configuré');
|
||||
|
||||
}
|
||||
|
||||
public function cadet()
|
||||
{
|
||||
if (!\App\GoogleDriveFile::checkConfig())
|
||||
{
|
||||
return redirect('/admin')->with('error','Google Drive n\'est pas configuré');
|
||||
}
|
||||
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Cadet')->first()->id, 'mode' => 'folder']);
|
||||
}
|
||||
|
||||
public function staff()
|
||||
{
|
||||
if (!\App\GoogleDriveFile::checkConfig())
|
||||
{
|
||||
return redirect('/admin')->with('error','Google Drive n\'est pas configuré');
|
||||
}
|
||||
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Staff')->first()->id, 'mode' => 'folder']);
|
||||
}
|
||||
|
||||
public function etamas()
|
||||
{
|
||||
if (!\App\GoogleDriveFile::checkConfig())
|
||||
{
|
||||
return redirect('/admin')->with('error','Google Drive n\'est pas configuré');
|
||||
}
|
||||
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.ETAMAS')->first()->id, 'mode' => 'folder']);
|
||||
}
|
||||
|
||||
public function officier()
|
||||
{
|
||||
if (!\App\GoogleDriveFile::checkConfig())
|
||||
{
|
||||
return redirect('/admin')->with('error','Google Drive n\'est pas configuré');
|
||||
}
|
||||
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Officier')->first()->id, 'mode' => 'folder']);
|
||||
}
|
||||
|
||||
public function publique()
|
||||
{
|
||||
if (!\App\GoogleDriveFile::checkConfig())
|
||||
{
|
||||
return redirect('/admin')->with('error','Google Drive n\'est pas configuré');
|
||||
}
|
||||
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Publique')->first()->id, 'mode' => 'folder']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user