gaku_admin 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/gaku/admin/admin.coffee +6 -6
- data/app/assets/javascripts/gaku/admin/base.js.coffee +11 -2
- data/app/assets/javascripts/gaku/admin.js.coffee +6 -0
- data/app/assets/stylesheets/gaku/admin/bootstrap_and_theme.css.scss +16 -1
- data/app/assets/stylesheets/gaku/admin.css +0 -1
- data/app/controllers/concerns/admin_picture_controller.rb +28 -0
- data/app/controllers/gaku/admin/attendance_types_controller.rb +8 -8
- data/app/controllers/gaku/admin/badge_types_controller.rb +9 -16
- data/app/controllers/gaku/admin/base_controller.rb +1 -1
- data/app/controllers/gaku/admin/{schools/campuses → campuses}/addresses_controller.rb +3 -9
- data/app/controllers/gaku/admin/{schools/campuses → campuses}/contacts_controller.rb +6 -10
- data/app/controllers/gaku/admin/{schools/campuses_controller.rb → campuses_controller.rb} +7 -11
- data/app/controllers/gaku/admin/commute_method_types_controller.rb +8 -7
- data/app/controllers/gaku/admin/contact_types_controller.rb +7 -7
- data/app/controllers/gaku/admin/departments_controller.rb +7 -7
- data/app/controllers/gaku/admin/enrollment_statuses_controller.rb +9 -8
- data/app/controllers/gaku/admin/grading_method_sets/grading_method_set_items_controller.rb +1 -1
- data/app/controllers/gaku/admin/grading_method_sets_controller.rb +11 -11
- data/app/controllers/gaku/admin/grading_methods_controller.rb +10 -9
- data/app/controllers/gaku/admin/home_controller.rb +11 -0
- data/app/controllers/gaku/admin/presets_controller.rb +4 -6
- data/app/controllers/gaku/admin/roles_controller.rb +8 -7
- data/app/controllers/gaku/admin/school_years/semesters_controller.rb +0 -1
- data/app/controllers/gaku/admin/school_years_controller.rb +3 -7
- data/app/controllers/gaku/admin/schools/programs_controller.rb +11 -4
- data/app/controllers/gaku/admin/schools_controller.rb +82 -79
- data/app/controllers/gaku/admin/{achievements/simple_grade_types_controller.rb → simple_grade_types_controller.rb} +4 -3
- data/app/controllers/gaku/admin/specialties_controller.rb +2 -5
- data/app/controllers/gaku/admin/states_controller.rb +71 -71
- data/app/controllers/gaku/admin/student_review_categories_controller.rb +57 -0
- data/app/controllers/gaku/admin/templates_controller.rb +47 -50
- data/app/controllers/gaku/admin/users_controller.rb +5 -7
- data/app/controllers/gaku/states_controller.rb +2 -0
- data/app/helpers/gaku/admin_helper.rb +16 -1
- data/app/helpers/gaku/shared_helper.rb +2 -2
- data/app/overrides/admin_menu.rb +7 -6
- data/app/views/gaku/admin/attendance_types/{index.html.slim → _attendance_types.html.slim} +9 -8
- data/app/views/gaku/admin/attendance_types/index.js.erb +1 -0
- data/app/views/gaku/admin/attendance_types/index.json.rb +1 -1
- data/app/views/gaku/admin/badge_types/{index.html.slim → _badge_types.html.slim} +9 -8
- data/app/views/gaku/admin/badge_types/_form.html.slim +1 -1
- data/app/views/gaku/admin/badge_types/_modal.html.slim +1 -1
- data/app/views/gaku/admin/badge_types/create.js.erb +7 -0
- data/app/views/gaku/admin/badge_types/index.js.erb +1 -0
- data/app/views/gaku/admin/badge_types/new.js.erb +1 -1
- data/app/views/gaku/admin/badge_types/update.js.erb +3 -0
- data/app/views/gaku/admin/campuses/_campus.html.slim +4 -0
- data/app/views/gaku/admin/{schools/campuses → campuses}/_campuses.html.slim +4 -6
- data/app/views/gaku/admin/campuses/_edit_form.html.slim +3 -0
- data/app/views/gaku/admin/campuses/addresses/_address.html.slim +6 -0
- data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_address_row_fields.html.slim +1 -1
- data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_addresses.html.slim +3 -4
- data/app/views/gaku/admin/campuses/addresses/index.js.erb +1 -0
- data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/update.js.erb +1 -1
- data/app/views/gaku/admin/campuses/contacts/_contact.html.slim +3 -0
- data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_contacts.html.slim +4 -4
- data/app/views/gaku/admin/campuses/contacts/_fields.html.slim +11 -0
- data/app/views/gaku/admin/campuses/contacts/_primary_field.html.slim +6 -0
- data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/create.js.erb +1 -1
- data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/destroy.js.erb +1 -1
- data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/edit.js.erb +1 -1
- data/app/views/gaku/admin/campuses/contacts/index.js.erb +1 -0
- data/app/views/gaku/admin/campuses/edit.html.slim +34 -0
- data/app/views/gaku/admin/campuses/edit.js.erb +1 -0
- data/app/views/gaku/admin/campuses/index.js.erb +1 -0
- data/app/views/gaku/admin/campuses/update.js.erb +2 -0
- data/app/views/gaku/admin/commute_method_types/_commute_method_types.html.slim +18 -0
- data/app/views/gaku/admin/commute_method_types/index.js.erb +1 -0
- data/app/views/gaku/admin/contact_types/_contact_types.html.slim +18 -0
- data/app/views/gaku/admin/contact_types/index.js.erb +1 -0
- data/app/views/gaku/admin/departments/_departments.html.slim +21 -0
- data/app/views/gaku/admin/departments/index.js.erb +1 -0
- data/app/views/gaku/admin/enrollment_statuses/{index.html.slim → _enrollment_statuses.html.slim} +9 -10
- data/app/views/gaku/admin/enrollment_statuses/index.js.erb +1 -0
- data/app/views/gaku/admin/grading_method_sets/_fields.html.slim +1 -1
- data/app/views/gaku/admin/grading_method_sets/{index.html.slim → _grading_method_sets.html.slim} +9 -8
- data/app/views/gaku/admin/grading_method_sets/_show.html.slim +4 -0
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_fields.html.slim +2 -2
- data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_items.html.slim +1 -1
- data/app/views/gaku/admin/grading_method_sets/index.js.erb +1 -0
- data/app/views/gaku/admin/grading_method_sets/show.js.erb +1 -0
- data/app/views/gaku/admin/grading_methods/_criteria_form_fields.html.slim +19 -0
- data/app/views/gaku/admin/grading_methods/_criteria_template.html.slim +11 -0
- data/app/views/gaku/admin/grading_methods/_fields.html.slim +1 -1
- data/app/views/gaku/admin/grading_methods/_form_fields.html.slim +3 -2
- data/app/views/gaku/admin/grading_methods/_grading_methods.html.slim +21 -0
- data/app/views/gaku/admin/grading_methods/index.js.erb +1 -0
- data/app/views/gaku/admin/home/index.html.slim +5 -0
- data/app/views/gaku/admin/presets/_address.html.slim +8 -7
- data/app/views/gaku/admin/presets/_chooser_fields.html.slim +1 -1
- data/app/views/gaku/admin/presets/_export_formats.html.slim +5 -4
- data/app/views/gaku/admin/presets/_fields.html.slim +1 -1
- data/app/views/gaku/admin/presets/_grading.html.slim +4 -3
- data/app/views/gaku/admin/presets/_locale.html.slim +6 -3
- data/app/views/gaku/admin/presets/_names_order.html.slim +1 -1
- data/app/views/gaku/admin/presets/_pagination.html.slim +10 -9
- data/app/views/gaku/admin/presets/_person.html.slim +3 -2
- data/app/views/gaku/admin/presets/{index.html.slim → _presets.html.slim} +7 -4
- data/app/views/gaku/admin/presets/_student.html.slim +1 -1
- data/app/views/gaku/admin/presets/_tabs.html.slim +2 -3
- data/app/views/gaku/admin/presets/edit.js.erb +1 -0
- data/app/views/gaku/admin/presets/index.js.erb +1 -0
- data/app/views/gaku/admin/presets/update.js.erb +1 -0
- data/app/views/gaku/admin/roles/_roles.html.slim +21 -0
- data/app/views/gaku/admin/roles/index.js.erb +1 -0
- data/app/views/gaku/admin/school_years/_edit_form.html.slim +4 -0
- data/app/views/gaku/admin/school_years/_fields.html.slim +1 -2
- data/app/views/gaku/admin/school_years/_school_years.html.slim +23 -0
- data/app/views/gaku/admin/school_years/edit.html.slim +20 -0
- data/app/views/gaku/admin/school_years/edit.js.erb +4 -2
- data/app/views/gaku/admin/school_years/index.js.erb +1 -0
- data/app/views/gaku/admin/school_years/semesters/_semesters.html.slim +1 -1
- data/app/views/gaku/admin/school_years/semesters/index.js.erb +1 -0
- data/app/views/gaku/admin/schools/_edit_form.html.slim +3 -0
- data/app/views/gaku/admin/schools/_edit_master_form.html.slim +10 -0
- data/app/views/gaku/admin/schools/_school.html.slim +4 -2
- data/app/views/gaku/admin/schools/{index.html.slim → _schools.html.slim} +10 -9
- data/app/views/gaku/admin/schools/_tabs.html.slim +1 -1
- data/app/views/gaku/admin/schools/edit.html.slim +37 -14
- data/app/views/gaku/admin/schools/edit.js.erb +1 -0
- data/app/views/gaku/admin/schools/edit_master.html.slim +36 -16
- data/app/views/gaku/admin/schools/index.js.erb +1 -0
- data/app/views/gaku/admin/schools/programs/_fields.html.slim +3 -4
- data/app/views/gaku/admin/schools/programs/_programs.html.slim +2 -2
- data/app/views/gaku/admin/schools/programs/create.js.erb +1 -0
- data/app/views/gaku/admin/schools/programs/destroy.js.erb +1 -0
- data/app/views/gaku/admin/schools/programs/index.js.erb +1 -0
- data/app/views/gaku/admin/schools/update.js.erb +1 -0
- data/app/views/gaku/admin/shared/_ajax_picture.html.slim +8 -0
- data/app/views/gaku/admin/shared/_ajax_upload_picture.html.slim +14 -0
- data/app/views/gaku/admin/shared/remove_picture.js.erb +3 -0
- data/app/views/gaku/admin/shared/set_picture.js.erb +3 -0
- data/app/views/gaku/admin/simple_grade_types/_simple_grade_types.html.slim +24 -0
- data/app/views/gaku/admin/simple_grade_types/index.js.erb +1 -0
- data/app/views/gaku/admin/specialties/{index.html.slim → _specialties.html.slim} +9 -8
- data/app/views/gaku/admin/specialties/index.js.erb +1 -0
- data/app/views/gaku/admin/states/_country_select_form.html.slim +1 -2
- data/app/views/gaku/admin/states/_form_fields.html.slim +1 -1
- data/app/views/gaku/admin/states/_states.html.slim +16 -0
- data/app/views/gaku/admin/states/index.js.erb +1 -0
- data/app/views/gaku/admin/student_review_categories/_form.html.slim +3 -0
- data/app/views/gaku/admin/student_review_categories/_form_fields.html.slim +1 -0
- data/app/views/gaku/admin/student_review_categories/_modal.html.slim +4 -0
- data/app/views/gaku/admin/student_review_categories/_student_review_categories.html.slim +18 -0
- data/app/views/gaku/admin/student_review_categories/_student_review_category.html.slim +2 -0
- data/app/views/gaku/admin/student_review_categories/_table_fields.html.slim +4 -0
- data/app/views/gaku/admin/student_review_categories/create.js.erb +7 -0
- data/app/views/gaku/admin/student_review_categories/destroy.js.erb +2 -0
- data/app/views/gaku/admin/student_review_categories/edit.js.erb +3 -0
- data/app/views/gaku/admin/student_review_categories/index.js.erb +1 -0
- data/app/views/gaku/admin/student_review_categories/new.js.erb +3 -0
- data/app/views/gaku/admin/student_review_categories/update.js.erb +3 -0
- data/app/views/gaku/admin/templates/_fields.html.slim +2 -2
- data/app/views/gaku/admin/templates/_form.html.slim +1 -1
- data/app/views/gaku/admin/templates/_modal.html.slim +5 -2
- data/app/views/gaku/admin/templates/_templates.html.slim +21 -0
- data/app/views/gaku/admin/templates/create.js.erb +7 -0
- data/app/views/gaku/admin/templates/edit.js.erb +3 -0
- data/app/views/gaku/admin/templates/index.js.erb +1 -0
- data/app/views/gaku/admin/templates/new.js.erb +3 -0
- data/app/views/gaku/admin/templates/update.js.erb +3 -0
- data/app/views/gaku/admin/users/_users.html.slim +22 -0
- data/app/views/gaku/admin/users/index.js.erb +1 -0
- data/app/views/gaku/layouts/admin/index.html.slim +0 -1
- data/app/views/gaku/shared/menu/_admin.html.erb +1 -71
- data/app/views/gaku/shared/menu/_admin_menu.html.erb +154 -0
- data/config/routes.rb +20 -10
- data/lib/gaku/admin/engine.rb +3 -5
- data/lib/gaku/admin.rb +2 -1
- data/lib/gaku/app_responder.rb +1 -1
- data/lib/gaku_admin.rb +1 -1
- data/lib/tasks/admin_user.rake +2 -1
- metadata +456 -374
- data/app/views/gaku/admin/achievements/simple_grade_types/index.html.slim +0 -23
- data/app/views/gaku/admin/commute_method_types/index.html.slim +0 -18
- data/app/views/gaku/admin/contact_types/index.html.slim +0 -18
- data/app/views/gaku/admin/departments/index.html.slim +0 -20
- data/app/views/gaku/admin/grading_method_sets/show.html.slim +0 -13
- data/app/views/gaku/admin/grading_methods/index.html.slim +0 -20
- data/app/views/gaku/admin/roles/index.html.slim +0 -20
- data/app/views/gaku/admin/school_years/index.html.slim +0 -21
- data/app/views/gaku/admin/school_years/show.html.slim +0 -15
- data/app/views/gaku/admin/schools/campuses/_campus.html.slim +0 -6
- data/app/views/gaku/admin/schools/campuses/_picture.html.slim +0 -8
- data/app/views/gaku/admin/schools/campuses/_show_table.html.slim +0 -10
- data/app/views/gaku/admin/schools/campuses/_tabs.html.slim +0 -15
- data/app/views/gaku/admin/schools/campuses/_upload_picture.html.slim +0 -7
- data/app/views/gaku/admin/schools/campuses/addresses/_address.html.slim +0 -7
- data/app/views/gaku/admin/schools/campuses/contacts/_contact.html.slim +0 -3
- data/app/views/gaku/admin/schools/campuses/contacts/_fields.html.slim +0 -12
- data/app/views/gaku/admin/schools/campuses/contacts/_primary_field.html.slim +0 -13
- data/app/views/gaku/admin/schools/campuses/edit.html.slim +0 -19
- data/app/views/gaku/admin/schools/campuses/show.html.slim +0 -13
- data/app/views/gaku/admin/schools/show.html.slim +0 -13
- data/app/views/gaku/admin/schools/show_master.html.slim +0 -14
- data/app/views/gaku/admin/states/index.html.slim +0 -15
- data/app/views/gaku/admin/templates/edit.html.slim +0 -1
- data/app/views/gaku/admin/templates/index.html.slim +0 -20
- data/app/views/gaku/admin/templates/new.html.slim +0 -1
- data/app/views/gaku/admin/users/index.html.slim +0 -21
- data/config/initializers/client_side_validations.rb +0 -9
- /data/app/views/gaku/admin/{schools/campuses → campuses}/_form.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/_form_fields.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_fields.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_form.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_form_fields.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_modal.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/create.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/destroy.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/edit.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/new.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_delete_link.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_form.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_form_fields.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_modal.html.slim +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/make_primary.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/new.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/soft_delete.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/update.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/create.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/destroy.js.erb +0 -0
- /data/app/views/gaku/admin/{schools/campuses → campuses}/new.js.erb +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_fields.html.slim +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_form.html.slim +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_form_fields.html.slim +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_modal.html.slim +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_simple_grade_type.html.slim +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/create.js.erb +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/destroy.js.erb +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/edit.js.erb +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/new.js.erb +0 -0
- /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/update.js.erb +0 -0
@@ -0,0 +1,154 @@
|
|
1
|
+
<div id="admin-menu">
|
2
|
+
|
3
|
+
<div class="panel panel-default">
|
4
|
+
<div class="panel-heading">
|
5
|
+
<h4 id="schools-master-menu" class="panel-title">
|
6
|
+
<a data-toggle="collapse" data-parent="#accordion" href="#schools">
|
7
|
+
<%= t(:'menu.admin.schools') %>
|
8
|
+
</a>
|
9
|
+
</h4>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div id="schools" class="panel-body panel-collapse collapse">
|
13
|
+
<ul class="list-unstyled">
|
14
|
+
<li id="schools-menu">
|
15
|
+
<%= link_to t(:'menu.admin.schools'), [:admin, :schools], remote: true %>
|
16
|
+
</li>
|
17
|
+
<li id="school-years-menu">
|
18
|
+
<%= link_to t(:'menu.admin.school_years'), [:admin, :school_years], remote: true %>
|
19
|
+
</li>
|
20
|
+
</ul>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
|
25
|
+
<div class="panel panel-default">
|
26
|
+
<div class="panel-heading">
|
27
|
+
<h4 id="types-master-menu" class="panel-title">
|
28
|
+
<a data-toggle="collapse" data-parent="#accordion" href="#types">
|
29
|
+
<%= t(:'menu.admin.types.types') %>
|
30
|
+
</a>
|
31
|
+
</h4>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div id="types" class="panel-body panel-collapse collapse">
|
35
|
+
<ul class="list-unstyled">
|
36
|
+
<li id="attendance-types-menu">
|
37
|
+
<%= link_to t(:'menu.admin.types.attendance_types'), [:admin, :attendance_types], remote: true %>
|
38
|
+
</li>
|
39
|
+
<li id="commute-methods-menu">
|
40
|
+
<%= link_to t(:'menu.admin.types.commute_methods'), [:admin, :commute_method_types], remote: true %>
|
41
|
+
</li>
|
42
|
+
<li id="contact-types-menu">
|
43
|
+
<%= link_to t(:'menu.admin.types.contact'), [:admin, :contact_types], remote: true %>
|
44
|
+
</li>
|
45
|
+
<li id="enrollment-statuses-menu">
|
46
|
+
<%= link_to t(:'menu.admin.types.enrollment_status'), [:admin, :enrollment_statuses], remote: true %>
|
47
|
+
</li>
|
48
|
+
<li id="states-menu">
|
49
|
+
<%= link_to t(:'menu.admin.types.states'), [:admin, :states], remote: true %>
|
50
|
+
</li>
|
51
|
+
<li id="student-review-categories-menu">
|
52
|
+
<%= link_to t(:'menu.admin.types.student_review_categories'), [:admin, :student_review_categories], remote: true %>
|
53
|
+
</li>
|
54
|
+
</ul>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="panel panel-default">
|
59
|
+
<div class="panel-heading">
|
60
|
+
<h4 id="grading-master-menu" class="panel-title">
|
61
|
+
<a data-toggle="collapse" data-parent="#accordion" href="#grading">
|
62
|
+
<%= t(:'menu.admin.grading.grading') %>
|
63
|
+
</a>
|
64
|
+
</h4>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<div id="grading" class="panel-body panel-collapse collapse">
|
68
|
+
<ul class="list-unstyled">
|
69
|
+
<li id="grading-methods-menu">
|
70
|
+
<%= link_to t(:'menu.admin.grading.grading_methods'), [:admin, :grading_methods], remote: true %>
|
71
|
+
</li>
|
72
|
+
<li id="grading-method-sets-menu">
|
73
|
+
<%= link_to t(:'menu.admin.grading.grading_sets'), [:admin, :grading_method_sets], remote: true %>
|
74
|
+
</li>
|
75
|
+
</ul>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
|
80
|
+
<div class="panel panel-default">
|
81
|
+
<div class="panel-heading">
|
82
|
+
<h4 id="users-and-roles-master-menu" class="panel-title">
|
83
|
+
<a data-toggle="collapse" data-parent="#accordion" href="#users-and-roles">
|
84
|
+
<%= t(:'menu.admin.users.users_and_roles') %>
|
85
|
+
</a>
|
86
|
+
</h4>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
<div id="users-and-roles" class="panel-body panel-collapse collapse">
|
90
|
+
<ul class="list-unstyled">
|
91
|
+
<li id="users-menu">
|
92
|
+
<%= link_to t(:'menu.admin.users.users'), [:admin, :users], remote: true %>
|
93
|
+
</li>
|
94
|
+
<li id="roles-menu">
|
95
|
+
<%= link_to t(:'menu.admin.users.roles'), [:admin, :roles], remote: true %>
|
96
|
+
</li>
|
97
|
+
</ul>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
|
102
|
+
<div class="panel panel-default">
|
103
|
+
<div class="panel-heading">
|
104
|
+
<h4 id="achievements-master-menu" class="panel-title">
|
105
|
+
<a data-toggle="collapse" data-parent="#accordion" href="#achievements">
|
106
|
+
<%= t(:'menu.admin.achievements.achievements') %>
|
107
|
+
</a>
|
108
|
+
</h4>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
<div id="achievements" class="panel-body panel-collapse collapse">
|
112
|
+
<ul class="list-unstyled">
|
113
|
+
<li id="simple-grade-types-menu">
|
114
|
+
<%= link_to t(:'menu.admin.achievements.simple_grade_types'), [:admin, :simple_grade_types], remote: true %>
|
115
|
+
</li>
|
116
|
+
<li id="badge-types-menu">
|
117
|
+
<%= link_to t(:'menu.admin.badge_types'), [:admin, :badge_types], remote: true %>
|
118
|
+
</li>
|
119
|
+
</ul>
|
120
|
+
</div>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
|
124
|
+
<div class="panel panel-default">
|
125
|
+
<div class="panel-heading">
|
126
|
+
<h4 id="specialties-menu" class="panel-title">
|
127
|
+
<%= link_to t(:'menu.admin.specialties'), [:admin, :specialties], remote: true %>
|
128
|
+
</h4>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
<div class="panel panel-default">
|
133
|
+
<div class="panel-heading">
|
134
|
+
<h4 id="departments-menu" class="panel-title">
|
135
|
+
<%= link_to t(:'menu.admin.departments'), [:admin, :departments], remote: true %>
|
136
|
+
</h4>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
|
140
|
+
<div class="panel panel-default">
|
141
|
+
<div class="panel-heading">
|
142
|
+
<h4 id="presets-menu" class="panel-title">
|
143
|
+
<%= link_to t(:'menu.admin.preset.plural'), [:admin, :presets], remote: true %>
|
144
|
+
</h4>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<div class="panel panel-default">
|
149
|
+
<div class="panel-heading">
|
150
|
+
<h4 id="templates-menu" class="panel-title">
|
151
|
+
<%= link_to t(:'menu.admin.templates'), [:admin, :templates], remote: true %>
|
152
|
+
</h4>
|
153
|
+
</div>
|
154
|
+
</div>
|
data/config/routes.rb
CHANGED
@@ -10,15 +10,23 @@ Gaku::Core::Engine.routes.draw do
|
|
10
10
|
concern(:sort) { post :sort, on: :collection }
|
11
11
|
concern(:download) { get :download, on: :member }
|
12
12
|
|
13
|
+
concern(:set_picture) do
|
14
|
+
member do
|
15
|
+
patch :set_picture
|
16
|
+
delete :remove_picture
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
13
20
|
resources :states, only: :index
|
14
21
|
|
15
22
|
namespace :admin do
|
23
|
+
root to: 'home#index'
|
16
24
|
|
17
25
|
get 'school_details', to: 'schools#show_master'
|
18
26
|
get 'school_details/edit', to: 'schools#edit_master'
|
19
27
|
patch 'school_details/update', to: 'schools#update_master'
|
20
28
|
|
21
|
-
resources :schools do
|
29
|
+
resources :schools, concerns: %i( set_picture ) do
|
22
30
|
resources :programs, controller: 'schools/programs' do
|
23
31
|
member do
|
24
32
|
get :show_program_levels
|
@@ -26,15 +34,16 @@ Gaku::Core::Engine.routes.draw do
|
|
26
34
|
get :show_program_specialties
|
27
35
|
end
|
28
36
|
end
|
29
|
-
resources :campuses,
|
30
|
-
resources :contacts, controller: 'schools/campuses/contacts', except: %i( show index ), concerns: %i( soft_delete primary )
|
31
|
-
|
32
|
-
resources :addresses, controller: 'schools/campuses/addresses', except: %i( show index )
|
33
|
-
end
|
37
|
+
resources :campuses, except: :show
|
34
38
|
end
|
35
39
|
|
36
|
-
resources :
|
40
|
+
resources :campuses, only: [], concerns: %i( set_picture ) do
|
41
|
+
resources :contacts, controller: 'campuses/contacts', except: %i( show ), concerns: %i( soft_delete primary )
|
42
|
+
|
43
|
+
resources :addresses, controller: 'campuses/addresses', except: %i( show )
|
44
|
+
end
|
37
45
|
|
46
|
+
resources :simple_grade_types
|
38
47
|
resources :badge_types
|
39
48
|
resources :specialties
|
40
49
|
resources :system_tools
|
@@ -46,11 +55,12 @@ Gaku::Core::Engine.routes.draw do
|
|
46
55
|
resources :users, concerns: %i( pagination )
|
47
56
|
resources :roles
|
48
57
|
resources :templates, except: %i( show ), concerns: %i( download )
|
58
|
+
resources :student_review_categories
|
49
59
|
resources :grading_methods
|
50
60
|
resources :grading_method_sets, concerns: %i( primary ) do
|
51
61
|
resources :grading_method_set_items,
|
52
|
-
|
53
|
-
|
62
|
+
controller: 'grading_method_sets/grading_method_set_items',
|
63
|
+
concerns: %i( sort )
|
54
64
|
end
|
55
65
|
|
56
66
|
resources :states do
|
@@ -58,7 +68,7 @@ Gaku::Core::Engine.routes.draw do
|
|
58
68
|
end
|
59
69
|
|
60
70
|
resources :school_years do
|
61
|
-
resources :semesters, controller: 'school_years/semesters', except: %i( show
|
71
|
+
resources :semesters, controller: 'school_years/semesters', except: %i( show )
|
62
72
|
end
|
63
73
|
|
64
74
|
resources :presets
|
data/lib/gaku/admin/engine.rb
CHANGED
@@ -3,7 +3,7 @@ module Gaku
|
|
3
3
|
class Engine < ::Rails::Engine
|
4
4
|
engine_name 'gaku_admin'
|
5
5
|
|
6
|
-
config.autoload_paths +=
|
6
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
7
7
|
|
8
8
|
config.to_prepare do
|
9
9
|
Gaku::Admin::BaseController.helper(Gaku::AdminHelper)
|
@@ -15,14 +15,12 @@ module Gaku
|
|
15
15
|
|
16
16
|
# sets the manifests / assets to be precompiled, even when initialize_on_precompile is false
|
17
17
|
initializer 'gaku.assets.precompile', group: :all do |app|
|
18
|
-
app.config.assets.precompile += %w
|
19
|
-
gaku/admin/all*
|
20
|
-
]
|
18
|
+
app.config.assets.precompile += %w( gaku/admin/all* )
|
21
19
|
end
|
22
20
|
|
23
21
|
# filter sensitive information during logging
|
24
22
|
initializer 'gaku.params.filter' do |app|
|
25
|
-
app.config.filter_parameters +=
|
23
|
+
app.config.filter_parameters += %i( password password_confirmation number )
|
26
24
|
end
|
27
25
|
|
28
26
|
end
|
data/lib/gaku/admin.rb
CHANGED
@@ -10,7 +10,7 @@ require 'jquery-minicolors-rails'
|
|
10
10
|
require 'momentjs-rails'
|
11
11
|
require 'underscore-rails'
|
12
12
|
require 'nprogress-rails'
|
13
|
-
require '
|
13
|
+
require 'client_side_validations'
|
14
14
|
require 'sass'
|
15
15
|
require 'bootstrap-sass'
|
16
16
|
require 'bootstrap-datepicker-rails'
|
@@ -18,6 +18,7 @@ require 'nested_form'
|
|
18
18
|
require 'phantom_helpers'
|
19
19
|
require 'phantom_forms'
|
20
20
|
require 'phantom_nested_forms'
|
21
|
+
require 'remotipart'
|
21
22
|
|
22
23
|
require 'gaku/core'
|
23
24
|
|
data/lib/gaku/app_responder.rb
CHANGED
data/lib/gaku_admin.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require 'gaku/admin'
|
1
|
+
require 'gaku/admin'
|
data/lib/tasks/admin_user.rake
CHANGED
@@ -91,7 +91,8 @@ def create_admin_user
|
|
91
91
|
say "\nWARNING: There is already a user with the username: #{username}, so no account changes were made. If you wish to create an additional admin user, please run rake gaku:generate_admin again with a different username.\n\n"
|
92
92
|
else
|
93
93
|
say "Creating user..."
|
94
|
-
|
94
|
+
creator = Gaku::UserCreator.new(attributes).save
|
95
|
+
admin = creator.get_user
|
95
96
|
# create an admin role and and assign the admin user to that role
|
96
97
|
role = Gaku::Role.find_or_create_by_name 'Admin'
|
97
98
|
admin.roles << role
|