gaku_admin 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/assets/fonts/gaku/admin/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/gaku/admin/glyphicons-halflings-regular.svg +228 -0
- data/app/assets/fonts/gaku/admin/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/gaku/admin/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/javascripts/gaku/admin/admin.coffee +51 -0
- data/app/assets/javascripts/gaku/admin/base.js.coffee +118 -0
- data/app/assets/javascripts/gaku/admin/slide.js.erb +14 -0
- data/app/assets/javascripts/gaku/admin.js.coffee +43 -0
- data/app/assets/stylesheets/gaku/admin/bootstrap_and_theme.css.scss +571 -0
- data/app/assets/stylesheets/gaku/admin/disposals.css.scss +14 -0
- data/app/assets/stylesheets/gaku/admin/gaku.css.scss +216 -0
- data/app/assets/stylesheets/gaku/admin.css +13 -0
- data/app/assets/templates/roster.xls +0 -0
- data/app/controllers/gaku/admin/achievements/simple_grade_types_controller.rb +70 -0
- data/app/controllers/gaku/admin/attendance_types_controller.rb +60 -0
- data/app/controllers/gaku/admin/badge_types_controller.rb +69 -0
- data/app/controllers/gaku/admin/base_controller.rb +43 -0
- data/app/controllers/gaku/admin/commute_method_types_controller.rb +54 -0
- data/app/controllers/gaku/admin/contact_types_controller.rb +55 -0
- data/app/controllers/gaku/admin/departments_controller.rb +55 -0
- data/app/controllers/gaku/admin/enrollment_statuses_controller.rb +58 -0
- data/app/controllers/gaku/admin/grading_method_sets/grading_method_set_items_controller.rb +70 -0
- data/app/controllers/gaku/admin/grading_method_sets_controller.rb +69 -0
- data/app/controllers/gaku/admin/grading_methods_controller.rb +60 -0
- data/app/controllers/gaku/admin/presets_controller.rb +75 -0
- data/app/controllers/gaku/admin/roles_controller.rb +54 -0
- data/app/controllers/gaku/admin/school_years/semesters_controller.rb +58 -0
- data/app/controllers/gaku/admin/school_years_controller.rb +63 -0
- data/app/controllers/gaku/admin/schools/campuses/addresses_controller.rb +64 -0
- data/app/controllers/gaku/admin/schools/campuses/contacts_controller.rb +77 -0
- data/app/controllers/gaku/admin/schools/campuses_controller.rb +72 -0
- data/app/controllers/gaku/admin/schools/programs_controller.rb +79 -0
- data/app/controllers/gaku/admin/schools_controller.rb +84 -0
- data/app/controllers/gaku/admin/specialties_controller.rb +63 -0
- data/app/controllers/gaku/admin/states_controller.rb +92 -0
- data/app/controllers/gaku/admin/system_tools_controller.rb +8 -0
- data/app/controllers/gaku/admin/templates_controller.rb +72 -0
- data/app/controllers/gaku/admin/users_controller.rb +82 -0
- data/app/controllers/gaku/states_controller.rb +17 -0
- data/app/helpers/gaku/admin_helper.rb +12 -0
- data/app/helpers/gaku/presets_helper.rb +10 -0
- data/app/helpers/gaku/shared_helper.rb +25 -0
- data/app/overrides/admin_menu.rb +6 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/_fields.html.slim +8 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/_form.html.slim +3 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/_form_fields.html.slim +7 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/_modal.html.slim +4 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/_simple_grade_type.html.slim +2 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/create.js.erb +7 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/destroy.js.erb +2 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/edit.js.erb +3 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/index.html.slim +23 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/new.js.erb +3 -0
- data/app/views/gaku/admin/achievements/simple_grade_types/update.js.erb +4 -0
- data/app/views/gaku/admin/attendance_types/_attendance_type.html.slim +2 -0
- data/app/views/gaku/admin/attendance_types/_fields.html.slim +9 -0
- data/app/views/gaku/admin/attendance_types/_form.html.slim +3 -0
- data/app/views/gaku/admin/attendance_types/_form_fields.html.slim +6 -0
- data/app/views/gaku/admin/attendance_types/_modal.html.slim +4 -0
- data/app/views/gaku/admin/attendance_types/create.js.erb +7 -0
- data/app/views/gaku/admin/attendance_types/destroy.js.erb +2 -0
- data/app/views/gaku/admin/attendance_types/edit.js.erb +4 -0
- data/app/views/gaku/admin/attendance_types/index.html.slim +24 -0
- data/app/views/gaku/admin/attendance_types/index.json.rb +1 -0
- data/app/views/gaku/admin/attendance_types/new.js.erb +4 -0
- data/app/views/gaku/admin/attendance_types/update.js.erb +4 -0
- data/app/views/gaku/admin/badge_types/_badge_type.html.slim +2 -0
- data/app/views/gaku/admin/badge_types/_fields.html.slim +7 -0
- data/app/views/gaku/admin/badge_types/_form.html.slim +3 -0
- data/app/views/gaku/admin/badge_types/_form_fields.html.slim +7 -0
- data/app/views/gaku/admin/badge_types/_modal.html.slim +4 -0
- data/app/views/gaku/admin/badge_types/destroy.js.erb +2 -0
- data/app/views/gaku/admin/badge_types/edit.js.erb +3 -0
- data/app/views/gaku/admin/badge_types/index.html.slim +22 -0
- data/app/views/gaku/admin/badge_types/new.js.erb +3 -0
- data/app/views/gaku/admin/commute_method_types/_commute_method_type.html.slim +2 -0
- data/app/views/gaku/admin/commute_method_types/_fields.html.slim +4 -0
- data/app/views/gaku/admin/commute_method_types/_form.html.slim +3 -0
- data/app/views/gaku/admin/commute_method_types/_modal.html.slim +4 -0
- data/app/views/gaku/admin/commute_method_types/create.js.erb +7 -0
- data/app/views/gaku/admin/commute_method_types/destroy.js.erb +2 -0
- data/app/views/gaku/admin/commute_method_types/edit.js.erb +3 -0
- data/app/views/gaku/admin/commute_method_types/index.html.slim +18 -0
- data/app/views/gaku/admin/commute_method_types/new.js.erb +3 -0
- data/app/views/gaku/admin/commute_method_types/update.js.erb +3 -0
- data/app/views/gaku/admin/contact_types/_contact_type.html.slim +2 -0
- data/app/views/gaku/admin/contact_types/_fields.html.slim +4 -0
- data/app/views/gaku/admin/contact_types/_form.html.slim +3 -0
- data/app/views/gaku/admin/contact_types/_modal.html.slim +4 -0
- data/app/views/gaku/admin/contact_types/create.js.erb +7 -0
- data/app/views/gaku/admin/contact_types/destroy.js.erb +2 -0
- data/app/views/gaku/admin/contact_types/edit.js.erb +3 -0
- data/app/views/gaku/admin/contact_types/index.html.slim +18 -0
- data/app/views/gaku/admin/contact_types/new.js.erb +3 -0
- data/app/views/gaku/admin/contact_types/update.js.erb +3 -0
- data/app/views/gaku/admin/departments/_department.html.slim +2 -0
- data/app/views/gaku/admin/departments/_form.html.slim +3 -0
- data/app/views/gaku/admin/departments/_form_fields.html.slim +1 -0
- data/app/views/gaku/admin/departments/_modal.html.slim +4 -0
- data/app/views/gaku/admin/departments/_table_fields.html.slim +5 -0
- data/app/views/gaku/admin/departments/create.js.erb +7 -0
- data/app/views/gaku/admin/departments/destroy.js.erb +2 -0
- data/app/views/gaku/admin/departments/edit.js.erb +3 -0
- data/app/views/gaku/admin/departments/index.html.slim +20 -0
- data/app/views/gaku/admin/departments/new.js.erb +3 -0
- data/app/views/gaku/admin/departments/update.js.erb +4 -0
- data/app/views/gaku/admin/enrollment_statuses/_enrollment_status.html.slim +2 -0
- data/app/views/gaku/admin/enrollment_statuses/_fields.html.slim +6 -0
- data/app/views/gaku/admin/enrollment_statuses/_form.html.slim +3 -0
- data/app/views/gaku/admin/enrollment_statuses/_form_fields.html.slim +3 -0
- data/app/views/gaku/admin/enrollment_statuses/_modal.html.slim +4 -0
- data/app/views/gaku/admin/enrollment_statuses/create.js.erb +7 -0
- data/app/views/gaku/admin/enrollment_statuses/destroy.js.erb +2 -0
- data/app/views/gaku/admin/enrollment_statuses/edit.js.erb +3 -0
- data/app/views/gaku/admin/enrollment_statuses/index.html.slim +21 -0
- data/app/views/gaku/admin/enrollment_statuses/new.js.erb +3 -0
- data/app/views/gaku/admin/enrollment_statuses/update.js.erb +4 -0
- data/app/views/gaku/admin/grading_method_sets/_fields.html.slim +9 -0
- data/app/views/gaku/admin/grading_method_sets/_form.html.slim +3 -0
- data/app/views/gaku/admin/grading_method_sets/_form_fields.html.slim +4 -0
- data/app/views/gaku/admin/grading_method_sets/_grading_method_set.html.slim +4 -0
- data/app/views/gaku/admin/grading_method_sets/_make_primary_field.html.slim +4 -0
- data/app/views/gaku/admin/grading_method_sets/_modal.html.slim +4 -0
- data/app/views/gaku/admin/grading_method_sets/create.js.erb +7 -0
- data/app/views/gaku/admin/grading_method_sets/destroy.js.erb +7 -0
- data/app/views/gaku/admin/grading_method_sets/edit.js.erb +3 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_fields.html.slim +9 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_form.html.slim +3 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_form_fields.html.slim +1 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_item.html.slim +4 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_items.html.slim +23 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_modal.html.slim +4 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/create.js.erb +7 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/destroy.js.erb +2 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/edit.js.erb +3 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/new.js.erb +3 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/update.js.erb +3 -0
- data/app/views/gaku/admin/grading_method_sets/index.html.slim +23 -0
- data/app/views/gaku/admin/grading_method_sets/make_primary.js.erb +6 -0
- data/app/views/gaku/admin/grading_method_sets/new.js.erb +3 -0
- data/app/views/gaku/admin/grading_method_sets/show.html.slim +13 -0
- data/app/views/gaku/admin/grading_method_sets/update.js.erb +3 -0
- data/app/views/gaku/admin/grading_methods/_fields.html.slim +6 -0
- data/app/views/gaku/admin/grading_methods/_form.html.slim +3 -0
- data/app/views/gaku/admin/grading_methods/_form_fields.html.slim +4 -0
- data/app/views/gaku/admin/grading_methods/_grading_method.html.slim +2 -0
- data/app/views/gaku/admin/grading_methods/_modal.html.slim +4 -0
- data/app/views/gaku/admin/grading_methods/create.js.erb +7 -0
- data/app/views/gaku/admin/grading_methods/destroy.js.erb +2 -0
- data/app/views/gaku/admin/grading_methods/edit.js.erb +3 -0
- data/app/views/gaku/admin/grading_methods/index.html.slim +20 -0
- data/app/views/gaku/admin/grading_methods/new.js.erb +3 -0
- data/app/views/gaku/admin/grading_methods/update.js.erb +3 -0
- data/app/views/gaku/admin/presets/_address.html.slim +19 -0
- data/app/views/gaku/admin/presets/_chooser_fields.html.slim +91 -0
- data/app/views/gaku/admin/presets/_export_formats.html.slim +19 -0
- data/app/views/gaku/admin/presets/_fields.html.slim +5 -0
- data/app/views/gaku/admin/presets/_grading.html.slim +14 -0
- data/app/views/gaku/admin/presets/_locale.html.slim +3 -0
- data/app/views/gaku/admin/presets/_names_order.html.slim +15 -0
- data/app/views/gaku/admin/presets/_pagination.html.slim +25 -0
- data/app/views/gaku/admin/presets/_person.html.slim +8 -0
- data/app/views/gaku/admin/presets/_preset.html.slim +2 -0
- data/app/views/gaku/admin/presets/_student.html.slim +19 -0
- data/app/views/gaku/admin/presets/_tabs.html.slim +51 -0
- data/app/views/gaku/admin/presets/edit.html.slim +1 -0
- data/app/views/gaku/admin/presets/index.html.slim +16 -0
- data/app/views/gaku/admin/roles/_fields.html.slim +5 -0
- data/app/views/gaku/admin/roles/_form.html.slim +3 -0
- data/app/views/gaku/admin/roles/_form_fields.html.slim +1 -0
- data/app/views/gaku/admin/roles/_modal.html.slim +4 -0
- data/app/views/gaku/admin/roles/_role.html.slim +2 -0
- data/app/views/gaku/admin/roles/create.js.erb +7 -0
- data/app/views/gaku/admin/roles/destroy.js.erb +2 -0
- data/app/views/gaku/admin/roles/edit.js.erb +3 -0
- data/app/views/gaku/admin/roles/index.html.slim +20 -0
- data/app/views/gaku/admin/roles/new.js.erb +3 -0
- data/app/views/gaku/admin/roles/update.js.erb +3 -0
- data/app/views/gaku/admin/school_years/_fields.html.slim +7 -0
- data/app/views/gaku/admin/school_years/_form.html.slim +3 -0
- data/app/views/gaku/admin/school_years/_form_fields.html.slim +5 -0
- data/app/views/gaku/admin/school_years/_modal.html.slim +5 -0
- data/app/views/gaku/admin/school_years/_school_year.html.slim +3 -0
- data/app/views/gaku/admin/school_years/_show_table.html.slim +10 -0
- data/app/views/gaku/admin/school_years/create.js.erb +10 -0
- data/app/views/gaku/admin/school_years/destroy.js.erb +2 -0
- data/app/views/gaku/admin/school_years/edit.js.erb +5 -0
- data/app/views/gaku/admin/school_years/index.html.slim +21 -0
- data/app/views/gaku/admin/school_years/new.js.erb +5 -0
- data/app/views/gaku/admin/school_years/semesters/_fields.html.slim +7 -0
- data/app/views/gaku/admin/school_years/semesters/_form.html.slim +3 -0
- data/app/views/gaku/admin/school_years/semesters/_form_fields.html.slim +5 -0
- data/app/views/gaku/admin/school_years/semesters/_modal.html.slim +5 -0
- data/app/views/gaku/admin/school_years/semesters/_semester.html.slim +3 -0
- data/app/views/gaku/admin/school_years/semesters/_semesters.html.slim +22 -0
- data/app/views/gaku/admin/school_years/semesters/create.js.erb +10 -0
- data/app/views/gaku/admin/school_years/semesters/destroy.js.erb +2 -0
- data/app/views/gaku/admin/school_years/semesters/edit.js.erb +6 -0
- data/app/views/gaku/admin/school_years/semesters/new.js.erb +4 -0
- data/app/views/gaku/admin/school_years/semesters/update.js.erb +8 -0
- data/app/views/gaku/admin/school_years/show.html.slim +15 -0
- data/app/views/gaku/admin/school_years/update.js.erb +8 -0
- data/app/views/gaku/admin/schools/_fields.html.slim +9 -0
- data/app/views/gaku/admin/schools/_form.html.slim +3 -0
- data/app/views/gaku/admin/schools/_form_fields.html.slim +25 -0
- data/app/views/gaku/admin/schools/_school.html.slim +6 -0
- data/app/views/gaku/admin/schools/_show_table.html.slim +35 -0
- data/app/views/gaku/admin/schools/_tabs.html.slim +15 -0
- data/app/views/gaku/admin/schools/campuses/_campus.html.slim +6 -0
- data/app/views/gaku/admin/schools/campuses/_campuses.html.slim +23 -0
- data/app/views/gaku/admin/schools/campuses/_form.html.slim +3 -0
- data/app/views/gaku/admin/schools/campuses/_form_fields.html.slim +1 -0
- data/app/views/gaku/admin/schools/campuses/_picture.html.slim +8 -0
- data/app/views/gaku/admin/schools/campuses/_show_table.html.slim +10 -0
- data/app/views/gaku/admin/schools/campuses/_tabs.html.slim +15 -0
- data/app/views/gaku/admin/schools/campuses/_upload_picture.html.slim +7 -0
- data/app/views/gaku/admin/schools/campuses/addresses/_address.html.slim +7 -0
- data/app/views/gaku/admin/schools/campuses/addresses/_address_row_fields.html.slim +4 -0
- data/app/views/gaku/admin/schools/campuses/addresses/_addresses.html.slim +24 -0
- data/app/views/gaku/admin/schools/campuses/addresses/_fields.html.slim +7 -0
- data/app/views/gaku/admin/schools/campuses/addresses/_form.html.slim +3 -0
- data/app/views/gaku/admin/schools/campuses/addresses/_form_fields.html.slim +26 -0
- data/app/views/gaku/admin/schools/campuses/addresses/_modal.html.slim +5 -0
- data/app/views/gaku/admin/schools/campuses/addresses/create.js.erb +6 -0
- data/app/views/gaku/admin/schools/campuses/addresses/destroy.js.erb +2 -0
- data/app/views/gaku/admin/schools/campuses/addresses/edit.js.erb +4 -0
- data/app/views/gaku/admin/schools/campuses/addresses/new.js.erb +4 -0
- data/app/views/gaku/admin/schools/campuses/addresses/update.js.erb +4 -0
- data/app/views/gaku/admin/schools/campuses/contacts/_contact.html.slim +3 -0
- data/app/views/gaku/admin/schools/campuses/contacts/_contacts.html.slim +22 -0
- data/app/views/gaku/admin/schools/campuses/contacts/_delete_link.html.slim +1 -0
- data/app/views/gaku/admin/schools/campuses/contacts/_fields.html.slim +12 -0
- data/app/views/gaku/admin/schools/campuses/contacts/_form.html.slim +3 -0
- data/app/views/gaku/admin/schools/campuses/contacts/_form_fields.html.slim +14 -0
- data/app/views/gaku/admin/schools/campuses/contacts/_modal.html.slim +5 -0
- data/app/views/gaku/admin/schools/campuses/contacts/_primary_field.html.slim +13 -0
- data/app/views/gaku/admin/schools/campuses/contacts/create.js.erb +20 -0
- data/app/views/gaku/admin/schools/campuses/contacts/destroy.js.erb +8 -0
- data/app/views/gaku/admin/schools/campuses/contacts/edit.js.erb +4 -0
- data/app/views/gaku/admin/schools/campuses/contacts/make_primary.js.erb +6 -0
- data/app/views/gaku/admin/schools/campuses/contacts/new.js.erb +3 -0
- data/app/views/gaku/admin/schools/campuses/contacts/soft_delete.js.erb +8 -0
- data/app/views/gaku/admin/schools/campuses/contacts/update.js.erb +14 -0
- data/app/views/gaku/admin/schools/campuses/create.js.erb +9 -0
- data/app/views/gaku/admin/schools/campuses/destroy.js.erb +2 -0
- data/app/views/gaku/admin/schools/campuses/edit.html.slim +19 -0
- data/app/views/gaku/admin/schools/campuses/new.js.erb +3 -0
- data/app/views/gaku/admin/schools/campuses/show.html.slim +13 -0
- data/app/views/gaku/admin/schools/create.js.erb +7 -0
- data/app/views/gaku/admin/schools/destroy.js.erb +1 -0
- data/app/views/gaku/admin/schools/edit.html.slim +19 -0
- data/app/views/gaku/admin/schools/edit_master.html.slim +22 -0
- data/app/views/gaku/admin/schools/index.html.slim +25 -0
- data/app/views/gaku/admin/schools/new.js.erb +3 -0
- data/app/views/gaku/admin/schools/programs/_fields.html.slim +10 -0
- data/app/views/gaku/admin/schools/programs/_form.html.slim +14 -0
- data/app/views/gaku/admin/schools/programs/_form_fields.html.slim +6 -0
- data/app/views/gaku/admin/schools/programs/_modal.html.slim +3 -0
- data/app/views/gaku/admin/schools/programs/_program.html.slim +2 -0
- data/app/views/gaku/admin/schools/programs/_programs.html.slim +23 -0
- data/app/views/gaku/admin/schools/programs/create.js.erb +7 -0
- data/app/views/gaku/admin/schools/programs/destroy.js.erb +2 -0
- data/app/views/gaku/admin/schools/programs/edit.js.erb +3 -0
- data/app/views/gaku/admin/schools/programs/new.js.erb +3 -0
- data/app/views/gaku/admin/schools/programs/program_levels/_form_fields.html.slim +6 -0
- data/app/views/gaku/admin/schools/programs/program_levels/_modal.html.slim +11 -0
- data/app/views/gaku/admin/schools/programs/program_specialties/_form_fields.html.slim +7 -0
- data/app/views/gaku/admin/schools/programs/program_specialties/_modal.html.slim +10 -0
- data/app/views/gaku/admin/schools/programs/program_syllabuses/_form_fields.html.slim +5 -0
- data/app/views/gaku/admin/schools/programs/program_syllabuses/_modal.html.slim +10 -0
- data/app/views/gaku/admin/schools/programs/show_program_levels.js.erb +3 -0
- data/app/views/gaku/admin/schools/programs/show_program_specialties.js.erb +3 -0
- data/app/views/gaku/admin/schools/programs/show_program_syllabuses.js.erb +3 -0
- data/app/views/gaku/admin/schools/programs/update.js.erb +3 -0
- data/app/views/gaku/admin/schools/show.html.slim +13 -0
- data/app/views/gaku/admin/schools/show_master.html.slim +14 -0
- data/app/views/gaku/admin/shared/_picture.html.slim +6 -0
- data/app/views/gaku/admin/shared/_upload_picture.html.slim +7 -0
- data/app/views/gaku/admin/specialties/_fields.html.slim +7 -0
- data/app/views/gaku/admin/specialties/_form.html.slim +3 -0
- data/app/views/gaku/admin/specialties/_form_fields.html.slim +4 -0
- data/app/views/gaku/admin/specialties/_modal.html.slim +4 -0
- data/app/views/gaku/admin/specialties/_specialty.html.slim +2 -0
- data/app/views/gaku/admin/specialties/create.js.erb +7 -0
- data/app/views/gaku/admin/specialties/destroy.js.erb +2 -0
- data/app/views/gaku/admin/specialties/edit.js.erb +3 -0
- data/app/views/gaku/admin/specialties/index.html.slim +21 -0
- data/app/views/gaku/admin/specialties/new.js.erb +3 -0
- data/app/views/gaku/admin/specialties/update.js.erb +3 -0
- data/app/views/gaku/admin/states/_country_select_form.html.slim +4 -0
- data/app/views/gaku/admin/states/_country_table.html.slim +11 -0
- data/app/views/gaku/admin/states/_fields.html.slim +8 -0
- data/app/views/gaku/admin/states/_form.html.slim +4 -0
- data/app/views/gaku/admin/states/_form_fields.html.slim +14 -0
- data/app/views/gaku/admin/states/_modal.html.slim +4 -0
- data/app/views/gaku/admin/states/_state.html.slim +2 -0
- data/app/views/gaku/admin/states/country_states.js.erb +2 -0
- data/app/views/gaku/admin/states/create.js.erb +7 -0
- data/app/views/gaku/admin/states/destroy.js.erb +2 -0
- data/app/views/gaku/admin/states/edit.js.erb +3 -0
- data/app/views/gaku/admin/states/index.html.slim +15 -0
- data/app/views/gaku/admin/states/new.js.erb +3 -0
- data/app/views/gaku/admin/states/update.js.erb +3 -0
- data/app/views/gaku/admin/system_tools/index.html.slim +1 -0
- data/app/views/gaku/admin/templates/_error_msg.html.slim +8 -0
- data/app/views/gaku/admin/templates/_fields.html.slim +8 -0
- data/app/views/gaku/admin/templates/_form.html.slim +3 -0
- data/app/views/gaku/admin/templates/_form_fields.html.slim +4 -0
- data/app/views/gaku/admin/templates/_modal.html.slim +4 -0
- data/app/views/gaku/admin/templates/_template.html.slim +2 -0
- data/app/views/gaku/admin/templates/destroy.js.erb +2 -0
- data/app/views/gaku/admin/templates/edit.html.slim +1 -0
- data/app/views/gaku/admin/templates/index.html.slim +20 -0
- data/app/views/gaku/admin/templates/new.html.slim +1 -0
- data/app/views/gaku/admin/users/_fields.html.slim +5 -0
- data/app/views/gaku/admin/users/_form.html.slim +3 -0
- data/app/views/gaku/admin/users/_form_fields.html.slim +14 -0
- data/app/views/gaku/admin/users/_modal.html.slim +4 -0
- data/app/views/gaku/admin/users/_user.html.slim +2 -0
- data/app/views/gaku/admin/users/create.js.erb +7 -0
- data/app/views/gaku/admin/users/destroy.js.erb +2 -0
- data/app/views/gaku/admin/users/edit.js.erb +3 -0
- data/app/views/gaku/admin/users/index.html.slim +21 -0
- data/app/views/gaku/admin/users/new.js.erb +3 -0
- data/app/views/gaku/admin/users/update.js.erb +4 -0
- data/app/views/gaku/layouts/admin/edit.html.slim +10 -0
- data/app/views/gaku/layouts/admin/gaku.html.slim +27 -0
- data/app/views/gaku/layouts/admin/index.html.slim +12 -0
- data/app/views/gaku/layouts/admin/show.html.slim +10 -0
- data/app/views/gaku/shared/_delete_link.html.slim +1 -0
- data/app/views/gaku/shared/_delete_modal.html.slim +11 -0
- data/app/views/gaku/shared/_errors.html.slim +6 -0
- data/app/views/gaku/shared/_flash.html.slim +4 -0
- data/app/views/gaku/shared/_language_bar.html.slim +8 -0
- data/app/views/gaku/shared/_login_widget.html.slim +15 -0
- data/app/views/gaku/shared/_manage_buttons.html.slim +4 -0
- data/app/views/gaku/shared/_modal_config.html.slim +37 -0
- data/app/views/gaku/shared/_multi_errors.html.slim +6 -0
- data/app/views/gaku/shared/_picture.html.slim +8 -0
- data/app/views/gaku/shared/_upload_picture.html.slim +7 -0
- data/app/views/gaku/shared/error.js.erb +2 -0
- data/app/views/gaku/shared/menu/_admin.html.erb +71 -0
- data/app/views/gaku/shared/multi_error.js.erb +2 -0
- data/app/views/gaku/shared/notice.js.erb +2 -0
- data/app/views/gaku/states/_no_states_select.html.slim +1 -0
- data/app/views/gaku/states/_states_select.html.slim +1 -0
- data/app/views/gaku/states/index.js.erb +5 -0
- data/config/initializers/client_side_validations.rb +9 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/routes.rb +67 -0
- data/lib/gaku/admin/engine.rb +30 -0
- data/lib/gaku/admin.rb +31 -0
- data/lib/gaku/app_responder.rb +6 -0
- data/lib/gaku_admin.rb +1 -0
- data/lib/tasks/admin_user.rake +104 -0
- data/lib/tasks/core.rake +65 -0
- data/lib/tasks/reset.rake +37 -0
- metadata +684 -0
@@ -0,0 +1,216 @@
|
|
1
|
+
// for nprogress ----------------
|
2
|
+
$nprogress-color: #bbbcde;
|
3
|
+
@import 'nprogress';
|
4
|
+
@import 'nprogress-bootstrap';
|
5
|
+
|
6
|
+
// for HTML tag ----------------
|
7
|
+
$c_red: #e45353; /* Error red */
|
8
|
+
|
9
|
+
html {
|
10
|
+
// overflow-y: hidden;
|
11
|
+
border: 0;
|
12
|
+
margin: 0;
|
13
|
+
padding: 0;
|
14
|
+
height: 100%;
|
15
|
+
width: 100%;
|
16
|
+
}
|
17
|
+
|
18
|
+
body {
|
19
|
+
padding-top: 70px;
|
20
|
+
}
|
21
|
+
|
22
|
+
hr {
|
23
|
+
margin: 20px 0px;
|
24
|
+
}
|
25
|
+
|
26
|
+
h1, h2, h3, h4, h5, h6 {
|
27
|
+
margin: 0px;
|
28
|
+
}
|
29
|
+
|
30
|
+
|
31
|
+
// for GAKUEngine ----------------
|
32
|
+
.container {
|
33
|
+
width: 100%;
|
34
|
+
max-width: 1900px;
|
35
|
+
}
|
36
|
+
|
37
|
+
.notice {
|
38
|
+
border: 2px;
|
39
|
+
background: {
|
40
|
+
color: #00a3af;
|
41
|
+
}
|
42
|
+
|
43
|
+
font: {
|
44
|
+
size: 20px;
|
45
|
+
}
|
46
|
+
|
47
|
+
color: black;
|
48
|
+
padding: 10px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.h4-vm {
|
52
|
+
height:28px;
|
53
|
+
line-height:28px;
|
54
|
+
}
|
55
|
+
|
56
|
+
th.vm {
|
57
|
+
vertical-align: middle;
|
58
|
+
}
|
59
|
+
th.vm-tc {
|
60
|
+
vertical-align: middle;
|
61
|
+
text-align: center;
|
62
|
+
}
|
63
|
+
th.vm-tr {
|
64
|
+
vertical-align: middle;
|
65
|
+
text-align: right;
|
66
|
+
}
|
67
|
+
td.vm {
|
68
|
+
vertical-align: middle;
|
69
|
+
}
|
70
|
+
td.vm-tc {
|
71
|
+
vertical-align: middle;
|
72
|
+
text-align: center;
|
73
|
+
}
|
74
|
+
td.vm-tr {
|
75
|
+
vertical-align: middle;
|
76
|
+
text-align: right;
|
77
|
+
}
|
78
|
+
|
79
|
+
.table {
|
80
|
+
tr {
|
81
|
+
td {
|
82
|
+
.btn {
|
83
|
+
margin-right: 5px;
|
84
|
+
&:last-child {
|
85
|
+
margin-right: 0px;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
&.th-center {
|
91
|
+
th {
|
92
|
+
vertical-align: middle;
|
93
|
+
text-align: center;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
.pull-right {
|
99
|
+
.btn {
|
100
|
+
margin-right: 10px;
|
101
|
+
&:last-child {
|
102
|
+
margin-right: 0px;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
// for bootstrap ----------------
|
108
|
+
|
109
|
+
.btn-toolbar {
|
110
|
+
margin: 0px;
|
111
|
+
height: 28px;
|
112
|
+
.last {
|
113
|
+
margin-right: 15px;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
.btn-group + .btn-group {
|
118
|
+
margin-left: 0px;
|
119
|
+
}
|
120
|
+
|
121
|
+
.icon-chair {
|
122
|
+
background-image: url("/assets/icon-chair.png");
|
123
|
+
background-position: 0px;
|
124
|
+
}
|
125
|
+
|
126
|
+
span.required {
|
127
|
+
color: $c_red;
|
128
|
+
font-weight: bold;
|
129
|
+
font-size: 1.2em;
|
130
|
+
}
|
131
|
+
.fieldWithErrors {
|
132
|
+
margin: 0px;
|
133
|
+
display: block;
|
134
|
+
clear: both;
|
135
|
+
}
|
136
|
+
|
137
|
+
form {
|
138
|
+
margin: 0px;
|
139
|
+
}
|
140
|
+
|
141
|
+
.alert ul {
|
142
|
+
margin-bottom:0px;
|
143
|
+
}
|
144
|
+
|
145
|
+
.well {
|
146
|
+
.well {
|
147
|
+
background-color: #FFF;
|
148
|
+
margin-bottom: 0px;
|
149
|
+
.well {
|
150
|
+
background-color: #F5F5F5;
|
151
|
+
margin-bottom: 20px;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
&.well-white {
|
155
|
+
background-color: #FFF;
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
.navbar-brand {
|
160
|
+
padding: 12px 15px 0px 15px;
|
161
|
+
}
|
162
|
+
|
163
|
+
.divider-vertical {
|
164
|
+
height: 42px;
|
165
|
+
border-right: 1px solid #B8B8B8;
|
166
|
+
border-left: 1px solid #F2F2F2;
|
167
|
+
}
|
168
|
+
|
169
|
+
.tab-content {
|
170
|
+
border: 1px solid #DDD;
|
171
|
+
padding: 15px;
|
172
|
+
border-top: none;
|
173
|
+
border-radius: 0px 0px 4px 4px;
|
174
|
+
}
|
175
|
+
|
176
|
+
|
177
|
+
// for fix ----------------
|
178
|
+
|
179
|
+
.mt-0 { margin-top: 0px }
|
180
|
+
.mt-xs { margin-top: 5px }
|
181
|
+
.mt-s { margin-top: 10px }
|
182
|
+
.mt-m { margin-top: 15px }
|
183
|
+
.mt-l { margin-top: 20px }
|
184
|
+
|
185
|
+
.mr-xs { margin-right: 5px }
|
186
|
+
.mr-s { margin-right: 10px }
|
187
|
+
.mr-m { margin-right: 15px }
|
188
|
+
.mr-l { margin-right: 20px }
|
189
|
+
|
190
|
+
.mb-xs { margin-bottom: 5px }
|
191
|
+
.mb-s { margin-bottom: 10px }
|
192
|
+
.mb-m { margin-bottom: 15px }
|
193
|
+
.mb-l { margin-bottom: 20px }
|
194
|
+
.mb-0 { margin-bottom: 0px }
|
195
|
+
|
196
|
+
.ml-xs { margin-left: 5px }
|
197
|
+
.ml-s { margin-left: 10px }
|
198
|
+
.ml-m { margin-left: 15px }
|
199
|
+
.ml-l { margin-left: 20px }
|
200
|
+
|
201
|
+
//.d-none { display: none }
|
202
|
+
|
203
|
+
|
204
|
+
// for responsive ----------------
|
205
|
+
|
206
|
+
/* Small devices (tablets, 768px and down) */
|
207
|
+
@media (max-width: 768px) {
|
208
|
+
}
|
209
|
+
|
210
|
+
/* Medium devices (desktops, 992px) */
|
211
|
+
@media (min-width: 768px) and (max-width: 992px) {
|
212
|
+
}
|
213
|
+
|
214
|
+
/* Large devices (large desktops, 1200px and up) */
|
215
|
+
@media (min-width: 1200px) {
|
216
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
*= require gaku/admin/bootstrap_and_theme
|
3
|
+
*= require bootstrap-datepicker
|
4
|
+
* require font-awesome
|
5
|
+
*= require jquery.ui.autocomplete
|
6
|
+
*= require jquery.minicolors
|
7
|
+
*= require nprogress
|
8
|
+
*= require nprogress-bootstrap
|
9
|
+
*= require phantom_helpers
|
10
|
+
*= require phantom_forms
|
11
|
+
*= require gaku/admin/gaku
|
12
|
+
*= require_self
|
13
|
+
*/
|
Binary file
|
@@ -0,0 +1,70 @@
|
|
1
|
+
module Gaku
|
2
|
+
class Admin::Achievements::SimpleGradeTypesController < Admin::BaseController
|
3
|
+
respond_to :js, only: %i( new create update edit destroy )
|
4
|
+
respond_to :html, only: %i( index )
|
5
|
+
|
6
|
+
before_action :set_simple_grade_type, only: %i( edit update destroy )
|
7
|
+
before_action :load_data, only: %i( new edit )
|
8
|
+
|
9
|
+
def index
|
10
|
+
@simple_grade_types = SimpleGradeType.all
|
11
|
+
set_count
|
12
|
+
respond_with @simple_grade_types
|
13
|
+
end
|
14
|
+
|
15
|
+
def new
|
16
|
+
@simple_grade_type = SimpleGradeType.new
|
17
|
+
respond_with @simple_grade_type
|
18
|
+
end
|
19
|
+
|
20
|
+
def create
|
21
|
+
@simple_grade_type = SimpleGradeType.new(simple_grade_type_params)
|
22
|
+
@simple_grade_type.save
|
23
|
+
set_count
|
24
|
+
flash.now[:notice] = t(:'notice.created', resource: t_resource)
|
25
|
+
respond_with @simple_grade_type
|
26
|
+
end
|
27
|
+
|
28
|
+
def edit
|
29
|
+
end
|
30
|
+
|
31
|
+
def update
|
32
|
+
@simple_grade_type.update(simple_grade_type_params)
|
33
|
+
flash.now[:notice] = t(:'notice.updated', resource: t_resource)
|
34
|
+
respond_with @simple_grade_type
|
35
|
+
end
|
36
|
+
|
37
|
+
def destroy
|
38
|
+
@simple_grade_type.destroy
|
39
|
+
set_count
|
40
|
+
respond_with @simple_grade_type
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def set_simple_grade_type
|
46
|
+
@simple_grade_type = SimpleGradeType.find(params[:id])
|
47
|
+
end
|
48
|
+
|
49
|
+
def simple_grade_type_params
|
50
|
+
params.require(:simple_grade_type).permit(attributes)
|
51
|
+
end
|
52
|
+
|
53
|
+
def set_count
|
54
|
+
@count = SimpleGradeType.count
|
55
|
+
end
|
56
|
+
|
57
|
+
def load_data
|
58
|
+
@schools = School.all
|
59
|
+
@grading_methods = GradingMethod.all
|
60
|
+
end
|
61
|
+
|
62
|
+
def attributes
|
63
|
+
%i(name max_score passing_score grading_method_id school_id )
|
64
|
+
end
|
65
|
+
|
66
|
+
def t_resource
|
67
|
+
t(:'simple_grade_type.singular')
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module Gaku
|
2
|
+
class Admin::AttendanceTypesController < Admin::BaseController
|
3
|
+
|
4
|
+
#load_and_authorize_resource class: AttendanceType
|
5
|
+
|
6
|
+
respond_to :json, only: :index
|
7
|
+
respond_to :js, only: %i( new create edit update destroy )
|
8
|
+
respond_to :html, only: :index
|
9
|
+
|
10
|
+
before_action :set_attendance_type, only: %i( edit update destroy )
|
11
|
+
|
12
|
+
def index
|
13
|
+
@attendance_types = AttendanceType.all
|
14
|
+
@count = AttendanceType.count
|
15
|
+
respond_with @attendance_types
|
16
|
+
end
|
17
|
+
|
18
|
+
def new
|
19
|
+
@attendance_type = AttendanceType.new
|
20
|
+
respond_with @attendance_type
|
21
|
+
end
|
22
|
+
|
23
|
+
def create
|
24
|
+
@attendance_type = AttendanceType.new(attendance_type_params)
|
25
|
+
@attendance_type.save
|
26
|
+
@count = AttendanceType.count
|
27
|
+
respond_with @attendance_type
|
28
|
+
end
|
29
|
+
|
30
|
+
def edit
|
31
|
+
end
|
32
|
+
|
33
|
+
def update
|
34
|
+
@attendance_type.update(attendance_type_params)
|
35
|
+
respond_with @attendance_type
|
36
|
+
end
|
37
|
+
|
38
|
+
def destroy
|
39
|
+
@attendance_type.destroy
|
40
|
+
@count = AttendanceType.count
|
41
|
+
respond_with @attendance_type
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def set_attendance_type
|
47
|
+
@attendance_type = AttendanceType.find(params[:id])
|
48
|
+
end
|
49
|
+
|
50
|
+
def attendance_type_params
|
51
|
+
params.require(:attendance_type).permit(attributes)
|
52
|
+
end
|
53
|
+
|
54
|
+
def attributes
|
55
|
+
%i(name color_code counted_absent disable_credit credit_rate auto_credit)
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module Gaku
|
2
|
+
class Admin::BadgeTypesController < Admin::BaseController
|
3
|
+
|
4
|
+
#load_and_authorize_resource class: Achievement
|
5
|
+
|
6
|
+
respond_to :js, only: %i( new edit destroy )
|
7
|
+
respond_to :html, only: %i( index create update )
|
8
|
+
|
9
|
+
before_action :set_badge_type, only: %i( edit update destroy )
|
10
|
+
|
11
|
+
def index
|
12
|
+
@badge_types = BadgeType.all
|
13
|
+
set_count
|
14
|
+
respond_with @badge_types
|
15
|
+
end
|
16
|
+
|
17
|
+
def new
|
18
|
+
@badge_type = BadgeType.new
|
19
|
+
respond_with @badge_type
|
20
|
+
end
|
21
|
+
|
22
|
+
def create
|
23
|
+
@badge_type = BadgeType.new(badge_type_params)
|
24
|
+
@badge_type.save
|
25
|
+
set_count
|
26
|
+
flash[:notice] = t(:'notice.created', resource: t_resource)
|
27
|
+
respond_with [:admin, :badge_types]
|
28
|
+
end
|
29
|
+
|
30
|
+
def edit
|
31
|
+
end
|
32
|
+
|
33
|
+
def update
|
34
|
+
@badge_type.update(badge_type_params)
|
35
|
+
flash[:notice] = t(:'notice.updated', resource: t_resource)
|
36
|
+
respond_with [:admin, :badge_types]
|
37
|
+
end
|
38
|
+
|
39
|
+
def destroy
|
40
|
+
@badge_type.destroy
|
41
|
+
flash[:notice] = t(:'notice.destroyed', resource: t_resource)
|
42
|
+
set_count
|
43
|
+
respond_with @badge_type
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def set_badge_type
|
49
|
+
@badge_type = BadgeType.find(params[:id])
|
50
|
+
end
|
51
|
+
|
52
|
+
def badge_type_params
|
53
|
+
params.require(:badge_type).permit(attributes)
|
54
|
+
end
|
55
|
+
|
56
|
+
def set_count
|
57
|
+
@count = BadgeType.count
|
58
|
+
end
|
59
|
+
|
60
|
+
def attributes
|
61
|
+
%i(name description code authority url issuer badge_image )
|
62
|
+
end
|
63
|
+
|
64
|
+
def t_resource
|
65
|
+
t(:'badge_type.singular')
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Gaku
|
2
|
+
module Admin
|
3
|
+
class BaseController < CoreController
|
4
|
+
|
5
|
+
self.responder = AppResponder
|
6
|
+
respond_to :html
|
7
|
+
|
8
|
+
layout :resolve_layout
|
9
|
+
|
10
|
+
before_filter :authorize_admin
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def current_ability
|
15
|
+
@current_ability ||= Gaku::AdminAbility.new(current_user)
|
16
|
+
end
|
17
|
+
|
18
|
+
def resolve_layout
|
19
|
+
case action_name
|
20
|
+
when 'index'
|
21
|
+
'gaku/layouts/admin/index'
|
22
|
+
when 'show'
|
23
|
+
'gaku/layouts/admin/show'
|
24
|
+
else
|
25
|
+
'gaku/layouts/admin/gaku'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
protected
|
30
|
+
|
31
|
+
def authorize_admin
|
32
|
+
begin
|
33
|
+
record = model_class.new
|
34
|
+
rescue
|
35
|
+
record = Object.new
|
36
|
+
end
|
37
|
+
authorize! :admin, record
|
38
|
+
authorize! params[:action].to_sym, record
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Gaku
|
2
|
+
class Admin::CommuteMethodTypesController < Admin::BaseController
|
3
|
+
|
4
|
+
#load_and_authorize_resource class: CommuteMethodType
|
5
|
+
|
6
|
+
respond_to :js, only: %i( new create edit update destroy )
|
7
|
+
respond_to :html, only: :index
|
8
|
+
|
9
|
+
before_action :set_commute_method_type, only: %i( edit update destroy )
|
10
|
+
|
11
|
+
def index
|
12
|
+
@commute_method_types = CommuteMethodType.all
|
13
|
+
@count = CommuteMethodType.count
|
14
|
+
respond_with @commute_method_types
|
15
|
+
end
|
16
|
+
|
17
|
+
def new
|
18
|
+
@commute_method_type = CommuteMethodType.new
|
19
|
+
respond_with @commute_method_type
|
20
|
+
end
|
21
|
+
|
22
|
+
def create
|
23
|
+
@commute_method_type = CommuteMethodType.new(commute_method_type_params)
|
24
|
+
@commute_method_type.save
|
25
|
+
@count = CommuteMethodType.count
|
26
|
+
respond_with @commute_method_type
|
27
|
+
end
|
28
|
+
|
29
|
+
def edit
|
30
|
+
end
|
31
|
+
|
32
|
+
def update
|
33
|
+
@commute_method_type.update(commute_method_type_params)
|
34
|
+
respond_with @commute_method_type
|
35
|
+
end
|
36
|
+
|
37
|
+
def destroy
|
38
|
+
@commute_method_type.destroy
|
39
|
+
@count = CommuteMethodType.count
|
40
|
+
respond_with @commute_method_type
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def set_commute_method_type
|
46
|
+
@commute_method_type = CommuteMethodType.find(params[:id])
|
47
|
+
end
|
48
|
+
|
49
|
+
def commute_method_type_params
|
50
|
+
params.require(:commute_method_type).permit(:name)
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Gaku
|
2
|
+
class Admin::ContactTypesController < Admin::BaseController
|
3
|
+
|
4
|
+
#load_and_authorize_resource class: ContactType
|
5
|
+
|
6
|
+
respond_to :js, only: %i( new create edit update destroy )
|
7
|
+
respond_to :html, only: :index
|
8
|
+
|
9
|
+
before_action :set_contact_type, only: %i( edit update destroy )
|
10
|
+
|
11
|
+
def index
|
12
|
+
@contact_types = ContactType.all
|
13
|
+
@count = ContactType.count
|
14
|
+
respond_with @contact_types
|
15
|
+
end
|
16
|
+
|
17
|
+
def new
|
18
|
+
@contact_type = ContactType.new
|
19
|
+
respond_with @contact_type
|
20
|
+
end
|
21
|
+
|
22
|
+
def create
|
23
|
+
@contact_type = ContactType.new(contact_type_params)
|
24
|
+
@contact_type.save
|
25
|
+
@count = ContactType.count
|
26
|
+
respond_with @contact_type
|
27
|
+
end
|
28
|
+
|
29
|
+
def edit
|
30
|
+
end
|
31
|
+
|
32
|
+
def update
|
33
|
+
@contact_type.update(contact_type_params)
|
34
|
+
respond_with @contact_type
|
35
|
+
end
|
36
|
+
|
37
|
+
def destroy
|
38
|
+
@contact_type.destroy
|
39
|
+
@count = ContactType.count
|
40
|
+
respond_with @contact_type
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def set_contact_type
|
46
|
+
@contact_type = ContactType.find(params[:id])
|
47
|
+
end
|
48
|
+
|
49
|
+
def contact_type_params
|
50
|
+
params.require(:contact_type).permit(:name)
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Gaku
|
2
|
+
class Admin::DepartmentsController < Admin::BaseController
|
3
|
+
|
4
|
+
#load_and_authorize_resource class: Department
|
5
|
+
|
6
|
+
respond_to :js, only: %i( new create edit update destroy )
|
7
|
+
respond_to :html, only: :index
|
8
|
+
|
9
|
+
before_action :set_department, only: %i( edit update destroy )
|
10
|
+
|
11
|
+
def index
|
12
|
+
@departments = Department.all
|
13
|
+
@count = Department.count
|
14
|
+
respond_with @departments
|
15
|
+
end
|
16
|
+
|
17
|
+
def new
|
18
|
+
@department = Department.new
|
19
|
+
respond_with @department
|
20
|
+
end
|
21
|
+
|
22
|
+
def create
|
23
|
+
@department = Department.new(department_params)
|
24
|
+
@department.save
|
25
|
+
@count = Department.count
|
26
|
+
respond_with @department
|
27
|
+
end
|
28
|
+
|
29
|
+
def edit
|
30
|
+
end
|
31
|
+
|
32
|
+
def update
|
33
|
+
@department.update(department_params)
|
34
|
+
respond_with @department
|
35
|
+
end
|
36
|
+
|
37
|
+
def destroy
|
38
|
+
@department.destroy
|
39
|
+
@count = Department.count
|
40
|
+
respond_with @department
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def set_department
|
46
|
+
@department = Department.find(params[:id])
|
47
|
+
end
|
48
|
+
|
49
|
+
def department_params
|
50
|
+
params.require(:department).permit(:name)
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module Gaku
|
2
|
+
class Admin::EnrollmentStatusesController < Admin::BaseController
|
3
|
+
|
4
|
+
#load_and_authorize_resource class: EnrollmentStatus
|
5
|
+
|
6
|
+
respond_to :js, only: %i( new create edit update destroy )
|
7
|
+
respond_to :html, only: :index
|
8
|
+
|
9
|
+
before_action :set_enrollment_status, only: %i( edit update destroy )
|
10
|
+
|
11
|
+
def index
|
12
|
+
@enrollment_statuses = EnrollmentStatus.includes(:translations)
|
13
|
+
@count = EnrollmentStatus.count
|
14
|
+
respond_with @enrollment_statuss
|
15
|
+
end
|
16
|
+
|
17
|
+
def new
|
18
|
+
@enrollment_status = EnrollmentStatus.new
|
19
|
+
respond_with @enrollment_status
|
20
|
+
end
|
21
|
+
|
22
|
+
def create
|
23
|
+
@enrollment_status = EnrollmentStatus.new(enrollment_status_params)
|
24
|
+
@enrollment_status.save
|
25
|
+
@count = EnrollmentStatus.count
|
26
|
+
respond_with @enrollment_status
|
27
|
+
end
|
28
|
+
|
29
|
+
def edit
|
30
|
+
end
|
31
|
+
|
32
|
+
def update
|
33
|
+
@enrollment_status.update(enrollment_status_params)
|
34
|
+
respond_with @enrollment_status
|
35
|
+
end
|
36
|
+
|
37
|
+
def destroy
|
38
|
+
@enrollment_status.destroy
|
39
|
+
@count = EnrollmentStatus.count
|
40
|
+
respond_with @enrollment_status
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def set_enrollment_status
|
46
|
+
@enrollment_status = EnrollmentStatus.find(params[:id])
|
47
|
+
end
|
48
|
+
|
49
|
+
def enrollment_status_params
|
50
|
+
params.require(:enrollment_status).permit(attributes)
|
51
|
+
end
|
52
|
+
|
53
|
+
def attributes
|
54
|
+
%i(code name active immutable)
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|