コード例 #1
0
ファイル: ConferencesController.php プロジェクト: AUCSC/sac
 function old(Request $request)
 {
     $id = $request['id'];
     if ($id == null) {
         $id = get_current_conference_id();
     }
     $conferences = Conference::where('id', '<>', get_current_conference_id())->orderBy('id', 'desc')->get();
     $chosen_conf = Conference::where('id', '=', $id)->first();
     $presentations = Presentation::where('conference_id', '=', $id)->where('status', '=', 'A')->orderBy('course_id')->get();
     return view('conferences.old', compact('conferences', 'chosen_conf', 'presentations'));
 }
コード例 #2
0
 protected function deletePresentation($id, $presentationId)
 {
     if ($id == null || $presentationId == null) {
         return Response::json('invalid ids', 400);
     }
     $Presentation = Presentation::where('Project_FK', '=', $id)->where('id', '=', $presentationId)->first();
     if (empty($Presentation)) {
         return Response::json('presentation is empty', 400);
     }
     \File::Delete(public_path() . "\\presentations\\" . $Presentation->file);
     $Presentation->delete();
 }
コード例 #3
0
ファイル: helpers.php プロジェクト: AUCSC/sac
function count_presentations()
{
    $id = get_current_conference_id();
    return Presentation::where('conference_id', '=', $id)->count();
}
コード例 #4
0
ファイル: PresentationsController.php プロジェクト: AUCSC/sac
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index($status = "Approved")
 {
     $status = strtoupper($status[0]);
     $presentations = Presentation::where('conference_id', '=', get_current_conference_id())->where('status', '=', $status)->orderBy('course_id')->get();
     return view('presentations.index', compact('presentations', 'status'));
 }
コード例 #5
0
ファイル: TimeslotController.php プロジェクト: AUCSC/sac
 public function preview()
 {
     $rooms = Room::where("available", true)->get();
     $days = Timeslot::orderBy("id", 'desc')->first()->day;
     $presentations = Presentation::where('conference_id', '=', get_current_conference_id())->whereNotNull('timeslot')->get();
     $timeslots = Timeslot::where('conference_id', '=', get_current_conference_id())->get();
     return view('timeslots.preview', compact('timeslots', 'rooms', 'presentations', 'days'));
 }