|
@@ -44,21 +44,25 @@
|
44
|
44
|
</li>
|
45
|
45
|
<li class="nav-item dropdown">
|
46
|
46
|
@php
|
47
|
|
- $department = \App\Department::find(Request()->session()->get('department'));
|
|
47
|
+ switch(Request()->session()->get('filter')) {
|
|
48
|
+ case 'f': $division = App\Faculty::find(Request()->session()->get('faculty')); break;
|
|
49
|
+ case 'd': $division = App\Department::find(Request()->session()->get('department')); break;
|
|
50
|
+ default: break;
|
|
51
|
+ }
|
48
|
52
|
@endphp
|
49
|
53
|
<a class="nav-link dropdown-toggle mdc-typography--body1" href="#" data-toggle="dropdown">
|
50
|
|
- {{ $department->title ?: $department->name ?? 'Departamento' }} <span class="caret"></span>
|
|
54
|
+ {{ $division->name ?: $division->code ?? 'Departamento' }} <span class="caret"></span>
|
51
|
55
|
</a>
|
52
|
56
|
<ul class="dropdown-menu">
|
53
|
57
|
@foreach (App\Faculty::orderBy('name')->get() as $faculty)
|
54
|
|
- @if (!$faculty->departments->isEmpty())
|
|
58
|
+ @if ($faculty->departments->isNotEmpty())
|
55
|
59
|
<li class="dropdown-submenu">
|
56
|
60
|
<a class="dropdown-item dropdown-toggle mdc-typography--body1" href="#" data-toggle="dropdown">{{ $faculty->name }}</a>
|
57
|
61
|
<ul class="dropdown-menu">
|
58
|
62
|
@foreach ($faculty->departments as $dept)
|
59
|
63
|
<li class="mdc-typography--body2">
|
60
|
64
|
<a class="dropdown-item" href="{{ url()->current() }}?f=d&dept={{ $dept->id }}">
|
61
|
|
- {{ $dept->title ?: $dept->name }}
|
|
65
|
+ {{ $dept->name ?: $dept->code }}
|
62
|
66
|
</a>
|
63
|
67
|
</li>
|
64
|
68
|
@endforeach
|