No Description

show-typ-program.blade.php 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 ='typ' class="form-control selectpicker" onchange="fetchSubmit('#typ')">
  18. @foreach($typ as $t)
  19. <option value = {{$t->id}}> Cycle {{$t->year_start}}-{{$t->year_end}} </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. <a href="{{ URL::action('ThreeYearPlanController@showPDFs', [$program->id]) }}">
  35. {{ $program->name }}
  36. </td>
  37. <td id = "is_submit-{{$program->id}}" class='submitted'>
  38. </td>
  39. </tr>
  40. @endforeach
  41. </tbody>
  42. </table>
  43. </div>
  44. <script>
  45. function fetchSubmit(typ){
  46. $.post(
  47. "{{URL::action('ThreeYearPlanController@fetchSubmitted')}}",
  48. {
  49. typ:$(typ).val()
  50. },
  51. function(programs){
  52. $(".submitted").html(' ');
  53. $.each(programs, function(ind, program){
  54. if(program.is_submitted){
  55. $('#is_submit-'+program.program_id).html(
  56. '<span class="glyphicon glyphicon-ok-sign"></span>'
  57. )
  58. }
  59. })
  60. }
  61. )
  62. }
  63. fetchSubmit("#typ");
  64. </script>
  65. @stop