gaku_frontend 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (508) hide show
  1. checksums.yaml +7 -0
  2. data/app/assets/fonts/gaku/frontend/glyphicons-halflings-regular.eot +0 -0
  3. data/app/assets/fonts/gaku/frontend/glyphicons-halflings-regular.svg +228 -0
  4. data/app/assets/fonts/gaku/frontend/glyphicons-halflings-regular.ttf +0 -0
  5. data/app/assets/fonts/gaku/frontend/glyphicons-halflings-regular.woff +0 -0
  6. data/app/assets/javascripts/gaku/frontend.js.coffee +42 -0
  7. data/app/assets/javascripts/gaku/frontend/base.js.coffee +147 -0
  8. data/app/assets/javascripts/gaku/frontend/class_groups.js.coffee +19 -0
  9. data/app/assets/javascripts/gaku/frontend/courses.js.coffee +23 -0
  10. data/app/assets/javascripts/gaku/frontend/exams.js.coffee +23 -0
  11. data/app/assets/javascripts/gaku/frontend/extracurricular_activities.js.coffee +12 -0
  12. data/app/assets/javascripts/gaku/frontend/slide.js.erb +14 -0
  13. data/app/assets/javascripts/gaku/frontend/students.js.coffee +38 -0
  14. data/app/assets/javascripts/gaku/frontend/syllabuses.js.coffee +23 -0
  15. data/app/assets/javascripts/gaku/frontend/teachers.js.coffee +12 -0
  16. data/app/assets/stylesheets/gaku/bootstrap_and_theme.css.scss +573 -0
  17. data/app/assets/stylesheets/gaku/frontend.css +14 -0
  18. data/app/assets/stylesheets/gaku/frontend/class_groups.css.scss +19 -0
  19. data/app/assets/stylesheets/gaku/frontend/course_groups.css.scss +14 -0
  20. data/app/assets/stylesheets/gaku/frontend/courses.css.scss +19 -0
  21. data/app/assets/stylesheets/gaku/frontend/exams.css.scss +72 -0
  22. data/app/assets/stylesheets/gaku/frontend/gaku.css.scss +216 -0
  23. data/app/assets/stylesheets/gaku/frontend/students.css.scss +22 -0
  24. data/app/assets/templates/roster.xls +0 -0
  25. data/app/controllers/concerns/enrollments_controller.rb +83 -0
  26. data/app/controllers/concerns/polymorphic_resource_concern.rb +48 -0
  27. data/app/controllers/concerns/student_chooser_controller.rb +41 -0
  28. data/app/controllers/gaku/addresses_controller.rb +94 -0
  29. data/app/controllers/gaku/attachments_controller.rb +90 -0
  30. data/app/controllers/gaku/attendances_controller.rb +28 -0
  31. data/app/controllers/gaku/class_group_enrollments_controller.rb +15 -0
  32. data/app/controllers/gaku/class_groups/courses_controller.rb +50 -0
  33. data/app/controllers/gaku/class_groups/semester_class_groups_controller.rb +63 -0
  34. data/app/controllers/gaku/class_groups/students_controller.rb +37 -0
  35. data/app/controllers/gaku/class_groups_controller.rb +120 -0
  36. data/app/controllers/gaku/contacts_controller.rb +79 -0
  37. data/app/controllers/gaku/course_enrollments_controller.rb +10 -0
  38. data/app/controllers/gaku/course_groups/course_group_enrollments_controller.rb +54 -0
  39. data/app/controllers/gaku/course_groups_controller.rb +91 -0
  40. data/app/controllers/gaku/courses/enrollments_controller.rb +55 -0
  41. data/app/controllers/gaku/courses/exams_controller.rb +28 -0
  42. data/app/controllers/gaku/courses/semester_courses_controller.rb +64 -0
  43. data/app/controllers/gaku/courses_controller.rb +95 -0
  44. data/app/controllers/gaku/devise/passwords_controller.rb +4 -0
  45. data/app/controllers/gaku/devise/registrations_controller.rb +60 -0
  46. data/app/controllers/gaku/devise/sessions_controller.rb +13 -0
  47. data/app/controllers/gaku/exam_portion_scores_controller.rb +26 -0
  48. data/app/controllers/gaku/exams/exam_portions/attachments_controller.rb +46 -0
  49. data/app/controllers/gaku/exams/exam_portions_controller.rb +76 -0
  50. data/app/controllers/gaku/exams_controller.rb +153 -0
  51. data/app/controllers/gaku/extracurricular_activities/students_controller.rb +21 -0
  52. data/app/controllers/gaku/extracurricular_activities_controller.rb +68 -0
  53. data/app/controllers/gaku/extracurricular_activity_enrollments_controller.rb +16 -0
  54. data/app/controllers/gaku/gaku_controller.rb +23 -0
  55. data/app/controllers/gaku/home_controller.rb +11 -0
  56. data/app/controllers/gaku/notes_controller.rb +81 -0
  57. data/app/controllers/gaku/realtime_controller.rb +29 -0
  58. data/app/controllers/gaku/search_controller.rb +16 -0
  59. data/app/controllers/gaku/states_controller.rb +17 -0
  60. data/app/controllers/gaku/students/badges_controller.rb +65 -0
  61. data/app/controllers/gaku/students/class_group_enrollments_controller.rb +45 -0
  62. data/app/controllers/gaku/students/course_enrollments_controller.rb +51 -0
  63. data/app/controllers/gaku/students/external_school_records_controller.rb +70 -0
  64. data/app/controllers/gaku/students/guardians_controller.rb +70 -0
  65. data/app/controllers/gaku/students/simple_grades_controller.rb +69 -0
  66. data/app/controllers/gaku/students/student_specialties_controller.rb +68 -0
  67. data/app/controllers/gaku/students_controller.rb +198 -0
  68. data/app/controllers/gaku/syllabuses/assignments_controller.rb +20 -0
  69. data/app/controllers/gaku/syllabuses/exam_syllabuses_controller.rb +38 -0
  70. data/app/controllers/gaku/syllabuses/exams_controller.rb +68 -0
  71. data/app/controllers/gaku/syllabuses_controller.rb +77 -0
  72. data/app/controllers/gaku/teachers_controller.rb +76 -0
  73. data/app/helpers/gaku/autocomplete_helper.rb +31 -0
  74. data/app/helpers/gaku/exam_helper.rb +13 -0
  75. data/app/helpers/gaku/frontend_helper.rb +42 -0
  76. data/app/helpers/gaku/person_helper.rb +79 -0
  77. data/app/helpers/gaku/shared_helper.rb +29 -0
  78. data/app/helpers/gaku/student_chooser_helper.rb +11 -0
  79. data/app/helpers/gaku/students_helper.rb +31 -0
  80. data/app/overrides/frontend_menu.rb +6 -0
  81. data/app/views/gaku/addresses/_address.html.slim +5 -0
  82. data/app/views/gaku/addresses/_addresses.html.slim +25 -0
  83. data/app/views/gaku/addresses/_delete_link.html.slim +1 -0
  84. data/app/views/gaku/addresses/_fields.html.slim +14 -0
  85. data/app/views/gaku/addresses/_form.html.slim +3 -0
  86. data/app/views/gaku/addresses/_form_fields.html.slim +26 -0
  87. data/app/views/gaku/addresses/_modal.html.slim +4 -0
  88. data/app/views/gaku/addresses/_primary_field.html.slim +12 -0
  89. data/app/views/gaku/addresses/create.js.erb +12 -0
  90. data/app/views/gaku/addresses/destroy.js.erb +8 -0
  91. data/app/views/gaku/addresses/edit.js.erb +4 -0
  92. data/app/views/gaku/addresses/make_primary.js.erb +7 -0
  93. data/app/views/gaku/addresses/new.js.erb +4 -0
  94. data/app/views/gaku/addresses/recovery.js.erb +1 -0
  95. data/app/views/gaku/addresses/soft_delete.js.erb +8 -0
  96. data/app/views/gaku/addresses/update.js.erb +5 -0
  97. data/app/views/gaku/attachments/destroy.js.erb +1 -0
  98. data/app/views/gaku/attachments/edit.js.erb +3 -0
  99. data/app/views/gaku/attachments/new.js.erb +1 -0
  100. data/app/views/gaku/attachments/recovery.js.erb +1 -0
  101. data/app/views/gaku/attachments/soft_delete.js.erb +3 -0
  102. data/app/views/gaku/class_groups/_class_group.html.slim +4 -0
  103. data/app/views/gaku/class_groups/_class_groups.html.slim +11 -0
  104. data/app/views/gaku/class_groups/_class_groups_with_semester.html.slim +12 -0
  105. data/app/views/gaku/class_groups/_fields.html.slim +3 -0
  106. data/app/views/gaku/class_groups/_form.html.slim +3 -0
  107. data/app/views/gaku/class_groups/_form_fields.html.slim +7 -0
  108. data/app/views/gaku/class_groups/_student_chooser_form.html.slim +4 -0
  109. data/app/views/gaku/class_groups/_tabs.html.slim +41 -0
  110. data/app/views/gaku/class_groups/advanced_search.js.erb +30 -0
  111. data/app/views/gaku/class_groups/courses/_course.html.slim +4 -0
  112. data/app/views/gaku/class_groups/courses/_courses.html.slim +14 -0
  113. data/app/views/gaku/class_groups/courses/_form.html.slim +5 -0
  114. data/app/views/gaku/class_groups/courses/create.js.erb +7 -0
  115. data/app/views/gaku/class_groups/courses/destroy.js.erb +2 -0
  116. data/app/views/gaku/class_groups/courses/new.js.erb +3 -0
  117. data/app/views/gaku/class_groups/create.js.erb +6 -0
  118. data/app/views/gaku/class_groups/destroy.js.erb +1 -0
  119. data/app/views/gaku/class_groups/edit.html.slim +16 -0
  120. data/app/views/gaku/class_groups/index.html.slim +25 -0
  121. data/app/views/gaku/class_groups/new.js.erb +3 -0
  122. data/app/views/gaku/class_groups/search/_form.html.slim +18 -0
  123. data/app/views/gaku/class_groups/search/_semester_form.html.slim +23 -0
  124. data/app/views/gaku/class_groups/semester_advanced_search.js.erb +30 -0
  125. data/app/views/gaku/class_groups/semester_class_groups/_fields.html.slim +4 -0
  126. data/app/views/gaku/class_groups/semester_class_groups/_form.html.slim +4 -0
  127. data/app/views/gaku/class_groups/semester_class_groups/_form_fields.html.slim +3 -0
  128. data/app/views/gaku/class_groups/semester_class_groups/_modal.html.slim +5 -0
  129. data/app/views/gaku/class_groups/semester_class_groups/_semester.html.slim +3 -0
  130. data/app/views/gaku/class_groups/semester_class_groups/_semester_modal.html.slim +4 -0
  131. data/app/views/gaku/class_groups/semester_class_groups/_semesters.html.slim +13 -0
  132. data/app/views/gaku/class_groups/semester_class_groups/create.js.erb +8 -0
  133. data/app/views/gaku/class_groups/semester_class_groups/destroy.js.erb +2 -0
  134. data/app/views/gaku/class_groups/semester_class_groups/edit.js.erb +3 -0
  135. data/app/views/gaku/class_groups/semester_class_groups/new.js.erb +3 -0
  136. data/app/views/gaku/class_groups/semester_class_groups/update.js.erb +3 -0
  137. data/app/views/gaku/class_groups/student_chooser.js.erb +9 -0
  138. data/app/views/gaku/class_groups/students/_student.html.slim +5 -0
  139. data/app/views/gaku/class_groups/students/_students.html.slim +14 -0
  140. data/app/views/gaku/class_groups/students/destroy.js.erb +2 -0
  141. data/app/views/gaku/class_groups/students/enroll_students.js.erb +16 -0
  142. data/app/views/gaku/class_groups/students/new.js.erb +3 -0
  143. data/app/views/gaku/class_groups/students/without_semester.js.erb +2 -0
  144. data/app/views/gaku/class_groups/with_semester.html.slim +26 -0
  145. data/app/views/gaku/class_groups/with_semester.js.erb +2 -0
  146. data/app/views/gaku/class_groups/without_semester.html.slim +26 -0
  147. data/app/views/gaku/class_groups/without_semester.js.erb +2 -0
  148. data/app/views/gaku/contacts/_contact.html.slim +5 -0
  149. data/app/views/gaku/contacts/_contacts.html.slim +22 -0
  150. data/app/views/gaku/contacts/_delete_link.html.slim +1 -0
  151. data/app/views/gaku/contacts/_fields.html.slim +14 -0
  152. data/app/views/gaku/contacts/_form.html.slim +4 -0
  153. data/app/views/gaku/contacts/_form_fields.html.slim +14 -0
  154. data/app/views/gaku/contacts/_modal.html.slim +4 -0
  155. data/app/views/gaku/contacts/_primary_field.html.slim +13 -0
  156. data/app/views/gaku/contacts/create.js.erb +21 -0
  157. data/app/views/gaku/contacts/destroy.js.erb +9 -0
  158. data/app/views/gaku/contacts/edit.js.erb +4 -0
  159. data/app/views/gaku/contacts/make_primary.js.erb +6 -0
  160. data/app/views/gaku/contacts/new.js.erb +3 -0
  161. data/app/views/gaku/contacts/recovery.js.erb +1 -0
  162. data/app/views/gaku/contacts/soft_delete.js.erb +8 -0
  163. data/app/views/gaku/contacts/update.js.erb +14 -0
  164. data/app/views/gaku/course_groups/_course_group.html.slim +4 -0
  165. data/app/views/gaku/course_groups/_course_groups.html.slim +7 -0
  166. data/app/views/gaku/course_groups/_fields.html.slim +1 -0
  167. data/app/views/gaku/course_groups/_form.html.slim +3 -0
  168. data/app/views/gaku/course_groups/_form_fields.html.slim +1 -0
  169. data/app/views/gaku/course_groups/course_group_enrollments/_course.html.slim +4 -0
  170. data/app/views/gaku/course_groups/course_group_enrollments/_courses.html.slim +21 -0
  171. data/app/views/gaku/course_groups/course_group_enrollments/_form.html.slim +4 -0
  172. data/app/views/gaku/course_groups/course_group_enrollments/create.js.erb +7 -0
  173. data/app/views/gaku/course_groups/course_group_enrollments/destroy.js.erb +2 -0
  174. data/app/views/gaku/course_groups/course_group_enrollments/new.js.erb +3 -0
  175. data/app/views/gaku/course_groups/create.js.erb +6 -0
  176. data/app/views/gaku/course_groups/destroy.js.erb +1 -0
  177. data/app/views/gaku/course_groups/edit.html.slim +21 -0
  178. data/app/views/gaku/course_groups/index.html.slim +14 -0
  179. data/app/views/gaku/course_groups/new.js.erb +3 -0
  180. data/app/views/gaku/courses/_course.html.slim +7 -0
  181. data/app/views/gaku/courses/_courses.html.slim +24 -0
  182. data/app/views/gaku/courses/_form.html.slim +3 -0
  183. data/app/views/gaku/courses/_form_fields.html.slim +5 -0
  184. data/app/views/gaku/courses/_student_chooser_form.html.slim +4 -0
  185. data/app/views/gaku/courses/_tabs.html.slim +26 -0
  186. data/app/views/gaku/courses/create.js.erb +6 -0
  187. data/app/views/gaku/courses/destroy.js.erb +1 -0
  188. data/app/views/gaku/courses/edit.html.slim +16 -0
  189. data/app/views/gaku/courses/enrollments/_enrolled.html.slim +7 -0
  190. data/app/views/gaku/courses/enrollments/_enrollments.html.slim +27 -0
  191. data/app/views/gaku/courses/enrollments/_errors_modal.html.slim +11 -0
  192. data/app/views/gaku/courses/enrollments/class_groups/_form.html.slim +3 -0
  193. data/app/views/gaku/courses/enrollments/class_groups/enroll.js.erb +16 -0
  194. data/app/views/gaku/courses/enrollments/class_groups/new.js.erb +4 -0
  195. data/app/views/gaku/courses/enrollments/error.js.erb +2 -0
  196. data/app/views/gaku/courses/enrollments/students/enroll_students.js.erb +11 -0
  197. data/app/views/gaku/courses/exams/_exam.html.slim +5 -0
  198. data/app/views/gaku/courses/exams/_exam_portion_head.html.slim +5 -0
  199. data/app/views/gaku/courses/exams/_exams.html.slim +14 -0
  200. data/app/views/gaku/courses/exams/_grading_table_head.html.slim +9 -0
  201. data/app/views/gaku/courses/exams/_grading_table_student_field.html.slim +11 -0
  202. data/app/views/gaku/courses/exams/grading.html.slim +7 -0
  203. data/app/views/gaku/courses/index.html.slim +14 -0
  204. data/app/views/gaku/courses/new.js.erb +3 -0
  205. data/app/views/gaku/courses/semester_courses/_fields.html.slim +4 -0
  206. data/app/views/gaku/courses/semester_courses/_form.html.slim +4 -0
  207. data/app/views/gaku/courses/semester_courses/_form_fields.html.slim +3 -0
  208. data/app/views/gaku/courses/semester_courses/_modal.html.slim +4 -0
  209. data/app/views/gaku/courses/semester_courses/_semester_course.html.slim +3 -0
  210. data/app/views/gaku/courses/semester_courses/_semester_courses.html.slim +16 -0
  211. data/app/views/gaku/courses/semester_courses/create.js.erb +6 -0
  212. data/app/views/gaku/courses/semester_courses/destroy.js.erb +3 -0
  213. data/app/views/gaku/courses/semester_courses/edit.js.erb +3 -0
  214. data/app/views/gaku/courses/semester_courses/new.js.erb +3 -0
  215. data/app/views/gaku/courses/semester_courses/update.js.erb +3 -0
  216. data/app/views/gaku/courses/student_chooser.js.erb +7 -0
  217. data/app/views/gaku/devise/confirmations/new.html.slim +9 -0
  218. data/app/views/gaku/devise/mailer/confirmation_instructions.html.slim +4 -0
  219. data/app/views/gaku/devise/mailer/reset_password_instructions.html.slim +6 -0
  220. data/app/views/gaku/devise/mailer/unlock_instructions.html.slim +5 -0
  221. data/app/views/gaku/devise/passwords/edit.html.slim +14 -0
  222. data/app/views/gaku/devise/passwords/new.html.slim +8 -0
  223. data/app/views/gaku/devise/registrations/edit.html.slim +31 -0
  224. data/app/views/gaku/devise/registrations/new.html.slim +27 -0
  225. data/app/views/gaku/devise/registrations/set_up_admin_account.html.slim +26 -0
  226. data/app/views/gaku/devise/sessions/new.html.slim +24 -0
  227. data/app/views/gaku/devise/shared/_links.html.erb +25 -0
  228. data/app/views/gaku/devise/unlocks/new.html.slim +9 -0
  229. data/app/views/gaku/exam_divisions/_form.html.erb +29 -0
  230. data/app/views/gaku/exam_divisions/edit.html.erb +6 -0
  231. data/app/views/gaku/exam_divisions/index.html.erb +27 -0
  232. data/app/views/gaku/exam_divisions/new.html.erb +5 -0
  233. data/app/views/gaku/exam_divisions/show.html.erb +20 -0
  234. data/app/views/gaku/exams/_exam.html.slim +2 -0
  235. data/app/views/gaku/exams/_form.html.slim +16 -0
  236. data/app/views/gaku/exams/_form_fields.html.slim +17 -0
  237. data/app/views/gaku/exams/_table_fields.html.slim +8 -0
  238. data/app/views/gaku/exams/_tabs.html.slim +15 -0
  239. data/app/views/gaku/exams/_weight_check_widget.html.slim +20 -0
  240. data/app/views/gaku/exams/create.js.erb +6 -0
  241. data/app/views/gaku/exams/destroy.js.erb +1 -0
  242. data/app/views/gaku/exams/edit.html.slim +16 -0
  243. data/app/views/gaku/exams/exam_portions/_custom_exam_portion_error.html.slim +4 -0
  244. data/app/views/gaku/exams/exam_portions/_exam_portion.html.slim +2 -0
  245. data/app/views/gaku/exams/exam_portions/_exam_portion_weight_td.html.slim +3 -0
  246. data/app/views/gaku/exams/exam_portions/_exam_portions.html.slim +27 -0
  247. data/app/views/gaku/exams/exam_portions/_form.html.slim +3 -0
  248. data/app/views/gaku/exams/exam_portions/_table_fields.slim +8 -0
  249. data/app/views/gaku/exams/exam_portions/_tabs.html.slim +11 -0
  250. data/app/views/gaku/exams/exam_portions/attachments/_attachment.html.slim +2 -0
  251. data/app/views/gaku/exams/exam_portions/attachments/_attachments.html.slim +20 -0
  252. data/app/views/gaku/exams/exam_portions/attachments/_form.html.slim +3 -0
  253. data/app/views/gaku/exams/exam_portions/attachments/_form_fields.html.slim +3 -0
  254. data/app/views/gaku/exams/exam_portions/attachments/_modal.html.slim +4 -0
  255. data/app/views/gaku/exams/exam_portions/attachments/create.js.erb +0 -0
  256. data/app/views/gaku/exams/exam_portions/attachments/new.js.erb +3 -0
  257. data/app/views/gaku/exams/exam_portions/create.js.erb +49 -0
  258. data/app/views/gaku/exams/exam_portions/destroy.js.erb +8 -0
  259. data/app/views/gaku/exams/exam_portions/edit.html.slim +16 -0
  260. data/app/views/gaku/exams/exam_portions/new.js.erb +3 -0
  261. data/app/views/gaku/exams/exam_portions/show.html.slim +30 -0
  262. data/app/views/gaku/exams/export.xls.rb +67 -0
  263. data/app/views/gaku/exams/index.html.slim +24 -0
  264. data/app/views/gaku/exams/new.js.erb +3 -0
  265. data/app/views/gaku/exams/show.html.slim +28 -0
  266. data/app/views/gaku/extracurricular_activities/_extracurricular_activities.html.slim +7 -0
  267. data/app/views/gaku/extracurricular_activities/_extracurricular_activity.html.slim +4 -0
  268. data/app/views/gaku/extracurricular_activities/_fields.html.slim +1 -0
  269. data/app/views/gaku/extracurricular_activities/_form.html.slim +3 -0
  270. data/app/views/gaku/extracurricular_activities/_form_fields.html.slim +3 -0
  271. data/app/views/gaku/extracurricular_activities/_student_chooser_form.html.slim +4 -0
  272. data/app/views/gaku/extracurricular_activities/_tabs.html.slim +15 -0
  273. data/app/views/gaku/extracurricular_activities/create.js.erb +6 -0
  274. data/app/views/gaku/extracurricular_activities/destroy.js.erb +2 -0
  275. data/app/views/gaku/extracurricular_activities/edit.html.slim +16 -0
  276. data/app/views/gaku/extracurricular_activities/index.html.slim +15 -0
  277. data/app/views/gaku/extracurricular_activities/new.js.erb +3 -0
  278. data/app/views/gaku/extracurricular_activities/student_chooser.js.erb +9 -0
  279. data/app/views/gaku/extracurricular_activities/students/_student.html.slim +5 -0
  280. data/app/views/gaku/extracurricular_activities/students/_students.html.slim +16 -0
  281. data/app/views/gaku/extracurricular_activities/students/destroy.js.erb +3 -0
  282. data/app/views/gaku/extracurricular_activities/students/enroll_students.js.erb +11 -0
  283. data/app/views/gaku/home/_user_info.html.slim +7 -0
  284. data/app/views/gaku/home/_user_menu.html.slim +4 -0
  285. data/app/views/gaku/home/index.html.slim +10 -0
  286. data/app/views/gaku/layouts/edit.html.slim +10 -0
  287. data/app/views/gaku/layouts/gaku.html.slim +22 -0
  288. data/app/views/gaku/layouts/home.html.slim +1 -0
  289. data/app/views/gaku/layouts/index.html.slim +12 -0
  290. data/app/views/gaku/layouts/show.html.slim +10 -0
  291. data/app/views/gaku/notes/_buttons.html.slim +8 -0
  292. data/app/views/gaku/notes/_fields.html.slim +2 -0
  293. data/app/views/gaku/notes/_form.html.slim +6 -0
  294. data/app/views/gaku/notes/_form_fields.html.slim +6 -0
  295. data/app/views/gaku/notes/_modal.html.slim +4 -0
  296. data/app/views/gaku/notes/_note.html.slim +4 -0
  297. data/app/views/gaku/notes/_notes.html.slim +21 -0
  298. data/app/views/gaku/notes/_show_modal.html.slim +4 -0
  299. data/app/views/gaku/notes/create.js.erb +11 -0
  300. data/app/views/gaku/notes/destroy.js.erb +4 -0
  301. data/app/views/gaku/notes/edit.js.erb +3 -0
  302. data/app/views/gaku/notes/new.js.erb +3 -0
  303. data/app/views/gaku/notes/show.js.erb +2 -0
  304. data/app/views/gaku/notes/update.js.erb +4 -0
  305. data/app/views/gaku/shared/_delete_link.html.slim +1 -0
  306. data/app/views/gaku/shared/_delete_modal.html.slim +11 -0
  307. data/app/views/gaku/shared/_errors.html.slim +6 -0
  308. data/app/views/gaku/shared/_external_school_record.html.slim +36 -0
  309. data/app/views/gaku/shared/_flash.html.slim +4 -0
  310. data/app/views/gaku/shared/_language_bar.html.slim +8 -0
  311. data/app/views/gaku/shared/_login_widget.html.slim +15 -0
  312. data/app/views/gaku/shared/_manage_buttons.html.slim +4 -0
  313. data/app/views/gaku/shared/_menubar.html.slim +7 -0
  314. data/app/views/gaku/shared/_modal_config.html.slim +37 -0
  315. data/app/views/gaku/shared/_multi_errors.html.slim +6 -0
  316. data/app/views/gaku/shared/_picture.html.slim +8 -0
  317. data/app/views/gaku/shared/_upload_picture.html.slim +7 -0
  318. data/app/views/gaku/shared/error.js.erb +2 -0
  319. data/app/views/gaku/shared/fields/_address_and_contact_show_table.html.slim +6 -0
  320. data/app/views/gaku/shared/fields/_attachment_fields.html.slim +10 -0
  321. data/app/views/gaku/shared/fields/_course_fields.html.slim +4 -0
  322. data/app/views/gaku/shared/fields/_course_show_fields.html.slim +3 -0
  323. data/app/views/gaku/shared/fields/_exam_portion_fields.html.slim +7 -0
  324. data/app/views/gaku/shared/fields/_person_edit_table.html.slim +7 -0
  325. data/app/views/gaku/shared/fields/_person_show_table.html.slim +15 -0
  326. data/app/views/gaku/shared/fields/_semester_fields.html.slim +1 -0
  327. data/app/views/gaku/shared/form_fields/_exam_portion_form_fields.html.slim +14 -0
  328. data/app/views/gaku/shared/form_fields/_person_form_fields.html.slim +17 -0
  329. data/app/views/gaku/shared/menu/_frontend.html.erb +22 -0
  330. data/app/views/gaku/shared/multi_error.js.erb +2 -0
  331. data/app/views/gaku/shared/notice.js.erb +2 -0
  332. data/app/views/gaku/shared/overrides/students/_import_link.html.slim +0 -0
  333. data/app/views/gaku/shared/overrides/syllabuses/_import_link.html.slim +0 -0
  334. data/app/views/gaku/shared/student/_show.html.slim +12 -0
  335. data/app/views/gaku/shared/student_chooser/_chooser.html.slim +7 -0
  336. data/app/views/gaku/shared/student_chooser/_chooser_widget.html.slim +10 -0
  337. data/app/views/gaku/shared/student_chooser/_modal.html.slim +3 -0
  338. data/app/views/gaku/states/_no_states_select.html.slim +1 -0
  339. data/app/views/gaku/states/_states_select.html.slim +1 -0
  340. data/app/views/gaku/states/index.js.erb +5 -0
  341. data/app/views/gaku/students/_academic.html.slim +18 -0
  342. data/app/views/gaku/students/_chooser_widget.html.slim +14 -0
  343. data/app/views/gaku/students/_form.html.slim +3 -0
  344. data/app/views/gaku/students/_form_fields.html.slim +25 -0
  345. data/app/views/gaku/students/_personal.html.slim +3 -0
  346. data/app/views/gaku/students/_student.html.slim +5 -0
  347. data/app/views/gaku/students/_student_chooser_form.html.slim +16 -0
  348. data/app/views/gaku/students/_student_unit.html.slim +5 -0
  349. data/app/views/gaku/students/_students.html.slim +62 -0
  350. data/app/views/gaku/students/_table_fields.html.slim +63 -0
  351. data/app/views/gaku/students/_tabs.html.slim +48 -0
  352. data/app/views/gaku/students/_tabs_academic.html.slim +40 -0
  353. data/app/views/gaku/students/_tabs_personal.html.slim +27 -0
  354. data/app/views/gaku/students/advanced_search.js.erb +66 -0
  355. data/app/views/gaku/students/badges/_badge.html.slim +2 -0
  356. data/app/views/gaku/students/badges/_badge_type.html.slim +5 -0
  357. data/app/views/gaku/students/badges/_badges.html.slim +2 -0
  358. data/app/views/gaku/students/badges/_badges_tab.html.slim +8 -0
  359. data/app/views/gaku/students/badges/_edit.html.slim +8 -0
  360. data/app/views/gaku/students/badges/_fields.html.slim +8 -0
  361. data/app/views/gaku/students/badges/_form.html.slim +3 -0
  362. data/app/views/gaku/students/badges/_form_fields.html.slim +1 -0
  363. data/app/views/gaku/students/badges/_index.html.slim +20 -0
  364. data/app/views/gaku/students/badges/_index_modal.html.slim +4 -0
  365. data/app/views/gaku/students/badges/create.js.erb +14 -0
  366. data/app/views/gaku/students/badges/destroy.js.erb +6 -0
  367. data/app/views/gaku/students/badges/edit.js.erb +2 -0
  368. data/app/views/gaku/students/badges/index.js.erb +3 -0
  369. data/app/views/gaku/students/badges/new.js.erb +3 -0
  370. data/app/views/gaku/students/badges/update.js.erb +5 -0
  371. data/app/views/gaku/students/chosen.js.erb +12 -0
  372. data/app/views/gaku/students/class_group_enrollments/_new_modal.html.slim +28 -0
  373. data/app/views/gaku/students/class_group_enrollments/create.js.erb +11 -0
  374. data/app/views/gaku/students/class_group_enrollments/new.js.erb +2 -0
  375. data/app/views/gaku/students/course_enrollments/_course_enrollment.html.slim +4 -0
  376. data/app/views/gaku/students/course_enrollments/_course_enrollments.html.slim +17 -0
  377. data/app/views/gaku/students/course_enrollments/_errors_modal.html.slim +11 -0
  378. data/app/views/gaku/students/course_enrollments/_form.html.slim +4 -0
  379. data/app/views/gaku/students/course_enrollments/create.js.erb +9 -0
  380. data/app/views/gaku/students/course_enrollments/destroy.js.erb +3 -0
  381. data/app/views/gaku/students/course_enrollments/error.js.erb +2 -0
  382. data/app/views/gaku/students/course_enrollments/new.js.erb +3 -0
  383. data/app/views/gaku/students/create.js.erb +8 -0
  384. data/app/views/gaku/students/destroy.js.erb +2 -0
  385. data/app/views/gaku/students/edit.html.slim +37 -0
  386. data/app/views/gaku/students/external_school_records/_external_school_record.html.slim +2 -0
  387. data/app/views/gaku/students/external_school_records/_external_school_records.html.slim +24 -0
  388. data/app/views/gaku/students/external_school_records/_fields.html.slim +11 -0
  389. data/app/views/gaku/students/external_school_records/_form.html.slim +3 -0
  390. data/app/views/gaku/students/external_school_records/_form_fields.html.slim +17 -0
  391. data/app/views/gaku/students/external_school_records/_modal.html.slim +4 -0
  392. data/app/views/gaku/students/external_school_records/create.js.erb +8 -0
  393. data/app/views/gaku/students/external_school_records/destroy.js.erb +3 -0
  394. data/app/views/gaku/students/external_school_records/edit.js.erb +4 -0
  395. data/app/views/gaku/students/external_school_records/new.js.erb +4 -0
  396. data/app/views/gaku/students/external_school_records/update.js.erb +3 -0
  397. data/app/views/gaku/students/guardians/_delete_modal.html.slim +12 -0
  398. data/app/views/gaku/students/guardians/_form.html.slim +3 -0
  399. data/app/views/gaku/students/guardians/_form_fields.html.slim +4 -0
  400. data/app/views/gaku/students/guardians/_guardian.html.slim +12 -0
  401. data/app/views/gaku/students/guardians/_guardians.html.slim +24 -0
  402. data/app/views/gaku/students/guardians/_picture.html.slim +8 -0
  403. data/app/views/gaku/students/guardians/_tabs.html.slim +14 -0
  404. data/app/views/gaku/students/guardians/_upload_picture.html.slim +7 -0
  405. data/app/views/gaku/students/guardians/create.js.erb +7 -0
  406. data/app/views/gaku/students/guardians/destroy.js.erb +1 -0
  407. data/app/views/gaku/students/guardians/edit.html.slim +21 -0
  408. data/app/views/gaku/students/guardians/new.js.erb +3 -0
  409. data/app/views/gaku/students/guardians/recovery.js.erb +1 -0
  410. data/app/views/gaku/students/guardians/show.html.slim +17 -0
  411. data/app/views/gaku/students/importer/index.html.slim +26 -0
  412. data/app/views/gaku/students/index.html.slim +22 -0
  413. data/app/views/gaku/students/index.js.erb +2 -0
  414. data/app/views/gaku/students/new.html.slim +3 -0
  415. data/app/views/gaku/students/new.js.erb +3 -0
  416. data/app/views/gaku/students/search/_academic.html.slim +22 -0
  417. data/app/views/gaku/students/search/_address.html.slim +34 -0
  418. data/app/views/gaku/students/search/_advanced_form.html.slim +36 -0
  419. data/app/views/gaku/students/search/_extended.slim +108 -0
  420. data/app/views/gaku/students/search/_form.html.slim +8 -0
  421. data/app/views/gaku/students/search/_student.html.slim +36 -0
  422. data/app/views/gaku/students/show.html.slim +24 -0
  423. data/app/views/gaku/students/simple_grades/_edit.html.slim +8 -0
  424. data/app/views/gaku/students/simple_grades/_fields.html.slim +8 -0
  425. data/app/views/gaku/students/simple_grades/_form.html.slim +3 -0
  426. data/app/views/gaku/students/simple_grades/_form_fields.html.slim +3 -0
  427. data/app/views/gaku/students/simple_grades/_index.html.slim +21 -0
  428. data/app/views/gaku/students/simple_grades/_index_modal.html.slim +4 -0
  429. data/app/views/gaku/students/simple_grades/_simple_grade.html.slim +2 -0
  430. data/app/views/gaku/students/simple_grades/_simple_grades.html.slim +2 -0
  431. data/app/views/gaku/students/simple_grades/create.js.erb +10 -0
  432. data/app/views/gaku/students/simple_grades/destroy.js.erb +4 -0
  433. data/app/views/gaku/students/simple_grades/edit.js.erb +4 -0
  434. data/app/views/gaku/students/simple_grades/index.js.erb +5 -0
  435. data/app/views/gaku/students/simple_grades/new.js.erb +6 -0
  436. data/app/views/gaku/students/simple_grades/update.js.erb +4 -0
  437. data/app/views/gaku/students/student_specialties/_edit.html.slim +8 -0
  438. data/app/views/gaku/students/student_specialties/_fields.html.slim +5 -0
  439. data/app/views/gaku/students/student_specialties/_form.html.slim +3 -0
  440. data/app/views/gaku/students/student_specialties/_form_fields.html.slim +2 -0
  441. data/app/views/gaku/students/student_specialties/_index.html.slim +18 -0
  442. data/app/views/gaku/students/student_specialties/_index_modal.html.slim +4 -0
  443. data/app/views/gaku/students/student_specialties/_student_specialties.html.slim +2 -0
  444. data/app/views/gaku/students/student_specialties/_student_specialty.html.slim +2 -0
  445. data/app/views/gaku/students/student_specialties/create.js.erb +10 -0
  446. data/app/views/gaku/students/student_specialties/destroy.js.erb +4 -0
  447. data/app/views/gaku/students/student_specialties/edit.js.erb +2 -0
  448. data/app/views/gaku/students/student_specialties/index.js.erb +5 -0
  449. data/app/views/gaku/students/student_specialties/new.js.erb +3 -0
  450. data/app/views/gaku/students/student_specialties/update.js.erb +4 -0
  451. data/app/views/gaku/syllabuses/_all_exams.html.slim +14 -0
  452. data/app/views/gaku/syllabuses/_fields.html.slim +7 -0
  453. data/app/views/gaku/syllabuses/_form.html.slim +3 -0
  454. data/app/views/gaku/syllabuses/_form_fields.html.slim +12 -0
  455. data/app/views/gaku/syllabuses/_syllabus.html.slim +2 -0
  456. data/app/views/gaku/syllabuses/_syllabuses.html.slim +12 -0
  457. data/app/views/gaku/syllabuses/_tabs.html.slim +16 -0
  458. data/app/views/gaku/syllabuses/create.js.erb +7 -0
  459. data/app/views/gaku/syllabuses/destroy.js.erb +1 -0
  460. data/app/views/gaku/syllabuses/edit.html.slim +16 -0
  461. data/app/views/gaku/syllabuses/exam_syllabuses/create.js.erb +12 -0
  462. data/app/views/gaku/syllabuses/exam_syllabuses/destroy.js.erb +5 -0
  463. data/app/views/gaku/syllabuses/exams/_exam.html.slim +3 -0
  464. data/app/views/gaku/syllabuses/exams/_exams.html.slim +13 -0
  465. data/app/views/gaku/syllabuses/exams/_fields.html.slim +10 -0
  466. data/app/views/gaku/syllabuses/exams/_form.html.slim +17 -0
  467. data/app/views/gaku/syllabuses/exams/_form_fields.html.slim +10 -0
  468. data/app/views/gaku/syllabuses/exams/_modal.html.slim +4 -0
  469. data/app/views/gaku/syllabuses/exams/_select_form.html.slim +6 -0
  470. data/app/views/gaku/syllabuses/exams/create.js.erb +9 -0
  471. data/app/views/gaku/syllabuses/exams/destroy.js.erb +3 -0
  472. data/app/views/gaku/syllabuses/exams/edit.js.erb +3 -0
  473. data/app/views/gaku/syllabuses/exams/new.js.erb +3 -0
  474. data/app/views/gaku/syllabuses/exams/update.js.erb +4 -0
  475. data/app/views/gaku/syllabuses/importer/index.html.slim +14 -0
  476. data/app/views/gaku/syllabuses/index.html.slim +14 -0
  477. data/app/views/gaku/syllabuses/new.js.erb +3 -0
  478. data/app/views/gaku/teachers/_fields.html.slim +5 -0
  479. data/app/views/gaku/teachers/_form.html.slim +3 -0
  480. data/app/views/gaku/teachers/_form_fields.html.slim +1 -0
  481. data/app/views/gaku/teachers/_tabs.html.slim +20 -0
  482. data/app/views/gaku/teachers/_teacher.html.slim +5 -0
  483. data/app/views/gaku/teachers/_teachers.html.slim +11 -0
  484. data/app/views/gaku/teachers/create.js.erb +8 -0
  485. data/app/views/gaku/teachers/destroy.js.erb +1 -0
  486. data/app/views/gaku/teachers/edit.html.slim +19 -0
  487. data/app/views/gaku/teachers/index.html.slim +16 -0
  488. data/app/views/gaku/teachers/new.js.erb +3 -0
  489. data/app/views/gaku/teachers/show.html.slim +13 -0
  490. data/app/views/kaminari/_first_page.html.erb +11 -0
  491. data/app/views/kaminari/_gap.html.erb +8 -0
  492. data/app/views/kaminari/_last_page.html.erb +11 -0
  493. data/app/views/kaminari/_next_page.html.erb +11 -0
  494. data/app/views/kaminari/_page.html.erb +12 -0
  495. data/app/views/kaminari/_paginator.html.erb +27 -0
  496. data/app/views/kaminari/_prev_page.html.erb +11 -0
  497. data/config/initializers/client_side_validations.rb +9 -0
  498. data/config/initializers/wrap_parameters.rb +14 -0
  499. data/config/routes.rb +137 -0
  500. data/lib/gaku/app_responder.rb +6 -0
  501. data/lib/gaku/class_name_detector.rb +23 -0
  502. data/lib/gaku/frontend.rb +33 -0
  503. data/lib/gaku/frontend/engine.rb +30 -0
  504. data/lib/gaku_frontend.rb +1 -0
  505. data/lib/tasks/admin_user.rake +104 -0
  506. data/lib/tasks/core.rake +65 -0
  507. data/lib/tasks/reset.rake +37 -0
  508. metadata +848 -0
