text lanbuage changed to PL, models updated

This commit is contained in:
s416422 2019-12-06 22:34:25 +01:00
parent bc41ccb8be
commit 0363feda51
22 changed files with 285 additions and 279 deletions

View File

@ -16,26 +16,26 @@ class AdminSubjectsController extends Controller
{ {
$subjects = Subject::all(); $subjects = Subject::all();
$users = User::all(); $users = User::all();
$rooms = Room::all(); // $rooms = Room::all();
$weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; $weekdays = ['Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota', 'Niedziela'];
$types = ['Lecture', 'Excercises', 'Labs', 'Other']; // $types = ['Lecture', 'Excercises', 'Labs', 'Other'];
return view('admin.admin_subjects', ['subjects' => $subjects, 'users' => $users, 'rooms' => $rooms, 'weekdays' => $weekdays, 'types' => $types]); return view('admin.admin_subjects', ['subjects' => $subjects, 'users' => $users, 'weekdays' => $weekdays]);
} }
public function add_subject(Request $request) public function add_subject(Request $request)
{ {
$name = $request->input('name'); $name = $request->input('name');
$type = $request->input('type'); // $type = $request->input('type');
$weekday = $request->input('weekday'); $weekday = $request->input('weekday');
$time = $request->input('time'); $time = $request->input('time');
$room_id = $request->input('room_id'); // $room_id = $request->input('room_id');
$user_id = $request->input('user_id'); $user_id = $request->input('user_id');
Subject::create([ Subject::create([
'name' => $name, 'name' => $name,
'type' => $type, // 'type' => $type,
'weekday'=> $weekday, 'weekday'=> $weekday,
'time' => $time, 'time' => $time,
'room_id' => $room_id, // 'room_id' => $room_id,
'user_id' => $user_id 'user_id' => $user_id
]); ]);
return redirect(route('admin_subjects')); return redirect(route('admin_subjects'));

View File

@ -11,17 +11,19 @@ use App\Classes;
use App\Room; use App\Room;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
class UserClassesController extends Controller class UserClassesController extends Controller
{ {
public function index($groupBy='name') public function index($groupBy='subject_id')
{ {
$user_id = Auth::id(); $user_id = Auth::id();
$subjects = Subject::where('user_id', $user_id)->get(); $subjects = Subject::where('user_id', $user_id)->get();
$subjects_ids = $subjects->pluck('id')->toArray(); $subjects_ids = $subjects->pluck('id')->toArray();
$classes = Classes::whereIn('subject_id', $subjects_ids)->get(); $classes = Classes::whereIn('subject_id', $subjects_ids)->get();
$classes_grouped = $classes->groupBy($groupBy); $classes_grouped = $classes->groupBy($groupBy);
return view('user.user_classes', ['classes' => $classes, 'classes_grouped' => $classes_grouped, 'subjects' => $subjects, 'grouped_by' => $groupBy]); $defaultDate = date("Y-m-d");
return view('user.user_classes', ['classes' => $classes, 'classes_grouped' => $classes_grouped, 'subjects' => $subjects, 'grouped_by' => $groupBy, 'defaultDate' => $defaultDate]);
} }
public function add_classes(Request $request) public function add_classes(Request $request)
@ -32,7 +34,8 @@ class UserClassesController extends Controller
'subject_id' => $subject_id, 'subject_id' => $subject_id,
'date' => $date 'date' => $date
]); ]);
return redirect(route('user_classes')); $classes_id = Classes::orderBy('created_at', 'desc')->first()->id;
return redirect(route('user_start_classes', ['classes_id' => $classes_id]));
} }
public function delete_classes($classes_id) public function delete_classes($classes_id)
@ -54,7 +57,8 @@ class UserClassesController extends Controller
'CLASSES_CODE' => $classes_code, 'CLASSES_CODE' => $classes_code,
'CLASSES_ID' => $classes_id 'CLASSES_ID' => $classes_id
]); ]);
return view('user.user_classes_start', ['verified' => false, 'classes_code' => $classes_code]); $classes = Classes::find($classes_id);
return view('user.user_classes_start', ['verified' => false, 'classes_code' => $classes_code, 'classes' => $classes]);
} }
public function start_classes_verified(Request $request) public function start_classes_verified(Request $request)

View File

