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
@@ -1,22 +1,42 @@
|
|
1
1
|
.row
|
2
|
-
.col-md-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
= level.link_to_remove t(:'school_level.remove_school_level'), class: 'btn btn-danger remove-school-level'
|
8
|
-
hr
|
9
|
-
p = f.link_to_add t(:'school_level.add_school_level'), :levels, class: 'btn btn-success add-school-level'
|
2
|
+
.col-md-2
|
3
|
+
.panel-group#accordion
|
4
|
+
.panel
|
5
|
+
.picture-upload
|
6
|
+
= render 'gaku/admin/shared/ajax_picture', resource: @school
|
10
7
|
|
11
|
-
= buttons_for @school, label: t(:'school.save'), resource: 'admin-school'
|
12
8
|
|
13
|
-
|
14
|
-
|
9
|
+
.panel.panel-default
|
10
|
+
.panel-heading
|
11
|
+
h4.panel-title
|
12
|
+
= @school.name
|
13
|
+
.panel-body
|
14
|
+
ul.list-unstyled
|
15
|
+
li = link_to t(:'edit'), admin_school_details_edit_path
|
15
16
|
|
16
|
-
hr
|
17
17
|
|
18
|
-
|
18
|
+
.panel.panel-default
|
19
|
+
.panel-heading
|
20
|
+
h4#campuses-menu.panel-title
|
21
|
+
= link_to badge_count(@school.campuses.count, t(:'campus.plural'), 'campuses-count'), [:admin, @school, :campuses], remote: true
|
22
|
+
.panel-body
|
23
|
+
ul.list-unstyled
|
24
|
+
- @school.campuses.each do |campus|
|
25
|
+
li = link_to campus.name, [:edit, :admin, @school, campus]
|
19
26
|
|
20
|
-
|
21
|
-
|
22
|
-
|
27
|
+
.panel.panel-default
|
28
|
+
.panel-heading
|
29
|
+
h4#programs-menu.panel-title
|
30
|
+
= link_to badge_count(@school.programs.count, t(:'program.plural'), 'programs-count'), [:admin, @school, :programs], remote: true
|
31
|
+
.panel-body
|
32
|
+
ul.list-unstyled
|
33
|
+
- @school.programs.each do |program|
|
34
|
+
li = link_to program.name, [:edit, :admin, @school, program], remote: true
|
35
|
+
|
36
|
+
.panel.panel-default
|
37
|
+
.panel-heading
|
38
|
+
h4.panel-title
|
39
|
+
= link_to t(:'admin.back'), [:admin, :root]
|
40
|
+
|
41
|
+
.col-md-10#ajax-load
|
42
|
+
= render 'edit_master_form'
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#ajax-load').html('<%=j render "schools" %>')
|
@@ -4,7 +4,6 @@ td = link_to t(:'program_level.list'), [:show_program_levels,:admin, @school, pr
|
|
4
4
|
td = link_to t(:'program_syllabus.list'), [:show_program_syllabuses,:admin, @school, program], remote: true, class: 'program-syllabuses-list'
|
5
5
|
td = link_to t(:'program_specialty.list'), [:show_program_specialties,:admin, @school, program], remote: true, class: 'program-specialties-list'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
= ajax_link_to_delete [:admin, @school, program]
|
7
|
+
td
|
8
|
+
= ajax_link_to_edit [:edit, :admin, @school, program]
|
9
|
+
= ajax_link_to_delete [:admin, @school, program]
|
@@ -6,7 +6,7 @@
|
|
6
6
|
= count_div 'admin-school-programs-count' do
|
7
7
|
= print_count @school.programs.count, t(:'program.list')
|
8
8
|
.pull-right
|
9
|
-
= ajax_link_to_new t(:'program.add'), [:new, :admin, @school, :program], id: 'new-admin-school-program-link'
|
9
|
+
= ajax_link_to_new t(:'program.add'), [:new, :admin, @school, :program], id: 'new-admin-school-program-link'
|
10
10
|
= hr
|
11
11
|
|
12
12
|
= index_body do
|
@@ -18,6 +18,6 @@
|
|
18
18
|
= th t(:'program.levels')
|
19
19
|
= th t(:'syllabus.plural')
|
20
20
|
= th t(:'specialty.plural')
|
21
|
-
= th_actions 2
|
21
|
+
= th_actions 2
|
22
22
|
tbody
|
23
23
|
= render partial: 'gaku/admin/schools/programs/program', collection: @school.programs, as: :program
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#ajax-load').html('<%=j render "programs" %>')
|
@@ -0,0 +1 @@
|
|
1
|
+
showNotice("<%= render_flash %>");
|
@@ -0,0 +1,8 @@
|
|
1
|
+
a.thumbnail.mb-0#thumb-picture
|
2
|
+
= image_tag resource.picture.url(:thumb), id: "avatar-picture"
|
3
|
+
#popover-upload-picture.d-none
|
4
|
+
= link_to_upload_image 'JavaScript:void(0);', method: :get, id: "upload-picture-link", style: "width: 280px"
|
5
|
+
#upload-picture.d-none
|
6
|
+
.row
|
7
|
+
.col-md-12
|
8
|
+
= render 'gaku/admin/shared/ajax_upload_picture', resource: resource
|
@@ -0,0 +1,14 @@
|
|
1
|
+
= form_for([:set_picture, :admin, resource], remote: true, html: { multipart: true }) do |form|
|
2
|
+
.row
|
3
|
+
.col-md-12
|
4
|
+
.form-group
|
5
|
+
= form.file_field :picture, class: "form-file form-control "
|
6
|
+
.row
|
7
|
+
.col-md-12
|
8
|
+
-if resource.picture.file?
|
9
|
+
= button_tag class: 'col-md-8 btn btn-default', style: 'margin-right:13px'
|
10
|
+
= content_tag(:span, t('upload'), class: 'glyphicon glyphicon-upload')
|
11
|
+
= link_to [:remove_picture, :admin, resource], remote: true, method: :delete, class: 'col-md-3 btn btn-danger remove-picture-link', data: {confirm: t('confirm')} do
|
12
|
+
= content_tag(:span, nil, class: 'glyphicon glyphicon-trash')
|
13
|
+
-else
|
14
|
+
= link_to_upload class: 'col-md-12 btn btn-default'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-12
|
3
|
+
#new-admin-simple-grade-type.d-none
|
4
|
+
.pull-left
|
5
|
+
= count_div 'admin-simple-grade-types-count' do
|
6
|
+
= print_count @count, t(:'simple_grade_type.list')
|
7
|
+
.pull-right
|
8
|
+
= ajax_link_to_new t(:'simple_grade_type.add'), [:new, :admin, :simple_grade_type], id: 'new-admin-simple-grade-type-link'
|
9
|
+
|
10
|
+
hr
|
11
|
+
|
12
|
+
#admin-simple-grade-types
|
13
|
+
= table_for 'admin-simple-grade-types-index' do
|
14
|
+
thead
|
15
|
+
tr
|
16
|
+
= th t(:'simple_grade_type.singular')
|
17
|
+
= th t(:'simple_grade_type.max_score')
|
18
|
+
= th t(:'simple_grade_type.passing_score')
|
19
|
+
= th t(:'school.singular')
|
20
|
+
= th t(:'grading_method.singular')
|
21
|
+
= th_actions 2
|
22
|
+
tbody
|
23
|
+
= render partial: 'simple_grade_type', collection: @simple_grade_types, as: :simple_grade_type
|
24
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#ajax-load').html('<%=j render "simple_grade_types" %>')
|
@@ -1,12 +1,13 @@
|
|
1
|
-
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
.row
|
2
|
+
.col-md-12
|
3
|
+
#new-admin-specialty.d-none
|
4
|
+
.pull-left
|
5
|
+
= count_div 'admin-specialties-count' do
|
6
|
+
= print_count @count, t(:'specialty.list')
|
7
|
+
.pull-right
|
8
|
+
= ajax_link_to_new t(:'specialty.add'), [:new, :admin, :specialty], id: 'new-admin-specialty-link'
|
7
9
|
|
8
|
-
|
9
|
-
#new-admin-specialty.d-none
|
10
|
+
hr
|
10
11
|
|
11
12
|
#admin-specialties
|
12
13
|
= table_for 'admin-specialties-index' do
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#ajax-load').html('<%=j render "specialties" %>')
|
@@ -1,4 +1,3 @@
|
|
1
1
|
= form_tag country_states_admin_states_path, { remote: true, class: 'form-inline' } do
|
2
|
-
=
|
3
|
-
= collection_select :state, :country_iso, Gaku::Country.all, :iso, :name, { selected: @default_country.try(:iso), prompt: t(:'address.choose_country') } , { class: 'input-normal', id: 'select-country' }
|
2
|
+
= collection_select :state, :country_iso, Gaku::Country.all, :iso, :name, { selected: @default_country.try(:iso), prompt: t(:'address.choose_country') } , { class: 'input-normal form-control', id: 'select-country' }
|
4
3
|
= submit_tag 'Show States', class: 'btn btn-primary', id: 'admin-show-country-states-submit'
|
@@ -10,5 +10,5 @@
|
|
10
10
|
= f.text_field :code, label: t(:'address.state.code')
|
11
11
|
.row
|
12
12
|
.col-md-6
|
13
|
-
= f.select :country_iso, @countries, { prompt: t(:'address.choose_country') }, label: t(:'address.country')
|
13
|
+
= f.select :country_iso, @countries, { prompt: t(:'address.choose_country') }, label: t(:'address.country'), class: 'form-control'
|
14
14
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-12
|
3
|
+
#new-admin-state.d-none
|
4
|
+
.pull-left
|
5
|
+
= count_div 'admin-states-count' do
|
6
|
+
= print_count @count, t(:'address.state.list')
|
7
|
+
.pull-right
|
8
|
+
= ajax_link_to_new t(:'address.state.add'), [:new, :admin, :state], id: 'new-admin-state-link'
|
9
|
+
|
10
|
+
#show-admin-states-form
|
11
|
+
= render 'country_select_form'
|
12
|
+
hr
|
13
|
+
|
14
|
+
#admin-country-states
|
15
|
+
= render 'country_table', states: @country.states, country: @country if @country
|
16
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#ajax-load').html('<%=j render "states" %>')
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.text_field :name, validate: { uniqueness: true }, label: t(:'student_review_category.name')
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-12
|
3
|
+
#new-admin-student-review-category.d-none
|
4
|
+
.pull-left
|
5
|
+
= count_div 'admin-student-review-categories-count' do
|
6
|
+
= print_count @count, t(:'student_review_category.list')
|
7
|
+
.pull-right
|
8
|
+
= ajax_link_to_new t(:'student_review_category.new'), [:new, :admin, :student_review_category], id: 'new-admin-student-review-category-link'
|
9
|
+
hr
|
10
|
+
|
11
|
+
#admin-student-review-categories
|
12
|
+
= table_for 'admin-student-review-categories-index' do
|
13
|
+
thead
|
14
|
+
tr
|
15
|
+
= th t(:'student_review_category.plural')
|
16
|
+
= th_actions 2
|
17
|
+
tbody
|
18
|
+
= render partial: 'student_review_category', collection: @student_review_categories, as: :student_review_category
|
@@ -0,0 +1,7 @@
|
|
1
|
+
$('#admin-student-review-categories-index tbody').append('<%= j render("student_review_category", {student_review_category: @student_review_category}) %>');
|
2
|
+
|
3
|
+
$('#new-admin-student-review-category').slide();
|
4
|
+
$('#new-admin-student-review-category-link').show();
|
5
|
+
|
6
|
+
$('.admin-student-review-categories-count').html("<%= print_count(@count, t(:'student_review_category.list')) %>");
|
7
|
+
showNotice("<%= render_flash %>");
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#ajax-load').html('<%=j render "student_review_categories" %>')
|
@@ -2,7 +2,7 @@ td = template.name
|
|
2
2
|
td = template.context
|
3
3
|
td = boolean_image template.locked?
|
4
4
|
td
|
5
|
-
=
|
6
|
-
=
|
5
|
+
= link_to_download [:download, :admin, template]
|
6
|
+
= ajax_link_to_edit [:edit, :admin, template]
|
7
7
|
= ajax_link_to_delete [:admin, template]
|
8
8
|
|
@@ -1,4 +1,7 @@
|
|
1
1
|
= modal_for 'edit-template-modal' do
|
2
|
-
=
|
3
|
-
=
|
2
|
+
= modal_form_for [:admin, @template], resource: 'admin-template' do |f|
|
3
|
+
= f.text_field :name, label: t(:'name')
|
4
|
+
= f.text_field :context, label: t(:'template.context')
|
5
|
+
= f.check_box :locked, label: t(:'template.lock')
|
6
|
+
|
4
7
|
= buttons_for @template, resource: 'admin-template'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-12
|
3
|
+
#new-admin-template.d-none
|
4
|
+
.pull-left
|
5
|
+
= count_div 'admin-templates-count' do
|
6
|
+
= print_count @count, t(:'template.list')
|
7
|
+
.pull-right
|
8
|
+
= ajax_link_to_new t(:'template.add'), [:new, :admin, :template], id: 'new-admin-template-link'
|
9
|
+
|
10
|
+
hr
|
11
|
+
|
12
|
+
#admin-templates
|
13
|
+
= table_for 'admin-templates-index' do
|
14
|
+
thead
|
15
|
+
tr
|
16
|
+
= th t(:'template.singular')
|
17
|
+
= th t(:'template.context')
|
18
|
+
= th t(:'template.lock')
|
19
|
+
= th_actions 3
|
20
|
+
tbody
|
21
|
+
= render partial: 'template', collection: @templates, as: :template
|
@@ -0,0 +1,7 @@
|
|
1
|
+
$('#admin-templates-index tbody').append('<%= j render("template", {template: @template}) %>');
|
2
|
+
|
3
|
+
$('#new-admin-template').slide();
|
4
|
+
$('#new-admin-template-link').show();
|
5
|
+
|
6
|
+
showNotice("<%= render_flash %>");
|
7
|
+
$('.admin-templates-count').html("<%= print_count(@count, t(:'template.list')) %>");
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#ajax-load').html('<%=j render "templates" %>')
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-12
|
3
|
+
#new-admin-user.d-none
|
4
|
+
.pull-left
|
5
|
+
= count_div 'admin-users-count' do
|
6
|
+
= print_count @count, t(:'user.list')
|
7
|
+
.pull-right
|
8
|
+
= ajax_link_to_new t(:'user.add'), [:new, :admin, :user], id: 'new-admin-user-link'
|
9
|
+
|
10
|
+
hr
|
11
|
+
|
12
|
+
#admin-users
|
13
|
+
= table_for 'admin-users-index' do
|
14
|
+
thead
|
15
|
+
tr
|
16
|
+
= th t(:'user.username')
|
17
|
+
= th t(:'user.email')
|
18
|
+
= th_actions 2
|
19
|
+
tbody
|
20
|
+
= render partial: 'gaku/admin/users/user', collection: @users, as: :user
|
21
|
+
|
22
|
+
= paginate @users, remote: true
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#ajax-load').html('<%=j render "users" %>')
|
@@ -1,71 +1 @@
|
|
1
|
-
<li
|
2
|
-
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
3
|
-
<%= t('menu.admin.admin') %>
|
4
|
-
<b class="caret"></b>
|
5
|
-
</a>
|
6
|
-
<ul class="dropdown-menu" data-hook="admin_dropdown_menu">
|
7
|
-
<li data-hook="school_details"><%= link_to t('menu.admin.school_details'), admin_school_details_path %></li>
|
8
|
-
<li data-hook="schools"><%= link_to t('menu.admin.schools'), admin_schools_path %></li>
|
9
|
-
<li data-hook="school_years"><%= link_to t('menu.admin.school_years'), admin_school_years_path %></li>
|
10
|
-
<li data-hook="specialties"><%= link_to t('menu.admin.specialties'), admin_specialties_path %></li>
|
11
|
-
<li data-hook="badge_types"><%= link_to t('menu.admin.badge_types'), admin_badge_types_path %></li>
|
12
|
-
<li data-hook="template"><%= link_to t('menu.admin.templates'), admin_templates_path %></li>
|
13
|
-
<li data-hook="deparment"><%= link_to t('menu.admin.departments'), admin_departments_path %></li>
|
14
|
-
|
15
|
-
<li class="dropdown-submenu" data-hook="achievements_sub_menu">
|
16
|
-
<a tabindex='-1' href='#'><%= t('menu.admin.achievements.achievements') %></a>
|
17
|
-
<ul class="dropdown-menu">
|
18
|
-
<li data-hook="grading_methods"><%= link_to t('menu.admin.achievements.simple_grade_types'), admin_simple_grade_types_path %></li>
|
19
|
-
</ul>
|
20
|
-
</li>
|
21
|
-
<li class="dropdown-submenu" data-hook="grading_sub_menu">
|
22
|
-
<a tabindex='-1' href='#'><%= t('menu.admin.grading.grading') %></a>
|
23
|
-
<ul class="dropdown-menu">
|
24
|
-
<li data-hook="grading_methods"><%= link_to t('menu.admin.grading.grading_methods'), admin_grading_methods_path %></li>
|
25
|
-
<li data-hook="grading_sets"><%= link_to t('menu.admin.grading.grading_sets'), admin_grading_method_sets_path %></li>
|
26
|
-
</ul>
|
27
|
-
</li>
|
28
|
-
<li class="dropdown-submenu" data-hook="types_sub_menu">
|
29
|
-
<a tabindex='-1' href='#'><%= t('menu.admin.types.types') %></a>
|
30
|
-
<ul class="dropdown-menu">
|
31
|
-
<li data-hook="contact_types"><%= link_to t('menu.admin.types.contact'), admin_contact_types_path %></li>
|
32
|
-
<li data-hook="enrollment_status_types">
|
33
|
-
<%= link_to t('menu.admin.types.enrollment_status'), admin_enrollment_statuses_path %>
|
34
|
-
</li>
|
35
|
-
<li data-hook="commute_method_types">
|
36
|
-
<%= link_to t('menu.admin.types.commute_methods'), admin_commute_method_types_path %>
|
37
|
-
</li>
|
38
|
-
<li data-hook="attendance_types">
|
39
|
-
<%= link_to t('menu.admin.types.attendance_types'), admin_attendance_types_path %>
|
40
|
-
</li>
|
41
|
-
<li data-hook="states">
|
42
|
-
<%= link_to t('menu.admin.types.states'), admin_states_path %>
|
43
|
-
</li>
|
44
|
-
</ul>
|
45
|
-
</li>
|
46
|
-
|
47
|
-
|
48
|
-
<li class="dropdown-submenu" data-hook="users_and_roles_sub_menu">
|
49
|
-
<a tabindex='-1' href='#'><%= t('menu.admin.users.users_and_roles') %></a>
|
50
|
-
<ul class="dropdown-menu">
|
51
|
-
<li data-hook="users"><%= link_to t('menu.admin.users.users'), admin_users_path %></li>
|
52
|
-
<li data-hook="roles">
|
53
|
-
<%= link_to t('menu.admin.users.roles'), admin_roles_path %>
|
54
|
-
</li>
|
55
|
-
</ul>
|
56
|
-
</li>
|
57
|
-
|
58
|
-
<li data-hook="presets"><%= link_to t('menu.admin.preset.plural'), admin_presets_path %></li>
|
59
|
-
|
60
|
-
|
61
|
-
<li class="dropdown-submenu" data-hook="system_tools_sub_menu">
|
62
|
-
<a tabindex='-1' href='#'><%= t('menu.admin.system.system_tools') %></a>
|
63
|
-
<ul class="dropdown-menu">
|
64
|
-
<li data-hook="student_presets"><%= link_to t('menu.admin.system.backup'), admin_system_tools_path %></li>
|
65
|
-
</ul>
|
66
|
-
</li>
|
67
|
-
|
68
|
-
|
69
|
-
</ul>
|
70
|
-
</li>
|
71
|
-
|
1
|
+
<li><%= link_to t(:'menu.admin.admin'), admin_root_path %></li>
|