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();
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,88 +8,80 @@
|
||||
|
||||
<head>
|
||||
|
||||
<!-- Include Head -->
|
||||
@include('layouts.public.head')
|
||||
<!-- Include Head -->
|
||||
@include('layouts.public.head')
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Include Header -->
|
||||
@include('layouts.public.header')
|
||||
<!-- Include Header -->
|
||||
@include('layouts.public.header')
|
||||
|
||||
<div class="wrapper wrapper-full-page">
|
||||
<div class="wrapper wrapper-full-page">
|
||||
|
||||
@yield('content')
|
||||
@yield('content')
|
||||
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
|
||||
<!-- Include Footer -->
|
||||
@include('layouts.public.footer')
|
||||
<!-- Include Footer -->
|
||||
@include('layouts.public.footer')
|
||||
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="https://polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en"></script>
|
||||
<script src="/js/core/jquery.min.js"></script>
|
||||
<script src="/js/core/popper.min.js"></script>
|
||||
<script src="/js/core/bootstrap-material-design.min.js"></script>
|
||||
<script src="/js/material-dashboard.js"></script>
|
||||
<script src="/js/material-kit.min.js"></script>
|
||||
<script src='/assets/fullcalendar/core/main.js'></script>
|
||||
<script src='/assets/fullcalendar/daygrid/main.js'></script>
|
||||
<script>
|
||||
function toggleEdit() {
|
||||
if($('#edit-switch').prop( "checked" )) {
|
||||
$('.edit-btn').css({"display":"inline-block"});
|
||||
} else {
|
||||
$('.edit-btn').css({"display":"none"});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$('#test').html('Loading Start ...');
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
$('#test').html('DOM ContentLoaded');
|
||||
var calendarEl = document.getElementById('public_calendar');
|
||||
<!-- Scripts -->
|
||||
<script src="https://polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en"></script>
|
||||
<script src="/js/core/jquery.min.js"></script>
|
||||
<script src="/js/core/popper.min.js"></script>
|
||||
<script src="/js/core/bootstrap-material-design.min.js"></script>
|
||||
<script src="/js/material-dashboard.js"></script>
|
||||
<script src="/js/material-kit.min.js"></script>
|
||||
<script src='/assets/fullcalendar/core/main.js'></script>
|
||||
<script src='/assets/fullcalendar/daygrid/main.js'></script>
|
||||
<script>
|
||||
function toggleEdit() {
|
||||
if ($('#edit-switch').prop("checked")) {
|
||||
$('.edit-btn').css({"display": "inline-block"});
|
||||
} else {
|
||||
$('.edit-btn').css({"display": "none"});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var calendarEl = document.getElementById('public_calendar');
|
||||
|
||||
try {
|
||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||
plugins: [ 'dayGrid' ],
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'title',
|
||||
center: '',
|
||||
right: 'prev,next'
|
||||
},
|
||||
events: '/api/schedule/events',
|
||||
eventClick: function(info) {
|
||||
console.log(info.event.id)
|
||||
$.get( "/api/schedule/events/modal/" + info.event.id + "/"+ info.event.extendedProps.extraParams.db_type, function( data ) {
|
||||
$( "#modal-content" ).html( data );
|
||||
});
|
||||
$('#schedulemodal').modal('toggle')
|
||||
}
|
||||
});
|
||||
$('#test').html('Begin render');
|
||||
calendar.render();
|
||||
$('#test').html('Done render');
|
||||
}
|
||||
catch(err) {
|
||||
document.getElementById("test").innerHTML = err.message;
|
||||
}
|
||||
});
|
||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||
plugins: ['dayGrid'],
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'title',
|
||||
center: '',
|
||||
right: 'prev,next'
|
||||
},
|
||||
events: '/api/schedule/events',
|
||||
eventClick: function (info) {
|
||||
console.log(info.event.id)
|
||||
$.get("/api/schedule/events/modal/" + info.event.id + "/" + info.event.extendedProps.extraParams.db_type, function (data) {
|
||||
$("#modal-content").html(data);
|
||||
});
|
||||
$('#schedulemodal').modal('toggle')
|
||||
}
|
||||
});
|
||||
calendar.render();
|
||||
});
|
||||
|
||||
</script>
|
||||
<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>
|
||||
</div>
|
||||
</script>
|
||||
<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>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user