Няма описание

annual_report.blade.php 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @if(Auth::user()->role==1)
  4. @include('local.managers.admins._navigation')
  5. @elseif(Auth::user()->role==2)
  6. @include('local.managers.sCoords._navigation')
  7. @elseif(Auth::user()->role==3)
  8. @include('local.managers.pCoords._navigation')
  9. @endif
  10. @stop
  11. @section('main')
  12. <div class="row">
  13. <div class="col-md-3">
  14. <div class="category" >
  15. <label for="annual_plans">Annual Plan</label>
  16. <div class="select">
  17. <select class="selectpicker" name="annual_plan" id="annual_plans" onchange ="fetchAnnualReport(this)">
  18. @foreach ($annual_plans as $an_pl)
  19. <option value='{{json_encode($an_pl)}}'>Annual Plan {{$an_pl->academic_year}}</option>
  20. @endforeach
  21. </select>
  22. </div>
  23. </div>
  24. </div>
  25. <div class='col-md-9' id='report'>
  26. <ul id = 'levelTabs' class = "nav nav-tabs" role = "tablist">
  27. </ul>
  28. <div id ='allLists' class="tab-content">
  29. </div>
  30. </div>
  31. </div>
  32. <script>
  33. function fetchAnnualReport(select){
  34. object_json = $(select).val();
  35. object_json = JSON.parse(object_json);
  36. semester_start = object_json.semester_start;
  37. semester_end = object_json.semester_end;
  38. program_id = object_json.program_id;
  39. annual_plan_id = object_json.annual_id;
  40. $.post(
  41. "{{ URL::action('AnnualPlansController@fetchAnnualReport') }}",
  42. {
  43. semester_start: semester_start,
  44. semester_end: semester_end,
  45. program_id: program_id,
  46. annual_plan_id: annual_plan_id,
  47. academic_year:object_json.academic_year
  48. },
  49. function(data)
  50. {
  51. $('#levelTabs').html(' ');
  52. $.each(data, function(course_code, course_data){
  53. li = $("<li/>", {
  54. 'role':'presentation'
  55. });
  56. li.append($('<a/>',{
  57. 'onclick': "$(this).tab('show')",
  58. 'data-toggle':'tab',
  59. 'href':'#'+course_code,
  60. 'role':'tab'
  61. }).html(course_code.replace('_',' ')));
  62. div = $("<div/>",{
  63. 'role':'tabpanel',
  64. 'class':'tab-pane',
  65. 'id':course_code,
  66. });
  67. title = $("<h3/>",{
  68. 'style':'text-align: center'
  69. }).html('Course: '+course_code.replace('_',' '));
  70. criteriaAssessed = $("<h5/>",{
  71. 'style':'display: inline'
  72. })
  73. $('#levelTabs').append(li);
  74. $("#allLists").append(div);
  75. $.each(course_data, function(index, reports){
  76. $.each(reports.criteriaReport, function(index2, criterion){
  77. })
  78. })
  79. })
  80. }
  81. );
  82. }
  83. fetchAnnualReport(document.getElementById('annual_plans'));
  84. </script>
  85. @section('included-js')
  86. @include('global._datatables_js')
  87. @stop
  88. @stop
  89. @section('javascript')
  90. @stop