mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
Merge branch '3.2.5' into 'dev'
April 9 update v2 See merge request TheGamecraft/c-cms!97
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();
|
||||
|
||||
@@ -84,39 +84,68 @@ class FilesController extends Controller
|
||||
}
|
||||
|
||||
public function guide()
|
||||
{
|
||||
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()
|
||||
{
|
||||
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']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,12 +52,9 @@
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$('#test').html('Loading Start ...');
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
$('#test').html('DOM ContentLoaded');
|
||||
var calendarEl = document.getElementById('public_calendar');
|
||||
|
||||
try {
|
||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||
plugins: ['dayGrid'],
|
||||
locale: 'fr',
|
||||
@@ -75,17 +72,12 @@
|
||||
$('#schedulemodal').modal('toggle')
|
||||
}
|
||||
});
|
||||
$('#test').html('Begin render');
|
||||
calendar.render();
|
||||
$('#test').html('Done render');
|
||||
}
|
||||
catch(err) {
|
||||
document.getElementById("test").innerHTML = err.message;
|
||||
}
|
||||
});
|
||||
|
||||
</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-content" id="modal-content"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user