暫無描述

appraisal-program.blade.php 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @if (Auth::user()->role == 1)
  4. @include('local.managers.admins._new_navigation')
  5. @elseif(Auth::user()->role == 2)
  6. @include('local.managers.sCoords._new_navigation')
  7. @elseif(Auth::user()->role == 3)
  8. @include('local.managers.pCoords._new_navigation')
  9. @endif
  10. @stop
  11. @section('main')
  12. <div class="row">
  13. <div class="col-md-12">
  14. <p>Click the links below to see annual appraisal plans for a specific program with assessed courses:</p>
  15. </div>
  16. <div class='col-md-12'>
  17. <select id ='annual_cycle' class="form-control selectpicker" onchange="fetchSubmit('#annual_cycle')">
  18. @foreach($annual_cycle as $a)
  19. <option value = {{$a->id}}> Cycle {{$a->academic_year}} </option>
  20. @endforeach
  21. </select>
  22. </div>
  23. <table class='table table-striped table-condensed '>
  24. <thead>
  25. <tr>
  26. <th>Program</th>
  27. <th>Submitted this cycle</th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. @foreach ($programs as $program)
  32. <tr>
  33. <td>
  34. @if($report ==0)
  35. <a href="{{ URL::action('AnnualPlansController@annualPlansShow', ['plan',$program->id]) }}">
  36. {{ $program->name }}
  37. @else
  38. <a href="{{ URL::action('AnnualPlansController@annualPlansShow', ['report',$program->id]) }}">
  39. {{ $program->name }}
  40. @endif
  41. </td>
  42. <td id = "is_submit-{{$program->id}}" class='submitted'>
  43. </td>
  44. </tr>
  45. @endforeach
  46. </tbody>
  47. </table>
  48. </div>
  49. <script>
  50. function fetchSubmit(annual_cycle){
  51. $.post(
  52. "{{URL::action('AnnualPlansController@fetchSubmitted')}}",
  53. {
  54. annual_cycle:$(annual_cycle).val(),
  55. report:{{$report}}
  56. },
  57. function(programs){
  58. $(".submitted").html(' ');
  59. $.each(programs, function(ind, program){
  60. if(program.is_submitted){
  61. $('#is_submit-'+program.program_id).html(
  62. '<span class="glyphicon glyphicon-ok-sign"></span>'
  63. )
  64. }
  65. })
  66. }
  67. )
  68. }
  69. fetchSubmit("#typ");
  70. </script>
  71. @stop