No Description

new-course-show.blade.php 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. @else
  10. @include('local.professors._navigation')
  11. @endif
  12. @stop
  13. @section('main')
  14. <div class="row">
  15. <div class="col-md-12">
  16. <p>{{$course->name}}</p>
  17. </div>
  18. </div>
  19. <div class="row">
  20. <div class="col-md-12">
  21. <h3>Activities</h3>
  22. @if(!$activities->isEmpty())
  23. @if ($is_active_semester)
  24. <button data-toggle="modal" data-target="#newActivityModal" class="btn btn-sm btn-default pull-right"> New Activity</button>
  25. @endif
  26. <table class="table table-striped table-condensed">
  27. <thead>
  28. <tr>
  29. <th>Name</th>
  30. <th>Date</th>
  31. <th>Updated</th>
  32. <th>Assessed</th>
  33. <th>Published</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. @foreach ($activities as $activity)
  38. <tr>
  39. <td>{{ link_to_action('ActivitiesController@show', $activity->name, $parameters = array('id'=>$activity->id)) }}</td>
  40. <td>{{ date('M d, Y', strtotime($activity->date)) }}</td>
  41. <td>{{ date('M d, Y', strtotime($activity->updated_at)) }}</td>
  42. <td>
  43. @if($activity->outcomes_attempted!=NULL)
  44. <span class="glyphicon glyphicon-ok"></span>
  45. @endif
  46. </td>
  47. <td>
  48. @if($activity->outcomes_attempted!=NULL && !$activity->draft)
  49. <span class="glyphicon glyphicon-ok"></span>
  50. @endif
  51. </td>
  52. </tr>
  53. @endforeach
  54. @if (!$is_active_semester)
  55. <tr>
  56. <td colspan="3"><div class="alert alert-info">The semester for this course is inactive. You cannot create any more activities.</div></td>
  57. </tr>
  58. @endif
  59. </tbody>
  60. </table>
  61. <p>Unplublished activity results are <strong>not considered</strong> in the graph above.</p>
  62. @else
  63. <div class="alert alert-info">
  64. @if($is_active_semester)
  65. <p>
  66. No activities.
  67. <a data-toggle="modal" data-target="#newActivityModal">
  68. Create one.
  69. </a>
  70. </p>
  71. @else
  72. <p>The semester for this course is inactive. You cannot create any activities.</p>
  73. @endif
  74. </div>
  75. @endif
  76. </div>
  77. </div>
  78. @stop
  79. @section('included-js')
  80. <!-- New Activity Modal -->
  81. <div class="modal fade" id="newActivityModal" tabindex="-1" role="dialog" aria-labelledby="newActivityModalLabel" aria-hidden="true">
  82. <div class="modal-dialog modal-sm">
  83. <div class="modal-content">
  84. <div class="modal-header">
  85. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  86. <h4 class="modal-title" id="newActivityModalLabel">New Activity</h4>
  87. </div>
  88. <div class="modal-body">
  89. {{ Form::open(array('action' => array('ActivitiesController@create', $course->id))) }}
  90. <div class="form-group">
  91. {{ Form::label('name', 'Name') }}
  92. {{ Form::text('name', Input::old('name'), array('class' => 'form-control')) }}
  93. </div>
  94. <div class="form-group">
  95. {{ Form::label('description', 'Description') }}
  96. {{ Form::textarea('description', Input::old('description'), array('class' => 'form-control', 'rows'=> 5, 'placeholder'=>'Minimum 10 characters')) }}
  97. </div>
  98. <div class="btn-group" role="group">
  99. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  100. <button type="submit" class="btn btn-default btn-primary">Submit</button>
  101. </div>
  102. {{ Form::close() }}
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <!-- HighCharts -->
  108. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  109. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  110. @stop
  111. @section('javascript')
  112. @stop