gaku 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1387) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +70 -0
  3. data/.rspec +4 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +24 -0
  7. data/Gemfile +1 -0
  8. data/LICENSE.md +15 -0
  9. data/README.md +179 -0
  10. data/Rakefile +99 -0
  11. data/VERSION +1 -0
  12. data/core/.gitignore +3 -0
  13. data/core/.rspec +2 -0
  14. data/core/.ruby-gemset +1 -0
  15. data/core/.ruby-version +1 -0
  16. data/core/Gemfile +2 -0
  17. data/core/Guardfile +24 -0
  18. data/core/Rakefile +34 -0
  19. data/core/app/assets/images/background.jpg +0 -0
  20. data/core/app/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
  21. data/core/app/assets/images/bootstrap/glyphicons-halflings.png +0 -0
  22. data/core/app/assets/images/check.png +0 -0
  23. data/core/app/assets/images/cross.png +0 -0
  24. data/core/app/assets/images/dataTables/back_disabled.png +0 -0
  25. data/core/app/assets/images/dataTables/back_enabled.png +0 -0
  26. data/core/app/assets/images/dataTables/back_enabled_hover.png +0 -0
  27. data/core/app/assets/images/dataTables/forward_disabled.png +0 -0
  28. data/core/app/assets/images/dataTables/forward_enabled.png +0 -0
  29. data/core/app/assets/images/dataTables/forward_enabled_hover.png +0 -0
  30. data/core/app/assets/images/dataTables/sort_asc.png +0 -0
  31. data/core/app/assets/images/dataTables/sort_asc_disabled.png +0 -0
  32. data/core/app/assets/images/dataTables/sort_both.png +0 -0
  33. data/core/app/assets/images/dataTables/sort_desc.png +0 -0
  34. data/core/app/assets/images/dataTables/sort_desc_disabled.png +0 -0
  35. data/core/app/assets/images/down_arrow.gif +0 -0
  36. data/core/app/assets/images/elements/highlight.png +0 -0
  37. data/core/app/assets/images/elements/toolbar1.png +0 -0
  38. data/core/app/assets/images/favicon.ico +0 -0
  39. data/core/app/assets/images/gaku-logo.png +0 -0
  40. data/core/app/assets/images/gakuengine.png +0 -0
  41. data/core/app/assets/images/gakuengine20.png +0 -0
  42. data/core/app/assets/images/icon-chair.png +0 -0
  43. data/core/app/assets/images/images/ui-bg_flat_30_cccccc_40x100.png +0 -0
  44. data/core/app/assets/images/images/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
  45. data/core/app/assets/images/images/ui-bg_glass_20_555555_1x400.png +0 -0
  46. data/core/app/assets/images/images/ui-bg_glass_40_0078a3_1x400.png +0 -0
  47. data/core/app/assets/images/images/ui-bg_glass_40_ffc73d_1x400.png +0 -0
  48. data/core/app/assets/images/images/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
  49. data/core/app/assets/images/images/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
  50. data/core/app/assets/images/images/ui-bg_inset-soft_25_000000_1x100.png +0 -0
  51. data/core/app/assets/images/images/ui-bg_inset-soft_30_f58400_1x100.png +0 -0
  52. data/core/app/assets/images/images/ui-icons_222222_256x240.png +0 -0
  53. data/core/app/assets/images/images/ui-icons_4b8e0b_256x240.png +0 -0
  54. data/core/app/assets/images/images/ui-icons_a83300_256x240.png +0 -0
  55. data/core/app/assets/images/images/ui-icons_cccccc_256x240.png +0 -0
  56. data/core/app/assets/images/images/ui-icons_ffffff_256x240.png +0 -0
  57. data/core/app/assets/images/pictures/thumb/missing.png +0 -0
  58. data/core/app/assets/images/rails.png +0 -0
  59. data/core/app/assets/images/raw/Logo_GAKUEngine.eps +0 -0
  60. data/core/app/assets/images/raw/Logo_GAKUEngine.svg +82 -0
  61. data/core/app/assets/images/raw/gakuengine-logoset.svg +332 -0
  62. data/core/app/assets/images/tbs-img/glyphicons-halflings-white.png +0 -0
  63. data/core/app/assets/images/tbs-img/glyphicons-halflings.png +0 -0
  64. data/core/app/assets/images/themes/gakuengine/images/ui-bg_flat_65_ffffff_40x100.png +0 -0
  65. data/core/app/assets/images/themes/gakuengine/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
  66. data/core/app/assets/images/themes/gakuengine/images/ui-bg_highlight-hard_40_aaaaaa_1x100.png +0 -0
  67. data/core/app/assets/images/themes/gakuengine/images/ui-bg_highlight-soft_50_aaaaaa_1x100.png +0 -0
  68. data/core/app/assets/images/themes/gakuengine/images/ui-bg_inset-hard_40_111111_1x100.png +0 -0
  69. data/core/app/assets/images/themes/gakuengine/images/ui-bg_inset-hard_45_cd0a0a_1x100.png +0 -0
  70. data/core/app/assets/images/themes/gakuengine/images/ui-bg_inset-hard_55_165e83_1x100.png +0 -0
  71. data/core/app/assets/images/themes/gakuengine/images/ui-bg_inset-soft_55_00a3af_1x100.png +0 -0
  72. data/core/app/assets/images/themes/gakuengine/images/ui-bg_inset-soft_99_00a3af_1x100.png +0 -0
  73. data/core/app/assets/images/themes/gakuengine/images/ui-icons_222222_256x240.png +0 -0
  74. data/core/app/assets/images/themes/gakuengine/images/ui-icons_70f000_256x240.png +0 -0
  75. data/core/app/assets/images/themes/gakuengine/images/ui-icons_bbbbbb_256x240.png +0 -0
  76. data/core/app/assets/images/themes/gakuengine/images/ui-icons_ededed_256x240.png +0 -0
  77. data/core/app/assets/images/themes/gakuengine/images/ui-icons_ffcf29_256x240.png +0 -0
  78. data/core/app/assets/images/themes/gakuengine/images/ui-icons_ffffff_256x240.png +0 -0
  79. data/core/app/assets/images/tick.png +0 -0
  80. data/core/app/assets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  81. data/core/app/assets/images/up_arrow.gif +0 -0
  82. data/core/app/assets/javascripts/gaku/admin.coffee +30 -0
  83. data/core/app/assets/javascripts/gaku/backbone/collections/attendance_types.js.coffee +2 -0
  84. data/core/app/assets/javascripts/gaku/backbone/collections/courses.js.coffee +2 -0
  85. data/core/app/assets/javascripts/gaku/backbone/collections/exams.js.coffee +2 -0
  86. data/core/app/assets/javascripts/gaku/backbone/models/attendance.js.coffee +1 -0
  87. data/core/app/assets/javascripts/gaku/backbone/models/attendance_type.coffee +1 -0
  88. data/core/app/assets/javascripts/gaku/backbone/models/calculation.js.coffee +43 -0
  89. data/core/app/assets/javascripts/gaku/backbone/models/completed.js.coffee +1 -0
  90. data/core/app/assets/javascripts/gaku/backbone/models/course.js.coffee +2 -0
  91. data/core/app/assets/javascripts/gaku/backbone/models/exam.js.coffee +1 -0
  92. data/core/app/assets/javascripts/gaku/backbone/models/exam_attendance.js.coffee +4 -0
  93. data/core/app/assets/javascripts/gaku/backbone/models/exam_portion_score.js.coffee +18 -0
  94. data/core/app/assets/javascripts/gaku/backbone/routers/.gitkeep +0 -0
  95. data/core/app/assets/javascripts/gaku/backbone/routers/exams_router.js.coffee +22 -0
  96. data/core/app/assets/javascripts/gaku/backbone/templates/.gitkeep +0 -0
  97. data/core/app/assets/javascripts/gaku/backbone/templates/attendance_chooser.jst.eco +19 -0
  98. data/core/app/assets/javascripts/gaku/backbone/templates/tables/attendance_show.jst.eco +3 -0
  99. data/core/app/assets/javascripts/gaku/backbone/templates/tables/exam_calculations.jst.eco +39 -0
  100. data/core/app/assets/javascripts/gaku/backbone/templates/tables/exam_completion.jst.eco +1 -0
  101. data/core/app/assets/javascripts/gaku/backbone/templates/tables/exam_score.jst.eco +53 -0
  102. data/core/app/assets/javascripts/gaku/backbone/templates/tables/exam_table.jst.eco +32 -0
  103. data/core/app/assets/javascripts/gaku/backbone/templates/tables/exam_user.jst.eco +18 -0
  104. data/core/app/assets/javascripts/gaku/backbone/views/exam_attendance.js.coffee +51 -0
  105. data/core/app/assets/javascripts/gaku/backbone/views/exam_attendance_show.js.coffee +6 -0
  106. data/core/app/assets/javascripts/gaku/backbone/views/exam_calculations.js.coffee +15 -0
  107. data/core/app/assets/javascripts/gaku/backbone/views/exam_completion.js.coffee +7 -0
  108. data/core/app/assets/javascripts/gaku/backbone/views/exam_portion_score.js.coffee +8 -0
  109. data/core/app/assets/javascripts/gaku/backbone/views/exam_score_view.js.coffee +7 -0
  110. data/core/app/assets/javascripts/gaku/backbone/views/exam_table_view.js.coffee +227 -0
  111. data/core/app/assets/javascripts/gaku/backbone/views/exam_user_view.js.coffee +8 -0
  112. data/core/app/assets/javascripts/gaku/class_groups.js.coffee +11 -0
  113. data/core/app/assets/javascripts/gaku/courses.js.coffee +12 -0
  114. data/core/app/assets/javascripts/gaku/exams.js.coffee +23 -0
  115. data/core/app/assets/javascripts/gaku/extracurricular_activities.js.coffee +12 -0
  116. data/core/app/assets/javascripts/gaku/gaku.js.coffee +174 -0
  117. data/core/app/assets/javascripts/gaku/gaku_core.js +35 -0
  118. data/core/app/assets/javascripts/gaku/slide.js.erb +14 -0
  119. data/core/app/assets/javascripts/gaku/students.js.coffee +36 -0
  120. data/core/app/assets/javascripts/gaku/syllabuses.js.coffee +26 -0
  121. data/core/app/assets/javascripts/gaku/teachers.js.coffee +12 -0
  122. data/core/app/assets/stylesheets/gaku/admin/disposals.css.scss +14 -0
  123. data/core/app/assets/stylesheets/gaku/class_groups.css.scss +19 -0
  124. data/core/app/assets/stylesheets/gaku/course_groups.css.scss +14 -0
  125. data/core/app/assets/stylesheets/gaku/courses.css.scss +19 -0
  126. data/core/app/assets/stylesheets/gaku/exams.css.scss +72 -0
  127. data/core/app/assets/stylesheets/gaku/gaku.css.scss +172 -0
  128. data/core/app/assets/stylesheets/gaku/gaku_core.css +10 -0
  129. data/core/app/assets/stylesheets/gaku/gaku_import.scss +2 -0
  130. data/core/app/assets/stylesheets/gaku/students.css.scss +22 -0
  131. data/core/app/assets/templates/roster.xls +0 -0
  132. data/core/app/controllers/concerns/enrollments_controller.rb +84 -0
  133. data/core/app/controllers/concerns/polymorphic_resource_concern.rb +47 -0
  134. data/core/app/controllers/concerns/student_chooser_controller.rb +52 -0
  135. data/core/app/controllers/gaku/addresses_controller.rb +105 -0
  136. data/core/app/controllers/gaku/admin/achievements_controller.rb +64 -0
  137. data/core/app/controllers/gaku/admin/attendance_types_controller.rb +60 -0
  138. data/core/app/controllers/gaku/admin/base_controller.rb +40 -0
  139. data/core/app/controllers/gaku/admin/changes/student_address_changes_controller.rb +14 -0
  140. data/core/app/controllers/gaku/admin/changes/student_changes_controller.rb +13 -0
  141. data/core/app/controllers/gaku/admin/changes/student_contact_changes_controller.rb +13 -0
  142. data/core/app/controllers/gaku/admin/commute_method_types_controller.rb +54 -0
  143. data/core/app/controllers/gaku/admin/contact_types_controller.rb +55 -0
  144. data/core/app/controllers/gaku/admin/disposals_controller.rb +82 -0
  145. data/core/app/controllers/gaku/admin/enrollment_statuses_controller.rb +58 -0
  146. data/core/app/controllers/gaku/admin/grading_method_sets/grading_method_set_items_controller.rb +70 -0
  147. data/core/app/controllers/gaku/admin/grading_method_sets_controller.rb +69 -0
  148. data/core/app/controllers/gaku/admin/grading_methods_controller.rb +58 -0
  149. data/core/app/controllers/gaku/admin/presets_controller.rb +40 -0
  150. data/core/app/controllers/gaku/admin/roles_controller.rb +54 -0
  151. data/core/app/controllers/gaku/admin/school_years/semesters_controller.rb +31 -0
  152. data/core/app/controllers/gaku/admin/school_years_controller.rb +30 -0
  153. data/core/app/controllers/gaku/admin/schools/campuses/addresses_controller.rb +53 -0
  154. data/core/app/controllers/gaku/admin/schools/campuses_controller.rb +46 -0
  155. data/core/app/controllers/gaku/admin/schools/programs_controller.rb +48 -0
  156. data/core/app/controllers/gaku/admin/schools_controller.rb +59 -0
  157. data/core/app/controllers/gaku/admin/specialties_controller.rb +58 -0
  158. data/core/app/controllers/gaku/admin/states_controller.rb +49 -0
  159. data/core/app/controllers/gaku/admin/system_tools_controller.rb +8 -0
  160. data/core/app/controllers/gaku/admin/templates_controller.rb +49 -0
  161. data/core/app/controllers/gaku/admin/users_controller.rb +82 -0
  162. data/core/app/controllers/gaku/assignments_controller.rb +15 -0
  163. data/core/app/controllers/gaku/attachments_controller.rb +88 -0
  164. data/core/app/controllers/gaku/attendances_controller.rb +29 -0
  165. data/core/app/controllers/gaku/class_group_enrollments_controller.rb +15 -0
  166. data/core/app/controllers/gaku/class_groups/courses_controller.rb +44 -0
  167. data/core/app/controllers/gaku/class_groups/semester_class_groups_controller.rb +38 -0
  168. data/core/app/controllers/gaku/class_groups/students_controller.rb +43 -0
  169. data/core/app/controllers/gaku/class_groups_controller.rb +59 -0
  170. data/core/app/controllers/gaku/contacts_controller.rb +103 -0
  171. data/core/app/controllers/gaku/course_enrollments_controller.rb +10 -0
  172. data/core/app/controllers/gaku/course_groups/course_group_enrollments_controller.rb +50 -0
  173. data/core/app/controllers/gaku/course_groups_controller.rb +81 -0
  174. data/core/app/controllers/gaku/courses/enrollments_controller.rb +55 -0
  175. data/core/app/controllers/gaku/courses/semester_courses_controller.rb +37 -0
  176. data/core/app/controllers/gaku/courses_controller.rb +73 -0
  177. data/core/app/controllers/gaku/devise/passwords_controller.rb +4 -0
  178. data/core/app/controllers/gaku/devise/registrations_controller.rb +60 -0
  179. data/core/app/controllers/gaku/devise/sessions_controller.rb +4 -0
  180. data/core/app/controllers/gaku/exam_portion_scores_controller.rb +18 -0
  181. data/core/app/controllers/gaku/exams/exam_portions/attachments_controller.rb +53 -0
  182. data/core/app/controllers/gaku/exams/exam_portions_controller.rb +55 -0
  183. data/core/app/controllers/gaku/exams_controller.rb +140 -0
  184. data/core/app/controllers/gaku/extracurricular_activities/students_controller.rb +55 -0
  185. data/core/app/controllers/gaku/extracurricular_activities_controller.rb +48 -0
  186. data/core/app/controllers/gaku/extracurricular_activity_enrollments_controller.rb +10 -0
  187. data/core/app/controllers/gaku/gaku_controller.rb +93 -0
  188. data/core/app/controllers/gaku/home_controller.rb +10 -0
  189. data/core/app/controllers/gaku/notes_controller.rb +72 -0
  190. data/core/app/controllers/gaku/schedules_controller.rb +11 -0
  191. data/core/app/controllers/gaku/states_controller.rb +17 -0
  192. data/core/app/controllers/gaku/students/class_group_enrollments_controller.rb +59 -0
  193. data/core/app/controllers/gaku/students/course_enrollments_controller.rb +43 -0
  194. data/core/app/controllers/gaku/students/guardians_controller.rb +85 -0
  195. data/core/app/controllers/gaku/students/importer_controller.rb +75 -0
  196. data/core/app/controllers/gaku/students/simple_grades_controller.rb +59 -0
  197. data/core/app/controllers/gaku/students/student_achievements_controller.rb +49 -0
  198. data/core/app/controllers/gaku/students/student_specialties_controller.rb +60 -0
  199. data/core/app/controllers/gaku/students_controller.rb +189 -0
  200. data/core/app/controllers/gaku/syllabuses/assignments_controller.rb +20 -0
  201. data/core/app/controllers/gaku/syllabuses/exam_syllabuses_controller.rb +38 -0
  202. data/core/app/controllers/gaku/syllabuses/exams_controller.rb +53 -0
  203. data/core/app/controllers/gaku/syllabuses/importer_controller.rb +19 -0
  204. data/core/app/controllers/gaku/syllabuses_controller.rb +45 -0
  205. data/core/app/controllers/gaku/teachers_controller.rb +113 -0
  206. data/core/app/decorators/gaku/guardian_decorator.rb +6 -0
  207. data/core/app/decorators/gaku/person_decorator.rb +63 -0
  208. data/core/app/decorators/gaku/student_decorator.rb +29 -0
  209. data/core/app/decorators/gaku/teacher_decorator.rb +6 -0
  210. data/core/app/helpers/gaku/autocomplete_helper.rb +31 -0
  211. data/core/app/helpers/gaku/count_helper.rb +13 -0
  212. data/core/app/helpers/gaku/flash_helper.rb +16 -0
  213. data/core/app/helpers/gaku/gaku_helper.rb +138 -0
  214. data/core/app/helpers/gaku/icon_helper.rb +26 -0
  215. data/core/app/helpers/gaku/person_helper.rb +55 -0
  216. data/core/app/helpers/gaku/presets_helper.rb +41 -0
  217. data/core/app/helpers/gaku/sort_helper.rb +17 -0
  218. data/core/app/helpers/gaku/student_chooser_helper.rb +12 -0
  219. data/core/app/helpers/gaku/students_helper.rb +42 -0
  220. data/core/app/helpers/gaku/translations_helper.rb +181 -0
  221. data/core/app/models/concerns/addresses.rb +17 -0
  222. data/core/app/models/concerns/contacts.rb +17 -0
  223. data/core/app/models/concerns/notes.rb +8 -0
  224. data/core/app/models/concerns/person.rb +18 -0
  225. data/core/app/models/concerns/picture.rb +9 -0
  226. data/core/app/models/concerns/trashable.rb +17 -0
  227. data/core/app/models/gaku/ability.rb +59 -0
  228. data/core/app/models/gaku/achievement.rb +17 -0
  229. data/core/app/models/gaku/address.rb +107 -0
  230. data/core/app/models/gaku/admin_ability.rb +21 -0
  231. data/core/app/models/gaku/assignment.rb +15 -0
  232. data/core/app/models/gaku/assignment_score.rb +13 -0
  233. data/core/app/models/gaku/attachment.rb +21 -0
  234. data/core/app/models/gaku/attendance.rb +16 -0
  235. data/core/app/models/gaku/attendance_type.rb +15 -0
  236. data/core/app/models/gaku/campus.rb +18 -0
  237. data/core/app/models/gaku/class_group.rb +27 -0
  238. data/core/app/models/gaku/class_group_course_enrollment.rb +17 -0
  239. data/core/app/models/gaku/class_group_enrollment.rb +30 -0
  240. data/core/app/models/gaku/commute_method_type.rb +15 -0
  241. data/core/app/models/gaku/contact.rb +107 -0
  242. data/core/app/models/gaku/contact_type.rb +13 -0
  243. data/core/app/models/gaku/country.rb +22 -0
  244. data/core/app/models/gaku/course.rb +57 -0
  245. data/core/app/models/gaku/course_enrollment.rb +17 -0
  246. data/core/app/models/gaku/course_group.rb +16 -0
  247. data/core/app/models/gaku/course_group_enrollment.rb +16 -0
  248. data/core/app/models/gaku/enrollment_status.rb +25 -0
  249. data/core/app/models/gaku/exam.rb +109 -0
  250. data/core/app/models/gaku/exam_portion.rb +86 -0
  251. data/core/app/models/gaku/exam_portion_score.rb +12 -0
  252. data/core/app/models/gaku/exam_schedule.rb +10 -0
  253. data/core/app/models/gaku/exam_score.rb +9 -0
  254. data/core/app/models/gaku/exam_syllabus.rb +17 -0
  255. data/core/app/models/gaku/external_school_record.rb +15 -0
  256. data/core/app/models/gaku/extracurricular_activity.rb +14 -0
  257. data/core/app/models/gaku/extracurricular_activity_enrollment.rb +15 -0
  258. data/core/app/models/gaku/faculty.rb +12 -0
  259. data/core/app/models/gaku/grading_method.rb +18 -0
  260. data/core/app/models/gaku/grading_method_set.rb +31 -0
  261. data/core/app/models/gaku/grading_method_set_item.rb +32 -0
  262. data/core/app/models/gaku/guardian.rb +22 -0
  263. data/core/app/models/gaku/import_file.rb +5 -0
  264. data/core/app/models/gaku/install.rb +8 -0
  265. data/core/app/models/gaku/lesson.rb +9 -0
  266. data/core/app/models/gaku/lesson_plan.rb +13 -0
  267. data/core/app/models/gaku/level.rb +16 -0
  268. data/core/app/models/gaku/note.rb +7 -0
  269. data/core/app/models/gaku/preset.rb +75 -0
  270. data/core/app/models/gaku/program.rb +27 -0
  271. data/core/app/models/gaku/program_level.rb +10 -0
  272. data/core/app/models/gaku/program_specialty.rb +10 -0
  273. data/core/app/models/gaku/program_syllabus.rb +11 -0
  274. data/core/app/models/gaku/role.rb +14 -0
  275. data/core/app/models/gaku/schedule.rb +5 -0
  276. data/core/app/models/gaku/scholarship_status.rb +15 -0
  277. data/core/app/models/gaku/school.rb +48 -0
  278. data/core/app/models/gaku/school_role.rb +13 -0
  279. data/core/app/models/gaku/school_year.rb +18 -0
  280. data/core/app/models/gaku/semester.rb +37 -0
  281. data/core/app/models/gaku/semester_class_group.rb +21 -0
  282. data/core/app/models/gaku/semester_course.rb +21 -0
  283. data/core/app/models/gaku/simple_grade.rb +14 -0
  284. data/core/app/models/gaku/specialty.rb +17 -0
  285. data/core/app/models/gaku/state.rb +35 -0
  286. data/core/app/models/gaku/student.rb +94 -0
  287. data/core/app/models/gaku/student_achievement.rb +10 -0
  288. data/core/app/models/gaku/student_guardian.rb +8 -0
  289. data/core/app/models/gaku/student_specialty.rb +19 -0
  290. data/core/app/models/gaku/syllabus.rb +22 -0
  291. data/core/app/models/gaku/teacher.rb +9 -0
  292. data/core/app/models/gaku/template.rb +20 -0
  293. data/core/app/models/gaku/user.rb +46 -0
  294. data/core/app/models/gaku/user_role.rb +8 -0
  295. data/core/app/models/gaku/versioning/address_version.rb +9 -0
  296. data/core/app/models/gaku/versioning/contact_version.rb +7 -0
  297. data/core/app/models/gaku/versioning/student_version.rb +54 -0
  298. data/core/app/views/gaku/addresses/_address.html.slim +5 -0
  299. data/core/app/views/gaku/addresses/_addresses.html.slim +27 -0
  300. data/core/app/views/gaku/addresses/_fields.html.slim +14 -0
  301. data/core/app/views/gaku/addresses/_form.html.slim +3 -0
  302. data/core/app/views/gaku/addresses/_form_fields.html.slim +26 -0
  303. data/core/app/views/gaku/addresses/_modal.html.slim +6 -0
  304. data/core/app/views/gaku/addresses/_primary_field.html.slim +13 -0
  305. data/core/app/views/gaku/addresses/create.js.erb +12 -0
  306. data/core/app/views/gaku/addresses/destroy.js.erb +8 -0
  307. data/core/app/views/gaku/addresses/edit.js.erb +4 -0
  308. data/core/app/views/gaku/addresses/make_primary.js.erb +7 -0
  309. data/core/app/views/gaku/addresses/new.js.erb +4 -0
  310. data/core/app/views/gaku/addresses/recovery.js.erb +1 -0
  311. data/core/app/views/gaku/addresses/soft_delete.js.erb +8 -0
  312. data/core/app/views/gaku/addresses/update.js.erb +5 -0
  313. data/core/app/views/gaku/admin/achievements/_achievement.html.slim +2 -0
  314. data/core/app/views/gaku/admin/achievements/_fields.html.slim +7 -0
  315. data/core/app/views/gaku/admin/achievements/_form.html.slim +3 -0
  316. data/core/app/views/gaku/admin/achievements/_form_fields.html.slim +4 -0
  317. data/core/app/views/gaku/admin/achievements/_modal.html.slim +6 -0
  318. data/core/app/views/gaku/admin/achievements/destroy.js.erb +2 -0
  319. data/core/app/views/gaku/admin/achievements/edit.js.erb +3 -0
  320. data/core/app/views/gaku/admin/achievements/index.html.slim +22 -0
  321. data/core/app/views/gaku/admin/achievements/new.js.erb +3 -0
  322. data/core/app/views/gaku/admin/attendance_types/_attendance_type.html.slim +2 -0
  323. data/core/app/views/gaku/admin/attendance_types/_fields.html.slim +9 -0
  324. data/core/app/views/gaku/admin/attendance_types/_form.html.slim +3 -0
  325. data/core/app/views/gaku/admin/attendance_types/_form_fields.html.slim +6 -0
  326. data/core/app/views/gaku/admin/attendance_types/_modal.html.slim +6 -0
  327. data/core/app/views/gaku/admin/attendance_types/create.js.erb +7 -0
  328. data/core/app/views/gaku/admin/attendance_types/destroy.js.erb +2 -0
  329. data/core/app/views/gaku/admin/attendance_types/edit.js.erb +4 -0
  330. data/core/app/views/gaku/admin/attendance_types/index.html.slim +24 -0
  331. data/core/app/views/gaku/admin/attendance_types/index.json.rb +1 -0
  332. data/core/app/views/gaku/admin/attendance_types/new.js.erb +4 -0
  333. data/core/app/views/gaku/admin/attendance_types/update.js.erb +4 -0
  334. data/core/app/views/gaku/admin/changes/student_address_changes/_change.html.slim +10 -0
  335. data/core/app/views/gaku/admin/changes/student_address_changes/_changes.html.slim +19 -0
  336. data/core/app/views/gaku/admin/changes/student_address_changes/_deletion.html.slim +9 -0
  337. data/core/app/views/gaku/admin/changes/student_address_changes/index.html.slim +11 -0
  338. data/core/app/views/gaku/admin/changes/student_changes/_change.html.slim +10 -0
  339. data/core/app/views/gaku/admin/changes/student_changes/_changes.html.slim +18 -0
  340. data/core/app/views/gaku/admin/changes/student_changes/_deletion.html.slim +9 -0
  341. data/core/app/views/gaku/admin/changes/student_changes/index.html.slim +13 -0
  342. data/core/app/views/gaku/admin/changes/student_contact_changes/_change.html.slim +10 -0
  343. data/core/app/views/gaku/admin/changes/student_contact_changes/_changes.html.slim +19 -0
  344. data/core/app/views/gaku/admin/changes/student_contact_changes/_deletion.html.slim +9 -0
  345. data/core/app/views/gaku/admin/changes/student_contact_changes/index.html.slim +11 -0
  346. data/core/app/views/gaku/admin/commute_method_types/_commute_method_type.html.slim +2 -0
  347. data/core/app/views/gaku/admin/commute_method_types/_fields.html.slim +4 -0
  348. data/core/app/views/gaku/admin/commute_method_types/_form.html.slim +3 -0
  349. data/core/app/views/gaku/admin/commute_method_types/_modal.html.slim +6 -0
  350. data/core/app/views/gaku/admin/commute_method_types/create.js.erb +7 -0
  351. data/core/app/views/gaku/admin/commute_method_types/destroy.js.erb +2 -0
  352. data/core/app/views/gaku/admin/commute_method_types/edit.js.erb +3 -0
  353. data/core/app/views/gaku/admin/commute_method_types/index.html.slim +18 -0
  354. data/core/app/views/gaku/admin/commute_method_types/new.js.erb +3 -0
  355. data/core/app/views/gaku/admin/commute_method_types/update.js.erb +3 -0
  356. data/core/app/views/gaku/admin/contact_types/_contact_type.html.slim +2 -0
  357. data/core/app/views/gaku/admin/contact_types/_fields.html.slim +4 -0
  358. data/core/app/views/gaku/admin/contact_types/_form.html.slim +3 -0
  359. data/core/app/views/gaku/admin/contact_types/_modal.html.slim +6 -0
  360. data/core/app/views/gaku/admin/contact_types/create.js.erb +7 -0
  361. data/core/app/views/gaku/admin/contact_types/destroy.js.erb +2 -0
  362. data/core/app/views/gaku/admin/contact_types/edit.js.erb +3 -0
  363. data/core/app/views/gaku/admin/contact_types/index.html.slim +18 -0
  364. data/core/app/views/gaku/admin/contact_types/new.js.erb +3 -0
  365. data/core/app/views/gaku/admin/contact_types/update.js.erb +3 -0
  366. data/core/app/views/gaku/admin/disposals/_address.html.slim +12 -0
  367. data/core/app/views/gaku/admin/disposals/_addresses.html.slim +17 -0
  368. data/core/app/views/gaku/admin/disposals/_contact.html.slim +9 -0
  369. data/core/app/views/gaku/admin/disposals/_contacts.html.slim +14 -0
  370. data/core/app/views/gaku/admin/disposals/_course_group.html.slim +3 -0
  371. data/core/app/views/gaku/admin/disposals/_course_groups.html.slim +12 -0
  372. data/core/app/views/gaku/admin/disposals/_exam.html.slim +10 -0
  373. data/core/app/views/gaku/admin/disposals/_guardian.html.slim +10 -0
  374. data/core/app/views/gaku/admin/disposals/_student.html.slim +10 -0
  375. data/core/app/views/gaku/admin/disposals/_tabs.html.slim +17 -0
  376. data/core/app/views/gaku/admin/disposals/_teacher.html.slim +10 -0
  377. data/core/app/views/gaku/admin/disposals/addresses.html.slim +2 -0
  378. data/core/app/views/gaku/admin/disposals/attachments.html.slim +30 -0
  379. data/core/app/views/gaku/admin/disposals/contacts.html.slim +2 -0
  380. data/core/app/views/gaku/admin/disposals/course_groups.html.slim +12 -0
  381. data/core/app/views/gaku/admin/disposals/exams.html.slim +16 -0
  382. data/core/app/views/gaku/admin/disposals/guardians.html.slim +16 -0
  383. data/core/app/views/gaku/admin/disposals/index.html.slim +1 -0
  384. data/core/app/views/gaku/admin/disposals/students.html.slim +16 -0
  385. data/core/app/views/gaku/admin/disposals/tabs/_addresses_tabs.html.slim +19 -0
  386. data/core/app/views/gaku/admin/disposals/tabs/_contacts_tabs.html.slim +19 -0
  387. data/core/app/views/gaku/admin/disposals/teachers.html.slim +16 -0
  388. data/core/app/views/gaku/admin/enrollment_statuses/_enrollment_status.html.slim +2 -0
  389. data/core/app/views/gaku/admin/enrollment_statuses/_fields.html.slim +6 -0
  390. data/core/app/views/gaku/admin/enrollment_statuses/_form.html.slim +3 -0
  391. data/core/app/views/gaku/admin/enrollment_statuses/_form_fields.html.slim +3 -0
  392. data/core/app/views/gaku/admin/enrollment_statuses/_modal.html.slim +6 -0
  393. data/core/app/views/gaku/admin/enrollment_statuses/create.js.erb +7 -0
  394. data/core/app/views/gaku/admin/enrollment_statuses/destroy.js.erb +2 -0
  395. data/core/app/views/gaku/admin/enrollment_statuses/edit.js.erb +3 -0
  396. data/core/app/views/gaku/admin/enrollment_statuses/index.html.slim +21 -0
  397. data/core/app/views/gaku/admin/enrollment_statuses/new.js.erb +3 -0
  398. data/core/app/views/gaku/admin/enrollment_statuses/update.js.erb +4 -0
  399. data/core/app/views/gaku/admin/grading_method_sets/_fields.html.slim +9 -0
  400. data/core/app/views/gaku/admin/grading_method_sets/_form.html.slim +3 -0
  401. data/core/app/views/gaku/admin/grading_method_sets/_form_fields.html.slim +4 -0
  402. data/core/app/views/gaku/admin/grading_method_sets/_grading_method_set.html.slim +4 -0
  403. data/core/app/views/gaku/admin/grading_method_sets/_make_primary_field.html.slim +4 -0
  404. data/core/app/views/gaku/admin/grading_method_sets/_modal.html.slim +6 -0
  405. data/core/app/views/gaku/admin/grading_method_sets/create.js.erb +7 -0
  406. data/core/app/views/gaku/admin/grading_method_sets/destroy.js.erb +7 -0
  407. data/core/app/views/gaku/admin/grading_method_sets/edit.js.erb +3 -0
  408. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_fields.html.slim +9 -0
  409. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_form.html.slim +3 -0
  410. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_form_fields.html.slim +1 -0
  411. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_item.html.slim +4 -0
  412. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_items.html.slim +23 -0
  413. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_modal.html.slim +6 -0
  414. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/create.js.erb +7 -0
  415. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/destroy.js.erb +2 -0
  416. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/edit.js.erb +3 -0
  417. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/new.js.erb +3 -0
  418. data/core/app/views/gaku/admin/grading_method_sets/grading_method_set_items/update.js.erb +3 -0
  419. data/core/app/views/gaku/admin/grading_method_sets/index.html.slim +23 -0
  420. data/core/app/views/gaku/admin/grading_method_sets/make_primary.js.erb +6 -0
  421. data/core/app/views/gaku/admin/grading_method_sets/new.js.erb +3 -0
  422. data/core/app/views/gaku/admin/grading_method_sets/show.html.slim +13 -0
  423. data/core/app/views/gaku/admin/grading_method_sets/update.js.erb +3 -0
  424. data/core/app/views/gaku/admin/grading_methods/_fields.html.slim +6 -0
  425. data/core/app/views/gaku/admin/grading_methods/_form.html.slim +3 -0
  426. data/core/app/views/gaku/admin/grading_methods/_form_fields.html.slim +3 -0
  427. data/core/app/views/gaku/admin/grading_methods/_grading_method.html.slim +2 -0
  428. data/core/app/views/gaku/admin/grading_methods/_modal.html.slim +6 -0
  429. data/core/app/views/gaku/admin/grading_methods/create.js.erb +7 -0
  430. data/core/app/views/gaku/admin/grading_methods/destroy.js.erb +2 -0
  431. data/core/app/views/gaku/admin/grading_methods/edit.js.erb +3 -0
  432. data/core/app/views/gaku/admin/grading_methods/index.html.slim +20 -0
  433. data/core/app/views/gaku/admin/grading_methods/new.js.erb +3 -0
  434. data/core/app/views/gaku/admin/grading_methods/update.js.erb +3 -0
  435. data/core/app/views/gaku/admin/presets/defaults.html.slim +50 -0
  436. data/core/app/views/gaku/admin/presets/grading.html.slim +12 -0
  437. data/core/app/views/gaku/admin/presets/locale.html.slim +10 -0
  438. data/core/app/views/gaku/admin/presets/names.html.slim +20 -0
  439. data/core/app/views/gaku/admin/presets/output_formats.html.slim +19 -0
  440. data/core/app/views/gaku/admin/presets/pagination.html.slim +19 -0
  441. data/core/app/views/gaku/admin/presets/students.html.slim +21 -0
  442. data/core/app/views/gaku/admin/roles/_fields.html.slim +5 -0
  443. data/core/app/views/gaku/admin/roles/_form.html.slim +3 -0
  444. data/core/app/views/gaku/admin/roles/_form_fields.html.slim +1 -0
  445. data/core/app/views/gaku/admin/roles/_modal.html.slim +6 -0
  446. data/core/app/views/gaku/admin/roles/_role.html.slim +2 -0
  447. data/core/app/views/gaku/admin/roles/create.js.erb +7 -0
  448. data/core/app/views/gaku/admin/roles/destroy.js.erb +2 -0
  449. data/core/app/views/gaku/admin/roles/edit.js.erb +3 -0
  450. data/core/app/views/gaku/admin/roles/index.html.slim +20 -0
  451. data/core/app/views/gaku/admin/roles/new.js.erb +3 -0
  452. data/core/app/views/gaku/admin/roles/update.js.erb +3 -0
  453. data/core/app/views/gaku/admin/school_years/_fields.html.slim +7 -0
  454. data/core/app/views/gaku/admin/school_years/_form.html.slim +3 -0
  455. data/core/app/views/gaku/admin/school_years/_form_fields.html.slim +5 -0
  456. data/core/app/views/gaku/admin/school_years/_modal.html.slim +7 -0
  457. data/core/app/views/gaku/admin/school_years/_school_year.html.slim +3 -0
  458. data/core/app/views/gaku/admin/school_years/_show_table.html.slim +10 -0
  459. data/core/app/views/gaku/admin/school_years/create.js.erb +10 -0
  460. data/core/app/views/gaku/admin/school_years/destroy.js.erb +2 -0
  461. data/core/app/views/gaku/admin/school_years/edit.js.erb +5 -0
  462. data/core/app/views/gaku/admin/school_years/index.html.slim +21 -0
  463. data/core/app/views/gaku/admin/school_years/new.js.erb +5 -0
  464. data/core/app/views/gaku/admin/school_years/semesters/_fields.html.slim +7 -0
  465. data/core/app/views/gaku/admin/school_years/semesters/_form.html.slim +3 -0
  466. data/core/app/views/gaku/admin/school_years/semesters/_form_fields.html.slim +5 -0
  467. data/core/app/views/gaku/admin/school_years/semesters/_modal.html.slim +7 -0
  468. data/core/app/views/gaku/admin/school_years/semesters/_semester.html.slim +3 -0
  469. data/core/app/views/gaku/admin/school_years/semesters/_semesters.html.slim +22 -0
  470. data/core/app/views/gaku/admin/school_years/semesters/create.js.erb +10 -0
  471. data/core/app/views/gaku/admin/school_years/semesters/destroy.js.erb +2 -0
  472. data/core/app/views/gaku/admin/school_years/semesters/edit.js.erb +6 -0
  473. data/core/app/views/gaku/admin/school_years/semesters/new.js.erb +5 -0
  474. data/core/app/views/gaku/admin/school_years/semesters/update.js.erb +8 -0
  475. data/core/app/views/gaku/admin/school_years/show.html.slim +15 -0
  476. data/core/app/views/gaku/admin/school_years/update.js.erb +8 -0
  477. data/core/app/views/gaku/admin/schools/_fields.html.slim +9 -0
  478. data/core/app/views/gaku/admin/schools/_form.html.slim +3 -0
  479. data/core/app/views/gaku/admin/schools/_form_fields.html.slim +25 -0
  480. data/core/app/views/gaku/admin/schools/_modal.html.slim +6 -0
  481. data/core/app/views/gaku/admin/schools/_school.html.slim +2 -0
  482. data/core/app/views/gaku/admin/schools/_school_unit.html.slim +6 -0
  483. data/core/app/views/gaku/admin/schools/_show_table.html.slim +35 -0
  484. data/core/app/views/gaku/admin/schools/campuses/_campus.html.slim +7 -0
  485. data/core/app/views/gaku/admin/schools/campuses/_campus_unit.html.slim +6 -0
  486. data/core/app/views/gaku/admin/schools/campuses/_campuses.html.slim +20 -0
  487. data/core/app/views/gaku/admin/schools/campuses/_form.html.slim +3 -0
  488. data/core/app/views/gaku/admin/schools/campuses/_modal.html.slim +6 -0
  489. data/core/app/views/gaku/admin/schools/campuses/_picture.html.slim +10 -0
  490. data/core/app/views/gaku/admin/schools/campuses/_show_table.html.slim +10 -0
  491. data/core/app/views/gaku/admin/schools/campuses/_upload_picture.html.slim +7 -0
  492. data/core/app/views/gaku/admin/schools/campuses/addresses/_address.html.slim +6 -0
  493. data/core/app/views/gaku/admin/schools/campuses/addresses/_address_row_fields.html.slim +4 -0
  494. data/core/app/views/gaku/admin/schools/campuses/addresses/_addresses.html.slim +24 -0
  495. data/core/app/views/gaku/admin/schools/campuses/addresses/_form.html.slim +3 -0
  496. data/core/app/views/gaku/admin/schools/campuses/addresses/_modal.html.slim +7 -0
  497. data/core/app/views/gaku/admin/schools/campuses/addresses/create.js.erb +6 -0
  498. data/core/app/views/gaku/admin/schools/campuses/addresses/destroy.js.erb +2 -0
  499. data/core/app/views/gaku/admin/schools/campuses/addresses/edit.js.erb +4 -0
  500. data/core/app/views/gaku/admin/schools/campuses/addresses/new.js.erb +4 -0
  501. data/core/app/views/gaku/admin/schools/campuses/addresses/update.js.erb +4 -0
  502. data/core/app/views/gaku/admin/schools/campuses/create.js.erb +7 -0
  503. data/core/app/views/gaku/admin/schools/campuses/destroy.js.erb +2 -0
  504. data/core/app/views/gaku/admin/schools/campuses/edit.js.erb +3 -0
  505. data/core/app/views/gaku/admin/schools/campuses/new.js.erb +3 -0
  506. data/core/app/views/gaku/admin/schools/campuses/show.html.slim +21 -0
  507. data/core/app/views/gaku/admin/schools/campuses/update.js.erb +3 -0
  508. data/core/app/views/gaku/admin/schools/create.js.erb +7 -0
  509. data/core/app/views/gaku/admin/schools/destroy.js.erb +2 -0
  510. data/core/app/views/gaku/admin/schools/edit.js.erb +3 -0
  511. data/core/app/views/gaku/admin/schools/edit_master.html.slim +17 -0
  512. data/core/app/views/gaku/admin/schools/index.html.slim +29 -0
  513. data/core/app/views/gaku/admin/schools/new.js.erb +3 -0
  514. data/core/app/views/gaku/admin/schools/programs/_fields.html.slim +9 -0
  515. data/core/app/views/gaku/admin/schools/programs/_form.html.slim +20 -0
  516. data/core/app/views/gaku/admin/schools/programs/_form_fields.html.slim +6 -0
  517. data/core/app/views/gaku/admin/schools/programs/_modal.html.slim +5 -0
  518. data/core/app/views/gaku/admin/schools/programs/_program.html.slim +2 -0
  519. data/core/app/views/gaku/admin/schools/programs/_programs.html.slim +25 -0
  520. data/core/app/views/gaku/admin/schools/programs/create.js.erb +7 -0
  521. data/core/app/views/gaku/admin/schools/programs/destroy.js.erb +2 -0
  522. data/core/app/views/gaku/admin/schools/programs/edit.js.erb +3 -0
  523. data/core/app/views/gaku/admin/schools/programs/new.js.erb +3 -0
  524. data/core/app/views/gaku/admin/schools/programs/program_levels/_form_fields.html.slim +8 -0
  525. data/core/app/views/gaku/admin/schools/programs/program_levels/_modal.html.slim +10 -0
  526. data/core/app/views/gaku/admin/schools/programs/program_specialties/_form_fields.html.slim +7 -0
  527. data/core/app/views/gaku/admin/schools/programs/program_specialties/_modal.html.slim +10 -0
  528. data/core/app/views/gaku/admin/schools/programs/program_syllabuses/_form_fields.html.slim +6 -0
  529. data/core/app/views/gaku/admin/schools/programs/program_syllabuses/_modal.html.slim +10 -0
  530. data/core/app/views/gaku/admin/schools/programs/show_program_levels.js.erb +3 -0
  531. data/core/app/views/gaku/admin/schools/programs/show_program_specialties.js.erb +3 -0
  532. data/core/app/views/gaku/admin/schools/programs/show_program_syllabuses.js.erb +3 -0
  533. data/core/app/views/gaku/admin/schools/programs/update.js.erb +3 -0
  534. data/core/app/views/gaku/admin/schools/show.html.slim +26 -0
  535. data/core/app/views/gaku/admin/schools/update.js.erb +7 -0
  536. data/core/app/views/gaku/admin/shared/_picture.html.slim +10 -0
  537. data/core/app/views/gaku/admin/shared/_upload_picture.html.slim +7 -0
  538. data/core/app/views/gaku/admin/specialties/_fields.html.slim +6 -0
  539. data/core/app/views/gaku/admin/specialties/_form.html.slim +3 -0
  540. data/core/app/views/gaku/admin/specialties/_form_fields.html.slim +3 -0
  541. data/core/app/views/gaku/admin/specialties/_modal.html.slim +6 -0
  542. data/core/app/views/gaku/admin/specialties/_specialty.html.slim +2 -0
  543. data/core/app/views/gaku/admin/specialties/create.js.erb +7 -0
  544. data/core/app/views/gaku/admin/specialties/destroy.js.erb +2 -0
  545. data/core/app/views/gaku/admin/specialties/edit.js.erb +3 -0
  546. data/core/app/views/gaku/admin/specialties/index.html.slim +20 -0
  547. data/core/app/views/gaku/admin/specialties/new.js.erb +3 -0
  548. data/core/app/views/gaku/admin/specialties/update.js.erb +3 -0
  549. data/core/app/views/gaku/admin/states/_country_select_form.html.slim +4 -0
  550. data/core/app/views/gaku/admin/states/_country_table.html.slim +11 -0
  551. data/core/app/views/gaku/admin/states/_fields.html.slim +8 -0
  552. data/core/app/views/gaku/admin/states/_form.html.slim +4 -0
  553. data/core/app/views/gaku/admin/states/_form_fields.html.slim +14 -0
  554. data/core/app/views/gaku/admin/states/_modal.html.slim +6 -0
  555. data/core/app/views/gaku/admin/states/_state.html.slim +2 -0
  556. data/core/app/views/gaku/admin/states/country_states.js.erb +1 -0
  557. data/core/app/views/gaku/admin/states/create.js.erb +7 -0
  558. data/core/app/views/gaku/admin/states/destroy.js.erb +2 -0
  559. data/core/app/views/gaku/admin/states/edit.js.erb +3 -0
  560. data/core/app/views/gaku/admin/states/index.html.slim +15 -0
  561. data/core/app/views/gaku/admin/states/new.js.erb +3 -0
  562. data/core/app/views/gaku/admin/states/update.js.erb +3 -0
  563. data/core/app/views/gaku/admin/system_tools/index.html.slim +1 -0
  564. data/core/app/views/gaku/admin/templates/_fields.html.slim +8 -0
  565. data/core/app/views/gaku/admin/templates/_form.html.slim +3 -0
  566. data/core/app/views/gaku/admin/templates/_form_fields.html.slim +4 -0
  567. data/core/app/views/gaku/admin/templates/_modal.html.slim +6 -0
  568. data/core/app/views/gaku/admin/templates/_template.html.slim +2 -0
  569. data/core/app/views/gaku/admin/templates/destroy.js.erb +2 -0
  570. data/core/app/views/gaku/admin/templates/edit.js.erb +4 -0
  571. data/core/app/views/gaku/admin/templates/index.html.slim +20 -0
  572. data/core/app/views/gaku/admin/templates/new.js.erb +3 -0
  573. data/core/app/views/gaku/admin/users/_fields.html.slim +5 -0
  574. data/core/app/views/gaku/admin/users/_form.html.slim +3 -0
  575. data/core/app/views/gaku/admin/users/_form_fields.html.slim +14 -0
  576. data/core/app/views/gaku/admin/users/_modal.html.slim +6 -0
  577. data/core/app/views/gaku/admin/users/_user.html.slim +2 -0
  578. data/core/app/views/gaku/admin/users/create.js.erb +7 -0
  579. data/core/app/views/gaku/admin/users/destroy.js.erb +2 -0
  580. data/core/app/views/gaku/admin/users/edit.js.erb +3 -0
  581. data/core/app/views/gaku/admin/users/index.html.slim +21 -0
  582. data/core/app/views/gaku/admin/users/new.js.erb +3 -0
  583. data/core/app/views/gaku/admin/users/update.js.erb +4 -0
  584. data/core/app/views/gaku/attachments/destroy.js.erb +1 -0
  585. data/core/app/views/gaku/attachments/edit.js.erb +3 -0
  586. data/core/app/views/gaku/attachments/new.js.erb +1 -0
  587. data/core/app/views/gaku/attachments/recover_attachment.js.erb +1 -0
  588. data/core/app/views/gaku/attachments/soft_delete.js.erb +3 -0
  589. data/core/app/views/gaku/class_groups/_class_group.html.slim +7 -0
  590. data/core/app/views/gaku/class_groups/_class_group_modal.html.slim +7 -0
  591. data/core/app/views/gaku/class_groups/_class_group_unit.html.slim +5 -0
  592. data/core/app/views/gaku/class_groups/_class_groups.html.slim +25 -0
  593. data/core/app/views/gaku/class_groups/_form.html.slim +8 -0
  594. data/core/app/views/gaku/class_groups/_form_fields.html.slim +6 -0
  595. data/core/app/views/gaku/class_groups/_tabs.html.slim +32 -0
  596. data/core/app/views/gaku/class_groups/courses/_course.html.slim +4 -0
  597. data/core/app/views/gaku/class_groups/courses/_courses.html.slim +19 -0
  598. data/core/app/views/gaku/class_groups/courses/_form.html.slim +5 -0
  599. data/core/app/views/gaku/class_groups/courses/create.js.erb +8 -0
  600. data/core/app/views/gaku/class_groups/courses/destroy.js.erb +3 -0
  601. data/core/app/views/gaku/class_groups/courses/new.js.erb +3 -0
  602. data/core/app/views/gaku/class_groups/create.js.erb +6 -0
  603. data/core/app/views/gaku/class_groups/destroy.js.erb +6 -0
  604. data/core/app/views/gaku/class_groups/edit.js.erb +3 -0
  605. data/core/app/views/gaku/class_groups/index.html.slim +14 -0
  606. data/core/app/views/gaku/class_groups/new.js.erb +3 -0
  607. data/core/app/views/gaku/class_groups/semester_class_groups/_fields.html.slim +4 -0
  608. data/core/app/views/gaku/class_groups/semester_class_groups/_form.html.slim +4 -0
  609. data/core/app/views/gaku/class_groups/semester_class_groups/_form_fields.html.slim +3 -0
  610. data/core/app/views/gaku/class_groups/semester_class_groups/_modal.html.slim +5 -0
  611. data/core/app/views/gaku/class_groups/semester_class_groups/_semester.html.slim +3 -0
  612. data/core/app/views/gaku/class_groups/semester_class_groups/_semester_modal.html.slim +6 -0
  613. data/core/app/views/gaku/class_groups/semester_class_groups/_semesters.html.slim +19 -0
  614. data/core/app/views/gaku/class_groups/semester_class_groups/create.js.erb +6 -0
  615. data/core/app/views/gaku/class_groups/semester_class_groups/destroy.js.erb +3 -0
  616. data/core/app/views/gaku/class_groups/semester_class_groups/edit.js.erb +3 -0
  617. data/core/app/views/gaku/class_groups/semester_class_groups/new.js.erb +3 -0
  618. data/core/app/views/gaku/class_groups/semester_class_groups/update.js.erb +3 -0
  619. data/core/app/views/gaku/class_groups/show.html.slim +25 -0
  620. data/core/app/views/gaku/class_groups/student_chooser.js.erb +2 -0
  621. data/core/app/views/gaku/class_groups/students/_student.html.slim +5 -0
  622. data/core/app/views/gaku/class_groups/students/_students.html.slim +19 -0
  623. data/core/app/views/gaku/class_groups/students/destroy.js.erb +3 -0
  624. data/core/app/views/gaku/class_groups/students/enroll_students.js.erb +11 -0
  625. data/core/app/views/gaku/class_groups/students/new.js.erb +3 -0
  626. data/core/app/views/gaku/class_groups/update.js.erb +8 -0
  627. data/core/app/views/gaku/contacts/_contact.html.slim +5 -0
  628. data/core/app/views/gaku/contacts/_contacts.html.slim +24 -0
  629. data/core/app/views/gaku/contacts/_fields.html.slim +13 -0
  630. data/core/app/views/gaku/contacts/_form.html.slim +4 -0
  631. data/core/app/views/gaku/contacts/_form_fields.html.slim +14 -0
  632. data/core/app/views/gaku/contacts/_modal.html.slim +6 -0
  633. data/core/app/views/gaku/contacts/_primary_field.html.slim +13 -0
  634. data/core/app/views/gaku/contacts/create.js.erb +21 -0
  635. data/core/app/views/gaku/contacts/destroy.js.erb +9 -0
  636. data/core/app/views/gaku/contacts/edit.js.erb +4 -0
  637. data/core/app/views/gaku/contacts/make_primary.js.erb +6 -0
  638. data/core/app/views/gaku/contacts/new.js.erb +3 -0
  639. data/core/app/views/gaku/contacts/recovery.js.erb +1 -0
  640. data/core/app/views/gaku/contacts/soft_delete.js.erb +8 -0
  641. data/core/app/views/gaku/contacts/update.js.erb +14 -0
  642. data/core/app/views/gaku/course_groups/_course_group.html.slim +3 -0
  643. data/core/app/views/gaku/course_groups/_course_group_unit.html.slim +4 -0
  644. data/core/app/views/gaku/course_groups/_course_groups.html.slim +7 -0
  645. data/core/app/views/gaku/course_groups/_delete_confirm.html.slim +11 -0
  646. data/core/app/views/gaku/course_groups/_fields.html.slim +1 -0
  647. data/core/app/views/gaku/course_groups/_form.html.slim +3 -0
  648. data/core/app/views/gaku/course_groups/_form_fields.html.slim +1 -0
  649. data/core/app/views/gaku/course_groups/_modal.html.slim +6 -0
  650. data/core/app/views/gaku/course_groups/course_group_enrollments/_course.html.slim +4 -0
  651. data/core/app/views/gaku/course_groups/course_group_enrollments/_courses.html.slim +23 -0
  652. data/core/app/views/gaku/course_groups/course_group_enrollments/_form.html.slim +4 -0
  653. data/core/app/views/gaku/course_groups/course_group_enrollments/create.js.erb +7 -0
  654. data/core/app/views/gaku/course_groups/course_group_enrollments/destroy.js.erb +2 -0
  655. data/core/app/views/gaku/course_groups/course_group_enrollments/new.js.erb +3 -0
  656. data/core/app/views/gaku/course_groups/create.js.erb +10 -0
  657. data/core/app/views/gaku/course_groups/destroy.js.erb +2 -0
  658. data/core/app/views/gaku/course_groups/edit.js.erb +3 -0
  659. data/core/app/views/gaku/course_groups/index.html.slim +15 -0
  660. data/core/app/views/gaku/course_groups/index.js.erb +1 -0
  661. data/core/app/views/gaku/course_groups/new.js.erb +3 -0
  662. data/core/app/views/gaku/course_groups/recovery.js.erb +2 -0
  663. data/core/app/views/gaku/course_groups/show.html.slim +30 -0
  664. data/core/app/views/gaku/course_groups/update.js.erb +7 -0
  665. data/core/app/views/gaku/courses/_course.html.slim +2 -0
  666. data/core/app/views/gaku/courses/_course_unit.html.slim +5 -0
  667. data/core/app/views/gaku/courses/_courses.html.slim +27 -0
  668. data/core/app/views/gaku/courses/_form.html.slim +7 -0
  669. data/core/app/views/gaku/courses/_form_fields.html.slim +4 -0
  670. data/core/app/views/gaku/courses/_modal.html.slim +6 -0
  671. data/core/app/views/gaku/courses/_tabs.html.slim +25 -0
  672. data/core/app/views/gaku/courses/assignments/_assignments.html.slim +2 -0
  673. data/core/app/views/gaku/courses/create.js.erb +7 -0
  674. data/core/app/views/gaku/courses/destroy.js.erb +7 -0
  675. data/core/app/views/gaku/courses/edit.js.erb +4 -0
  676. data/core/app/views/gaku/courses/enrollments/_enrolled.html.slim +7 -0
  677. data/core/app/views/gaku/courses/enrollments/_enrollments.html.slim +29 -0
  678. data/core/app/views/gaku/courses/enrollments/_errors_modal.html.slim +11 -0
  679. data/core/app/views/gaku/courses/enrollments/class_groups/_form.html.slim +3 -0
  680. data/core/app/views/gaku/courses/enrollments/class_groups/enroll.js.erb +16 -0
  681. data/core/app/views/gaku/courses/enrollments/class_groups/new.js.erb +4 -0
  682. data/core/app/views/gaku/courses/enrollments/error.js.erb +2 -0
  683. data/core/app/views/gaku/courses/enrollments/students/enroll_students.js.erb +11 -0
  684. data/core/app/views/gaku/courses/exams/_exam.html.slim +5 -0
  685. data/core/app/views/gaku/courses/exams/_exams.html.slim +14 -0
  686. data/core/app/views/gaku/courses/index.html.slim +14 -0
  687. data/core/app/views/gaku/courses/new.js.erb +3 -0
  688. data/core/app/views/gaku/courses/semester_courses/_fields.html.slim +4 -0
  689. data/core/app/views/gaku/courses/semester_courses/_form.html.slim +4 -0
  690. data/core/app/views/gaku/courses/semester_courses/_form_fields.html.slim +3 -0
  691. data/core/app/views/gaku/courses/semester_courses/_modal.html.slim +6 -0
  692. data/core/app/views/gaku/courses/semester_courses/_semester_course.html.slim +3 -0
  693. data/core/app/views/gaku/courses/semester_courses/_semester_courses.html.slim +18 -0
  694. data/core/app/views/gaku/courses/semester_courses/create.js.erb +6 -0
  695. data/core/app/views/gaku/courses/semester_courses/destroy.js.erb +3 -0
  696. data/core/app/views/gaku/courses/semester_courses/edit.js.erb +3 -0
  697. data/core/app/views/gaku/courses/semester_courses/new.js.erb +3 -0
  698. data/core/app/views/gaku/courses/semester_courses/update.js.erb +3 -0
  699. data/core/app/views/gaku/courses/show.html.slim +32 -0
  700. data/core/app/views/gaku/courses/student_chooser.js.erb +2 -0
  701. data/core/app/views/gaku/courses/update.js.erb +16 -0
  702. data/core/app/views/gaku/devise/confirmations/new.html.slim +9 -0
  703. data/core/app/views/gaku/devise/mailer/confirmation_instructions.html.slim +4 -0
  704. data/core/app/views/gaku/devise/mailer/reset_password_instructions.html.slim +6 -0
  705. data/core/app/views/gaku/devise/mailer/unlock_instructions.html.slim +5 -0
  706. data/core/app/views/gaku/devise/passwords/edit.html.slim +14 -0
  707. data/core/app/views/gaku/devise/passwords/new.html.slim +8 -0
  708. data/core/app/views/gaku/devise/registrations/edit.html.slim +31 -0
  709. data/core/app/views/gaku/devise/registrations/new.html.slim +29 -0
  710. data/core/app/views/gaku/devise/registrations/set_up_admin_account.html.slim +27 -0
  711. data/core/app/views/gaku/devise/sessions/new.html.slim +27 -0
  712. data/core/app/views/gaku/devise/shared/_links.html.erb +25 -0
  713. data/core/app/views/gaku/devise/unlocks/new.html.slim +9 -0
  714. data/core/app/views/gaku/exam_divisions/_form.html.erb +29 -0
  715. data/core/app/views/gaku/exam_divisions/edit.html.erb +6 -0
  716. data/core/app/views/gaku/exam_divisions/index.html.erb +27 -0
  717. data/core/app/views/gaku/exam_divisions/new.html.erb +5 -0
  718. data/core/app/views/gaku/exam_divisions/show.html.erb +20 -0
  719. data/core/app/views/gaku/exams/_exam.html.slim +2 -0
  720. data/core/app/views/gaku/exams/_fields.html.slim +8 -0
  721. data/core/app/views/gaku/exams/_form.html.slim +19 -0
  722. data/core/app/views/gaku/exams/_form_fields.html.slim +13 -0
  723. data/core/app/views/gaku/exams/_modal.html.slim +6 -0
  724. data/core/app/views/gaku/exams/_show_table.html.slim +15 -0
  725. data/core/app/views/gaku/exams/_weight_check_widget.html.slim +20 -0
  726. data/core/app/views/gaku/exams/create.js.erb +6 -0
  727. data/core/app/views/gaku/exams/destroy.js.erb +2 -0
  728. data/core/app/views/gaku/exams/edit.js +3 -0
  729. data/core/app/views/gaku/exams/exam_portions/_custom_exam_portion_error.html.slim +4 -0
  730. data/core/app/views/gaku/exams/exam_portions/_exam_portion.html.slim +3 -0
  731. data/core/app/views/gaku/exams/exam_portions/_exam_portion_unit.html.slim +3 -0
  732. data/core/app/views/gaku/exams/exam_portions/_exam_portion_weight_td.html.slim +3 -0
  733. data/core/app/views/gaku/exams/exam_portions/_exam_portions.html.slim +14 -0
  734. data/core/app/views/gaku/exams/exam_portions/_form.html.slim +3 -0
  735. data/core/app/views/gaku/exams/exam_portions/_modal.html.slim +8 -0
  736. data/core/app/views/gaku/exams/exam_portions/_show_table.html.slim +12 -0
  737. data/core/app/views/gaku/exams/exam_portions/attachments/_attachment.html.slim +2 -0
  738. data/core/app/views/gaku/exams/exam_portions/attachments/_attachments.html.slim +23 -0
  739. data/core/app/views/gaku/exams/exam_portions/attachments/_form.html.slim +6 -0
  740. data/core/app/views/gaku/exams/exam_portions/attachments/_form_fields.html.slim +3 -0
  741. data/core/app/views/gaku/exams/exam_portions/attachments/_modal.html.slim +6 -0
  742. data/core/app/views/gaku/exams/exam_portions/attachments/create.js.erb +0 -0
  743. data/core/app/views/gaku/exams/exam_portions/attachments/create.js.erb~HEAD +0 -0
  744. data/core/app/views/gaku/exams/exam_portions/attachments/create.js.erb~HEAD_0 +0 -0
  745. data/core/app/views/gaku/exams/exam_portions/attachments/create.js.erb~kagetsuki_master +0 -0
  746. data/core/app/views/gaku/exams/exam_portions/attachments/create.js.erb~kagetsuki_master_0 +0 -0
  747. data/core/app/views/gaku/exams/exam_portions/attachments/new.js.erb +3 -0
  748. data/core/app/views/gaku/exams/exam_portions/create.js.erb +48 -0
  749. data/core/app/views/gaku/exams/exam_portions/destroy.js.erb +8 -0
  750. data/core/app/views/gaku/exams/exam_portions/edit.js.erb +3 -0
  751. data/core/app/views/gaku/exams/exam_portions/new.js.erb +3 -0
  752. data/core/app/views/gaku/exams/exam_portions/show.html.slim +8 -0
  753. data/core/app/views/gaku/exams/exam_portions/update.js.erb +27 -0
  754. data/core/app/views/gaku/exams/export.xls.rb +67 -0
  755. data/core/app/views/gaku/exams/grading.html.slim +34 -0
  756. data/core/app/views/gaku/exams/index.html.slim +21 -0
  757. data/core/app/views/gaku/exams/new.js.erb +3 -0
  758. data/core/app/views/gaku/exams/recovery.js.erb +1 -0
  759. data/core/app/views/gaku/exams/show.html.slim +33 -0
  760. data/core/app/views/gaku/exams/update.js.erb +5 -0
  761. data/core/app/views/gaku/extracurricular_activities/_extracurricular_activities.html.slim +9 -0
  762. data/core/app/views/gaku/extracurricular_activities/_extracurricular_activity.html.slim +6 -0
  763. data/core/app/views/gaku/extracurricular_activities/_fields.html.slim +1 -0
  764. data/core/app/views/gaku/extracurricular_activities/_form.html.slim +3 -0
  765. data/core/app/views/gaku/extracurricular_activities/_form_fields.html.slim +3 -0
  766. data/core/app/views/gaku/extracurricular_activities/_modal.html.slim +7 -0
  767. data/core/app/views/gaku/extracurricular_activities/_tabs.html.slim +14 -0
  768. data/core/app/views/gaku/extracurricular_activities/create.js.erb +6 -0
  769. data/core/app/views/gaku/extracurricular_activities/destroy.js.erb +2 -0
  770. data/core/app/views/gaku/extracurricular_activities/edit.js.erb +3 -0
  771. data/core/app/views/gaku/extracurricular_activities/index.html.slim +14 -0
  772. data/core/app/views/gaku/extracurricular_activities/index.js.erb +2 -0
  773. data/core/app/views/gaku/extracurricular_activities/new.js.erb +3 -0
  774. data/core/app/views/gaku/extracurricular_activities/show.html.slim +20 -0
  775. data/core/app/views/gaku/extracurricular_activities/student_chooser.js.erb +2 -0
  776. data/core/app/views/gaku/extracurricular_activities/students/_student.html.slim +5 -0
  777. data/core/app/views/gaku/extracurricular_activities/students/_students.html.slim +19 -0
  778. data/core/app/views/gaku/extracurricular_activities/students/destroy.js.erb +3 -0
  779. data/core/app/views/gaku/extracurricular_activities/students/enroll_students.js.erb +11 -0
  780. data/core/app/views/gaku/extracurricular_activities/update.js.erb +6 -0
  781. data/core/app/views/gaku/home/_user_info.html.slim +7 -0
  782. data/core/app/views/gaku/home/_user_menu.html.slim +2 -0
  783. data/core/app/views/gaku/home/index.html.slim +13 -0
  784. data/core/app/views/gaku/layouts/admin/index.html.slim +15 -0
  785. data/core/app/views/gaku/layouts/edit.html.slim +9 -0
  786. data/core/app/views/gaku/layouts/gaku.html.slim +23 -0
  787. data/core/app/views/gaku/layouts/index.html.slim +14 -0
  788. data/core/app/views/gaku/layouts/show.html.slim +10 -0
  789. data/core/app/views/gaku/notes/_buttons.html.slim +5 -0
  790. data/core/app/views/gaku/notes/_fields.html.slim +2 -0
  791. data/core/app/views/gaku/notes/_form.html.slim +6 -0
  792. data/core/app/views/gaku/notes/_form_fields.html.slim +6 -0
  793. data/core/app/views/gaku/notes/_modal.html.slim +6 -0
  794. data/core/app/views/gaku/notes/_note.html.slim +4 -0
  795. data/core/app/views/gaku/notes/_notes.html.slim +19 -0
  796. data/core/app/views/gaku/notes/_show_modal.html.slim +4 -0
  797. data/core/app/views/gaku/notes/create.js.erb +11 -0
  798. data/core/app/views/gaku/notes/destroy.js.erb +4 -0
  799. data/core/app/views/gaku/notes/edit.js.erb +3 -0
  800. data/core/app/views/gaku/notes/new.js.erb +3 -0
  801. data/core/app/views/gaku/notes/show.js.erb +3 -0
  802. data/core/app/views/gaku/notes/update.js.erb +4 -0
  803. data/core/app/views/gaku/shared/_delete_modal.html.slim +7 -0
  804. data/core/app/views/gaku/shared/_delete_modal_remote.html.slim +7 -0
  805. data/core/app/views/gaku/shared/_errors.html.slim +6 -0
  806. data/core/app/views/gaku/shared/_external_school_record.html.slim +36 -0
  807. data/core/app/views/gaku/shared/_flash.html.slim +4 -0
  808. data/core/app/views/gaku/shared/_language_bar.html.slim +8 -0
  809. data/core/app/views/gaku/shared/_login_widget.html.slim +27 -0
  810. data/core/app/views/gaku/shared/_manage_buttons.html.slim +4 -0
  811. data/core/app/views/gaku/shared/_menubar.html.slim +8 -0
  812. data/core/app/views/gaku/shared/_modal_config.html.slim +37 -0
  813. data/core/app/views/gaku/shared/_multi_errors.html.slim +6 -0
  814. data/core/app/views/gaku/shared/_picture.html.slim +12 -0
  815. data/core/app/views/gaku/shared/_upload_picture.html.slim +7 -0
  816. data/core/app/views/gaku/shared/error.js.erb +2 -0
  817. data/core/app/views/gaku/shared/fields/_address_fields.html.slim +7 -0
  818. data/core/app/views/gaku/shared/fields/_attachment_fields.html.slim +10 -0
  819. data/core/app/views/gaku/shared/fields/_class_group_fields.html.slim +3 -0
  820. data/core/app/views/gaku/shared/fields/_course_fields.html.slim +4 -0
  821. data/core/app/views/gaku/shared/fields/_course_show_fields.html.slim +3 -0
  822. data/core/app/views/gaku/shared/fields/_exam_portion_fields.html.slim +8 -0
  823. data/core/app/views/gaku/shared/fields/_person_edit_table.html.slim +7 -0
  824. data/core/app/views/gaku/shared/fields/_person_fields.html.slim +4 -0
  825. data/core/app/views/gaku/shared/fields/_person_show_table.html.slim +3 -0
  826. data/core/app/views/gaku/shared/fields/_semester_fields.html.slim +1 -0
  827. data/core/app/views/gaku/shared/fields/_student_fields.html.slim +22 -0
  828. data/core/app/views/gaku/shared/fields/_syllabus_fields.html.slim +5 -0
  829. data/core/app/views/gaku/shared/form_fields/_exam_portion_form_fields.html.slim +15 -0
  830. data/core/app/views/gaku/shared/form_fields/_person_form_fields.html.slim +16 -0
  831. data/core/app/views/gaku/shared/menu/_admin.html.erb +104 -0
  832. data/core/app/views/gaku/shared/menu/_global.html.erb +26 -0
  833. data/core/app/views/gaku/shared/multi_error.js.erb +2 -0
  834. data/core/app/views/gaku/shared/notice.js.erb +2 -0
  835. data/core/app/views/gaku/shared/student/_academic.html.slim +18 -0
  836. data/core/app/views/gaku/shared/student/_edit.html.slim +20 -0
  837. data/core/app/views/gaku/shared/student/_personal.html.slim +6 -0
  838. data/core/app/views/gaku/shared/student/_show.html.slim +14 -0
  839. data/core/app/views/gaku/shared/student/_show_table.html.slim +51 -0
  840. data/core/app/views/gaku/shared/student/_tabs.html.slim +36 -0
  841. data/core/app/views/gaku/shared/student_chooser/_chooser.html.slim +36 -0
  842. data/core/app/views/gaku/shared/student_chooser/_class_group.html.slim +5 -0
  843. data/core/app/views/gaku/shared/student_chooser/_course.html.slim +5 -0
  844. data/core/app/views/gaku/shared/student_chooser/_extracurricular_activity.html.slim +5 -0
  845. data/core/app/views/gaku/shared/student_chooser/_modal.html.slim +4 -0
  846. data/core/app/views/gaku/shared/student_chooser/_student.html.slim +18 -0
  847. data/core/app/views/gaku/states/_no_states_select.html.slim +1 -0
  848. data/core/app/views/gaku/states/_states_select.html.slim +1 -0
  849. data/core/app/views/gaku/states/index.js.erb +5 -0
  850. data/core/app/views/gaku/students/_delete_modal.html.slim +5 -0
  851. data/core/app/views/gaku/students/_form.html.slim +3 -0
  852. data/core/app/views/gaku/students/_form_fields.html.slim +19 -0
  853. data/core/app/views/gaku/students/_modal.html.slim +6 -0
  854. data/core/app/views/gaku/students/_student.html.slim +6 -0
  855. data/core/app/views/gaku/students/_student_unit.html.slim +5 -0
  856. data/core/app/views/gaku/students/_students.html.slim +17 -0
  857. data/core/app/views/gaku/students/class_group_enrollments/_new_modal.html.slim +28 -0
  858. data/core/app/views/gaku/students/class_group_enrollments/create.js.erb +11 -0
  859. data/core/app/views/gaku/students/class_group_enrollments/new.js.erb +2 -0
  860. data/core/app/views/gaku/students/commute_methods/_commute_method.html.slim +6 -0
  861. data/core/app/views/gaku/students/commute_methods/_modal.html.slim +6 -0
  862. data/core/app/views/gaku/students/commute_methods/create.js.erb +3 -0
  863. data/core/app/views/gaku/students/commute_methods/edit.js.erb +5 -0
  864. data/core/app/views/gaku/students/commute_methods/new.js.erb +4 -0
  865. data/core/app/views/gaku/students/commute_methods/update.js.erb +3 -0
  866. data/core/app/views/gaku/students/course_enrollments/_course_enrollment.html.slim +5 -0
  867. data/core/app/views/gaku/students/course_enrollments/_course_enrollment_unit.html.slim +3 -0
  868. data/core/app/views/gaku/students/course_enrollments/_course_enrollments.html.slim +21 -0
  869. data/core/app/views/gaku/students/course_enrollments/_errors_modal.html.slim +11 -0
  870. data/core/app/views/gaku/students/course_enrollments/_form.html.slim +5 -0
  871. data/core/app/views/gaku/students/course_enrollments/create.js.erb +10 -0
  872. data/core/app/views/gaku/students/course_enrollments/destroy.js.erb +3 -0
  873. data/core/app/views/gaku/students/course_enrollments/error.js.erb +2 -0
  874. data/core/app/views/gaku/students/course_enrollments/new.js.erb +3 -0
  875. data/core/app/views/gaku/students/create.js.erb +8 -0
  876. data/core/app/views/gaku/students/destroy.js.erb +2 -0
  877. data/core/app/views/gaku/students/edit.html.slim +9 -0
  878. data/core/app/views/gaku/students/edit.js.erb +3 -0
  879. data/core/app/views/gaku/students/guardians/_edit_table.html.slim +9 -0
  880. data/core/app/views/gaku/students/guardians/_form.html.slim +3 -0
  881. data/core/app/views/gaku/students/guardians/_form_fields.html.slim +4 -0
  882. data/core/app/views/gaku/students/guardians/_guardian.html.slim +2 -0
  883. data/core/app/views/gaku/students/guardians/_guardian_unit.html.slim +12 -0
  884. data/core/app/views/gaku/students/guardians/_guardians.html.slim +26 -0
  885. data/core/app/views/gaku/students/guardians/_modal.html.slim +7 -0
  886. data/core/app/views/gaku/students/guardians/_picture.html.slim +12 -0
  887. data/core/app/views/gaku/students/guardians/_show_table.html.slim +13 -0
  888. data/core/app/views/gaku/students/guardians/_tabs.html.slim +15 -0
  889. data/core/app/views/gaku/students/guardians/_upload_picture.html.slim +7 -0
  890. data/core/app/views/gaku/students/guardians/create.js.erb +7 -0
  891. data/core/app/views/gaku/students/guardians/destroy.js.erb +4 -0
  892. data/core/app/views/gaku/students/guardians/edit.html.slim +7 -0
  893. data/core/app/views/gaku/students/guardians/edit.js.erb +3 -0
  894. data/core/app/views/gaku/students/guardians/new.js.erb +3 -0
  895. data/core/app/views/gaku/students/guardians/recovery.js.erb +1 -0
  896. data/core/app/views/gaku/students/guardians/show.html.slim +14 -0
  897. data/core/app/views/gaku/students/guardians/update.js.erb +4 -0
  898. data/core/app/views/gaku/students/importer/index.html.slim +26 -0
  899. data/core/app/views/gaku/students/importer/roster_import_preview.html.slim +4 -0
  900. data/core/app/views/gaku/students/index.html.slim +16 -0
  901. data/core/app/views/gaku/students/index.js.erb +13 -0
  902. data/core/app/views/gaku/students/index.pdf.thinreports +17 -0
  903. data/core/app/views/gaku/students/new.js.erb +3 -0
  904. data/core/app/views/gaku/students/recovery.js.erb +1 -0
  905. data/core/app/views/gaku/students/search/_address.html.slim +36 -0
  906. data/core/app/views/gaku/students/search/_extended.slim +134 -0
  907. data/core/app/views/gaku/students/search/_form.html.slim +25 -0
  908. data/core/app/views/gaku/students/search/_student.html.slim +24 -0
  909. data/core/app/views/gaku/students/show.html.slim +1 -0
  910. data/core/app/views/gaku/students/show.pdf.thinreports +8 -0
  911. data/core/app/views/gaku/students/simple_grades/_edit.html.slim +8 -0
  912. data/core/app/views/gaku/students/simple_grades/_fields.html.slim +6 -0
  913. data/core/app/views/gaku/students/simple_grades/_form.html.slim +6 -0
  914. data/core/app/views/gaku/students/simple_grades/_form_fields.html.slim +3 -0
  915. data/core/app/views/gaku/students/simple_grades/_index.html.slim +19 -0
  916. data/core/app/views/gaku/students/simple_grades/_index_modal.html.slim +4 -0
  917. data/core/app/views/gaku/students/simple_grades/_simple_grade.html.slim +3 -0
  918. data/core/app/views/gaku/students/simple_grades/_simple_grades.html.slim +2 -0
  919. data/core/app/views/gaku/students/simple_grades/create.js.erb +10 -0
  920. data/core/app/views/gaku/students/simple_grades/destroy.js.erb +4 -0
  921. data/core/app/views/gaku/students/simple_grades/edit.js.erb +2 -0
  922. data/core/app/views/gaku/students/simple_grades/index.js.erb +5 -0
  923. data/core/app/views/gaku/students/simple_grades/new.js.erb +3 -0
  924. data/core/app/views/gaku/students/simple_grades/update.js.erb +4 -0
  925. data/core/app/views/gaku/students/student_achievements/_achievements_tab.html.slim +12 -0
  926. data/core/app/views/gaku/students/student_achievements/_edit.html.slim +8 -0
  927. data/core/app/views/gaku/students/student_achievements/_fields.html.slim +8 -0
  928. data/core/app/views/gaku/students/student_achievements/_form.html.slim +6 -0
  929. data/core/app/views/gaku/students/student_achievements/_form_fields.html.slim +1 -0
  930. data/core/app/views/gaku/students/student_achievements/_index.html.slim +20 -0
  931. data/core/app/views/gaku/students/student_achievements/_index_modal.html.slim +4 -0
  932. data/core/app/views/gaku/students/student_achievements/_student_achievement.html.slim +3 -0
  933. data/core/app/views/gaku/students/student_achievements/_student_achievements.html.slim +2 -0
  934. data/core/app/views/gaku/students/student_achievements/create.js.erb +10 -0
  935. data/core/app/views/gaku/students/student_achievements/destroy.js.erb +4 -0
  936. data/core/app/views/gaku/students/student_achievements/edit.js.erb +2 -0
  937. data/core/app/views/gaku/students/student_achievements/index.js.erb +3 -0
  938. data/core/app/views/gaku/students/student_achievements/new.js.erb +3 -0
  939. data/core/app/views/gaku/students/student_achievements/update.js.erb +5 -0
  940. data/core/app/views/gaku/students/student_specialties/_edit.html.slim +8 -0
  941. data/core/app/views/gaku/students/student_specialties/_fields.html.slim +5 -0
  942. data/core/app/views/gaku/students/student_specialties/_form.html.slim +6 -0
  943. data/core/app/views/gaku/students/student_specialties/_form_fields.html.slim +2 -0
  944. data/core/app/views/gaku/students/student_specialties/_index.html.slim +18 -0
  945. data/core/app/views/gaku/students/student_specialties/_index_modal.html.slim +4 -0
  946. data/core/app/views/gaku/students/student_specialties/_specialties_list.html.slim +0 -0
  947. data/core/app/views/gaku/students/student_specialties/_student_specialties.html.slim +2 -0
  948. data/core/app/views/gaku/students/student_specialties/_student_specialty.html.slim +3 -0
  949. data/core/app/views/gaku/students/student_specialties/create.js.erb +11 -0
  950. data/core/app/views/gaku/students/student_specialties/destroy.js.erb +5 -0
  951. data/core/app/views/gaku/students/student_specialties/edit.js.erb +2 -0
  952. data/core/app/views/gaku/students/student_specialties/index.js.erb +5 -0
  953. data/core/app/views/gaku/students/student_specialties/new.js.erb +3 -0
  954. data/core/app/views/gaku/students/student_specialties/update.js.erb +4 -0
  955. data/core/app/views/gaku/students/update.js.erb +3 -0
  956. data/core/app/views/gaku/syllabuses/_form.html.slim +3 -0
  957. data/core/app/views/gaku/syllabuses/_form_fields.html.slim +10 -0
  958. data/core/app/views/gaku/syllabuses/_modal.html.slim +7 -0
  959. data/core/app/views/gaku/syllabuses/_syllabus.html.slim +2 -0
  960. data/core/app/views/gaku/syllabuses/_syllabus_fields.html.slim +5 -0
  961. data/core/app/views/gaku/syllabuses/_syllabuses.html.slim +11 -0
  962. data/core/app/views/gaku/syllabuses/assignments/_assignment.html.slim +9 -0
  963. data/core/app/views/gaku/syllabuses/assignments/_assignments.html.slim +19 -0
  964. data/core/app/views/gaku/syllabuses/assignments/_form.html.slim +17 -0
  965. data/core/app/views/gaku/syllabuses/assignments/create.js.erb +7 -0
  966. data/core/app/views/gaku/syllabuses/create.js.erb +6 -0
  967. data/core/app/views/gaku/syllabuses/destroy.js.erb +2 -0
  968. data/core/app/views/gaku/syllabuses/edit.js.erb +3 -0
  969. data/core/app/views/gaku/syllabuses/exam_syllabuses/create.js.erb +11 -0
  970. data/core/app/views/gaku/syllabuses/exam_syllabuses/destroy.js.erb +6 -0
  971. data/core/app/views/gaku/syllabuses/exams/_exam.html.slim +4 -0
  972. data/core/app/views/gaku/syllabuses/exams/_exams.html.slim +16 -0
  973. data/core/app/views/gaku/syllabuses/exams/_fields.html.slim +9 -0
  974. data/core/app/views/gaku/syllabuses/exams/_form.html.slim +15 -0
  975. data/core/app/views/gaku/syllabuses/exams/_form_fields.html.slim +10 -0
  976. data/core/app/views/gaku/syllabuses/exams/_modal.html.slim +6 -0
  977. data/core/app/views/gaku/syllabuses/exams/_select_form.html.slim +6 -0
  978. data/core/app/views/gaku/syllabuses/exams/create.js.erb +10 -0
  979. data/core/app/views/gaku/syllabuses/exams/destroy.js.erb +2 -0
  980. data/core/app/views/gaku/syllabuses/exams/edit.js.erb +3 -0
  981. data/core/app/views/gaku/syllabuses/exams/new.js.erb +3 -0
  982. data/core/app/views/gaku/syllabuses/exams/update.js.erb +4 -0
  983. data/core/app/views/gaku/syllabuses/importer/index.html.slim +14 -0
  984. data/core/app/views/gaku/syllabuses/index.html.slim +14 -0
  985. data/core/app/views/gaku/syllabuses/new.js.erb +3 -0
  986. data/core/app/views/gaku/syllabuses/show.html.slim +59 -0
  987. data/core/app/views/gaku/syllabuses/update.js.erb +4 -0
  988. data/core/app/views/gaku/teachers/_delete_modal.html.slim +5 -0
  989. data/core/app/views/gaku/teachers/_edit_table.html.slim +5 -0
  990. data/core/app/views/gaku/teachers/_fields.html.slim +1 -0
  991. data/core/app/views/gaku/teachers/_form.html.slim +3 -0
  992. data/core/app/views/gaku/teachers/_form_fields.html.slim +1 -0
  993. data/core/app/views/gaku/teachers/_modal.html.slim +6 -0
  994. data/core/app/views/gaku/teachers/_show_table.html.slim +7 -0
  995. data/core/app/views/gaku/teachers/_tabs.html.slim +21 -0
  996. data/core/app/views/gaku/teachers/_teacher.html.slim +6 -0
  997. data/core/app/views/gaku/teachers/_teacher_unit.html.slim +4 -0
  998. data/core/app/views/gaku/teachers/_teachers.html.slim +11 -0
  999. data/core/app/views/gaku/teachers/create.js.erb +8 -0
  1000. data/core/app/views/gaku/teachers/destroy.js.erb +2 -0
  1001. data/core/app/views/gaku/teachers/edit.html.slim +23 -0
  1002. data/core/app/views/gaku/teachers/edit.js.erb +3 -0
  1003. data/core/app/views/gaku/teachers/index.html.slim +16 -0
  1004. data/core/app/views/gaku/teachers/index.js.erb +2 -0
  1005. data/core/app/views/gaku/teachers/new.js.erb +3 -0
  1006. data/core/app/views/gaku/teachers/recovery.js.erb +1 -0
  1007. data/core/app/views/gaku/teachers/show.html.slim +14 -0
  1008. data/core/app/views/gaku/teachers/update.js.erb +4 -0
  1009. data/core/app/views/kaminari/_first_page.html.erb +11 -0
  1010. data/core/app/views/kaminari/_gap.html.erb +8 -0
  1011. data/core/app/views/kaminari/_last_page.html.erb +11 -0
  1012. data/core/app/views/kaminari/_next_page.html.erb +11 -0
  1013. data/core/app/views/kaminari/_page.html.erb +12 -0
  1014. data/core/app/views/kaminari/_paginator.html.erb +25 -0
  1015. data/core/app/views/kaminari/_prev_page.html.erb +11 -0
  1016. data/core/app/workers/gaku/importers/students/roster_worker.rb +18 -0
  1017. data/core/app/workers/gaku/importers/students/school_station_zaikousei_worker.rb +15 -0
  1018. data/core/config/initializers/active_record.rb +41 -0
  1019. data/core/config/initializers/client_side_validations.rb +9 -0
  1020. data/core/config/initializers/devise.rb +213 -0
  1021. data/core/config/initializers/i18n.rb +26 -0
  1022. data/core/config/initializers/inflections.rb +19 -0
  1023. data/core/config/initializers/kaminari_config.rb +10 -0
  1024. data/core/config/initializers/locale.rb +2 -0
  1025. data/core/config/initializers/mime_types.rb +1 -0
  1026. data/core/config/initializers/paper_trail.rb +3 -0
  1027. data/core/config/initializers/ruby_template_handler.rb +1 -0
  1028. data/core/config/initializers/sidekiq.rb +6 -0
  1029. data/core/config/initializers/translation_missing.rb +11 -0
  1030. data/core/config/initializers/wrap_parameters.rb +14 -0
  1031. data/core/config/routes.rb +321 -0
  1032. data/core/db/default/gaku/attendance_types.rb +77 -0
  1033. data/core/db/default/gaku/commute_method_types.rb +29 -0
  1034. data/core/db/default/gaku/contact_types.yml +20 -0
  1035. data/core/db/default/gaku/countries.yml +1357 -0
  1036. data/core/db/default/gaku/enrollment_status.rb +37 -0
  1037. data/core/db/default/gaku/master_school.rb +6 -0
  1038. data/core/db/default/gaku/roles.yml +2 -0
  1039. data/core/db/default/gaku/scholarship_statuses.rb +19 -0
  1040. data/core/db/default/gaku/states.yml +494 -0
  1041. data/core/db/migrate/20120202111850_gaku_core.rb +771 -0
  1042. data/core/db/schema.rb +481 -0
  1043. data/core/db/seeds.rb +5 -0
  1044. data/core/gaku_core.gemspec +71 -0
  1045. data/core/lib/gaku/app_responder.rb +6 -0
  1046. data/core/lib/gaku/class_name_detector.rb +23 -0
  1047. data/core/lib/gaku/core.rb +45 -0
  1048. data/core/lib/gaku/core/console_colors.rb +22 -0
  1049. data/core/lib/gaku/core/engine.rb +45 -0
  1050. data/core/lib/gaku/core/url_helpers.rb +5 -0
  1051. data/core/lib/gaku/core/version.rb +5 -0
  1052. data/core/lib/gaku/exporters/roster_exporter.rb +36 -0
  1053. data/core/lib/gaku/grading/calculations.rb +279 -0
  1054. data/core/lib/gaku/grading/grade.rb +17 -0
  1055. data/core/lib/gaku/grading/japanese_hs_standard.rb +8 -0
  1056. data/core/lib/gaku/importers/key_mapper.rb +19 -0
  1057. data/core/lib/gaku/importers/logger.rb +10 -0
  1058. data/core/lib/gaku/importers/students/guardians.rb +89 -0
  1059. data/core/lib/gaku/importers/students/personal_information.rb +65 -0
  1060. data/core/lib/gaku/importers/students/roster.rb +50 -0
  1061. data/core/lib/gaku/importers/students/roster_to_student.rb +67 -0
  1062. data/core/lib/gaku/importers/students/school_station_zaikousei.rb +109 -0
  1063. data/core/lib/gaku/importers/students/student_identity.rb +17 -0
  1064. data/core/lib/gaku/testing/auth_helpers.rb +25 -0
  1065. data/core/lib/gaku/testing/common_rake.rb +27 -0
  1066. data/core/lib/gaku/testing/controller_helpers.rb +100 -0
  1067. data/core/lib/gaku/testing/env.rb +10 -0
  1068. data/core/lib/gaku/testing/factories.rb +5 -0
  1069. data/core/lib/gaku/testing/factories/achievement_factory.rb +12 -0
  1070. data/core/lib/gaku/testing/factories/address_factory.rb +22 -0
  1071. data/core/lib/gaku/testing/factories/assignment_factory.rb +11 -0
  1072. data/core/lib/gaku/testing/factories/assignment_score_factory.rb +8 -0
  1073. data/core/lib/gaku/testing/factories/attachment_factory.rb +15 -0
  1074. data/core/lib/gaku/testing/factories/attendance_factory.rb +11 -0
  1075. data/core/lib/gaku/testing/factories/attendance_type_factory.rb +14 -0
  1076. data/core/lib/gaku/testing/factories/campus_factory.rb +15 -0
  1077. data/core/lib/gaku/testing/factories/class_group_enrollment_factory.rb +9 -0
  1078. data/core/lib/gaku/testing/factories/class_group_factory.rb +18 -0
  1079. data/core/lib/gaku/testing/factories/commute_method_type_factory.rb +11 -0
  1080. data/core/lib/gaku/testing/factories/contact_factory.rb +19 -0
  1081. data/core/lib/gaku/testing/factories/contact_type_factory.rb +11 -0
  1082. data/core/lib/gaku/testing/factories/country_factory.rb +11 -0
  1083. data/core/lib/gaku/testing/factories/course_enrollment_factory.rb +8 -0
  1084. data/core/lib/gaku/testing/factories/course_factory.rb +7 -0
  1085. data/core/lib/gaku/testing/factories/course_group_enrollment_factory.rb +8 -0
  1086. data/core/lib/gaku/testing/factories/course_group_factory.rb +7 -0
  1087. data/core/lib/gaku/testing/factories/enrollment_status_factory.rb +28 -0
  1088. data/core/lib/gaku/testing/factories/exam_factory.rb +20 -0
  1089. data/core/lib/gaku/testing/factories/exam_portion_factory.rb +11 -0
  1090. data/core/lib/gaku/testing/factories/exam_portion_score_factory.rb +9 -0
  1091. data/core/lib/gaku/testing/factories/exam_schedule_factory.rb +9 -0
  1092. data/core/lib/gaku/testing/factories/exam_score_factory.rb +9 -0
  1093. data/core/lib/gaku/testing/factories/extracurricular_activity_factory.rb +7 -0
  1094. data/core/lib/gaku/testing/factories/faculty_factory.rb +6 -0
  1095. data/core/lib/gaku/testing/factories/grading_method_factory.rb +13 -0
  1096. data/core/lib/gaku/testing/factories/grading_method_set_factory.rb +11 -0
  1097. data/core/lib/gaku/testing/factories/grading_method_set_item_factory.rb +12 -0
  1098. data/core/lib/gaku/testing/factories/guardian_factory.rb +10 -0
  1099. data/core/lib/gaku/testing/factories/import_file_factory.rb +8 -0
  1100. data/core/lib/gaku/testing/factories/lesson_factory.rb +7 -0
  1101. data/core/lib/gaku/testing/factories/lesson_plan_factory.rb +9 -0
  1102. data/core/lib/gaku/testing/factories/level_factory.rb +8 -0
  1103. data/core/lib/gaku/testing/factories/note_factory.rb +8 -0
  1104. data/core/lib/gaku/testing/factories/program_factory.rb +39 -0
  1105. data/core/lib/gaku/testing/factories/program_level_factory.rb +8 -0
  1106. data/core/lib/gaku/testing/factories/program_specialty.rb +8 -0
  1107. data/core/lib/gaku/testing/factories/program_syllabus_factory.rb +9 -0
  1108. data/core/lib/gaku/testing/factories/role_factory.rb +43 -0
  1109. data/core/lib/gaku/testing/factories/schedule_factory.rb +9 -0
  1110. data/core/lib/gaku/testing/factories/scholarship_status_factory.rb +8 -0
  1111. data/core/lib/gaku/testing/factories/school_factory.rb +28 -0
  1112. data/core/lib/gaku/testing/factories/school_role_factory.rb +7 -0
  1113. data/core/lib/gaku/testing/factories/school_year_factory.rb +8 -0
  1114. data/core/lib/gaku/testing/factories/semester_class_group_factory.rb +8 -0
  1115. data/core/lib/gaku/testing/factories/semester_course.rb +8 -0
  1116. data/core/lib/gaku/testing/factories/semester_factory.rb +8 -0
  1117. data/core/lib/gaku/testing/factories/simple_grade_factory.rb +10 -0
  1118. data/core/lib/gaku/testing/factories/specialty_factory.rb +13 -0
  1119. data/core/lib/gaku/testing/factories/state_factory.rb +13 -0
  1120. data/core/lib/gaku/testing/factories/student_achievement_factory.rb +8 -0
  1121. data/core/lib/gaku/testing/factories/student_factory.rb +51 -0
  1122. data/core/lib/gaku/testing/factories/student_specialty_factory.rb +9 -0
  1123. data/core/lib/gaku/testing/factories/syllabus_factory.rb +16 -0
  1124. data/core/lib/gaku/testing/factories/teacher_factory.rb +15 -0
  1125. data/core/lib/gaku/testing/factories/template_factory.rb +11 -0
  1126. data/core/lib/gaku/testing/factories/traits.rb +68 -0
  1127. data/core/lib/gaku/testing/factories/user_factory.rb +42 -0
  1128. data/core/lib/gaku/testing/factories/user_role_factory.rb +8 -0
  1129. data/core/lib/gaku/testing/flash_helpers.rb +35 -0
  1130. data/core/lib/gaku/testing/request_helpers.rb +207 -0
  1131. data/core/lib/gaku_core.rb +1 -0
  1132. data/core/lib/generators/gaku/dummy/dummy_generator.rb +102 -0
  1133. data/core/lib/generators/gaku/dummy/templates/rails/application.rb +10 -0
  1134. data/core/lib/generators/gaku/dummy/templates/rails/boot.rb +6 -0
  1135. data/core/lib/generators/gaku/dummy/templates/rails/database.yml +15 -0
  1136. data/core/lib/generators/gaku/dummy/templates/rails/routes.rb +3 -0
  1137. data/core/lib/generators/gaku/dummy/templates/rails/script/rails +7 -0
  1138. data/core/lib/generators/gaku/install/install_generator.rb +162 -0
  1139. data/core/lib/generators/gaku/install/templates/Procfile +2 -0
  1140. data/core/lib/generators/gaku/install/templates/app/assets/javascripts/gaku/all.js +14 -0
  1141. data/core/lib/generators/gaku/install/templates/app/assets/stylesheets/gaku/all.css +12 -0
  1142. data/core/lib/generators/gaku/install/templates/config/sidekiq.yml +8 -0
  1143. data/core/lib/tasks/admin_user.rake +104 -0
  1144. data/core/lib/tasks/core.rake +65 -0
  1145. data/core/lib/tasks/reset.rake +37 -0
  1146. data/core/log/.gitkeep +0 -0
  1147. data/core/script/rails +9 -0
  1148. data/core/spec/controllers/gaku/addresses_controller_spec.rb +262 -0
  1149. data/core/spec/controllers/gaku/admin/achievements_controller_spec.rb +139 -0
  1150. data/core/spec/controllers/gaku/admin/disposals_controller_spec.rb +177 -0
  1151. data/core/spec/controllers/gaku/admin/grading/grading_method_set_items_controller_spec.rb +165 -0
  1152. data/core/spec/controllers/gaku/admin/grading/grading_method_sets_controller_spec.rb +183 -0
  1153. data/core/spec/controllers/gaku/admin/grading/grading_methods_controller_spec.rb +154 -0
  1154. data/core/spec/controllers/gaku/admin/presets_controller_spec.rb +44 -0
  1155. data/core/spec/controllers/gaku/admin/roles_controller_spec.rb +154 -0
  1156. data/core/spec/controllers/gaku/admin/schools/campuses/campuses_controller_spec.rb +94 -0
  1157. data/core/spec/controllers/gaku/admin/schools/schools_controller_spec.rb +129 -0
  1158. data/core/spec/controllers/gaku/admin/specialties_controller_spec.rb +154 -0
  1159. data/core/spec/controllers/gaku/admin/templates_controller_spec.rb +118 -0
  1160. data/core/spec/controllers/gaku/admin/types_and_methods/attendance_types_controller_spec.rb +176 -0
  1161. data/core/spec/controllers/gaku/admin/types_and_methods/commute_method_types_controller_spec.rb +154 -0
  1162. data/core/spec/controllers/gaku/admin/types_and_methods/contact_types_controller_spec.rb +154 -0
  1163. data/core/spec/controllers/gaku/admin/types_and_methods/enrollment_statuses_controller_spec.rb +153 -0
  1164. data/core/spec/controllers/gaku/admin/users_controller_spec.rb +154 -0
  1165. data/core/spec/controllers/gaku/class_group_enrollments_controller_spec.rb +62 -0
  1166. data/core/spec/controllers/gaku/class_groups/class_groups_controller_spec.rb +129 -0
  1167. data/core/spec/controllers/gaku/contacts_controller_spec.rb +179 -0
  1168. data/core/spec/controllers/gaku/course_groups/course_groups_controller_spec.rb +75 -0
  1169. data/core/spec/controllers/gaku/courses/courses_controller_spec.rb +79 -0
  1170. data/core/spec/controllers/gaku/exams/exams_controller_spec.rb +156 -0
  1171. data/core/spec/controllers/gaku/students/guardians_controller_spec.rb +62 -0
  1172. data/core/spec/controllers/gaku/students/students_controller_spec.rb +243 -0
  1173. data/core/spec/controllers/gaku/syllabuses/syllabuses_controller_spec.rb +92 -0
  1174. data/core/spec/controllers/gaku/teachers_controller_spec.rb +190 -0
  1175. data/core/spec/coverage/.last_run.json +5 -0
  1176. data/core/spec/coverage/.resultset.json +103 -0
  1177. data/core/spec/integration/importers/roster_spec.rb +41 -0
  1178. data/core/spec/integration/student_address_versioning_spec.rb +20 -0
  1179. data/core/spec/integration/student_contact_vesioning_spec.rb +21 -0
  1180. data/core/spec/integration/student_versioning_spec.rb +93 -0
  1181. data/core/spec/models/achievement_spec.rb +21 -0
  1182. data/core/spec/models/address_spec.rb +162 -0
  1183. data/core/spec/models/assignment_score_spec.rb +19 -0
  1184. data/core/spec/models/assignment_spec.rb +19 -0
  1185. data/core/spec/models/attachment_spec.rb +24 -0
  1186. data/core/spec/models/attendance_spec.rb +21 -0
  1187. data/core/spec/models/attendance_type_spec.rb +19 -0
  1188. data/core/spec/models/campus_spec.rb +68 -0
  1189. data/core/spec/models/class_group_course_enrollment_spec.rb +16 -0
  1190. data/core/spec/models/class_group_enrollment_spec.rb +24 -0
  1191. data/core/spec/models/class_group_spec.rb +50 -0
  1192. data/core/spec/models/commute_method_type_spec.rb +19 -0
  1193. data/core/spec/models/contact_spec.rb +28 -0
  1194. data/core/spec/models/contact_type_spec.rb +18 -0
  1195. data/core/spec/models/country_spec.rb +20 -0
  1196. data/core/spec/models/course_enrollment_spec.rb +16 -0
  1197. data/core/spec/models/course_group_enrollment_spec.rb +16 -0
  1198. data/core/spec/models/course_group_spec.rb +23 -0
  1199. data/core/spec/models/course_spec.rb +88 -0
  1200. data/core/spec/models/enrollment_status_spec.rb +23 -0
  1201. data/core/spec/models/exam_portion_score_spec.rb +16 -0
  1202. data/core/spec/models/exam_portion_spec.rb +46 -0
  1203. data/core/spec/models/exam_schedule_spec.rb +17 -0
  1204. data/core/spec/models/exam_score_spec.rb +15 -0
  1205. data/core/spec/models/exam_spec.rb +78 -0
  1206. data/core/spec/models/exam_syllabus_spec.rb +16 -0
  1207. data/core/spec/models/external_school_record_spec.rb +18 -0
  1208. data/core/spec/models/extracurricular_activity_enrollment_spec.rb +18 -0
  1209. data/core/spec/models/extracurricular_activity_spec.rb +19 -0
  1210. data/core/spec/models/factories_spec.rb +11 -0
  1211. data/core/spec/models/faculty_spec.rb +17 -0
  1212. data/core/spec/models/grading_method_set_item_spec.rb +19 -0
  1213. data/core/spec/models/grading_method_set_spec.rb +33 -0
  1214. data/core/spec/models/grading_method_spec.rb +23 -0
  1215. data/core/spec/models/guardian_spec.rb +65 -0
  1216. data/core/spec/models/import_file_spec.rb +9 -0
  1217. data/core/spec/models/lesson_plan_spec.rb +43 -0
  1218. data/core/spec/models/lesson_spec.rb +14 -0
  1219. data/core/spec/models/level_spec.rb +21 -0
  1220. data/core/spec/models/note_spec.rb +14 -0
  1221. data/core/spec/models/preset_spec.rb +10 -0
  1222. data/core/spec/models/program_level_spec.rb +15 -0
  1223. data/core/spec/models/program_spec.rb +34 -0
  1224. data/core/spec/models/program_specialty_spec.rb +15 -0
  1225. data/core/spec/models/program_syllabus_spec.rb +17 -0
  1226. data/core/spec/models/role_spec.rb +20 -0
  1227. data/core/spec/models/scholarship_status_spec.rb +19 -0
  1228. data/core/spec/models/school_role_spec.rb +19 -0
  1229. data/core/spec/models/school_spec.rb +21 -0
  1230. data/core/spec/models/school_year_spec.rb +20 -0
  1231. data/core/spec/models/semester_class_group_spec.rb +17 -0
  1232. data/core/spec/models/semester_course_spec.rb +17 -0
  1233. data/core/spec/models/semester_spec.rb +43 -0
  1234. data/core/spec/models/simple_grade_spec.rb +15 -0
  1235. data/core/spec/models/specialty_spec.rb +22 -0
  1236. data/core/spec/models/state_spec.rb +26 -0
  1237. data/core/spec/models/student_achievement_spec.rb +15 -0
  1238. data/core/spec/models/student_guardian_spec.rb +10 -0
  1239. data/core/spec/models/student_spec.rb +158 -0
  1240. data/core/spec/models/student_speciality_spec.rb +15 -0
  1241. data/core/spec/models/syllabus_spec.rb +70 -0
  1242. data/core/spec/models/teacher_spec.rb +80 -0
  1243. data/core/spec/models/template_spec.rb +19 -0
  1244. data/core/spec/models/user_role_spec.rb +10 -0
  1245. data/core/spec/models/user_spec.rb +16 -0
  1246. data/core/spec/requests/admin/achievements/achievements_spec.rb +73 -0
  1247. data/core/spec/requests/admin/changes_and_deletions/student_addresses_spec.rb +40 -0
  1248. data/core/spec/requests/admin/changes_and_deletions/student_contacts_spec.rb +28 -0
  1249. data/core/spec/requests/admin/changes_and_deletions/students_spec.rb +47 -0
  1250. data/core/spec/requests/admin/disposals/student_disposals_spec.rb +50 -0
  1251. data/core/spec/requests/admin/disposals/teacher_disposals_spec.rb +50 -0
  1252. data/core/spec/requests/admin/grading/grading_method_set_items_spec.rb +86 -0
  1253. data/core/spec/requests/admin/grading/grading_method_sets_spec.rb +118 -0
  1254. data/core/spec/requests/admin/grading/grading_methods_spec.rb +74 -0
  1255. data/core/spec/requests/admin/presets/defaults_preset_spec.rb +21 -0
  1256. data/core/spec/requests/admin/presets/grading_preset_spec.rb +22 -0
  1257. data/core/spec/requests/admin/presets/locale_preset_spec.rb +22 -0
  1258. data/core/spec/requests/admin/presets/names_preset_spec.rb +21 -0
  1259. data/core/spec/requests/admin/presets/output_formats_spec.rb +30 -0
  1260. data/core/spec/requests/admin/presets/pagination_preset_spec.rb +23 -0
  1261. data/core/spec/requests/admin/presets/student_preset_spec.rb +28 -0
  1262. data/core/spec/requests/admin/roles_spec.rb +86 -0
  1263. data/core/spec/requests/admin/school_years/school_years_spec.rb +125 -0
  1264. data/core/spec/requests/admin/school_years/semesters_spec.rb +167 -0
  1265. data/core/spec/requests/admin/schools/campuses/addresses_spec.rb +116 -0
  1266. data/core/spec/requests/admin/schools/campuses/campuses_spec.rb +90 -0
  1267. data/core/spec/requests/admin/schools/campuses/contacts_spec.rb +61 -0
  1268. data/core/spec/requests/admin/schools/campuses/picture_spec.rb +19 -0
  1269. data/core/spec/requests/admin/schools/picture_spec.rb +21 -0
  1270. data/core/spec/requests/admin/schools/programs_spec.rb +125 -0
  1271. data/core/spec/requests/admin/schools/school_details_spec.rb +22 -0
  1272. data/core/spec/requests/admin/schools/school_levels_spec.rb +82 -0
  1273. data/core/spec/requests/admin/schools/schools_spec.rb +138 -0
  1274. data/core/spec/requests/admin/specialties_spec.rb +73 -0
  1275. data/core/spec/requests/admin/system_tools/backup_spec.rb +7 -0
  1276. data/core/spec/requests/admin/templates_spec.rb +97 -0
  1277. data/core/spec/requests/admin/types_and_methods/attendance_types_spec.rb +80 -0
  1278. data/core/spec/requests/admin/types_and_methods/commute_method_types_spec.rb +75 -0
  1279. data/core/spec/requests/admin/types_and_methods/contact_types_spec.rb +74 -0
  1280. data/core/spec/requests/admin/types_and_methods/enrollment_statuses_spec.rb +75 -0
  1281. data/core/spec/requests/admin/types_and_methods/states_spec.rb +110 -0
  1282. data/core/spec/requests/admin/users_spec.rb +91 -0
  1283. data/core/spec/requests/change_language_spec.rb +25 -0
  1284. data/core/spec/requests/class_groups/class_groups_spec.rb +171 -0
  1285. data/core/spec/requests/class_groups/courses_spec.rb +40 -0
  1286. data/core/spec/requests/class_groups/notes_spec.rb +37 -0
  1287. data/core/spec/requests/class_groups/semester_class_groups_spec.rb +111 -0
  1288. data/core/spec/requests/class_groups/students_spec.rb +92 -0
  1289. data/core/spec/requests/course_groups/course_groups_spec.rb +122 -0
  1290. data/core/spec/requests/course_groups/courses_spec.rb +38 -0
  1291. data/core/spec/requests/courses/courses_spec.rb +167 -0
  1292. data/core/spec/requests/courses/enrollments/class_groups_spec.rb +86 -0
  1293. data/core/spec/requests/courses/enrollments/students_spec.rb +63 -0
  1294. data/core/spec/requests/courses/exams_spec.rb +36 -0
  1295. data/core/spec/requests/courses/notes_spec.rb +35 -0
  1296. data/core/spec/requests/courses/semester_courses_spec.rb +119 -0
  1297. data/core/spec/requests/exams/exam_portions/attachments_spec.rb +147 -0
  1298. data/core/spec/requests/exams/exam_portions/exam_portions_spec.rb +113 -0
  1299. data/core/spec/requests/exams/exams_spec.rb +141 -0
  1300. data/core/spec/requests/exams/notes_spec.rb +35 -0
  1301. data/core/spec/requests/extracurricular_activities/extracurricular_activities_spec.rb +87 -0
  1302. data/core/spec/requests/extracurricular_activities/students_spec.rb +120 -0
  1303. data/core/spec/requests/sign_in_spec.rb +78 -0
  1304. data/core/spec/requests/sign_out_spec.rb +16 -0
  1305. data/core/spec/requests/sign_up_spec.rb +75 -0
  1306. data/core/spec/requests/students/achievements_spec.rb +82 -0
  1307. data/core/spec/requests/students/addresses_spec.rb +61 -0
  1308. data/core/spec/requests/students/class_group_enrollments_spec.rb +47 -0
  1309. data/core/spec/requests/students/commute_methods_spec.rb +22 -0
  1310. data/core/spec/requests/students/contacts_spec.rb +60 -0
  1311. data/core/spec/requests/students/course_enrollments_spec.rb +39 -0
  1312. data/core/spec/requests/students/enrollment_status_spec.rb +22 -0
  1313. data/core/spec/requests/students/guardians/addresses_spec.rb +65 -0
  1314. data/core/spec/requests/students/guardians/contacts_spec.rb +67 -0
  1315. data/core/spec/requests/students/guardians/guardians_spec.rb +89 -0
  1316. data/core/spec/requests/students/guardians/picture_spec.rb +23 -0
  1317. data/core/spec/requests/students/import_export.rb +37 -0
  1318. data/core/spec/requests/students/notes_spec.rb +37 -0
  1319. data/core/spec/requests/students/picture_spec.rb +21 -0
  1320. data/core/spec/requests/students/scholarship_status_spec.rb +22 -0
  1321. data/core/spec/requests/students/simple_grades_spec.rb +85 -0
  1322. data/core/spec/requests/students/specialties_spec.rb +91 -0
  1323. data/core/spec/requests/students/students_spec.rb +127 -0
  1324. data/core/spec/requests/syllabuses/exams_spec.rb +168 -0
  1325. data/core/spec/requests/syllabuses/notes_spec.rb +35 -0
  1326. data/core/spec/requests/syllabuses/syllabuses_spec.rb +143 -0
  1327. data/core/spec/requests/teachers/addresses_spec.rb +60 -0
  1328. data/core/spec/requests/teachers/contacts_spec.rb +64 -0
  1329. data/core/spec/requests/teachers/notes_spec.rb +39 -0
  1330. data/core/spec/requests/teachers/picture_spec.rb +21 -0
  1331. data/core/spec/requests/teachers/teachers_spec.rb +114 -0
  1332. data/core/spec/routing/student_routes_spec.rb +73 -0
  1333. data/core/spec/spec_helper.rb +86 -0
  1334. data/core/spec/support/120x120.jpg +0 -0
  1335. data/core/spec/support/accept_nested_attributes_for_matcher.rb +39 -0
  1336. data/core/spec/support/deferred_garbage_collection.rb +20 -0
  1337. data/core/spec/support/have_attributes_matcher.rb +8 -0
  1338. data/core/spec/support/requests/avatarable_spec.rb +16 -0
  1339. data/core/spec/support/requests/course_enrollable_spec.rb +72 -0
  1340. data/core/spec/support/requests/shared_addresses_spec.rb +171 -0
  1341. data/core/spec/support/requests/shared_contacts_spec.rb +117 -0
  1342. data/core/spec/support/requests/shared_notes_spec.rb +82 -0
  1343. data/core/spec/support/sample_roster.ods +0 -0
  1344. data/core/spec/support/sample_roster.xls +0 -0
  1345. data/core/spec/support/shared_examples/addressable.rb +3 -0
  1346. data/core/spec/support/shared_examples/allow.rb +10 -0
  1347. data/core/spec/support/shared_examples/avatarable.rb +3 -0
  1348. data/core/spec/support/shared_examples/contactable.rb +3 -0
  1349. data/core/spec/support/shared_examples/deny.rb +27 -0
  1350. data/core/spec/support/shared_examples/notable.rb +3 -0
  1351. data/core/spec/support/shared_examples/person.rb +4 -0
  1352. data/core/spec/support/shared_examples/thrashable.rb +6 -0
  1353. data/core/spec/workers/roster_spec.rb +13 -0
  1354. data/core/vendor/assets/javascripts/backbone.js +1431 -0
  1355. data/core/vendor/assets/javascripts/tablefix.js.coffee +109 -0
  1356. data/doc/authorized_service_providers/Genshin/genshin_okazaki_office.geojson +13 -0
  1357. data/gaku.gemspec +26 -0
  1358. data/gaku_dependencies.rb +33 -0
  1359. data/lib/gaku.rb +2 -0
  1360. data/sample/Rakefile +16 -0
  1361. data/sample/db/sample/gaku/achievements.rb +12 -0
  1362. data/sample/db/sample/gaku/changes/student_changes.rb +35 -0
  1363. data/sample/db/sample/gaku/class_groups.rb +22 -0
  1364. data/sample/db/sample/gaku/course_groups.rb +7 -0
  1365. data/sample/db/sample/gaku/courses.rb +9 -0
  1366. data/sample/db/sample/gaku/disposals/address_and_contact_disposals.rb +26 -0
  1367. data/sample/db/sample/gaku/disposals/attachment_disposals.rb +9 -0
  1368. data/sample/db/sample/gaku/disposals/course_group_disposals.rb +8 -0
  1369. data/sample/db/sample/gaku/disposals/exam_disposals.rb +8 -0
  1370. data/sample/db/sample/gaku/disposals/student_disposals.rb +10 -0
  1371. data/sample/db/sample/gaku/disposals/teacher_disposals.rb +8 -0
  1372. data/sample/db/sample/gaku/exams.rb +14 -0
  1373. data/sample/db/sample/gaku/extracurricular_activities.rb +7 -0
  1374. data/sample/db/sample/gaku/grading_widget.rb +31 -0
  1375. data/sample/db/sample/gaku/images/120x120.jpg +0 -0
  1376. data/sample/db/sample/gaku/roles.rb +9 -0
  1377. data/sample/db/sample/gaku/specialties.rb +10 -0
  1378. data/sample/db/sample/gaku/students.rb +22 -0
  1379. data/sample/db/sample/gaku/syllabuses.rb +130 -0
  1380. data/sample/db/sample/gaku/teachers.rb +31 -0
  1381. data/sample/db/sample/gaku/users.rb +59 -0
  1382. data/sample/gaku_sample.gemspec +24 -0
  1383. data/sample/lib/gaku_sample.rb +10 -0
  1384. data/sample/lib/sample_counters.rb +23 -0
  1385. data/sample/lib/shared_sample_data.rb +108 -0
  1386. data/sample/lib/tasks/sample.rake +73 -0
  1387. metadata +1468 -0
