ALPHA 3.0.1i

This commit is contained in:
TheGamecraft
2018-08-20 15:30:08 -04:00
parent 54cdc12680
commit c77d35bd14
10 changed files with 220 additions and 24 deletions

View File

@@ -19,7 +19,7 @@ class CalendarController extends Controller
*/
public function __construct()
{
$this->middleware('auth', ['except' => ['generate','load']]);
$this->middleware('auth', ['except' => ['generate','load','delete']]);
}
/**
@@ -217,11 +217,11 @@ class CalendarController extends Controller
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<tbody>
<tr style="border:none;">
<td style="border:none;">'.User::find($date->data['n1_p1_instructor'])->fullname().'</td>
<td style="border:none; width:80%">'.User::find($date->data['n1_p1_instructor'])->fullname().'</td>
<td style="border:none;">'.$isdone_n1_p1.'</td>
</tr>
<tr style="border:none;">
<td style="border:none;">'.$date->data['n1_p1_ocom'].' - '.$date->data['n1_p1_name'].'</td>
<td style="border:none;width:80%">'.$date->data['n1_p1_ocom'].' - '.$date->data['n1_p1_name'].'</td>
<td style="border:none;">'.Local::find($date->data['n1_p1_local'])->name.'</td>
</tr>
</tbody>
@@ -231,11 +231,11 @@ class CalendarController extends Controller
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<tbody>
<tr style="border:none;">
<td style="border:none;">'.User::find($date->data['n1_p2_instructor'])->fullname().'</td>
<td style="border:none;width:80%">'.User::find($date->data['n1_p2_instructor'])->fullname().'</td>
<td style="border:none;">'.$isdone_n1_p2.'</td>
</tr>
<tr style="border:none;">
<td style="border:none;">'.$date->data['n1_p2_ocom'].' - '.$date->data['n1_p2_name'].'</td>
<td style="border:none;width:80%">'.$date->data['n1_p2_ocom'].' - '.$date->data['n1_p2_name'].'</td>
<td style="border:none;">'.Local::find($date->data['n1_p2_local'])->name.'</td>
</tr>
</tbody>
@@ -248,11 +248,11 @@ class CalendarController extends Controller
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<tbody>
<tr style="border:none;">
<td style="border:none;">'.User::find($date->data['n2_p1_instructor'])->fullname().'</td>
<td style="border:none;width:80%">'.User::find($date->data['n2_p1_instructor'])->fullname().'</td>
<td style="border:none;">'.$isdone_n2_p1.'</td>
</tr>
<tr style="border:none;">
<td style="border:none;">'.$date->data['n2_p1_ocom'].' - '.$date->data['n2_p1_name'].'</td>
<td style="border:none;width:80%">'.$date->data['n2_p1_ocom'].' - '.$date->data['n2_p1_name'].'</td>
<td style="border:none;">'.Local::find($date->data['n2_p1_local'])->name.'</td>
</tr>
</tbody>
@@ -262,11 +262,11 @@ class CalendarController extends Controller
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<tbody>
<tr style="border:none;">
<td style="border:none;">'.User::find($date->data['n2_p2_instructor'])->fullname().'</td>
<td style="border:none;width:80%">'.User::find($date->data['n2_p2_instructor'])->fullname().'</td>
<td style="border:none;">'.$isdone_n2_p2.'</td>
</tr>
<tr style="border:none;">
<td style="border:none;">'.$date->data['n2_p2_ocom'].' - '.$date->data['n2_p2_name'].'</td>
<td style="border:none;width:80%">'.$date->data['n2_p2_ocom'].' - '.$date->data['n2_p2_name'].'</td>
<td style="border:none;">'.Local::find($date->data['n2_p2_local'])->name.'</td>
</tr>
</tbody>
@@ -279,11 +279,11 @@ class CalendarController extends Controller
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<tbody>
<tr style="border:none;">
<td style="border:none;">'.User::find($date->data['n3_p1_instructor'])->fullname().'</td>
<td style="border:none;width:80%">'.User::find($date->data['n3_p1_instructor'])->fullname().'</td>
<td style="border:none;">'.$isdone_n3_p1.'</td>
</tr>
<tr style="border:none;">
<td style="border:none;">'.$date->data['n3_p1_ocom'].' - '.$date->data['n3_p1_name'].'</td>
<td style="border:none;width:80%">'.$date->data['n3_p1_ocom'].' - '.$date->data['n3_p1_name'].'</td>
<td style="border:none;">'.Local::find($date->data['n3_p1_local'])->name.'</td>
</tr>
</tbody>
@@ -293,11 +293,11 @@ class CalendarController extends Controller
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<tbody>
<tr style="border:none;">
<td style="border:none;">'.User::find($date->data['n3_p2_instructor'])->fullname().'</td>
<td style="border:none;width:80%">'.User::find($date->data['n3_p2_instructor'])->fullname().'</td>
<td style="border:none;">'.$isdone_n3_p2.'</td>
</tr>
<tr style="border:none;">
<td style="border:none;">'.$date->data['n3_p2_ocom'].' - '.$date->data['n3_p2_name'].'</td>
<td style="border:none;width:80%">'.$date->data['n3_p2_ocom'].' - '.$date->data['n3_p2_name'].'</td>
<td style="border:none;">'.Local::find($date->data['n3_p2_local'])->name.'</td>
</tr>
</tbody>
@@ -307,6 +307,7 @@ class CalendarController extends Controller
</tbody>
</table>';
}
echo '<br><hr><br>';
}
echo '<a href="/admin/calendar/add/'.$url.'" type="button" class="btn btn-primary btn-lg btn-block">'.trans('calendar.add_to_schedule').'</a></div><div class="modal-footer"><button type="button" class="btn btn-secondary" data-dismiss="modal">'.trans('pagination.close').'</button></div></div>';
@@ -468,4 +469,13 @@ class CalendarController extends Controller
dd($check);
}
public function delete()
{
$id = request('id');
$schedule = Schedule::find($id);
$schedule->delete();
}
}

View File

@@ -0,0 +1,87 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Log;
class LogController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$logs = Log::all()->sortByDesc('created_at')->take(500);
return view('admin.log.display' ,['log' => $logs]);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}