@@ -0,0 +1,6 @@
1
+ $('table#class-groups-without-semester-index tbody').append('<%= j render("class_group", {class_group: @class_group}) %>');
2
+ $('#new-class-group form')[0].reset();
3
+ $('#new-class-group').slide();
4
+ $('#new-class-group-link').show();
5
+ $('.class-groups-count').html("<%= print_count(@count, t(:'class_group.list')) %>");
6
+ showNotice("<%= render_flash %>");
@@ -0,0 +1 @@
1
+ showNotice("<%= render_flash %>");
@@ -0,0 +1,16 @@
1
+ .row
2
+ .col-md-12
3
+ = normal_form_for @class_group, label: 'nil' do |f|
4
+ = render 'form_fields', f: f, class_group: @class_group
5
+ = buttons_for @class_group
6
+
7
+ hr
8
+
9
+ = render 'tabs'
10
+
11
+ = footer do
12
+ .col-md-9
13
+ = link_to_index class_groups_path
14
+ .col-md-3
15
+ = link_to_modal_delete
16
+ = render 'gaku/shared/delete_modal', target: @class_group
@@ -0,0 +1,25 @@
1
+ = content_for :title do
2
+ = t(:'class_group.plural')
3
+
4
+ = content_for :new_form do
5
+ #new-class-group.d-none
6
+
7
+ #class-groups-advanced-search.d-none
8
+
9
+ = content_for :index_header do
10
+ .pull-left
11
+ = count_div('semesters-count') { print_count @count, t(:'semester.list') }
12
+ .pull-right
13
+ = ajax_link_to_new t(:'class_group.new'), [:new, :class_group], id: "new-class-group-link"
14
+
15
+ ul.nav.nav-tabs
16
+ li.active
17
+ = link_to(t(:'class_group.active'), class_groups_path, id: 'class-groups-active-tab-link')
18
+ li
19
+ = link_to(t(:'class_group.with_semester'), with_semester_class_groups_path, id: 'class-groups-with-semester-tab-link')
20
+ li
21
+ = link_to(t(:'class_group.without_semester'), without_semester_class_groups_path, id: 'class-groups-without-semester-tab-link')
22
+
23
+
24
+ #class-groups-index
25
+ = render 'class_groups_with_semester'
@@ -0,0 +1,3 @@
1
+ $('#new-class-group').html('<%= j render("form") %>').slide();
2
+ $('#new-class-group-link').hide();
3
+ $('.remote-form').enableValidations();
@@ -0,0 +1,18 @@
1
+ .panel.panel-success
2
+ .panel-heading
3
+ = t(:'search')
4
+ span.hide-advanced-search-table.d-none = modal_close_button
5
+ .panel-body
6
+ = search_form_for @search, url: search_class_groups_path, html: {id: 'search-class-groups'} do |f|
7
+ .row.mb-m
8
+ .col-md-2
9
+ = f.label :name_cont, t(:'class_group.name')
10
+ = f.text_field :name_cont, class: "form-control input-sm"
11
+
12
+ .col-md-2
13
+ = f.label :grade_eq, t(:'class_group.grade')
14
+ = f.text_field :grade_eq, class: "form-control input-sm"
15
+
16
+ .col-md-2
17
+ = f.label :homeroom_cont, t(:'class_group.homeroom')
18
+ = f.text_field :homeroom_cont, class: "form-control input-sm"
@@ -0,0 +1,23 @@
1
+ .panel.panel-success
2
+ .panel-heading
3
+ = t(:'search')
4
+ span.hide-advanced-search-table.d-none = modal_close_button
5
+ .panel-body
6
+ = search_form_for @search, url: search_semester_class_groups_path, html: {id: 'search-semesters'} do |f|
7
+ .row
8
+ .col-md-2
9
+ = autocomplete_select(f, options = { object_name: 'id_eq',
10
+ tag_name: t('semester.singular'),
11
+ collection: @semesters_for_select, prompt: t('semester.singular'),
12
+ prompt_position: "bottomRight:5",
13
+ html_options: {class: "validate[required] form-control", id: "semester_dropdown"}})
14
+ .col-md-2
15
+ = f.label :class_groups_name_cont, t(:'class_group.name')
16
+ = f.text_field :class_groups_name_cont, class: "form-control input-sm"
17
+ .col-md-2
18
+ = f.label :class_groups_grade_eq, t(:'class_group.grade')
19
+ = f.text_field :class_groups_grade_eq, class: "form-control input-sm"
20
+ .col-md-2
21
+ = f.label :class_groups_homeroom_cont, t(:'class_group.homeroom')
22
+ = f.text_field :class_groups_homeroom_cont, class: "form-control input-sm"
23
+
@@ -0,0 +1,30 @@
1
+ $('#class-groups-semester-advanced-search').html('<%= j render("gaku/class_groups/search/semester_form") %>').slide();
2
+ $('#class-groups-semester-advanced-search-link').slide();
3
+ $('.hide-advanced-search-table').show();
4
+
5
+
6
+ $(document).on('keyup', "#search-semesters input", function(event) {
7
+ process_search();
8
+ });
9
+
10
+ function process_search()
11
+ {
12
+ action = $("#search-semesters").attr('action');
13
+ form_data = $("#search-semesters").serialize();
14
+ $.get(action, form_data, null, "script");
15
+ history.pushState(null, "", action + "?" + form_data);
16
+ return false;
17
+ }
18
+
19
+
20
+ $(document).on('change', "#search-semesters select", function(event) {
21
+ process_search();
22
+ });
23
+
24
+
25
+
26
+ $('body').on('click', '.hide-advanced-search-table', function(event) {
27
+ event.preventDefault();
28
+ $('#class-groups-semesters-advanced-search').hide();
29
+ $('#class-groups-semesters-advanced-search-link').show();
30
+ });
@@ -0,0 +1,4 @@
1
+ = render 'gaku/shared/fields/semester_fields', semester: semester_class_group.semester
2
+ td
3
+ = ajax_link_to_edit [:edit, @class_group, semester_class_group]
4
+ = ajax_link_to_delete [@class_group, semester_class_group]
@@ -0,0 +1,4 @@
1
+ = remote_form_for [@class_group, @semester_class_group], resource: 'class-group-semester-class-group' do |f|
2
+ = render 'form_fields', f: f
3
+ = buttons_for @semester_class_group, resource: 'class-group-semester-class-group'
4
+
@@ -0,0 +1,3 @@
1
+ .row
2
+ .col-md-6
3
+ = f.select :semester_id, options_from_collection_for_select(@semesters, :id, :to_s) , {prompt: t(:'semester_class_group.choose')}, class: "span12", label: t(:'semester.plural'), uniqueness: true
@@ -0,0 +1,5 @@
1
+ = modal_for 'semester-modal' do
2
+ = modal_header t(:'semester.edit')
3
+ #class-group-semester-form-errors
4
+ .modal-body
5
+ = render 'form'
@@ -0,0 +1,3 @@
1
+ -unless semester_class_group.nil? or semester_class_group.new_record? or !semester_class_group
2
+ tr id="semester-class-group-#{semester_class_group.id}"
3
+ =render 'gaku/class_groups/semester_class_groups/fields', semester_class_group: semester_class_group
@@ -0,0 +1,4 @@
1
+ = modal_for 'semester-modal' do
2
+ = modal_form_for [@class_group, @semester_class_group], resource: 'class-group-semester-class-group' do |f|
3
+ = render 'form_fields', f: f
4
+ = buttons_for @semester_class_group, resource: 'class-group-semester-class-group'
@@ -0,0 +1,13 @@
1
+ = index_header do
2
+ #new-class-group-semester-class-group.d-none
3
+ .pull-right
4
+ = ajax_link_to_new t(:'semester.add'), [:new, @class_group, :semester_class_group], id: 'new-class-group-semester-class-group-link'
5
+
6
+ = index_body do
7
+ = table_for 'class-group-semester-class-groups-index' do
8
+ thead
9
+ tr
10
+ = th t(:'period')
11
+ = th_actions 2
12
+ tbody
13
+ =render partial: 'gaku/class_groups/semester_class_groups/semester', collection: @class_group.semester_class_groups, as: :semester_class_group
@@ -0,0 +1,8 @@
1
+ showNotice("<%= render_flash %>");
2
+
3
+ <%- if @semester_class_group.valid? %>
4
+ $('#class-group-semester-class-groups-index tbody').append('<%= j render("semester", {semester_class_group: @semester_class_group}) %>');
5
+ $('#new-class-group-semester-class-group').slide();
6
+ $('#new-class-group-semester-class-group-link').show();
7
+ $('#class-group-semester-class-groups-tab-link').html("<%= print_count(@count, t(:'semester.plural')) %>");
8
+ <% end %>
@@ -0,0 +1,2 @@
1
+ showNotice("<%= render_flash %>");
2
+ $('#class-group-semester-class-groups-tab-link').html("<%= print_count(@count, t(:'semester.plural')) %>");
@@ -0,0 +1,3 @@
1
+ $('#modal-dialogs').html("<%= j render('semester_modal', {semester: @semester}) %>");
2
+ $('#semester-modal').modal('show');
3
+ $('.remote-form').enableValidations();
@@ -0,0 +1,3 @@
1
+ $('#new-class-group-semester-class-group').html('<%= j render("form") %>').slide();
2
+ $('#new-class-group-semester-class-group-link').hide();
3
+ $('.remote-form').enableValidations();
@@ -0,0 +1,3 @@
1
+ showNotice("<%= render_flash %>");
2
+ $('#semester-modal').modal('hide');
3
+ $('#semester-class-group-<%= @semester_class_group.id %>').html('<%= j render("fields", {semester_class_group: @semester_class_group}) %>');
@@ -0,0 +1,9 @@
1
+ $('#modal-dialogs').html('<%= j render("gaku/shared/student_chooser/modal") %>');
2
+ $('#student-modal').modal('show');
3
+
4
+
5
+ $('#chosen-actions').html('<%= j render("student_chooser_form") %>');
6
+ $('.show-chosen-table').hide();
7
+ $('.hide-chosen-table').show();
8
+ $('#chosen-table').slide();
9
+ $('#chosen-actions').slide();
@@ -0,0 +1,5 @@
1
+ tr id="enrollment-#{enrollment.id}"
2
+ td = enrollment.student.surname
3
+ td = enrollment.student.name
4
+ td
5
+ = ajax_link_to_delete class_group_student_path(class_group_id: enrollment.class_group_id, id: enrollment.student_id,class_group_enrollment: enrollment.id)
@@ -0,0 +1,14 @@
1
+ #class-group-students
2
+ = index_header do
3
+ .pull-right
4
+ = ajax_link_to_new t(:'student.add'), student_chooser_class_group_path(class_group_id: @class_group.id), id: 'new-class-group-student-link'
5
+
6
+ = index_body do
7
+ = table_for 'class-group-students-index' do
8
+ thead
9
+ tr
10
+ = th t(:'surname')
11
+ = th t(:'name')
12
+ = th_actions 1
13
+ tbody
14
+ = render partial: 'gaku/class_groups/students/student', collection: @class_group.enrollments, as: 'enrollment'
@@ -0,0 +1,2 @@
1
+ showNotice("<%= render_flash %>");
2
+ $('#class-group-enrollments-tab-link').html("<%= print_count(@class_group.enrollments.count, t(:'class_group_enrollment.list')) %>");
@@ -0,0 +1,16 @@
1
+ $("#class-group-students-index tbody").html('');
2
+
3
+ <% @resource.enrollments.each do |enrollment| %>
4
+ $('#class-group-students-index tbody').append('<%= j render("gaku/class_groups/students/student", {enrollment: enrollment}) %>');
5
+ <% end %>
6
+
7
+ $('#class-group-enrollments-tab-link').html("<%= print_count(@count, t(:'student.plural')) %>");
8
+
9
+ $('#student-modal').modal('hide');
10
+ showNotice("<%= render_flash %>");
11
+
12
+ var enrollments = <%= raw @enrollments.map {|e| [e.student_id, e.class_and_number ]}.to_json %>
13
+ enrollments.forEach(function(enrollment) {
14
+ $('#student-' + enrollment[0] + ' td:eq(5)' ).html(enrollment[1])
15
+ })
16
+
@@ -0,0 +1,3 @@
1
+ $('#modal-dialogs').html('<%= j render("modal", {class_group_enrollment: @class_group_enrollment}) %>');
2
+ $('#student-modal').modal('show');
3
+ $('.remote-form').enableValidations();
@@ -0,0 +1,2 @@
1
+ $("#class-groups-index").html("<%= j render('class_groups') %>");
2
+ $('.semesters-count').html("<%= print_count(@count, t(:'semester.list')) %>");
@@ -0,0 +1,26 @@
1
+ = content_for :title do
2
+ = t(:'class_group.plural')
3
+
4
+ = content_for :new_form do
5
+ #new-class-group.d-none
6
+
7
+ #class-groups-semester-advanced-search.d-none
8
+
9
+ = content_for :index_header do
10
+ .pull-left
11
+ = count_div('semesters-count') { print_count @count, t(:'semester.list') }
12
+ .pull-right
13
+ = ajax_link_to_search t(:'search'), semester_advanced_search_class_groups_path, id: "student-semester-advanced-search-link"
14
+ = ajax_link_to_new t(:'class_group.new'), [:new, :class_group], id: "new-class-group-link"
15
+
16
+ ul.nav.nav-tabs
17
+ li
18
+ = link_to(t(:'class_group.active'), class_groups_path, id: 'class-groups-active-tab-link')
19
+ li.active
20
+ = link_to(t(:'class_group.with_semester'), with_semester_class_groups_path, id: 'class-groups-with-semester-tab-link')
21
+ li
22
+ = link_to(t(:'class_group.without_semester'), without_semester_class_groups_path, id: 'class-groups-without-semester-tab-link')
23
+
24
+
25
+ #class-groups-index
26
+ = render 'class_groups_with_semester', semesters: @semesters
@@ -0,0 +1,2 @@
1
+ $("#class-groups-index").html("<%= j render('class_groups_with_semester') %>");
2
+ $('.semesters-count').html("<%= print_count(@count, t(:'semester.list')) %>");
@@ -0,0 +1,26 @@
1
+ = content_for :title do
2
+ = t(:'class_group.plural')
3
+
4
+ = content_for :new_form do
5
+ #new-class-group.d-none
6
+
7
+ #class-groups-advanced-search.d-none
8
+
9
+ = content_for :index_header do
10
+ .pull-left
11
+ = count_div('class-groups-count') { print_count @count, t(:'class_group.list') }
12
+ .pull-right
13
+ = ajax_link_to_search t(:'search'), advanced_search_class_groups_path, id: "student-advanced-search-link"
14
+ = ajax_link_to_new t(:'class_group.new'), [:new, :class_group], id: "new-class-group-link"
15
+
16
+ ul.nav.nav-tabs
17
+ li
18
+ = link_to(t(:'class_group.active'), class_groups_path, id: 'class-groups-active-tab-link')
19
+ li
20
+ = link_to(t(:'class_group.with_semester'), with_semester_class_groups_path, id: 'class-groups-with-semester-tab-link')
21
+ li.active
22
+ = link_to(t(:'class_group.without_semester'), without_semester_class_groups_path, id: 'class-groups-without-semester-tab-link')
23
+
24
+
25
+ #class-groups-index
26
+ = render 'class_groups'
@@ -0,0 +1,2 @@
1
+ $("#class-groups-index").html("<%= j render('class_groups') %>");
2
+ $('.class-groups-count').html("<%= print_count(@count, t(:'class_group.list')) %>");
@@ -0,0 +1,5 @@
1
+ - target ||= prepare_target(nested_resources, contact) if defined?(nested_resources)
2
+ - unless contact.nil? or contact.new_record? or !contact
3
+ tr id="contact-#{contact.id}"
4
+ = render 'gaku/contacts/fields', contact: contact, target: target
5
+
@@ -0,0 +1,22 @@
1
+ - prepare_resource_name(nested_resources, :contact)
2
+ div class="#{@resource_name.pluralize}"
3
+ = index_header do
4
+ .d-none id="new-#{@resource_name}"
5
+ .pull-left
6
+ = count_div "#{@resource_name.pluralize}-count" do
7
+ = print_count nested_resources.last.contacts_count, t(:'contact.list')
8
+ .pull-right
9
+ = ajax_link_to_new t(:'contact.add'), [:new, nested_resources, :contact].flatten, id: "new-#{@resource_name}-link" if can_edit?
10
+
11
+ = index_body do
12
+ = table_for "#{@resource_name.pluralize}-index" do
13
+ thead
14
+ tr
15
+ = th_icon 'home'
16
+ = th t(:'contact.contact_type')
17
+ = th t(:'contact.data')
18
+ = th t(:'contact.details')
19
+ = th t(:'contact.emergency')
20
+ = th_actions 2 if can_edit?
21
+ tbody
22
+ = render partial: 'gaku/contacts/contact', collection: nested_resources.last.contacts, as: :contact, locals: {nested_resources: nested_resources}
@@ -0,0 +1 @@
1
+ = ajax_link_to_delete [target].flatten
@@ -0,0 +1,14 @@
1
+ - target ||= [@nested_resources, @polymorphic_resource, contact].flatten
2
+ = render partial: 'gaku/contacts/primary_field', locals: {contact: contact, target: target}
3
+
4
+ td = contact.name
5
+ td = contact.data
6
+ td = contact.details
7
+ td
8
+ = t(:'contact.emergency') if contact.emergency?
9
+
10
+ - if can_edit?
11
+ td
12
+ = ajax_link_to_edit [:edit, target].flatten
13
+ = render 'gaku/contacts/delete_link', target: target
14
+
@@ -0,0 +1,4 @@
1
+ = remote_form_for [@nested_resources, @polymorphic_resource, @contact].flatten, resource: @polymorphic_resource_name do |f|
2
+ = render 'form_fields', f: f
3
+ = buttons_for @contact, resource: @polymorphic_resource_name
4
+
@@ -0,0 +1,14 @@
1
+ .row
2
+ .col-md-6
3
+ = f.select :contact_type_id, options_from_collection_for_select(@contact_types, :id, :name), {prompt: t(:'contact_type.choose')}, label: t(:'contact_type.plural')
4
+ .col-md-6
5
+ = f.text_field :data, label: t(:'contact.data')
6
+
7
+ .row
8
+ .col-md-12
9
+ = f.text_field :details, label: t(:'contact.details')
10
+ .row
11
+ .col-md-6
12
+ = f.check_box :primary, label: t(:'contact.primary')
13
+ .col-md-6
14
+ = f.check_box :emergency, label: t(:'contact.emergency')
@@ -0,0 +1,4 @@
1
+ = modal_for 'edit-contact-modal' do
2
+ = modal_form_for [@nested_resources, @polymorphic_resource, @contact].flatten do |f|
3
+ = render 'form_fields', f: f
4
+ = buttons_for @contact, resource: @polymorphic_resource_name
@@ -0,0 +1,13 @@
1
+ td class="primary-contact" width="28px"
2
+ - if can_edit?
3
+ - if contact.primary?
4
+ = ajax_link_to_make_primary [:make_primary] + target, method: :patch, id: 'set-primary-link', class: 'btn btn-xs btn-primary make-primary'
5
+ - else
6
+ = ajax_link_to_make_primary [:make_primary] + target, method: :patch, id: 'set-primary-link', class: 'btn btn-xs btn-default'
7
+
8
+ - else
9
+ - if contact.primary?
10
+ span.btn.btn-xs.btn-primary
11
+ = primary_checkbox
12
+
13
+
@@ -0,0 +1,21 @@
1
+ showNotice("<%= render_flash %>");
2
+
3
+ $('#<%= @polymorphic_resource_name.pluralize %>-index tbody').append('<%= j render("contact", {contact: @contact}) %>');
4
+ $("#new-<%= @polymorphic_resource_name %>-link").show();
5
+ $('#new-<%= @polymorphic_resource_name %>').slide();
6
+
7
+ $('.<%= @polymorphic_resource_name.pluralize %>-count').html("<%= print_count(@count, t(:'contact.list')) %>");
8
+ $('#<%= @polymorphic_resource_name.pluralize %>-tab-link').html("<%= print_count(@count, t(:'contact.plural')) %>");
9
+
10
+ <% if @contact.primary? %>
11
+ $('#<%= @polymorphic_resource_name.pluralize %>-index tbody tr').each(function(){
12
+ $(this).children('td.primary-contact').find('a').removeClass('btn-primary')
13
+ });
14
+ $("#contact-<%= @contact.id %>").children('td.primary-contact')
15
+ .find('a')
16
+ .addClass('btn-primary')
17
+
18
+
19
+ $('#primary-contact').html("<%= @contact.contact_type.name + ':' + @contact.data + '(' + @contact.details + ')' %>");
20
+ <% end %>
21
+