@@ -0,0 +1,154 @@
1
+ require 'spec_helper'
2
+
3
+ describe Gaku::Admin::CommuteMethodTypesController do
4
+
5
+ let(:commute_method_type) { create(:commute_method_type) }
6
+ let(:invalid_commute_method_type) { create(:invalid_commute_method_type) }
7
+
8
+ context 'as student' do
9
+ before { as :student }
10
+
11
+ describe 'GET #index' do
12
+ before { gaku_get :index }
13
+
14
+ it { should respond_with 302 }
15
+ it('redirects') { redirect_to? gaku.root_path }
16
+ it('sets unauthorized flash') { flash_unauthorized? }
17
+ end
18
+ end
19
+
20
+ context 'as admin' do
21
+ before { as :admin }
22
+
23
+ context 'html' do
24
+ describe 'GET #index' do
25
+ before do
26
+ commute_method_type
27
+ gaku_get :index
28
+ end
29
+
30
+ it { should respond_with 200 }
31
+ it('assigns @commute_method_types') { expect(assigns(:commute_method_types)).to eq [commute_method_type] }
32
+ it('assigns @count') { expect(assigns(:count)).to eq 1 }
33
+ it('renders :index template') { template? :index }
34
+ end
35
+
36
+ end
37
+
38
+ context 'js' do
39
+
40
+ describe 'XHR #new' do
41
+ before { gaku_js_get :new }
42
+
43
+ it { should respond_with 200 }
44
+ it('assigns @commute_method_type') { expect(assigns(:commute_method_type)).to be_a_new(Gaku::CommuteMethodType) }
45
+ it('renders the :new template') { template? :new }
46
+ end
47
+
48
+ describe 'POST #create' do
49
+ context 'with valid attributes' do
50
+ let(:valid_js_create) do
51
+ gaku_js_post :create, commute_method_type: attributes_for(:commute_method_type)
52
+ end
53
+
54
+ it 'creates new commute_method_type' do
55
+ expect do
56
+ valid_js_create
57
+ end.to change(Gaku::CommuteMethodType, :count).by(1)
58
+ end
59
+
60
+ it 'renders flash' do
61
+ valid_js_create
62
+ flash_created?
63
+ end
64
+
65
+ it 'increments @count' do
66
+ valid_js_create
67
+ expect(assigns(:count)).to eq 1
68
+ end
69
+ end
70
+
71
+ context 'with invalid attributes' do
72
+ let(:invalid_js_create) do
73
+ gaku_js_post :create, commute_method_type: attributes_for(:invalid_commute_method_type)
74
+ end
75
+
76
+ it 'does not save the new commute_method_type' do
77
+ expect do
78
+ invalid_js_create
79
+ end.to_not change(Gaku::CommuteMethodType, :count)
80
+ end
81
+
82
+ it 're-renders the new method' do
83
+ invalid_js_create
84
+ template? :create
85
+ end
86
+
87
+ it "doesn't increment @count" do
88
+ invalid_js_create
89
+ expect(assigns(:count)).to eq 0
90
+ end
91
+ end
92
+ end
93
+
94
+ describe 'XHR #edit' do
95
+ before { gaku_js_get :edit, id: commute_method_type }
96
+
97
+ it { should respond_with 200 }
98
+ it('assigns @commute_method_type') { expect(assigns(:commute_method_type)).to eq commute_method_type }
99
+ it('renders the :edit template') { template? :edit }
100
+ end
101
+
102
+ describe 'PATCH #update' do
103
+ context 'with valid attributes' do
104
+ before do
105
+ gaku_js_patch :update, id: commute_method_type, commute_method_type: attributes_for(:commute_method_type, name: 'new method')
106
+ end
107
+
108
+ it { should respond_with 200 }
109
+ it('assigns @commute_method_type') { expect(assigns(:commute_method_type)).to eq commute_method_type }
110
+ it('sets flash') { flash_updated? }
111
+ it "changes commute_method_type's attributes" do
112
+ commute_method_type.reload
113
+ expect(commute_method_type.name).to eq 'new method'
114
+ end
115
+ end
116
+
117
+ context 'with invalid attributes' do
118
+ before do
119
+ gaku_js_patch :update, id: commute_method_type, commute_method_type: attributes_for(:invalid_commute_method_type, name: '')
120
+ end
121
+
122
+ it { should respond_with 200 }
123
+ it('assigns @commute_method_type') { expect(assigns(:commute_method_type)).to eq commute_method_type }
124
+
125
+ it "does not change commute_method_type's attributes" do
126
+ commute_method_type.reload
127
+ expect(commute_method_type.name).not_to eq ''
128
+ end
129
+ end
130
+ end
131
+
132
+ describe 'XHR DELETE #destroy' do
133
+ it 'deletes the commute_method_type' do
134
+ commute_method_type
135
+ expect do
136
+ gaku_js_delete :destroy, id: commute_method_type
137
+ end.to change(Gaku::CommuteMethodType, :count).by(-1)
138
+ end
139
+
140
+ it 'decrements @count' do
141
+ gaku_js_delete :destroy, id: commute_method_type
142
+ expect(assigns(:count)).to eq 0
143
+ end
144
+
145
+ it 'sets flash' do
146
+ gaku_js_delete :destroy, id: commute_method_type
147
+ flash_destroyed?
148
+ end
149
+ end
150
+
151
+ end
152
+
153
+ end
154
+ end
@@ -0,0 +1,154 @@
1
+ require 'spec_helper'
2
+
3
+ describe Gaku::Admin::ContactTypesController do
4
+
5
+ let(:contact_type) { create(:contact_type) }
6
+ let(:invalid_contact_type) { create(:invalid_contact_type) }
7
+
8
+ context 'as student' do
9
+ before { as :student }
10
+
11
+ describe 'GET #index' do
12
+ before { gaku_get :index }
13
+
14
+ it { should respond_with 302 }
15
+ it('redirects') { redirect_to? gaku.root_path }
16
+ it('sets unauthorized flash') { flash_unauthorized? }
17
+ end
18
+ end
19
+
20
+ context 'as admin' do
21
+ before { as :admin }
22
+
23
+ context 'html' do
24
+ describe 'GET #index' do
25
+ before do
26
+ contact_type
27
+ gaku_get :index
28
+ end
29
+
30
+ it { should respond_with 200 }
31
+ it('assigns @contact_types') { expect(assigns(:contact_types)).to eq [contact_type] }
32
+ it('assigns @count') { expect(assigns(:count)).to eq 1 }
33
+ it('renders :index template') { template? :index }
34
+ end
35
+
36
+ end
37
+
38
+ context 'js' do
39
+
40
+ describe 'XHR #new' do
41
+ before { gaku_js_get :new }
42
+
43
+ it { should respond_with 200 }
44
+ it('assigns @contact_type') { expect(assigns(:contact_type)).to be_a_new(Gaku::ContactType) }
45
+ it('renders the :new template') { template? :new }
46
+ end
47
+
48
+ describe 'POST #create' do
49
+ context 'with valid attributes' do
50
+ let(:valid_js_create) do
51
+ gaku_js_post :create, contact_type: attributes_for(:contact_type)
52
+ end
53
+
54
+ it 'creates new contact_type' do
55
+ expect do
56
+ valid_js_create
57
+ end.to change(Gaku::ContactType, :count).by(1)
58
+ end
59
+
60
+ it 'renders flash' do
61
+ valid_js_create
62
+ flash_created?
63
+ end
64
+
65
+ it 'increments @count' do
66
+ valid_js_create
67
+ expect(assigns(:count)).to eq 1
68
+ end
69
+ end
70
+
71
+ context 'with invalid attributes' do
72
+ let(:invalid_js_create) do
73
+ gaku_js_post :create, contact_type: attributes_for(:invalid_contact_type)
74
+ end
75
+
76
+ it 'does not save the new contact_type' do
77
+ expect do
78
+ invalid_js_create
79
+ end.to_not change(Gaku::ContactType, :count)
80
+ end
81
+
82
+ it 're-renders the new method' do
83
+ invalid_js_create
84
+ template? :create
85
+ end
86
+
87
+ it "doesn't increment @count" do
88
+ invalid_js_create
89
+ expect(assigns(:count)).to eq 0
90
+ end
91
+ end
92
+ end
93
+
94
+ describe 'XHR #edit' do
95
+ before { gaku_js_get :edit, id: contact_type }
96
+
97
+ it { should respond_with 200 }
98
+ it('assigns @contact_type') { expect(assigns(:contact_type)).to eq contact_type }
99
+ it('renders the :edit template') { template? :edit }
100
+ end
101
+
102
+ describe 'PATCH #update' do
103
+ context 'with valid attributes' do
104
+ before do
105
+ gaku_js_patch :update, id: contact_type, contact_type: attributes_for(:contact_type, name: 'mobifon')
106
+ end
107
+
108
+ it { should respond_with 200 }
109
+ it('assigns @contact_type') { expect(assigns(:contact_type)).to eq contact_type }
110
+ it('sets flash') { flash_updated? }
111
+ it "changes contact_type's attributes" do
112
+ contact_type.reload
113
+ expect(contact_type.name).to eq 'mobifon'
114
+ end
115
+ end
116
+
117
+ context 'with invalid attributes' do
118
+ before do
119
+ gaku_js_patch :update, id: contact_type, contact_type: attributes_for(:invalid_contact_type, name: '')
120
+ end
121
+
122
+ it { should respond_with 200 }
123
+ it('assigns @contact_type') { expect(assigns(:contact_type)).to eq contact_type }
124
+
125
+ it "does not change contact_type's attributes" do
126
+ contact_type.reload
127
+ expect(contact_type.name).not_to eq ''
128
+ end
129
+ end
130
+ end
131
+
132
+ describe 'XHR DELETE #destroy' do
133
+ it 'deletes the contact_type' do
134
+ contact_type
135
+ expect do
136
+ gaku_js_delete :destroy, id: contact_type
137
+ end.to change(Gaku::ContactType, :count).by(-1)
138
+ end
139
+
140
+ it 'decrements @count' do
141
+ gaku_js_delete :destroy, id: contact_type
142
+ expect(assigns(:count)).to eq 0
143
+ end
144
+
145
+ it 'sets flash' do
146
+ gaku_js_delete :destroy, id: contact_type
147
+ flash_destroyed?
148
+ end
149
+ end
150
+
151
+ end
152
+
153
+ end
154
+ end
@@ -0,0 +1,153 @@
1
+ require 'spec_helper'
2
+
3
+ describe Gaku::Admin::EnrollmentStatusesController do
4
+
5
+ let(:enrollment_status) { create(:enrollment_status) }
6
+ let(:invalid_enrollment_status) { create(:invalid_enrollment_status) }
7
+
8
+ context 'as student' do
9
+ before { as :student }
10
+
11
+ describe 'GET #index' do
12
+ before { gaku_get :index }
13
+
14
+ it { should respond_with 302 }
15
+ it('redirects') { redirect_to? gaku.root_path }
16
+ it('sets unauthorized flash') { flash_unauthorized? }
17
+ end
18
+ end
19
+
20
+ context 'as admin' do
21
+ before { as :admin }
22
+
23
+ context 'html' do
24
+ describe 'GET #index' do
25
+ before do
26
+ enrollment_status
27
+ gaku_get :index
28
+ end
29
+
30
+ it { should respond_with 200 }
31
+ it('assigns @enrollment_statuses') { expect(assigns(:enrollment_statuses)).to eq [enrollment_status] }
32
+ it('assigns @count') { expect(assigns(:count)).to eq 1 }
33
+ it('renders :index template') { template? :index }
34
+ end
35
+
36
+ end
37
+
38
+ context 'js' do
39
+
40
+ describe 'XHR #new' do
41
+ before { gaku_js_get :new }
42
+
43
+ it { should respond_with 200 }
44
+ it('assigns @enrollment_status') { expect(assigns(:enrollment_status)).to be_a_new(Gaku::EnrollmentStatus) }
45
+ it('renders the :new template') { template? :new }
46
+ end
47
+
48
+ describe 'POST #create' do
49
+ context 'with valid attributes' do
50
+ let(:valid_js_create) do
51
+ gaku_js_post :create, enrollment_status: attributes_for(:enrollment_status)
52
+ end
53
+
54
+ it 'creates new enrollment_status' do
55
+ expect do
56
+ valid_js_create
57
+ end.to change(Gaku::EnrollmentStatus, :count).by(1)
58
+ end
59
+
60
+ it 'renders flash' do
61
+ valid_js_create
62
+ flash_created?
63
+ end
64
+
65
+ it 'increments @count' do
66
+ valid_js_create
67
+ expect(assigns(:count)).to eq 1
68
+ end
69
+ end
70
+
71
+ context 'with invalid attributes' do
72
+ let(:invalid_js_create) do
73
+ gaku_js_post :create, enrollment_status: attributes_for(:invalid_enrollment_status)
74
+ end
75
+
76
+ it 'does not save the new enrollment_status' do
77
+ expect do
78
+ invalid_js_create
79
+ end.to_not change(Gaku::EnrollmentStatus, :count)
80
+ end
81
+
82
+ it 're-renders the new method' do
83
+ invalid_js_create
84
+ template? :create
85
+ end
86
+
87
+ it "doesn't increment @count" do
88
+ invalid_js_create
89
+ expect(assigns(:count)).to eq 0
90
+ end
91
+ end
92
+ end
93
+
94
+ describe 'XHR #edit' do
95
+ before { gaku_js_get :edit, id: enrollment_status }
96
+
97
+ it { should respond_with 200 }
98
+ it('assigns @enrollment_status') { expect(assigns(:enrollment_status)).to eq enrollment_status }
99
+ it('renders the :edit template') { template? :edit }
100
+ end
101
+
102
+ describe 'PATCH #update' do
103
+ context 'with valid attributes' do
104
+ before do
105
+ gaku_js_patch :update, id: enrollment_status, enrollment_status: attributes_for(:enrollment_status, code: 'new status')
106
+ end
107
+
108
+ it { should respond_with 200 }
109
+ it('assigns @enrollment_status') { expect(assigns(:enrollment_status)).to eq enrollment_status }
110
+ it('sets flash') { flash_updated? }
111
+ it "changes enrollment_status's attributes" do
112
+ expect(enrollment_status.reload.code).to eq 'new status'
113
+ end
114
+ end
115
+
116
+ context 'with invalid attributes' do
117
+ before do
118
+ gaku_js_patch :update, id: enrollment_status, enrollment_status: attributes_for(:invalid_enrollment_status, code: '')
119
+ end
120
+
121
+ it { should respond_with 200 }
122
+ it('assigns @enrollment_status') { expect(assigns(:enrollment_status)).to eq enrollment_status }
123
+
124
+ it "does not change enrollment_status's attributes" do
125
+ enrollment_status.reload
126
+ expect(enrollment_status.code).not_to eq ''
127
+ end
128
+ end
129
+ end
130
+
131
+ describe 'XHR DELETE #destroy' do
132
+ it 'deletes the enrollment_status' do
133
+ enrollment_status
134
+ expect do
135
+ gaku_js_delete :destroy, id: enrollment_status
136
+ end.to change(Gaku::EnrollmentStatus, :count).by(-1)
137
+ end
138
+
139
+ it 'decrements @count' do
140
+ gaku_js_delete :destroy, id: enrollment_status
141
+ expect(assigns(:count)).to eq 0
142
+ end
143
+
144
+ it 'sets flash' do
145
+ gaku_js_delete :destroy, id: enrollment_status
146
+ flash_destroyed?
147
+ end
148
+ end
149
+
150
+ end
151
+
152
+ end
153
+ end