mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
April 9 update v2
This commit is contained in:
@@ -330,6 +330,10 @@ class GoogleDriveFile extends Model
|
|||||||
|
|
||||||
public static function getSidebarFile()
|
public static function getSidebarFile()
|
||||||
{
|
{
|
||||||
|
if (!\App\GoogleDriveFile::checkConfig())
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
$user = \Auth::user();
|
$user = \Auth::user();
|
||||||
$sidebarArray = [];
|
$sidebarArray = [];
|
||||||
$dirList = \App\GoogleDriveFile::all();
|
$dirList = \App\GoogleDriveFile::all();
|
||||||
|
|||||||
@@ -84,39 +84,68 @@ class FilesController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function guide()
|
public function guide()
|
||||||
|
{
|
||||||
|
if (\App\GoogleDriveFile::checkConfig())
|
||||||
{
|
{
|
||||||
$dirID = \App\GoogleDriveFile::findByPath('.Privé/.Staff/.Guide');
|
$dirID = \App\GoogleDriveFile::findByPath('.Privé/.Staff/.Guide');
|
||||||
$dir = collect(\Storage::cloud()->listContents($dirID->id,false))->sortBy('name');
|
$dir = collect(\Storage::cloud()->listContents($dirID->id,false))->sortBy('name');
|
||||||
return view('admin.files.guide',['dir' => $dir]);
|
return view('admin.files.guide',['dir' => $dir]);
|
||||||
}
|
}
|
||||||
|
return redirect('/admin')->with('error','Google Drive n\'est pas configuré');
|
||||||
|
}
|
||||||
|
|
||||||
public function instruction()
|
public function instruction()
|
||||||
|
{
|
||||||
|
if (\App\GoogleDriveFile::checkConfig())
|
||||||
{
|
{
|
||||||
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Staff/.Instruction')->first()->id, 'mode' => 'folder']);
|
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()
|
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']);
|
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Cadet')->first()->id, 'mode' => 'folder']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function staff()
|
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']);
|
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Staff')->first()->id, 'mode' => 'folder']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function etamas()
|
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']);
|
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.ETAMAS')->first()->id, 'mode' => 'folder']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function officier()
|
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']);
|
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Privé/.Officier')->first()->id, 'mode' => 'folder']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function publique()
|
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']);
|
return view('admin.files.Google Drive.index',['folder' => \App\GoogleDriveFile::where('path','=','.Publique')->first()->id, 'mode' => 'folder']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,12 +52,9 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
$('#test').html('Loading Start ...');
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
$('#test').html('DOM ContentLoaded');
|
|
||||||
var calendarEl = document.getElementById('public_calendar');
|
var calendarEl = document.getElementById('public_calendar');
|
||||||
|
|
||||||
try {
|
|
||||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||||
plugins: ['dayGrid'],
|
plugins: ['dayGrid'],
|
||||||
locale: 'fr',
|
locale: 'fr',
|
||||||
@@ -75,17 +72,12 @@
|
|||||||
$('#schedulemodal').modal('toggle')
|
$('#schedulemodal').modal('toggle')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#test').html('Begin render');
|
|
||||||
calendar.render();
|
calendar.render();
|
||||||
$('#test').html('Done render');
|
|
||||||
}
|
|
||||||
catch(err) {
|
|
||||||
document.getElementById("test").innerHTML = err.message;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<div class="modal fade" id="schedulemodal" tabindex="-1" role="dialog" aria-labelledby="schedulemodal" aria-hidden="true">
|
<div class="modal fade" id="schedulemodal" tabindex="-1" role="dialog" aria-labelledby="schedulemodal"
|
||||||
|
aria-hidden="true">
|
||||||
<div class="modal-dialog w-100 modal-lg mx-2 mx-lg-auto" role="document">
|
<div class="modal-dialog w-100 modal-lg mx-2 mx-lg-auto" role="document">
|
||||||
<div class="modal-content" id="modal-content"></div>
|
<div class="modal-content" id="modal-content"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user