Aucune description

reassign.blade.php 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @include('local.managers.admins._navigation')
  4. @stop
  5. @section('main')
  6. <div class="row">
  7. <div class="col-md-6">
  8. <div class="panel panel-default panel-button">
  9. <div class="panel-heading">
  10. Reassign Course Programs
  11. </div>
  12. <div class="panel-body">
  13. <p>Use this to reassign courses matching your specified criteria to the program of your choice. Use <strong>*</strong> (asterisk) to do a wildcard search at the beginning or end. At least <strong>one</strong> field is required.</p>
  14. <p>As an example, the following will assign all courses with a code <strong>starting</strong> with 'MAT' and a number <strong>starting</strong> with '3' to the Mathematics Program.</p>
  15. <ul>
  16. <li>Code: MAT*</li>
  17. <li>Number: 3*</li>
  18. <li>Program: Mathematics</li>
  19. </ul>
  20. {{ Form::open(array('action' => 'CoursesController@update')) }}
  21. <div class="form-group">
  22. {{ Form::label('code', 'Code') }}
  23. {{ Form::text('code', Input::old('code'), array('class' => 'form-control', 'placeholder'=>'TEST', 'maxLength'=>5)) }}
  24. </div>
  25. <div class="form-group">
  26. {{ Form::label('number', 'Number') }}
  27. {{ Form::text('number', Input::old('number'), array('class' => 'form-control', 'placeholder'=>'3001', 'maxLength'=>5)) }}
  28. </div>
  29. <div class="form-group">
  30. {{ Form::label('section', 'Section') }}
  31. {{ Form::text('section', Input::old('section'), array('class' => 'form-control', 'placeholder'=>'001', 'maxLength'=>4)) }}
  32. </div>
  33. <!-- Program -->
  34. <div class="form-group">
  35. {{ Form::label('program', 'Program') }}
  36. <select id="program" name="program" class="form-control">
  37. @foreach ($programs as $program)
  38. @if(Input::old('program')!=$program->id)
  39. <option value="{{ $program->id }}">{{ $program->name }} ({{ $program->school->name }})</option>
  40. @else
  41. <option selected value="{{ $program->id }}">{{ $program->name }} ({{ $program->school->name }})</option>
  42. @endif
  43. @endforeach
  44. </select>
  45. </div>
  46. <br>
  47. {{ Form::submit('Submit', array('class' => 'btn btn-primary btn-block', 'name'=>'reassign_program')) }}
  48. {{ Form::close() }}
  49. <br>
  50. @if(Session::has('courses'))
  51. <p><strong>The following courses were updated:</strong></p>
  52. <ul>
  53. @foreach(json_decode(Session::get('courses')) as $course)
  54. <li>
  55. @if(Session::has('show_sections'))
  56. {{ $course->code }}{{ $course->number }}-{{ $course->section }}
  57. @else
  58. {{ $course->code }}{{ $course->number }}
  59. @endif
  60. </li>
  61. @endforeach
  62. </ul>
  63. @endif
  64. </div>
  65. </div>
  66. </div>
  67. <div class="col-md-6">
  68. <div class="panel panel-default panel-button">
  69. <div class="panel-heading">
  70. Reassign Sections' Professors
  71. </div>
  72. <div class="panel-body">
  73. <p>Use this to reassign a section to a specific professor. Write down the code, number and section of the course. Then, choose a professor from the list. <strong>All fields are required.</strong></p>
  74. {{ Form::open(array('action' => 'CoursesController@update')) }}
  75. <div class="form-group">
  76. {{ Form::label('code_prof', 'Code') }}
  77. {{ Form::text('code_prof', Input::old('code_prof'), array('class' => 'form-control', 'placeholder'=>'TEST', 'maxLength'=>4)) }}
  78. </div>
  79. <div class="form-group">
  80. {{ Form::label('number_prof', 'Number') }}
  81. {{ Form::text('number_prof', Input::old('number_prof'), array('class' => 'form-control', 'placeholder'=>'3001', 'maxLength'=>4)) }}
  82. </div>
  83. <div class="form-group">
  84. {{ Form::label('section_prof', 'Section') }}
  85. {{ Form::text('section_prof', Input::old('section_prof'), array('class' => 'form-control', 'placeholder'=>'001', 'maxLength'=>3)) }}
  86. </div>
  87. <!-- Program -->
  88. <div class="form-group">
  89. {{ Form::label('user_prof', 'User') }}
  90. <select id="user_prof" name="user_prof" class="form-control">
  91. @foreach ($users as $user)
  92. @if(Input::old('user_prof')!=$user->id)
  93. <option value="{{ $user->id }}">{{ $user->surnames }}, {{ $user->first_name }}</option>
  94. @else
  95. <option selected value="{{ $user->id }}">{{ $user->surnames }}, {{ $user->first_name }}</option>
  96. @endif
  97. @endforeach
  98. </select>
  99. </div>
  100. <!-- Semester -->
  101. <div class="form-group">
  102. {{ Form::label('semester_prof', 'Semester') }}
  103. <select id="semester_prof" name="semester_prof" class="form-control">
  104. @foreach ($semesters as $semester)
  105. @if(Input::old('semester_prof')!=$semester->id)
  106. <option value="{{ $semester->id }}">{{ $semester->name }}</option>
  107. @else
  108. <option selected value="{{ $semester->id }}">{{ $semester->name }}</option>
  109. @endif
  110. @endforeach
  111. </select>
  112. </div>
  113. <br>
  114. {{ Form::submit('Submit', array('class' => 'btn btn-primary btn-block', 'name'=>'reassign_professor')) }}
  115. {{ Form::close() }}
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. @stop
  121. @section('javascript')
  122. // --------------------------------------------------------------------------
  123. // Page load
  124. // --------------------------------------------------------------------------
  125. // --------------------------------------------------------------------------
  126. // Functions
  127. // --------------------------------------------------------------------------
  128. // --------------------------------------------------------------------------
  129. // Events
  130. // --------------------------------------------------------------------------
  131. @stop