@ -13,30 +13,34 @@ class UserSubjectsController extends Controller
{ {
public function index($groupBy='weekday') public function index($groupBy='weekday')
{ {
setlocale(LC_ALL, 'pl', 'pl_PL', 'pl_PL.ISO8859-2', 'plk', 'polish', 'Polish');
$user_id = Auth::id(); $user_id = Auth::id();
$subjects = Subject::where('user_id', $user_id)->get(); $subjects = Subject::where('user_id', $user_id)->get();
$subjects_grouped = $subjects->groupBy($groupBy); $subjects_grouped = $subjects->groupBy($groupBy);
$rooms = Room::all(); // $rooms = Room::all();
$weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; $weekdays = ['Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota', 'Niedziela'];
$types = ['Lecture', 'Excercises', 'Labs', 'Other']; // $types = ['Lecture', 'Excercises', 'Labs', 'Other'];
return view('user.user_subjects', ['subjects' => $subjects, 'rooms' => $rooms, 'weekdays' => $weekdays, $defaultTime = date("H:i");
'types' => $types, 'subjects_grouped' => $subjects_grouped, 'grouped_by' => $groupBy]); $defaultWeekday = $weekdays[date('w')-1];
return view('user.user_subjects', ['subjects' => $subjects, 'weekdays' => $weekdays,
'subjects_grouped' => $subjects_grouped, 'grouped_by' => $groupBy, 'defaultTime' => $defaultTime, 'defaultWeekday' => $defaultWeekday]);
} }
public function add_subject(Request $request) public function add_subject(Request $request)
{ {
$name = $request->input('name'); $name = $request->input('name');
$type = $request->input('type'); // $type = $request->input('type');
$weekday = $request->input('weekday'); $weekday = $request->input('weekday');
$time = $request->input('time'); $time = $request->input('time');
$room_id = $request->input('room_id'); // $room_id = $request->input('room_id');
$user_id_n = Auth::id(); $user_id_n = Auth::id();
Subject::create([ Subject::create([
'name' => $name, 'name' => $name,
'type' => $type, // 'type' => $type,
'weekday'=> $weekday, 'weekday'=> $weekday,
'time' => $time, 'time' => $time,
'room_id' => $room_id, // 'room_id' => $room_id,
'user_id' => $user_id_n 'user_id' => $user_id_n
]); ]);
return redirect(route('user_subjects')); return redirect(route('user_subjects'));

View File

@ -16,10 +16,10 @@ class CreateSubjectsTable extends Migration
Schema::create('subjects', function (Blueprint $table) { Schema::create('subjects', function (Blueprint $table) {
$table->bigIncrements('id')->unique(); $table->bigIncrements('id')->unique();
$table->string('name'); $table->string('name');
$table->string('type')->nullable(); // $table->string('type')->nullable();
$table->string('weekday')->nullable(); $table->string('weekday')->nullable();
$table->string('time')->nullable(); $table->string('time')->nullable();
$table->integer('room_id'); // $table->integer('room_id');
$table->integer('user_id'); $table->integer('user_id');
$table->timestamps(); $table->timestamps();
}); });

View File

@ -13,7 +13,7 @@ class DatabaseSeeder extends Seeder
{ {
$this->call([ $this->call([
UsersTableSeeder::class, UsersTableSeeder::class,
RoomsTableSeeder::class, // RoomsTableSeeder::class,
SubjectsTableSeeder::class, SubjectsTableSeeder::class,
ClassesTableSeeder::class, ClassesTableSeeder::class,
AttendancesTableSeeder::class, AttendancesTableSeeder::class,

View File

@ -13,19 +13,15 @@ class SubjectsTableSeeder extends Seeder
{ {
DB::table('subjects')->insert([ DB::table('subjects')->insert([
'name' => 'Systemy Informatyczne UA0', 'name' => 'Systemy Informatyczne UA0',
'type' => 'Lecture', 'weekday' => 'Poniedziałek',
'weekday' => 'Monday',
'time' => '15:30', 'time' => '15:30',
'room_id' => 32,
'user_id' => 2 'user_id' => 2
]); ]);
DB::table('subjects')->insert([ DB::table('subjects')->insert([
'name' => 'Systemy Informatyczne UA0', 'name' => 'Systemy Informatyczne UA0',
'type' => 'Excercises', 'weekday' => 'Wtorek',
'weekday' => 'Monday',
'time' => '17:15', 'time' => '17:15',
'room_id' => 7,
'user_id' => 3 'user_id' => 3
]); ]);
} }

View File

@ -1,22 +1,21 @@
@extends('layouts.adminpanel') @extends('layouts.adminpanel')
@section('title') Admin Panel - Attendance @endsection @section('title') Panel admina - obecności @endsection
@section('admin_content') @section('admin_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<h5> Add new attendance record </h5> <h5> Dodaj obecność </h5>
<form method="POST" action="{{ route('admin_add_attendance') }}" class="col-md-12"> <form method="POST" action="{{ route('admin_add_attendance') }}" class="col-md-12">
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
<label for="classes_id" class="col-md-4 col-form-label text-md-right">{{ __('Classes') }}</label> <label for="classes_id" class="col-md-4 col-form-label text-md-right">{{ __('Zajęcia') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<select id="classes_id" class="form-control @error('classes_id') is-invalid @enderror" name="classes_id" required> <select id="classes_id" class="form-control @error('classes_id') is-invalid @enderror" name="classes_id" required>
@foreach ($classes as $classes_item) @foreach ($classes as $classes_item)
<option value="{{ $classes_item->id }}">{{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->name }}, <option value="{{ $classes_item->id }}">{{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->name }},
{{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->type }},
{{ App\Classes::find($classes_item->id)-> date }} {{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->time }} {{ App\Classes::find($classes_item->id)-> date }} {{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->time }}
</option> </option>
@endforeach @endforeach
@ -31,7 +30,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="student_id" class="col-md-4 col-form-label text-md-right">{{ __('Student ID') }}</label> <label for="student_id" class="col-md-4 col-form-label text-md-right">{{ __('ID studenta') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="student_id" type="number" class="form-control @error('student_id') is-invalid @enderror" name="student_id" value="{{ old('student_id') }}" required autocomplete="student_id" autofocus> <input id="student_id" type="number" class="form-control @error('student_id') is-invalid @enderror" name="student_id" value="{{ old('student_id') }}" required autocomplete="student_id" autofocus>
@ -45,7 +44,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="student_name" class="col-md-4 col-form-label text-md-right">{{ __('Student name') }}</label> <label for="student_name" class="col-md-4 col-form-label text-md-right">{{ __('Imię studenta') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="student_name" type="text" class="form-control @error('student_name') is-invalid @enderror" name="student_name" value="{{ old('student_name') }}" autocomplete="student_name"> <input id="student_name" type="text" class="form-control @error('student_name') is-invalid @enderror" name="student_name" value="{{ old('student_name') }}" autocomplete="student_name">
@ -59,7 +58,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="student_surname" class="col-md-4 col-form-label text-md-right">{{ __('Student surname') }}</label> <label for="student_surname" class="col-md-4 col-form-label text-md-right">{{ __('Nazwisko studenta') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="student_surname" type="text" class="form-control @error('student_surname') is-invalid @enderror" name="student_surname" value="{{ old('student_surname') }}" autocomplete="student_surname"> <input id="student_surname" type="text" class="form-control @error('student_surname') is-invalid @enderror" name="student_surname" value="{{ old('student_surname') }}" autocomplete="student_surname">
@ -73,7 +72,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="seat_number" class="col-md-4 col-form-label text-md-right">{{ __('Seat number') }}</label> <label for="seat_number" class="col-md-4 col-form-label text-md-right">{{ __('Nr miejsca') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="seat_number" type="number" class="form-control @error('seat_number') is-invalid @enderror" name="seat_number" value="{{ old('seat_number') }}" required autocomplete="seat_number" autofocus> <input id="seat_number" type="number" class="form-control @error('seat_number') is-invalid @enderror" name="seat_number" value="{{ old('seat_number') }}" required autocomplete="seat_number" autofocus>
@ -89,7 +88,7 @@
<div class="form-group row mb-0"> <div class="form-group row mb-0">
<div class="col-md-6 offset-md-4"> <div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{{ __('Add') }} {{ __('Dodaj') }}
</button> </button>
</div> </div>
</div> </div>
@ -100,12 +99,12 @@
<table class="table table-striped"> <table class="table table-striped">
<tr class="thead-dark"> <tr class="thead-dark">
<th>ID</th> <th>ID</th>
<th> Classes id </th> <th> ID zajęc </th>
<th> Classes name </th> <th> Nazwa zajęć </th>
<th> Student ID </th> <th> ID studenta </th>
<th> Student name </th> <th> Imię studenta</th>
<th> Student surname </th> <th> Nazwisko studenta </th>
<th> Seat number </th> <th> Nr miejsca </th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
@ -114,23 +113,22 @@
<td> {{ $attendance->id }}</td> <td> {{ $attendance->id }}</td>
<td> {{ $attendance->classes_id }} </td> <td> {{ $attendance->classes_id }} </td>
<td> {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->name }}, <td> {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->name }},
{{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->type }},
{{ App\Classes::find($attendance->classes_id)-> date }} {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->time }} </td> {{ App\Classes::find($attendance->classes_id)-> date }} {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->time }} </td>
<td> {{ $attendance->student_id_number }} </td> <td> {{ $attendance->student_id_number }} </td>
<td> {{ $attendance->student_name}}</td> <td> {{ $attendance->student_name}}</td>
<td> {{ $attendance->student_surname}}</td> <td> {{ $attendance->student_surname}}</td>
<td> {{ $attendance->seat_number }} </td> <td> {{ $attendance->seat_number }} </td>
<td> <td>
<a href="{{ route('admin_delete_attendance', [$attendance->id]) }}" name="delete-attendance-btn" class="btn btn-danger"> Delete </a> <a href="{{ route('admin_delete_attendance', [$attendance->id]) }}" name="delete-attendance-btn" class="btn btn-danger"> Usuń </a>
</td> </td>
<td> <td>
<a href="{{ route('admin_edit_attendance', [$attendance->id]) }}" name="edit-attendance-btn" class="btn btn-secondary"> Edit </a> <a href="{{ route('admin_edit_attendance', [$attendance->id]) }}" name="edit-attendance-btn" class="btn btn-secondary"> Edytuj </a>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</table> </table>
@else @else
<p> No attendance data yet. </p> <p> Brak obecności. </p>
@endif @endif
</div> </div>
</div> </div>

View File

@ -1,21 +1,21 @@
@extends('layouts.adminpanel') @extends('layouts.adminpanel')
@section('title') Admin Panel - Classes @endsection @section('title') Panel admina - Zajęcia @endsection
@section('admin_content') @section('admin_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<h5> Add new classes </h5> <h5> Dodaj zajęcia </h5>
<form method="POST" action="{{ route('admin_add_classes') }}"> <form method="POST" action="{{ route('admin_add_classes') }}">
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
<label for="subject_id" class="col-md-4 col-form-label text-md-right">{{ __('Subject') }}</label> <label for="subject_id" class="col-md-4 col-form-label text-md-right">{{ __('Przedmiot') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<select id="subject_id" class="form-control @error('subject_id') is-invalid @enderror" name="subject_id" required> <select id="subject_id" class="form-control @error('subject_id') is-invalid @enderror" name="subject_id" required>
@foreach ($subjects as $subject) @foreach ($subjects as $subject)
<option value="{{ $subject->id }}">{{ $subject->name }}, {{ $subject->type }}, {{ $subject->weekday }} {{ $subject->time }}</option> <option value="{{ $subject->id }}">{{ $subject->name }}, {{ $subject->weekday }} {{ $subject->time }}</option>
@endforeach @endforeach
</select> </select>
@ -28,7 +28,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="date" class="col-md-4 col-form-label text-md-right">{{ __('Date') }}</label> <label for="date" class="col-md-4 col-form-label text-md-right">{{ __('Data') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="date" type="date" class="form-control @error('date') is-invalid @enderror" name="date" value="{{ old('date') }}" autocomplete="date"> <input id="date" type="date" class="form-control @error('date') is-invalid @enderror" name="date" value="{{ old('date') }}" autocomplete="date">
@ -44,19 +44,19 @@
<div class="form-group row mb-0"> <div class="form-group row mb-0">
<div class="col-md-6 offset-md-4"> <div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{{ __('Add') }} {{ __('Dodaj') }}
</button> </button>
</div> </div>
</div> </div>
</form> </form>
@if ($classes->count() > 0) @if ($classes->count() > 0)
<h5> All classes: ({{ $classes->count() }}) </h5> <h5> Wszystkie zajęcia: ({{ $classes->count() }}) </h5>
<table class="table table-striped"> <table class="table table-striped">
<tr class="thead-dark"> <tr class="thead-dark">
<th>ID</th> <th>ID</th>
<th> Subject id </th> <th> ID przedmoitu </th>
<th> Subject name </th> <th> Nazwa przedmiotu </th>
<th> Date </th> <th> Data </th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
@ -68,16 +68,16 @@
{{ App\Subject::find($classes_item->subject_id)->weekday }} {{ App\Subject::find($classes_item->subject_id)->time }}</td> {{ App\Subject::find($classes_item->subject_id)->weekday }} {{ App\Subject::find($classes_item->subject_id)->time }}</td>
<td> {{ $classes_item->date }} </td> <td> {{ $classes_item->date }} </td>
<td> <td>
<a href="{{ route('admin_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger"> Delete </a> <a href="{{ route('admin_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger"> Usuń </a>
</td> </td>
<td> <td>
<a href="{{ route('admin_edit_classes', [$classes_item->id]) }}" name="edit-classes-btn" class="btn btn-secondary"> Edit </a> <a href="{{ route('admin_edit_classes', [$classes_item->id]) }}" name="edit-classes-btn" class="btn btn-secondary"> Edytuj </a>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</table> </table>
@else @else
<p> No classes yet. </p> <p> Brak zajęć. </p>
@endif @endif
</div> </div>
</div> </div>

View File

@ -1,15 +1,15 @@
@extends('layouts.adminpanel') @extends('layouts.adminpanel')
@section('title') Admin Panel - Subjects @endsection @section('title') Panel admina - Przedmioty @endsection
@section('admin_content') @section('admin_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<h5> Add new subject </h5> <h5> Dodaj przedmiot </h5>
<form method="POST" action="{{ route('admin_add_subject') }}"> <form method="POST" action="{{ route('admin_add_subject') }}">
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
<label for="name" class="col-md-4 col-form-label text-md-right">{{ __('Name') }}</label> <label for="name" class="col-md-4 col-form-label text-md-right">{{ __('Nazwa') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus> <input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus>
@ -22,27 +22,27 @@
</div> </div>
</div> </div>
<div class="form-group row"> {{--<div class="form-group row">--}}
<label for="type" class="col-md-4 col-form-label text-md-right">{{ __('Type') }}</label> {{--<label for="type" class="col-md-4 col-form-label text-md-right">{{ __('Type') }}</label>--}}
<div class="col-md-6"> {{--<div class="col-md-6">--}}
<select id="type" class="form-control @error('type') is-invalid @enderror" name="type"> {{--<select id="type" class="form-control @error('type') is-invalid @enderror" name="type">--}}
<option label="-- select type -- "></option> {{--<option label="-- select type -- "></option>--}}
@foreach ($types as $type) {{--@foreach ($types as $type)--}}
<option value="{{ $type }}">{{ $type }}</option> {{--<option value="{{ $type }}">{{ $type }}</option>--}}
@endforeach {{--@endforeach--}}
</select> {{--</select>--}}
@error('type') {{--@error('type')--}}
<span class="invalid-feedback" role="alert"> {{--<span class="invalid-feedback" role="alert">--}}
<strong>{{ $message }}</strong> {{--<strong>{{ $message }}</strong>--}}
</span> {{--</span>--}}
@enderror {{--@enderror--}}
</div> {{--</div>--}}
</div> {{--</div>--}}
<div class="form-group row"> <div class="form-group row">
<label for="weekday" class="col-md-4 col-form-label text-md-right">{{ __('Day of the week') }}</label> <label for="weekday" class="col-md-4 col-form-label text-md-right">{{ __('Dzień tygodnia') }}</label>
<div class="col-md-6"> <div class="col-md-6">
@ -62,10 +62,10 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="time" class="col-md-4 col-form-label text-md-right">{{ __('Time') }}</label> <label for="time" class="col-md-4 col-form-label text-md-right">{{ __('Godzina') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="time" type="text" class="form-control @error('time') is-invalid @enderror" name="time" value="{{ old('time') }}" autocomplete="time"> <input id="time" type="time" class="form-control @error('time') is-invalid @enderror" name="time" value="{{ old('time') }}" autocomplete="time">
@error('time') @error('time')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@ -75,26 +75,26 @@
</div> </div>
</div> </div>
<div class="form-group row"> {{--<div class="form-group row">--}}
<label for="room_id" class="col-md-4 col-form-label text-md-right">{{ __('Room') }}</label> {{--<label for="room_id" class="col-md-4 col-form-label text-md-right">{{ __('Room') }}</label>--}}
<div class="col-md-6"> {{--<div class="col-md-6">--}}
<select id="room_id" class="form-control @error('room_id') is-invalid @enderror" name="room_id" required> {{--<select id="room_id" class="form-control @error('room_id') is-invalid @enderror" name="room_id" required>--}}
@foreach ($rooms as $room) {{--@foreach ($rooms as $room)--}}
<option value="{{ $room->id }}">{{ $room->name }}</option> {{--<option value="{{ $room->id }}">{{ $room->name }}</option>--}}
@endforeach {{--@endforeach--}}
</select> {{--</select>--}}
@error('room_id') {{--@error('room_id')--}}
<span class="invalid-feedback" role="alert"> {{--<span class="invalid-feedback" role="alert">--}}
<strong>{{ $message }}</strong> {{--<strong>{{ $message }}</strong>--}}
</span> {{--</span>--}}
@enderror {{--@enderror--}}
</div> {{--</div>--}}
</div> {{--</div>--}}
<div class="form-group row"> <div class="form-group row">
<label for="user_id" class="col-md-4 col-form-label text-md-right">{{ __('User') }}</label> <label for="user_id" class="col-md-4 col-form-label text-md-right">{{ __('Prowadzący') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<select id="user_id" class="form-control @error('user_id') is-invalid @enderror" name="user_id" required> <select id="user_id" class="form-control @error('user_id') is-invalid @enderror" name="user_id" required>
@ -114,24 +114,24 @@
<div class="form-group row mb-0"> <div class="form-group row mb-0">
<div class="col-md-6 offset-md-4"> <div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{{ __('Add') }} {{ __('Dodaj') }}
</button> </button>
</div> </div>
</div> </div>
</form> </form>
@if ($subjects->count() > 0) @if ($subjects->count() > 0)
<h5> All subjects: ({{ $subjects->count() }}) </h5> <h5> Wszystkie przedmioty: ({{ $subjects->count() }}) </h5>
<table class="table table-striped"> <table class="table table-striped">
<tr class="thead-dark"> <tr class="thead-dark">
<th>ID</th> <th>ID</th>
<th> Name </th> <th> Nazwa </th>
<th> Type </th> {{--<th> Type </th>--}}
<th> Day of the week </th> <th> Dzień tygodnia </th>
<th> Time </th> <th> Godzina </th>
<th> User id </th> <th> ID prowadzącego </th>
<th> User name </th> <th> Prowadzący </th>
<th> Room id </th> {{--<th> Room id </th>--}}
<th> Room name </th> {{--<th> Room name </th>--}}
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
@ -139,24 +139,24 @@
<tr> <tr>
<td> {{ $subject->id }}</td> <td> {{ $subject->id }}</td>
<td> {{ $subject->name }} </td> <td> {{ $subject->name }} </td>
<td> {{ $subject->type }} </td> {{--<td> {{ $subject->type }} </td>--}}
<td> {{ $subject->weekday }} </td> <td> {{ $subject->weekday }} </td>
<td> {{ $subject->time }} </td> <td> {{ $subject->time }} </td>
<td> {{ $subject->user_id}}</td> <td> {{ $subject->user_id}}</td>
<td> {{ App\User::find($subject->user_id)->name }} {{ App\User::find($subject->user_id)->surname }}</td> <td> {{ App\User::find($subject->user_id)->name }} {{ App\User::find($subject->user_id)->surname }}</td>
<td> {{ $subject->room_id}}</td> {{--<td> {{ $subject->room_id}}</td>--}}
<td> {{ App\Room::find($subject->room_id)->name }} </td> {{--<td> {{ App\Room::find($subject->room_id)->name }} </td>--}}
<td> <td>
<a href="{{ route('admin_delete_subject', [$subject->id]) }}" name="delete-subject-btn" class="btn btn-danger"> Delete </a> <a href="{{ route('admin_delete_subject', [$subject->id]) }}" name="delete-subject-btn" class="btn btn-danger"> Usuń </a>
</td> </td>
<td> <td>
<a href="{{ route('admin_edit_subject', [$subject->id]) }}" name="edit-subject-btn" class="btn btn-secondary"> Edit </a> <a href="{{ route('admin_edit_subject', [$subject->id]) }}" name="edit-subject-btn" class="btn btn-secondary"> Edytuj </a>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</table> </table>
@else @else
<p> No subjects yet. </p> <p> Brak przedmiotów. </p>
@endif @endif
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
@extends('layouts.adminpanel') @extends('layouts.adminpanel')
@section('title') Admin Panel - Users @endsection @section('title') Panel admina - Test requesta @endsection
@section('admin_content') @section('admin_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
@ -9,19 +9,19 @@
<label for="classes_code"> Kod: </label> <label for="classes_code"> Kod: </label>
<input type="text" name="classes_code" id="classes_code"> <input type="text" name="classes_code" id="classes_code">
<label for="student_id_number"> Student ID: </label> <label for="student_id_number"> ID studenta: </label>
<input type="text" name="student_id_number" id="student_id_number"> <input type="text" name="student_id_number" id="student_id_number">
<label for="student_name"> Student name: </label> <label for="student_name"> Imię studenta: </label>
<input type="text" name="student_name" id="student_name"> <input type="text" name="student_name" id="student_name">
<label for="student_surname"> Student surname: </label> <label for="student_surname"> Nazwisko studenta: </label>
<input type="text" name="student_surname" id="student_surname"> <input type="text" name="student_surname" id="student_surname">
<label for="seat_number"> Seat number: </label> <label for="seat_number"> Nr miejsca: </label>
<input type="text" name="seat_number" id="seat_number"> <input type="text" name="seat_number" id="seat_number">
<button type="submit"> Test connection </button> <button type="submit"> Test requesta </button>
</form> </form>
</div> </div>
</div> </div>

View File

@ -1,19 +1,19 @@
@extends('layouts.adminpanel') @extends('layouts.adminpanel')
@section('title') Admin Panel - Users @endsection @section('title') Panel admina - Prowadzący @endsection
@section('admin_content') @section('admin_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
@if ($users->count() > 0) @if ($users->count() > 0)
<h5> All users: ({{ $users->count() }}) </h5> <h5> Wszyscy prowadzący: ({{ $users->count() }}) </h5>
<table class="table table-striped"> <table class="table table-striped">
<tr class="thead-dark"> <tr class="thead-dark">
<th>ID</th> <th>ID</th>
<th> Name </th> <th> Imię </th>
<th> Surname </th> <th> Nazwisko </th>
<th> Email </th> <th> Email </th>
<th> Is admin </th> <th> Admin? </th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
@ -26,17 +26,17 @@
<td> {{ $user->is_Admin }} </td> <td> {{ $user->is_Admin }} </td>
@if (!$user->is_Admin) @if (!$user->is_Admin)
<td> <td>
<a href="{{ route('admin_delete_user', [$user->id]) }}" name="delete-user-btn" class="btn btn-danger"> Delete </a> <a href="{{ route('admin_delete_user', [$user->id]) }}" name="delete-user-btn" class="btn btn-danger"> Usuń </a>
</td> </td>
<td> <td>
<a href="{{ route('admin_edit_user', [$user->id]) }}" name="edit-user-btn" class="btn btn-secondary"> Edit </a> <a href="{{ route('admin_edit_user', [$user->id]) }}" name="edit-user-btn" class="btn btn-secondary"> Edytuj </a>
</td> </td>
@endif @endif
</tr> </tr>
@endforeach @endforeach
</table> </table>
@else @else
<p> No users yet. </p> <p> Brak prowadzących. </p>
@endif @endif
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
@extends('layouts.app') @extends('layouts.app')
@section('title') Login @endsection @section('title') Zaloguj się @endsection
@section('content') @section('content')
<div class="container"> <div class="container">
@ -14,7 +14,7 @@
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label> <label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus> <input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
@ -28,7 +28,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label> <label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Hasło') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password"> <input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
@ -47,7 +47,7 @@
<input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}> <input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
<label class="form-check-label" for="remember"> <label class="form-check-label" for="remember">
{{ __('Remember Me') }} {{ __('Zapamiętaj') }}
</label> </label>
</div> </div>
</div> </div>
@ -56,12 +56,12 @@
<div class="form-group row mb-0"> <div class="form-group row mb-0">
<div class="col-md-8 offset-md-4"> <div class="col-md-8 offset-md-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{{ __('Login') }} {{ __('Zaloguj się') }}
</button> </button>
@if (Route::has('password.request')) @if (Route::has('password.request'))
<a class="btn btn-link" href="{{ route('password.request') }}"> <a class="btn btn-link" href="{{ route('password.request') }}">
{{ __('Forgot Your Password?') }} {{ __('Zapomniałeś hasła?') }}
</a> </a>
@endif @endif
</div> </div>

View File

@ -1,20 +1,20 @@
@extends('layouts.app') @extends('layouts.app')
@section('title') Register @endsection @section('title') Zarejestruj się @endsection
@section('content') @section('content')
<div class="container"> <div class="container">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-8"> <div class="col-md-8">
<div class="card"> <div class="card">
<div class="card-header">{{ __('Register') }}</div> <div class="card-header">{{ __('Zarejestruj się') }}</div>
<div class="card-body"> <div class="card-body">
<form method="POST" action="{{ route('register') }}"> <form method="POST" action="{{ route('register') }}">
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
<label for="name" class="col-md-4 col-form-label text-md-right">{{ __('Name') }}</label> <label for="name" class="col-md-4 col-form-label text-md-right">{{ __('Imię') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus> <input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus>
@ -28,7 +28,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="surname" class="col-md-4 col-form-label text-md-right">{{ __('Surname') }}</label> <label for="surname" class="col-md-4 col-form-label text-md-right">{{ __('Nazwisko') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="surname" type="text" class="form-control @error('surname') is-invalid @enderror" name="surname" value="{{ old('surname') }}" required autocomplete="surname"> <input id="surname" type="text" class="form-control @error('surname') is-invalid @enderror" name="surname" value="{{ old('surname') }}" required autocomplete="surname">
@ -42,7 +42,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label> <label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email"> <input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email">
@ -56,7 +56,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label> <label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Hasło') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password"> <input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
@ -70,7 +70,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="password-confirm" class="col-md-4 col-form-label text-md-right">{{ __('Confirm Password') }}</label> <label for="password-confirm" class="col-md-4 col-form-label text-md-right">{{ __('Powtórz hasło') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password"> <input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
@ -80,7 +80,7 @@
<div class="form-group row mb-0"> <div class="form-group row mb-0">
<div class="col-md-6 offset-md-4"> <div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{{ __('Register') }} {{ __('Zarejestruj się') }}
</button> </button>
</div> </div>
</div> </div>

View File

@ -1,26 +1,26 @@
@extends('layouts.app') @extends('layouts.app')
@section('title') Verify email @endsection @section('title') Potwierdź E-Mail @endsection
@section('content') @section('content')
<div class="container"> <div class="container">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-8"> <div class="col-md-8">
<div class="card"> <div class="card">
<div class="card-header">{{ __('Verify Your Email Address') }}</div> <div class="card-header">{{ __('Potwierdź swój adres E-Mail') }}</div>
<div class="card-body"> <div class="card-body">
@if (session('resent')) @if (session('resent'))
<div class="alert alert-success" role="alert"> <div class="alert alert-success" role="alert">
{{ __('A fresh verification link has been sent to your email address.') }} {{ __('Nowy link weryfikacyjny został wysłany na Twój adres mailowy.') }}
</div> </div>
@endif @endif
{{ __('Before proceeding, please check your email for a verification link.') }} {{ __('Zanim przejdziesz dalej, sprawdź swoją skrzynkę mailową.') }}
{{ __('If you did not receive the email') }}, {{ __('Jeśli nie otrzymałeś linka weryfikacyjnego,') }},
<form class="d-inline" method="POST" action="{{ route('verification.resend') }}"> <form class="d-inline" method="POST" action="{{ route('verification.resend') }}">
@csrf @csrf
<button type="submit" class="btn btn-link p-0 m-0 align-baseline">{{ __('click here to request another') }}</button>. <button type="submit" class="btn btn-link p-0 m-0 align-baseline">{{ __('kliknij tutaj, aby wysłać kolejny link.') }}</button>.
</form> </form>
</div> </div>
</div> </div>

View File

@ -1,13 +1,13 @@
@extends('layouts.app') @extends('layouts.app')
@section('title') My Home @endsection @section('title') Strona Główna @endsection
@section('content') @section('content')
<div class="container"> <div class="container">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<div class="card"> <div class="card">
<div class="card-header">Dashboard</div> <div class="card-header">Mój Panel</div>
<div class="card-body"> <div class="card-body">
@if (session('status')) @if (session('status'))
<div class="alert alert-success" role="alert"> <div class="alert alert-success" role="alert">
@ -16,9 +16,10 @@
@endif @endif
</div> </div>
<div class="card-body"> <div class="card-body">
<a href="{{ route('user_subjects') }}" class="btn btn-primary"> My subjects </a> <a href="{{ route('user_subjects') }}" class="btn btn-primary"> Moje przedmioty </a>
<a href="{{ route('user_classes') }}" class="btn btn-primary"> My classes </a> {{--<a href="{{ route('user_classes') }}" class="btn btn-primary"> My classes </a>--}}
<a href="{{ route('user_attendances') }}" class="btn btn-primary"> Attendance </a> <a href="{{ route('user_classes') }}" class="btn btn-primary"> Sprawdź obecność </a>
<a href="{{ route('user_attendances') }}" class="btn btn-primary"> Statystyki </a>
</div> </div>
<div class="card-body"> <div class="card-body">
@yield('user_content') @yield('user_content')

View File

@ -1,16 +1,16 @@
@extends('layouts.app') @extends('layouts.app')
@section('title') Admin Panel @endsection @section('title') Panel admina @endsection
@section('content') @section('content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
@if (!Auth::user()->is_Admin) @if (!Auth::user()->is_Admin)
<p> You are not allowed to see this page. </p> <p> Nie możesz przejść na stronę. </p>
<a href="{{ route('home') }}"> Go somewhere nice </a> <a href="{{ route('home') }}"> Powrót na Stronę Główną </a>
@else @else
<div class="card"> <div class="card">
<div class="card-header">Admin Panel</div> <div class="card-header">Panel admina</div>
<div class="card-body"> <div class="card-body">
@if (session('status')) @if (session('status'))
<div class="alert alert-success" role="alert"> <div class="alert alert-success" role="alert">
@ -19,12 +19,12 @@
@endif @endif
</div> </div>
<div class="card-body"> <div class="card-body">
<a href="{{ route('admin_users') }}" class="btn btn-primary"> Users </a> <a href="{{ route('admin_users') }}" class="btn btn-primary"> Prowadzący </a>
<a href="{{ route('admin_subjects') }}" class="btn btn-primary"> Subjects </a> <a href="{{ route('admin_subjects') }}" class="btn btn-primary"> Przedmioty </a>
<a href="{{ route('admin_rooms') }}" class="btn btn-primary"> Rooms </a> <a href="{{ route('admin_rooms') }}" class="btn btn-primary"> Sale </a>
<a href="{{ route('admin_classes') }}" class="btn btn-primary"> Classes </a> <a href="{{ route('admin_classes') }}" class="btn btn-primary"> Zajęcia </a>
<a href="{{ route('admin_attendances') }}" class="btn btn-primary"> Attendances </a> <a href="{{ route('admin_attendances') }}" class="btn btn-primary"> Obecności </a>
<a href="{{ route('admin_test_connection') }}" class="btn btn-primary"> Test connection </a> <a href="{{ route('admin_test_connection') }}" class="btn btn-primary"> Test requesta </a>
</div> </div>
<div class="card-body"> <div class="card-body">
@yield('admin_content') @yield('admin_content')

View File

@ -41,17 +41,17 @@
<!-- Authentication Links --> <!-- Authentication Links -->
@guest @guest
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a> <a class="nav-link" href="{{ route('login') }}">{{ __('Zaloguj się') }}</a>
</li> </li>
@if (Route::has('register')) @if (Route::has('register'))
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a> <a class="nav-link" href="{{ route('register') }}">{{ __('Zarejestruj się') }}</a>
</li> </li>
@endif @endif
@else @else
@if (Auth::user()->is_Admin) @if (Auth::user()->is_Admin)
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{ route('admin') }}">{{ __('Admin panel') }}</a> <a class="nav-link" href="{{ route('admin') }}">{{ __('Panel admina') }}</a>
</li> </li>
@endif @endif
<li class="nav-item dropdown"> <li class="nav-item dropdown">
@ -63,7 +63,7 @@
<a class="dropdown-item" href="{{ route('logout') }}" <a class="dropdown-item" href="{{ route('logout') }}"
onclick="event.preventDefault(); onclick="event.preventDefault();
document.getElementById('logout-form').submit();"> document.getElementById('logout-form').submit();">
{{ __('Logout') }} {{ __('Wyloguj się') }}
</a> </a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;"> <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">

View File

@ -1,17 +1,17 @@
@extends('home') @extends('home')
@section('title') My Panel - Attendance @endsection @section('title') Mój Panel - Obecności @endsection
@section('user_content') @section('user_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<div class="card-body"> <div class="card-body">
<h4 class="card-header"> Add new attendance record </h4> <h4 class="card-header"> Dodaj obecność </h4>
<form method="POST" action="{{ route('user_add_attendance') }}" class="col-md-12"> <form method="POST" action="{{ route('user_add_attendance') }}" class="col-md-12">
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
<label for="classes_id" class="col-md-4 col-form-label text-md-right">{{ __('Classes') }}</label> <label for="classes_id" class="col-md-4 col-form-label text-md-right">{{ __('Zajęcia') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<select id="classes_id" class="form-control @error('classes_id') is-invalid @enderror" name="classes_id" required> <select id="classes_id" class="form-control @error('classes_id') is-invalid @enderror" name="classes_id" required>
@ -32,7 +32,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="student_id" class="col-md-4 col-form-label text-md-right">{{ __('Student ID') }}</label> <label for="student_id" class="col-md-4 col-form-label text-md-right">{{ __('ID studenta') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="student_id" type="number" class="form-control @error('student_id') is-invalid @enderror" name="student_id" value="{{ old('student_id') }}" required autocomplete="student_id" autofocus> <input id="student_id" type="number" class="form-control @error('student_id') is-invalid @enderror" name="student_id" value="{{ old('student_id') }}" required autocomplete="student_id" autofocus>
@ -46,7 +46,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="student_name" class="col-md-4 col-form-label text-md-right">{{ __('Student name') }}</label> <label for="student_name" class="col-md-4 col-form-label text-md-right">{{ __('Imię studenta') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="student_name" type="text" class="form-control @error('student_name') is-invalid @enderror" name="student_name" value="{{ old('student_name') }}" autocomplete="student_name"> <input id="student_name" type="text" class="form-control @error('student_name') is-invalid @enderror" name="student_name" value="{{ old('student_name') }}" autocomplete="student_name">
@ -60,7 +60,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="student_surname" class="col-md-4 col-form-label text-md-right">{{ __('Student surname') }}</label> <label for="student_surname" class="col-md-4 col-form-label text-md-right">{{ __('Nazwisko studenta') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="student_surname" type="text" class="form-control @error('student_surname') is-invalid @enderror" name="student_surname" value="{{ old('student_surname') }}" autocomplete="student_surname"> <input id="student_surname" type="text" class="form-control @error('student_surname') is-invalid @enderror" name="student_surname" value="{{ old('student_surname') }}" autocomplete="student_surname">
@ -74,7 +74,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="seat_number" class="col-md-4 col-form-label text-md-right">{{ __('Seat number') }}</label> <label for="seat_number" class="col-md-4 col-form-label text-md-right">{{ __('Nr miejsca') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="seat_number" type="number" class="form-control @error('seat_number') is-invalid @enderror" name="seat_number" value="{{ old('seat_number') }}" required autocomplete="seat_number" autofocus> <input id="seat_number" type="number" class="form-control @error('seat_number') is-invalid @enderror" name="seat_number" value="{{ old('seat_number') }}" required autocomplete="seat_number" autofocus>
@ -90,7 +90,7 @@
<div class="form-group row mb-0"> <div class="form-group row mb-0">
<div class="col-md-6 offset-md-4"> <div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{{ __('Add') }} {{ __('Dodaj') }}
</button> </button>
</div> </div>
</div> </div>
@ -98,53 +98,51 @@
</div> </div>
<div class="card-body"> <div class="card-body">
@if ($attendances->count() > 0) @if ($attendances->count() > 0)
<h4 class="card-header"> My all attendance records: ({{ $attendances->count() }}) </h4> <h4 class="card-header"> Wszystkie obecności: ({{ $attendances->count() }}) </h4>
<div class="card-body"> <div class="card-body">
<span> Group by: </span> <span> Grupuj: </span>
<a href="{{ route('user_attendances', ['classes_id']) }}" class="btn btn-primary"> Classes name </a> <a href="{{ route('user_attendances', ['classes_id']) }}" class="btn btn-primary"> po nazwie zajęć </a>
<a href="{{ route('user_attendances', ['student_id_number']) }}" class="btn btn-primary"> Student ID </a> <a href="{{ route('user_attendances', ['student_id_number']) }}" class="btn btn-primary"> po ID studenta </a>
<a href="{{ route('user_attendances', ['seat_number']) }}" class="btn btn-primary"> Seat number </a> <a href="{{ route('user_attendances', ['seat_number']) }}" class="btn btn-primary"> po numerze miejsca </a>
</div> </div>
@foreach ($attendances_grouped as $attendances_group_name => $attendances_list) @foreach ($attendances_grouped as $attendances_group_name => $attendances_list)
@if($attendances_group_name) @if($attendances_group_name)
@if($grouped_by == 'classes_id') @if($grouped_by == 'classes_id')
<h5 class="card-title"> {{ App\Subject::find(App\Classes::find($attendances_group_name)->subject_id)->name }}, <h5 class="card-title"> {{ App\Subject::find(App\Classes::find($attendances_group_name)->subject_id)->name }},
{{ App\Subject::find(App\Classes::find($attendances_group_name)->subject_id)->type }},
{{ App\Classes::find($attendances_group_name)-> date }} {{ App\Subject::find(App\Classes::find($attendances_group_name)->subject_id)->time }} {{ App\Classes::find($attendances_group_name)-> date }} {{ App\Subject::find(App\Classes::find($attendances_group_name)->subject_id)->time }}
({{ $attendances_list->count() }}) </h5> ({{ $attendances_list->count() }}) </h5>
@else @else
<h5 class="card-title"> {{ $attendances_group_name }} ({{ $attendances_list->count() }}) </h5> <h5 class="card-title"> {{ $attendances_group_name }} ({{ $attendances_list->count() }}) </h5>
@endif @endif
@else @else
<h5 class="card-title"> Other ({{ $attendances_list->count() }})</h5> <h5 class="card-title"> Inne ({{ $attendances_list->count() }})</h5>
@endif @endif
<table class="table table-striped"> <table class="table table-striped">
<tr class="thead-dark"> <tr class="thead-dark">
<th> Classes name </th> <th> Nazwa zajęc </th>
<th> Student ID </th> <th> ID studenta </th>
<th> Student name </th> <th> Imię studenta </th>
<th> Student surname </th> <th> Nazwisko studenta </th>
<th> Seat number </th> <th> Nr miejsca </th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
@foreach ($attendances_list as $attendance) @foreach ($attendances_list as $attendance)
<tr> <tr>
<td> {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->name }}, <td> {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->name }},
{{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->type }},
{{ App\Classes::find($attendance->classes_id)-> date }} {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->time }} </td> {{ App\Classes::find($attendance->classes_id)-> date }} {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->time }} </td>
<td> {{ $attendance->student_id_number }} </td> <td> {{ $attendance->student_id_number }} </td>
<td> {{ $attendance->student_name}}</td> <td> {{ $attendance->student_name}}</td>
<td> {{ $attendance->student_surname}}</td> <td> {{ $attendance->student_surname}}</td>
<td> {{ $attendance->seat_number }} </td> <td> {{ $attendance->seat_number }} </td>
<td> <td>
<a href="{{ route('user_delete_attendance', [$attendance->id]) }}" name="delete-attendance-btn" class="btn btn-danger"> Delete </a> <a href="{{ route('user_delete_attendance', [$attendance->id]) }}" name="delete-attendance-btn" class="btn btn-danger"> Usuń </a>
</td> </td>
<td> <td>
<a href="{{ route('user_edit_attendance', [$attendance->id]) }}" name="edit-attendance-btn" class="btn btn-secondary"> Edit </a> <a href="{{ route('user_edit_attendance', [$attendance->id]) }}" name="edit-attendance-btn" class="btn btn-secondary"> Edytuj </a>
</td> </td>
</tr> </tr>
@endforeach @endforeach

View File

@ -1,22 +1,22 @@
@extends('home') @extends('home')
@section('title') My Panel - Classes @endsection @section('title') Mój Panel - Zajęcia @endsection
@section('user_content') @section('user_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<div class="card-body"> <div class="card-body">
<h4 class="card-header"> Add new classes </h4> <h4 class="card-header"> Sprawdź obecność </h4>
<form method="POST" action="{{ route('user_add_classes') }}"> <form method="POST" action="{{ route('user_add_classes') }}">
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
<label for="subject_id" class="col-md-4 col-form-label text-md-right">{{ __('Subject') }}</label> <label for="subject_id" class="col-md-4 col-form-label text-md-right">{{ __('Przedmiot') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<select id="subject_id" class="form-control @error('subject_id') is-invalid @enderror" name="subject_id" required> <select id="subject_id" class="form-control @error('subject_id') is-invalid @enderror" name="subject_id" required>
@foreach ($subjects as $subject) @foreach ($subjects as $subject)
<option value="{{ $subject->id }}">{{ $subject->name }}, {{ $subject->type }}, {{ $subject->weekday }} {{ $subject->time }}</option> <option value="{{ $subject->id }}">{{ $subject->name }}, {{ $subject->weekday }} {{ $subject->time }}</option>
@endforeach @endforeach
</select> </select>
@ -29,10 +29,10 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="date" class="col-md-4 col-form-label text-md-right">{{ __('Date') }}</label> <label for="date" class="col-md-4 col-form-label text-md-right">{{ __('Data') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="date" type="date" class="form-control @error('date') is-invalid @enderror" name="date" value="{{ old('date') }}" autocomplete="date"> <input id="date" type="date" class="form-control @error('date') is-invalid @enderror" name="date" value="{{ $defaultDate }}" autocomplete="date">
@error('date') @error('date')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@ -45,7 +45,7 @@
<div class="form-group row mb-0"> <div class="form-group row mb-0">
<div class="col-md-6 offset-md-4"> <div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{{ __('Add') }} {{ __('Dodaj zajęcia i rozpocznij zapisy') }}
</button> </button>
</div> </div>
</div> </div>
@ -53,53 +53,53 @@
</div> </div>
<div> <div>
@if ($classes->count() > 0) @if ($classes->count() > 0)
<h4 class="card-header"> My all classes: ({{ $classes->count() }}) </h4> <h4 class="card-header"> Moje zajęcia: ({{ $classes->count() }}) </h4>
<div class="card-body"> <div class="card-body">
<span> Group by: </span> <span> Grupuj: </span>
<a href="{{ route('user_classes', ['subject_id']) }}" class="btn btn-primary"> Subject name </a> <a href="{{ route('user_classes', ['subject_id']) }}" class="btn btn-primary"> po nazwie przedmiotu </a>
<a href="{{ route('user_classes', ['date']) }}" class="btn btn-primary"> Date </a> <a href="{{ route('user_classes', ['date']) }}" class="btn btn-primary"> po dacie </a>
</div> </div>
@foreach ($classes_grouped as $classes_group_name => $classes_list) @foreach ($classes_grouped as $classes_group_name => $classes_list)
@if($classes_group_name) @if($classes_group_name)
@if($grouped_by == 'subject_id') @if($grouped_by == 'subject_id')
<h5 class="card-title"> {{ App\Subject::find($classes_group_name)->name }}, {{ App\Subject::find($classes_group_name)->type }}, <h5 class="card-title"> {{ App\Subject::find($classes_group_name)->name }},
{{ App\Subject::find($classes_group_name)->weekday }} {{ App\Subject::find($classes_group_name)->time }} ({{ $classes_list->count() }}) </h5> {{ App\Subject::find($classes_group_name)->weekday }} {{ App\Subject::find($classes_group_name)->time }} ({{ $classes_list->count() }}) </h5>
@else @else
<h5 class="card-title"> {{ $classes_group_name }} ({{ $classes_list->count() }}) </h5> <h5 class="card-title"> {{ $classes_group_name }} ({{ $classes_list->count() }}) </h5>
@endif @endif
@else @else
<h5 class="card-title"> Other ({{ $classes_list->count() }})</h5> <h5 class="card-title"> Inne ({{ $classes_list->count() }})</h5>
@endif @endif
<table class="table table-striped"> <table class="table table-striped">
<tr class="thead-dark"> <tr class="thead-dark">
<th> Subject name </th> <th> Nazwa przedmiotu </th>
<th> Date </th> <th> Data </th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
@foreach ($classes_list as $classes_item) @foreach ($classes_list as $classes_item)
<tr> <tr>
<td> {{ App\Subject::find($classes_item->subject_id)->name }}, {{ App\Subject::find($classes_item->subject_id)->type }}, <td> {{ App\Subject::find($classes_item->subject_id)->name }},
{{ App\Subject::find($classes_item->subject_id)->weekday }} {{ App\Subject::find($classes_item->subject_id)->time }}</td> {{ App\Subject::find($classes_item->subject_id)->weekday }} {{ App\Subject::find($classes_item->subject_id)->time }}</td>
<td> {{ $classes_item->date }} </td> <td> {{ $classes_item->date }} </td>
{{--<td>--}}
{{--<a href="{{ route('user_start_classes', [$classes_item->id]) }}" name="start-classes-btn" class="btn btn-warning"> Rozpocznij zapisy </a>--}}
{{--</td>--}}
<td> <td>
<a href="{{ route('user_start_classes', [$classes_item->id]) }}" name="start-classes-btn" class="btn btn-warning"> Rozpocznij zapisy </a> <a href="{{ route('user_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger"> Usuń </a>
</td> </td>
<td> <td>
<a href="{{ route('user_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger"> Delete </a> <a href="{{ route('user_edit_classes', [$classes_item->id]) }}" name="edit-classes-btn" class="btn btn-secondary"> Edytuj </a>
</td>
<td>
<a href="{{ route('user_edit_classes', [$classes_item->id]) }}" name="edit-classes-btn" class="btn btn-secondary"> Edit </a>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</table> </table>
@endforeach @endforeach
@else @else
<p> No classes yet. </p> <p> Brak zajęć. </p>
@endif @endif
</div> </div>
</div> </div>

View File

@ -1,11 +1,12 @@
@extends('home') @extends('home')
@section('title') My Panel - Classes @endsection @section('title') Mój Panel - Zajęcia @endsection
@section('user_content') @section('user_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<div class="card-body"> <div class="card-body">
<p> {{ App\Subject::find($classes->subject_id)->name }}, {{ $classes->date }} {{ App\Subject::find($classes->subject_id)->time }}</p>
@if(!$verified) @if(!$verified)
<p> <p>
Wprowadź poniższy kod do programu: Wprowadź poniższy kod do programu:

View File

@ -1,16 +1,16 @@
@extends('home') @extends('home')
@section('title') My Panel - Subjects @endsection @section('title') Mój Panel - Przedmioty @endsection
@section('user_content') @section('user_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<div class="card-body"> <div class="card-body">
<h4 class="card-header"> Add new subject </h4> <h4 class="card-header"> Dodaj nowy przedmiot </h4>
<form method="POST" action="{{ route('user_add_subject') }}"> <form method="POST" action="{{ route('user_add_subject') }}">
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
<label for="name" class="col-md-4 col-form-label text-md-right">{{ __('Name') }}</label> <label for="name" class="col-md-4 col-form-label text-md-right">{{ __('Nazwa') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus> <input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus>
@ -23,34 +23,39 @@
</div> </div>
</div> </div>
<div class="form-group row"> {{--<div class="form-group row">--}}
<label for="type" class="col-md-4 col-form-label text-md-right">{{ __('Type') }}</label> {{--<label for="type" class="col-md-4 col-form-label text-md-right">{{ __('Type') }}</label>--}}
<div class="col-md-6"> {{--<div class="col-md-6">--}}
<select id="type" class="form-control @error('type') is-invalid @enderror" name="type"> {{--<select id="type" class="form-control @error('type') is-invalid @enderror" name="type">--}}
<option label="-- select type -- "></option> {{--<option label="-- select type -- "></option>--}}
@foreach ($types as $type) {{--@foreach ($types as $type)--}}
<option value="{{ $type }}">{{ $type }}</option> {{--<option value="{{ $type }}">{{ $type }}</option>--}}
@endforeach {{--@endforeach--}}
</select> {{--</select>--}}
@error('type') {{--@error('type')--}}
<span class="invalid-feedback" role="alert"> {{--<span class="invalid-feedback" role="alert">--}}
<strong>{{ $message }}</strong> {{--<strong>{{ $message }}</strong>--}}
</span> {{--</span>--}}
@enderror {{--@enderror--}}
</div> {{--</div>--}}
</div> {{--</div>--}}
<div class="form-group row"> <div class="form-group row">
<label for="weekday" class="col-md-4 col-form-label text-md-right">{{ __('Day of the week') }}</label> <label for="weekday" class="col-md-4 col-form-label text-md-right">{{ __('Dzień tygodnia') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<select id="weekday" class="form-control @error('weekday') is-invalid @enderror" name="weekday"> <select id="weekday" class="form-control @error('weekday') is-invalid @enderror" name="weekday">
<option label="-- select day of the week -- "></option> <option label="-- select day of the week -- "></option>
@foreach ($weekdays as $weekday) @foreach ($weekdays as $weekday)
@if ($weekday == $defaultWeekday)
<option value="{{ $weekday }}" selected="selected">{{ $weekday }}</option>
@else
<option value="{{ $weekday }}">{{ $weekday }}</option> <option value="{{ $weekday }}">{{ $weekday }}</option>
@endif
@endforeach @endforeach
</select> </select>
@ -63,10 +68,10 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="time" class="col-md-4 col-form-label text-md-right">{{ __('Time') }}</label> <label for="time" class="col-md-4 col-form-label text-md-right">{{ __('Godzina') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="time" type="text" class="form-control @error('time') is-invalid @enderror" name="time" value="{{ old('time') }}" autocomplete="time"> <input id="time" type="time" class="form-control @error('time') is-invalid @enderror" name="time" value="{{ $defaultTime }}" autocomplete="time">
@error('time') @error('time')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@ -76,26 +81,26 @@
</div> </div>
</div> </div>
<div class="form-group row"> {{--<div class="form-group row">--}}
<label for="room_id" class="col-md-4 col-form-label text-md-right">{{ __('Room') }}</label> {{--<label for="room_id" class="col-md-4 col-form-label text-md-right">{{ __('Room') }}</label>--}}
<div class="col-md-6"> {{--<div class="col-md-6">--}}
<select id="room_id" class="form-control @error('room_id') is-invalid @enderror" name="room_id" required> {{--<select id="room_id" class="form-control @error('room_id') is-invalid @enderror" name="room_id" required>--}}
@foreach ($rooms as $room) {{--@foreach ($rooms as $room)--}}
<option value="{{ $room->id }}">{{ $room->name }}</option> {{--<option value="{{ $room->id }}">{{ $room->name }}</option>--}}
@endforeach {{--@endforeach--}}
</select> {{--</select>--}}
@error('room_id') {{--@error('room_id')--}}
<span class="invalid-feedback" role="alert"> {{--<span class="invalid-feedback" role="alert">--}}
<strong>{{ $message }}</strong> {{--<strong>{{ $message }}</strong>--}}
</span> {{--</span>--}}
@enderror {{--@enderror--}}
</div> {{--</div>--}}
</div> {{--</div>--}}
<div class="form-group row"> <div class="form-group row">
<label for="user_id" class="col-md-4 col-form-label text-md-right">{{ __('Instructor') }}</label> <label for="user_id" class="col-md-4 col-form-label text-md-right">{{ __('Prowadzący') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="user_id" type="text" class="@error('user_id') is-invalid @enderror form-control-plaintext" name="user_id" value="{{ Auth::user()->name }} {{ Auth::user()->surname }}" readonly> <input id="user_id" type="text" class="@error('user_id') is-invalid @enderror form-control-plaintext" name="user_id" value="{{ Auth::user()->name }} {{ Auth::user()->surname }}" readonly>
@ -111,7 +116,7 @@
<div class="form-group row mb-0"> <div class="form-group row mb-0">
<div class="col-md-6 offset-md-4"> <div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{{ __('Add') }} {{ __('Dodaj') }}
</button> </button>
</div> </div>
</div> </div>
@ -119,15 +124,15 @@
</div> </div>
<div class="card-body"> <div class="card-body">
@if ($subjects->count() > 0) @if ($subjects->count() > 0)
<h4 class="card-header"> My all subjects: ({{ $subjects->count() }}) </h4> <h4 class="card-header"> Moje przedmioty: ({{ $subjects->count() }}) </h4>
<div class="card-body"> <div class="card-body">
<span> Group by: </span> <span> Grupuj: </span>
<a href="{{ route('user_subjects', ['name']) }}" class="btn btn-primary"> Name </a> <a href="{{ route('user_subjects', ['name']) }}" class="btn btn-primary"> po nazwie </a>
<a href="{{ route('user_subjects', ['type']) }}" class="btn btn-primary"> Type </a> {{--<a href="{{ route('user_subjects', ['type']) }}" class="btn btn-primary"> Type </a>--}}
<a href="{{ route('user_subjects', ['weekday']) }}" class="btn btn-primary"> Day of the week </a> <a href="{{ route('user_subjects', ['weekday']) }}" class="btn btn-primary"> po dniu tygodnia </a>
<a href="{{ route('user_subjects', ['time']) }}" class="btn btn-primary"> Time </a> <a href="{{ route('user_subjects', ['time']) }}" class="btn btn-primary"> po godzinie </a>
<a href="{{ route('user_subjects', ['room_id']) }}" class="btn btn-primary"> Room </a> {{--<a href="{{ route('user_subjects', ['room_id']) }}" class="btn btn-primary"> Room </a>--}}
</div> </div>
@foreach ($subjects_grouped as $subject_group_name => $subjects_list) @foreach ($subjects_grouped as $subject_group_name => $subjects_list)
@ -137,41 +142,40 @@
@else @else
<h5 class="card-title"> {{ $subject_group_name }} ({{ $subjects_list->count() }})</h5> <h5 class="card-title"> {{ $subject_group_name }} ({{ $subjects_list->count() }})</h5>
@endif @endif
@else @else
<h5 class="card-title"> Other ({{ $subjects_list->count() }})</h5> <h5 class="card-title"> Inne ({{ $subjects_list->count() }})</h5>
@endif @endif
<table class="table table-striped"> <table class="table table-striped">
<tr class="thead-dark"> <tr class="thead-dark">
<th> Name </th> <th> Nazwa </th>
<th> Type </th> {{--<th> Type </th>--}}
<th> Day of the week </th> <th> Dzień tygodnia </th>
<th> Time </th> <th> Godzina </th>
<th> Instructor </th> <th> Prowadzący </th>
<th> Room </th> {{--<th> Room </th>--}}
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
@foreach ($subjects_list as $subject) @foreach ($subjects_list as $subject)
<tr> <tr>
<td> {{ $subject->name }} </td> <td> {{ $subject->name }} </td>
<td> {{ $subject->type }} </td> {{--<td> {{ $subject->type }} </td>--}}
<td> {{ $subject->weekday }} </td> <td> {{ $subject->weekday }} </td>
<td> {{ $subject->time }} </td> <td> {{ $subject->time }} </td>
<td> {{ App\User::find($subject->user_id)->name }} {{ App\User::find($subject->user_id)->surname }}</td> <td> {{ App\User::find($subject->user_id)->name }} {{ App\User::find($subject->user_id)->surname }}</td>
<td> {{ App\Room::find($subject->room_id)->name }} </td> {{--<td> {{ App\Room::find($subject->room_id)->name }} </td>--}}
<td> <td>
<a href="{{ route('user_delete_subject', [$subject->id]) }}" name="delete-subject-btn" class="btn btn-danger"> Delete </a> <a href="{{ route('user_delete_subject', [$subject->id]) }}" name="delete-subject-btn" class="btn btn-danger"> Usuń </a>
</td> </td>
<td> <td>
<a href="{{ route('user_edit_subject', [$subject->id]) }}" name="edit-subject-btn" class="btn btn-secondary"> Edit </a> <a href="{{ route('user_edit_subject', [$subject->id]) }}" name="edit-subject-btn" class="btn btn-secondary"> Edytuj </a>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</table> </table>
@endforeach @endforeach
@else @else
<p> No subjects yet. </p> <p> Brak przedmiotów. </p>
@endif @endif
</div> </div>
</div> </div>

View File

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title> <title>@CHECK</title>
<!-- Fonts --> <!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
@ -68,12 +68,12 @@
@if (Route::has('login')) @if (Route::has('login'))
<div class="top-right links"> <div class="top-right links">
@auth @auth
<a href="{{ url('/home') }}">My Home</a> <a href="{{ url('/home') }}">Strona Główna</a>
@else @else
<a href="{{ route('login') }}">Login</a> <a href="{{ route('login') }}">Zaloguj się</a>
@if (Route::has('register')) @if (Route::has('register'))
<a href="{{ route('register') }}">Register</a> <a href="{{ route('register') }}">Zarejestruj się</a>
@endif @endif
@endauth @endauth
</div> </div>
@ -83,7 +83,7 @@
<div class="title m-b-md"> <div class="title m-b-md">
@CHECK @CHECK
</div> </div>
<h2>Welcome!</h2> <h2>Witaj!</h2>
</div> </div>
</div> </div>
</body> </body>