frontend fixes, timezone updated, delete confirmation added
This commit is contained in:
parent
1a1d79a5f4
commit
1cbbfe6186
@ -12,18 +12,16 @@ use App\Room;
|
||||
class UserSubjectsController extends Controller
|
||||
{
|
||||
public function index($groupBy = 'weekday') {
|
||||
setlocale(LC_ALL, 'pl', 'pl_PL', 'pl_PL.ISO8859-2', 'plk', 'polish', 'Polish');
|
||||
$user_id = Auth::id();
|
||||
$subjects = Subject::where('user_id', $user_id)->orderBy('name','ASC')->get();
|
||||
$subjects_grouped = $subjects->groupBy($groupBy);
|
||||
$rooms = Room::all();
|
||||
$weekdays = ['Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota', 'Niedziela'];
|
||||
// $types = ['Lecture', 'Excercises', 'Labs', 'Other'];
|
||||
$defaultTime = date("H:i");
|
||||
if(date('w')-1 < 0 ) {
|
||||
$defaultWeekday = $weekdays[6];
|
||||
} else {
|
||||
$defaultWeekday = "Poniedziałek";//$weekdays[date('w') - 1];
|
||||
$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, 'rooms' => $rooms]);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'UTC',
|
||||
'timezone' => 'Europe/Warsaw',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -11157,7 +11157,7 @@ a.text-dark:focus {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.subjects-table {
|
||||
.custom-table {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
@ -11198,3 +11198,4 @@ a.text-dark:focus {
|
||||
main {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
|
@ -217,10 +217,18 @@ a.checkout-button {
|
||||
padding: 50px 100px;
|
||||
font-size: 30px;
|
||||
display: none;
|
||||
width: 70%;
|
||||
width: 50%;
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 3px 10px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.card-reader div {
|
||||
margin: 5px 0;
|
||||
}
|
||||
.card-reader-form input {
|
||||
width: 50%;
|
||||
padding: 10px;
|
||||
font-size: 20px;
|
||||
border: 1px solid #3490dc;
|
||||
}
|
||||
.card-reader.open {
|
||||
display: block;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
.preview-page-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
height: 100%;
|
||||
margin: 40px;
|
||||
}
|
||||
|
@ -7,18 +7,26 @@ $(document).ready(function(){
|
||||
$('.add-subject-btn').on('click', function () {
|
||||
$('.add-subject').toggleClass('open');
|
||||
if ($('.add-subject').first().hasClass('open')) {
|
||||
$(this).text('Anuluj')
|
||||
$(this).addClass('btn-danger');
|
||||
$(this).html('<i class="fa fa-times"></i> Anuluj');
|
||||
$(this).attr('title', 'Anuluj');
|
||||
} else {
|
||||
$(this).text('Dodaj nowy')
|
||||
$(this).removeClass('btn-danger');
|
||||
$(this).html('<i class="fa fa-plus"></i> Dodaj nowy przedmiot');
|
||||
$(this).attr('title', 'Dodaj nowy przedmiot');
|
||||
}
|
||||
});
|
||||
|
||||
$('.add-attendance-btn').on('click', function () {
|
||||
$('.add-attendance').toggleClass('open');
|
||||
if ($('.add-attendance').first().hasClass('open')) {
|
||||
$(this).text('Anuluj')
|
||||
$(this).addClass('btn-danger');
|
||||
$(this).html('<i class="fa fa-times"></i> Anuluj');
|
||||
$(this).attr('title', 'Anuluj');
|
||||
} else {
|
||||
$(this).text('Dodaj nowy wpis')
|
||||
$(this).removeClass('btn-danger');
|
||||
$(this).html('<i class="fa fa-plus"></i> Dodaj nowy wpis');
|
||||
$(this).attr('title', 'Dodaj nowy wpis');
|
||||
}
|
||||
});
|
||||
|
||||
@ -59,5 +67,4 @@ $(document).ready(function(){
|
||||
});
|
||||
}
|
||||
setSelectedOptionGroup();
|
||||
|
||||
});
|
||||
|
@ -16,6 +16,7 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||
<link rel="shortcut icon" href="{{ asset('img/favicon.png') }}">
|
||||
@yield('additional_meta')
|
||||
@ -61,8 +62,8 @@
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
{{ __('Wyloguj się') }}
|
||||
document.getElementById('logout-form').submit();"> <i class="fa fa-power-off"></i>
|
||||
{{ __(' Wyloguj się ') }}
|
||||
</a>
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
||||
@csrf
|
||||
|
@ -18,8 +18,8 @@
|
||||
<textarea class="form-control" id="note_content" name="note_content">{{ $attendance->notes }}</textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Anuluj</button>
|
||||
<button type="submit" class="btn btn-primary">Zapisz</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" title="Anuluj"> Anuluj </button>
|
||||
<button type="submit" class="btn btn-primary" title="Zapisz notatkę"> Zapisz </button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<table class="table table-striped subjects-table">
|
||||
<table class="table table-striped table-borderless custom-table">
|
||||
<tr class="thead-dark">
|
||||
<th> Nazwa zajęć </th>
|
||||
<th> Nr indeksu </th>
|
||||
@ -21,24 +21,25 @@
|
||||
<td> {{ $attendance->student_name}}</td>
|
||||
<td> {{ $attendance->seat_number }} </td>
|
||||
@if(!$export == 1)
|
||||
<td>
|
||||
<a href="{{ route('user_delete_attendance', [$attendance->id]) }}" name="delete-attendance-btn" class="btn btn-danger"> Usuń </a>
|
||||
</td>
|
||||
@if(!$attendance->notes)
|
||||
<td>
|
||||
<button type="button" name="note-attendance-btn" class="btn btn-info" data-toggle="modal" data-target="#noteModal-{{ $attendance->id }}"> Dodaj notatkę </button>
|
||||
<button type="button" name="note-attendance-btn" class="btn btn-primary" data-toggle="modal" data-target="#noteModal-{{ $attendance->id }}" title="Dodaj notatkę"> <i class="fa fa-plus"></i> Dodaj notatkę </button>
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
<button type="button" name="note-attendance-btn" class="btn btn-info" data-toggle="modal" data-target="#noteModal-{{ $attendance->id }}"> Edytuj notatkę </button>
|
||||
<button type="button" name="note-attendance-btn" class="btn btn-secondary" data-toggle="modal" data-target="#noteModal-{{ $attendance->id }}" title="Edytuj notatkę"> <i class="fa fa-pencil"></i> Edytuj notatkę </button>
|
||||
</td>
|
||||
@endif
|
||||
@include('user.attendance_note', [$attendance])
|
||||
<td>
|
||||
<button type="button" name="delete-attendance-btn" class="btn btn-danger" data-toggle="modal" data-target="#attendanceConfirmationModal-{{ $attendance->id }}" title="Usuń wpis"> <i class="fa fa-trash-o"></i> Usuń </button>
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
{{ $attendance->notes }}
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@include('user.attendance_note', [$attendance])
|
||||
@include('user.delete_confirmation_attendance', [$attendance])
|
||||
@endforeach
|
||||
</table>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<table class="table subjects-table">
|
||||
<table class="table table-borderless custom-table">
|
||||
<tr class="thead-light">
|
||||
<th> Nr indeksu </th>
|
||||
<th> Nazwisko </th>
|
||||
@ -18,25 +18,26 @@
|
||||
<td> {{ $attendance->student_name}}</td>
|
||||
<td> {{ $attendance->seat_number }} </td>
|
||||
@if(!$export == 1)
|
||||
<td>
|
||||
<a href="{{ route('user_delete_attendance', [$attendance->id]) }}" name="delete-attendance-btn" class="btn btn-danger"> Usuń </a>
|
||||
</td>
|
||||
@if(!$attendance->notes)
|
||||
<td>
|
||||
<button type="button" name="note-attendance-btn" class="btn btn-info" data-toggle="modal" data-target="#noteModal-{{ $attendance->id }}"> Dodaj notatkę </button>
|
||||
<button type="button" name="note-attendance-btn" class="btn btn-primary" data-toggle="modal" data-target="#noteModal-{{ $attendance->id }}" title="Dodaj notatkę"> <i class="fa fa-plus"></i> <i class="fa fa-sticky-note"></i> </button>
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
<button type="button" name="note-attendance-btn" class="btn btn-info" data-toggle="modal" data-target="#noteModal-{{ $attendance->id }}"> Edytuj notatkę </button>
|
||||
<button type="button" name="note-attendance-btn" class="btn btn-secondary" data-toggle="modal" data-target="#noteModal-{{ $attendance->id }}" title="Edytuj notatkę"> <i class="fa fa-pencil"></i> <i class="fa fa-sticky-note"></i> </button>
|
||||
</td>
|
||||
@endif
|
||||
@include('user.attendance_note', [$attendance])
|
||||
<td>
|
||||
<button type="button" name="delete-attendance-btn" class="btn btn-danger" data-toggle="modal" data-target="#attendanceConfirmationModal-{{ $attendance->id }}" title="Usuń wpis"> <i class="fa fa-trash-o"></i></button>
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
{{ $attendance->notes }}
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@include('user.attendance_note', [$attendance])
|
||||
@include('user.delete_confirmation_attendance', [$attendance])
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
<div class="modal fade" id="attendanceConfirmationModal-{{ $attendance->id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5> Usuwanie wpisu obecności </h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p> Czy na pewno chcesz usunąć obecność studenta {{ $attendance->student_name }} {{ $attendance->student_surname }}
|
||||
(numer indeksu {{ $attendance->student_id_number }}) z zajęć {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->name }},
|
||||
które odbyły się {{ App\Classes::find($attendance->classes_id)-> date }} o godzinie {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->time }}?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" title="Anuluj"> Anuluj </button>
|
||||
<a href="{{ route('user_delete_attendance', [$attendance->id]) }}" name="delete-attendance-btn" class="btn btn-danger" title="Usuń wpis"> Tak, usuń </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
20
resources/views/user/delete_confirmation_classes.blade.php
Normal file
20
resources/views/user/delete_confirmation_classes.blade.php
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="modal fade" id="classesConfirmationModal-{{ $classes_item->id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5> Usuwanie zajęć </h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p> Czy na pewno chcesz usunąć zajęcia {{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->name }}, które odbyły się
|
||||
{{ App\Classes::find($classes_item->id)-> date }} o godzinie {{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->time }}?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" title="Anuluj"> Anuluj </button>
|
||||
<a href="{{ route('user_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger" title="Usuń zajęcia"> Tak, usuń </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
19
resources/views/user/delete_confirmation_subject.blade.php
Normal file
19
resources/views/user/delete_confirmation_subject.blade.php
Normal file
@ -0,0 +1,19 @@
|
||||
<div class="modal fade" id="subjectConfirmationModal-{{ $subject->id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5> Usuwanie przedmiotu </h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p> Czy na pewno chcesz usunąć przedmiot {{ $subject->name }}, który odbywa się w każdy {{ $subject->weekday }} o godzinie {{ $subject->time }} w sali {{ App\Room::find($subject->room_id)->name }}?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" title="Anuluj"> Anuluj </button>
|
||||
<a href="{{ route('user_delete_subject', [$subject->id]) }}" name="delete-subject-btn" class="btn btn-danger hover-btn" title="Usuń przedmiot"> Tak, usuń </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -6,8 +6,11 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card-header custom-header">
|
||||
<h4> Wszystkie obecności: ({{ $attendances->count() }}) </h4>
|
||||
<button type="button" class="btn btn-primary btn-custom add-attendance-btn"> Dodaj nowy wpis </button>
|
||||
<h4> Wszystkie obecności <span class="badge badge-secondary"> {{ $attendances->count() }} </span> </h4>
|
||||
<div>
|
||||
<a href="{{ route('user_export_grouped', [$grouped_by]) }}" class="btn btn-success btn-export" title="Wyeksportuj wszystko do xlsx"> <i class="fa fa-file-excel-o"></i> Wyeksportuj (.xlsx) </a>
|
||||
<button type="button" class="btn btn-primary add-attendance-btn" title="Dodaj nowy wpis"> <i class="fa fa-plus"></i> Dodaj nowy wpis </button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body add-attendance">
|
||||
@ -22,7 +25,6 @@
|
||||
<select id="classes_id" class="form-control @error('classes_id') is-invalid @enderror" name="classes_id" required>
|
||||
@foreach ($classes as $classes_item)
|
||||
<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 }}
|
||||
</option>
|
||||
@endforeach
|
||||
@ -108,7 +110,7 @@
|
||||
|
||||
<div class="form-group row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<button type="submit" class="btn btn-primary" title="Dodaj nowy wpis">
|
||||
{{ __('Dodaj') }}
|
||||
</button>
|
||||
</div>
|
||||
@ -133,14 +135,16 @@
|
||||
@if($grouped_by == 'classes_id')
|
||||
<h5 class="card-title"> {{ App\Subject::find(App\Classes::find($attendances_group_name)->subject_id)->name }},
|
||||
{{ App\Classes::find($attendances_group_name)-> date }} {{ App\Subject::find(App\Classes::find($attendances_group_name)->subject_id)->time }}
|
||||
({{ $attendances_list->count() }}) </h5>
|
||||
<span class="badge badge-secondary"> {{ $attendances_list->count() }}</span> </h5>
|
||||
@else
|
||||
<h5 class="card-title"> {{ $attendances_group_name }} ({{ $attendances_list->count() }}) </h5>
|
||||
<h5 class="card-title"> {{ $attendances_group_name }} <span class="badge badge-secondary"> {{ $attendances_list->count() }} </span> </h5>
|
||||
@endif
|
||||
@else
|
||||
<h5 class="card-title"> Inne ({{ $attendances_list->count() }})</h5>
|
||||
<h5 class="card-title"> Inne <span class="badge badge-secondary"> {{ $attendances_list->count() }}</span></h5>
|
||||
@endif
|
||||
<div class="table-responsive">
|
||||
@include('user.attendances_table', ['attendances_list' => $attendances_list, 'export' => 0])
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
<div class="form-group row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<button type="submit" class="btn btn-primary" title="Dodaj zajęcia i rozpocznij zapisy">
|
||||
{{ __('Dodaj zajęcia i rozpocznij zapisy') }}
|
||||
</button>
|
||||
</div>
|
||||
@ -55,7 +55,7 @@
|
||||
</div>
|
||||
@if ($classes->count() > 0)
|
||||
<div class="card-header custom-header">
|
||||
<h4> Moje zajęcia: ({{ $classes->count() }}) </h4>
|
||||
<h4> Moje zajęcia <span class="badge badge-secondary"> {{ $classes->count() }} </span> </h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body card-custom">
|
||||
@ -72,14 +72,15 @@
|
||||
@if($classes_group_name)
|
||||
@if($grouped_by == 'subject_id')
|
||||
<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 }} <span class="badge badge-secondary"> {{ $classes_list->count() }} </span> </h5>
|
||||
@else
|
||||
<h5 class="card-title"> {{ $classes_group_name }} ({{ $classes_list->count() }}) </h5>
|
||||
<h5 class="card-title"> {{ $classes_group_name }} <span class="badge badge-secondary"> {{ $classes_list->count() }} </span> </h5>
|
||||
@endif
|
||||
@else
|
||||
<h5 class="card-title"> Inne ({{ $classes_list->count() }})</h5>
|
||||
<h5 class="card-title"> Inne <span class="badge badge-secondary"> {{ $classes_list->count() }} </span></h5>
|
||||
@endif
|
||||
<table class="table table-striped subjects-table">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless custom-table">
|
||||
<tr class="thead-dark">
|
||||
<th> Nazwa przedmiotu </th>
|
||||
<th> Data </th>
|
||||
@ -94,18 +95,20 @@
|
||||
<td> {{ $classes_item->date }} </td>
|
||||
<td>
|
||||
@if($classes_item->classes_code)
|
||||
<a href="{{ route('user_start_classes', [$classes_item->id]) }}" name="start-classes-btn" class="btn btn-warning"> Kontynuuj zapisy </a>
|
||||
<a href="{{ route('user_start_classes', [$classes_item->id]) }}" name="start-classes-btn" class="btn btn-secondary" title="Kontynuuj zapisy"> <i class="fa fa-play"></i> Kontynuuj zapisy </a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('user_preview_classes', [$classes_item->id]) }}" name="preview-classes-btn" class="btn btn-info"> Zobacz podgląd sali </a>
|
||||
<a href="{{ route('user_preview_classes', [$classes_item->id]) }}" name="preview-classes-btn" class="btn btn-primary" title="Zobacz podgląd sali"> <i class="fa fa-television"></i> Zobacz salę </a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('user_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger"> Usuń </a>
|
||||
<button type="button" name="delete-classes-btn" class="btn btn-danger" data-toggle="modal" data-target="#classesConfirmationModal-{{ $classes_item->id }}" title="Usuń zajęcia"> <i class="fa fa-trash-o"></i> Usuń </button>
|
||||
</td>
|
||||
</tr>
|
||||
@include('user.delete_confirmation_classes', [$classes_item])
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
|
@ -28,8 +28,8 @@
|
||||
<div class="preview-page-content">
|
||||
<div class="preview-attendance-table">
|
||||
<div class="card-header custom-header">
|
||||
<h4> Lista obecności </h4>
|
||||
<a href="{{ route('user_export', [$classes_id]) }}" class="btn btn-success btn-export"> Wyeksportuj do xlsx </a>
|
||||
<h4> Lista obecności <span class="badge badge-secondary"> {{ $attendances->count() }} </span></h4>
|
||||
<a href="{{ route('user_export', [$classes_id]) }}" class="btn btn-success btn-export" title="Wyeksportuj tabelę do xlsx"> <i class="fa fa-file-excel-o"></i> Wyeksportuj (.xlsx) </a>
|
||||
</div>
|
||||
<div class="card-body card-custom">
|
||||
<span class="sort-span"> Sortuj: </span>
|
||||
@ -44,8 +44,10 @@
|
||||
<option value="{{ route('user_preview_classes', ['classes_id' => $classes_id, 'orderBy' => 'seat_number', 'orderDirection' => 'DESC']) }}">po numerze miejsca malejąco</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
@include('user.attendances_table_preview', ['attendances' => $attendances, 'export' => 0])
|
||||
</div>
|
||||
</div>
|
||||
<div class="seat-chart-wrapper">
|
||||
@if($twoparts)
|
||||
<div id="map-carousel" class="carousel slide" data-ride="carousel" data-interval="false" data-wrap="false">
|
||||
|
@ -6,8 +6,8 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card-header custom-header">
|
||||
<h4> Moje przedmioty: ({{ $subjects->count() }}) </h4>
|
||||
<button type="button" class="btn btn-primary btn-custom add-subject-btn"> Dodaj nowy </button>
|
||||
<h4> Moje przedmioty <span class="badge badge-secondary"> {{ $subjects->count() }} </span></h4>
|
||||
<button type="button" class="btn btn-primary add-subject-btn" title="Dodaj nowy przedmiot"> <i class="fa fa-plus"></i> Dodaj nowy przedmiot </button>
|
||||
</div>
|
||||
|
||||
<div class="card-body add-subject">
|
||||
@ -101,7 +101,7 @@
|
||||
|
||||
<div class="form-group row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<button type="submit" class="btn btn-primary" title="Dodaj nowy przedmiot">
|
||||
{{ __('Dodaj') }}
|
||||
</button>
|
||||
</div>
|
||||
@ -126,17 +126,17 @@
|
||||
@foreach ($subjects_grouped as $subject_group_name => $subjects_list)
|
||||
@if($subject_group_name)
|
||||
@if($grouped_by == 'room_id')
|
||||
<h5 class="card-title"> {{ App\Room::find($subject_group_name)->name }} ({{ $subjects_list->count() }}) </h5>
|
||||
<h5 class="card-title"> {{ App\Room::find($subject_group_name)->name }} <span class="badge badge-secondary"> {{ $subjects_list->count() }} </span></h5>
|
||||
@else
|
||||
<h5 class="card-title"> {{ $subject_group_name }} ({{ $subjects_list->count() }})</h5>
|
||||
<h5 class="card-title"> {{ $subject_group_name }} <span class="badge badge-secondary"> {{ $subjects_list->count() }} </span></h5>
|
||||
@endif
|
||||
@else
|
||||
<h5 class="card-title"> Inne ({{ $subjects_list->count() }})</h5>
|
||||
<h5 class="card-title"> Inne <span class="badge badge-secondary"> {{ $subjects_list->count() }} </span></h5>
|
||||
@endif
|
||||
<table class="table table-striped subjects-table">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless custom-table">
|
||||
<tr class="thead-dark">
|
||||
<th> Nazwa </th>
|
||||
{{--<th> Type </th>--}}
|
||||
<th> Dzień tygodnia </th>
|
||||
<th> Godzina </th>
|
||||
<th> Prowadzący </th>
|
||||
@ -147,20 +147,21 @@
|
||||
@foreach ($subjects_list as $subject)
|
||||
<tr>
|
||||
<td> {{ $subject->name }} </td>
|
||||
{{--<td> {{ $subject->type }} </td>--}}
|
||||
<td> {{ $subject->weekday }} </td>
|
||||
<td> {{ $subject->time }} </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>
|
||||
<a href="{{ route('user_delete_subject', [$subject->id]) }}" name="delete-subject-btn" class="btn btn-danger"> Usuń </a>
|
||||
<button type="button" name="delete-subject-btn" class="btn btn-danger" data-toggle="modal" data-target="#subjectConfirmationModal-{{ $subject->id }}" title="Usuń przedmiot"> <i class="fa fa-trash-o"></i> Usuń </button>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('user_edit_subject', [$subject->id]) }}" name="edit-subject-btn" class="btn btn-secondary" title="Edytuj przedmiot"> <i class="fa fa-pencil"></i> Edytuj </a>
|
||||
</td>
|
||||
{{--<td>--}}
|
||||
{{--<a href="{{ route('user_edit_subject', [$subject->id]) }}" name="edit-subject-btn" class="btn btn-secondary"> Edytuj </a>--}}
|
||||
{{--</td>--}}
|
||||
</tr>
|
||||
@include('user.delete_confirmation_subject', [$subject])
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
|
Loading…
Reference in New Issue
Block a user