暫無描述

reassign.blade.php 7.7KB

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