Nenhuma descrição

show.blade.php 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. @extends('layouts.app')
  2. @section('title', $professor->full_name)
  3. @section('content')
  4. <div class="mdc-layout-grid__inner">
  5. <h1 class="mdc-layout-grid__cell mdc-typography--heading1">{{ $professor->full_name }}</h1>
  6. </div>
  7. <br>
  8. <div class="mdc-layout-grid__inner">
  9. <h5 class="mdc-layout-grid__cell mdc-typography--heading5">
  10. Email: {{ $professor->email ?? 'n/a' }}
  11. </h5>
  12. </div>
  13. <hr>
  14. <div class="mdc-layout-grid__inner">
  15. <h2 class="mdc-layout-grid__cell mdc-typography--heading2">Semestres</h2>
  16. </div>
  17. <div class="mdc-layout-grid__inner">
  18. <div class="mdc-layout-grid__cell--span-12">
  19. @foreach ($semesters as $semester)
  20. @php
  21. $semester_sections = $sections->get($semester->code);
  22. $semester_loads = $loads->get($semester->code);
  23. @endphp
  24. @if ($semester_sections || ($semester_loads && (is_numeric($semester_loads->pivot->investigative_load) || is_numeric($semester_loads->pivot->investigative_load))))
  25. <div class="mdc-layout-grid__inner">
  26. <div class="mdc-layout-grid__cell">
  27. <h4 class="mdc-typography--heading4">{{ $semester->alpha }}</h4>
  28. </div>
  29. </div>
  30. <div class="mdc-layout-grid__inner">
  31. <div class="mdc-data-table mdc-layout-grid__cell--span-6 prof-sections-table">
  32. <div class="mdc-data-table">
  33. <table class="mdc-data-table__table">
  34. <thead class="thead-light">
  35. <tr class="mdc-data-table__header-row">
  36. <th scope="col" class="mdc-data-table__header-cell">Curso</th>
  37. <th scope="col" class="mdc-data-table__header-cell">Sección</th>
  38. <th scope="col" class="mdc-data-table__header-cell">Horario</th>
  39. <th scope="col" class="mdc-data-table__header-cell">Evaluación</th>
  40. <th scope="col" class="mdc-data-table__header-cell"># de Estudiantes</th>
  41. <th scope="col" class="mdc-data-table__header-cell">Créditos</th>
  42. </tr>
  43. </thead>
  44. <tbody class="mdc-data-table__content">
  45. @php $academic_load = $professor->getAcademicLoad($semester); @endphp
  46. @if ($semester_sections)
  47. @foreach ($semester_sections as $section)
  48. <tr class="mdc-data-table__row">
  49. <td class="mdc-data-table__cell">
  50. <a href="/course/{{ $section->course->id }}">{{ $section->course->code }}</a>
  51. </td>
  52. <td class="mdc-data-table__cell">{{ $section->code }}</td>
  53. <td class="mdc-data-table__cell">{{ $section->schedule ?: 'n/a'}}</td>
  54. <td class="mdc-data-table__cell">{{ $section->eval ?? 'n/a' }}</td>
  55. <td class="mdc-data-table__cell">{{ $section->student_count ?? 'n/a' }}</td>
  56. <td class="mdc-data-table__cell">{{ $section->credits ?? 'n/a' }}</td>
  57. </tr>
  58. @endforeach
  59. <tr class="mdc-data-table__row">
  60. <th scope="row" class="mdc-data-table__cell" colspan="5">Carga Academica</th>
  61. <td class="mdc-data-table__cell">{{ $academic_load }}</td>
  62. </tr>
  63. @endif
  64. @if (Auth::check() || $semester_loads && is_numeric($semester_loads->pivot->admin_load))
  65. <tr class="mdc-data-table__row">
  66. <th class="mdc-data-table__cell" scope="row" @auth colspan="4" @else colspan="5" @endauth>Carga Administrativa</th>
  67. @auth
  68. <td class="mdc-data-table__cell">
  69. <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-professor-loads" data-semester-code="{{ $semester->code }}">edit</button>
  70. </td>
  71. @endauth
  72. <td class="mdc-data-table__cell">{{ $semester_loads ? $semester_loads->pivot->admin_load : 'n/a' }}</td>
  73. </tr>
  74. @endif
  75. @if (Auth::check() || $semester_loads && is_numeric($semester_loads->pivot->investigative_load))
  76. <tr class="mdc-data-table__row">
  77. <th class="mdc-data-table__cell" scope="row" @auth colspan="4" @else colspan="5" @endauth>Carga Investigativa</th>
  78. @auth
  79. <td class="mdc-data-table__cell">
  80. <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-professor-loads" data-semester-code="{{ $semester->code }}">edit</button>
  81. </td>
  82. @endauth
  83. <td class="mdc-data-table__cell">{{ $semester_loads ? $semester_loads->pivot->investigative_load : 'n/a' }}</td>
  84. </tr>
  85. @endif
  86. @if ($semester_sections || $semester_loads)
  87. <tr class="mdc-data-table__row">
  88. <th class="mdc-data-table__cell" scope="row" colspan="5">Carga Total</th>
  89. <td class="mdc-data-table__cell">{{ $academic_load + ($semester_loads->pivot->admin_load ?? 0) + ($semester_loads->pivot->investigative_load ?? 0) }}</td>
  90. </tr>
  91. @endif
  92. </tbody>
  93. </table>
  94. </div>
  95. </div>
  96. </div>
  97. @if (!$loop->last)
  98. <br>
  99. @endif
  100. @endif
  101. @endforeach
  102. </div>
  103. </div>
  104. @endsection
  105. @section('modals')
  106. @include('modal.professor.edit')
  107. @include('modal.professor.loads')
  108. {{-- @include('modal.semesterload') --}}
  109. @endsection
  110. @section('scripts')
  111. <script type="text/javascript" src="/js/prof.js"></script>
  112. @endsection