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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98be1e120b74736790a719245f7c3933199959b1
|
4
|
+
data.tar.gz: 3a16cf2a75da88531167f5b7fc25931fa1154b92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a12244f88eec759da4ac8563b18fdb5d4e16621e015d999c9aae9ddd04c20e96e31d248815af8191f193bc35a17ba5c1c8de7978111d52977bfad8b1a21fe5bb
|
7
|
+
data.tar.gz: ab2570575dfe3874d8b06c8d13a8fab7c7d444bdbdb9a3bdc83e1fff5c328c61f1fd0fb0bddef8a4542a6f9d86f2c33de373c092253b39f46cdd04dcba283fa9
|
@@ -17,16 +17,15 @@ ready = ->
|
|
17
17
|
.find('.dynamicAttributeValue')
|
18
18
|
value = nameElem.val()
|
19
19
|
|
20
|
-
valueElem.attr 'id', "
|
21
|
-
valueElem.attr 'name', "grading_method[
|
22
|
-
valueElem.attr 'placeholder', "value for #{value}"
|
20
|
+
valueElem.attr 'id', "grading_method_criteria_#{value}"
|
21
|
+
valueElem.attr 'name', "grading_method[criteria][#{value}]"
|
23
22
|
|
24
|
-
$(document).on 'click', '.remove-
|
23
|
+
$(document).on 'click', '.remove-criteria-row', (e)->
|
25
24
|
e.preventDefault()
|
26
25
|
if confirm('Are you sure?')
|
27
26
|
$(@).closest('.row').html ''
|
28
27
|
|
29
|
-
$(document).on 'click', '.add-
|
28
|
+
$(document).on 'click', '.add-criteria-row', (e)->
|
30
29
|
e.preventDefault()
|
31
30
|
|
32
31
|
contents = "<div class='row'> #{$('.attribute-template').html()} </div>"
|
@@ -35,9 +34,10 @@ ready = ->
|
|
35
34
|
|
36
35
|
edit: ->
|
37
36
|
self.admin.country_dropdown()
|
37
|
+
self.admin.upload_picture_ajax()
|
38
38
|
|
39
39
|
edit_master: ->
|
40
|
-
self.admin.
|
40
|
+
self.admin.upload_picture_ajax()
|
41
41
|
|
42
42
|
new: ->
|
43
43
|
self.admin.country_dropdown()
|
@@ -3,7 +3,7 @@ window.showNotice = (notice)->
|
|
3
3
|
$(@).html('').show()
|
4
4
|
|
5
5
|
$.fn.enableValidations = ->
|
6
|
-
$(this).
|
6
|
+
$(this).enableClientSideValidations()
|
7
7
|
|
8
8
|
$.fn.withAnimation = ->
|
9
9
|
$(this).animate({height:"toggle", opacity:"toggle"})
|
@@ -88,9 +88,18 @@ ready = ->
|
|
88
88
|
@edit()
|
89
89
|
|
90
90
|
upload_picture: ->
|
91
|
-
$(
|
91
|
+
$(document).on 'click', '#upload-picture-link', ->
|
92
92
|
$("#upload-picture").toggle()
|
93
93
|
|
94
|
+
upload_picture_ajax: ->
|
95
|
+
$('body').popover
|
96
|
+
selector: '.picture-upload'
|
97
|
+
html: true
|
98
|
+
content: ()->
|
99
|
+
return $('#upload-picture').html()
|
100
|
+
placement: 'bottom'
|
101
|
+
trigger: 'click'
|
102
|
+
|
94
103
|
country_dropdown: ->
|
95
104
|
$('body').on 'change', '#country_dropdown', ->
|
96
105
|
window.load_states()
|
@@ -14,7 +14,11 @@
|
|
14
14
|
#= require bootstrap/button
|
15
15
|
#= require bootstrap/tab
|
16
16
|
#= require bootstrap/dropdown
|
17
|
+
#= require bootstrap/collapse
|
18
|
+
#= require bootstrap/transition
|
17
19
|
#= require bootstrap/modal
|
20
|
+
#= require bootstrap/tooltip
|
21
|
+
#= require bootstrap/popover
|
18
22
|
|
19
23
|
|
20
24
|
#= require nprogress
|
@@ -27,6 +31,8 @@
|
|
27
31
|
#= require underscore
|
28
32
|
#= require moment
|
29
33
|
#= require rails.validations
|
34
|
+
#= require jquery.remotipart
|
35
|
+
|
30
36
|
#= require gaku/admin/slide.js.erb
|
31
37
|
|
32
38
|
#= require gaku/admin/base
|
@@ -22,6 +22,12 @@
|
|
22
22
|
max-width: 1900px;
|
23
23
|
}
|
24
24
|
|
25
|
+
|
26
|
+
#user_menu {
|
27
|
+
margin-right: 25px;
|
28
|
+
}
|
29
|
+
|
30
|
+
|
25
31
|
.alert-dismissable .close {
|
26
32
|
position: relative;
|
27
33
|
top: -2px;
|
@@ -302,6 +308,10 @@ font-size: 24px;
|
|
302
308
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
|
303
309
|
}
|
304
310
|
|
311
|
+
.navbar .navbarright {
|
312
|
+
margin-right: 0px;
|
313
|
+
}
|
314
|
+
|
305
315
|
.navbar .navbar-nav > .active > a {
|
306
316
|
background-color: #f8f8f8;
|
307
317
|
}
|
@@ -568,4 +578,9 @@ font-size: 24px;
|
|
568
578
|
background-repeat: repeat-x;
|
569
579
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); }
|
570
580
|
}
|
571
|
-
}
|
581
|
+
}
|
582
|
+
|
583
|
+
.modal-backdrop.in {
|
584
|
+
opacity: 0.70;
|
585
|
+
filter: alpha(opacity=70);
|
586
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module AdminPictureController
|
2
|
+
include Gaku::ClassNameDetector
|
3
|
+
|
4
|
+
def set_picture
|
5
|
+
@resource = set_resource
|
6
|
+
@resource.update params.require(param_name).permit(:picture)
|
7
|
+
flash.now[:notice] = t('notice.picture_update')
|
8
|
+
render 'gaku/admin/shared/set_picture'
|
9
|
+
end
|
10
|
+
|
11
|
+
def remove_picture
|
12
|
+
@resource = set_resource
|
13
|
+
@resource.update(picture: nil)
|
14
|
+
flash.now[:notice] = t('notice.picture_remove')
|
15
|
+
render 'gaku/admin/shared/remove_picture'
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def set_resource
|
21
|
+
instance_variable_set("@#{class_name_underscored}", class_name.constantize.find(params[:id]))
|
22
|
+
end
|
23
|
+
|
24
|
+
def param_name
|
25
|
+
controller_name.singularize.to_sym
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -1,17 +1,14 @@
|
|
1
1
|
module Gaku
|
2
2
|
class Admin::AttendanceTypesController < Admin::BaseController
|
3
3
|
|
4
|
-
#load_and_authorize_resource class: AttendanceType
|
5
|
-
|
6
4
|
respond_to :json, only: :index
|
7
|
-
respond_to :js, only: %i( new create edit update destroy )
|
8
|
-
respond_to :html, only: :index
|
5
|
+
respond_to :js, only: %i( new create edit update destroy index )
|
9
6
|
|
10
7
|
before_action :set_attendance_type, only: %i( edit update destroy )
|
11
8
|
|
12
9
|
def index
|
13
10
|
@attendance_types = AttendanceType.all
|
14
|
-
|
11
|
+
set_count
|
15
12
|
respond_with @attendance_types
|
16
13
|
end
|
17
14
|
|
@@ -23,7 +20,7 @@ module Gaku
|
|
23
20
|
def create
|
24
21
|
@attendance_type = AttendanceType.new(attendance_type_params)
|
25
22
|
@attendance_type.save
|
26
|
-
|
23
|
+
set_count
|
27
24
|
respond_with @attendance_type
|
28
25
|
end
|
29
26
|
|
@@ -37,7 +34,7 @@ module Gaku
|
|
37
34
|
|
38
35
|
def destroy
|
39
36
|
@attendance_type.destroy
|
40
|
-
|
37
|
+
set_count
|
41
38
|
respond_with @attendance_type
|
42
39
|
end
|
43
40
|
|
@@ -55,6 +52,9 @@ module Gaku
|
|
55
52
|
%i(name color_code counted_absent disable_credit credit_rate auto_credit)
|
56
53
|
end
|
57
54
|
|
55
|
+
def set_count
|
56
|
+
@count = AttendanceType.count
|
57
|
+
end
|
58
|
+
|
58
59
|
end
|
59
60
|
end
|
60
|
-
|
@@ -1,10 +1,7 @@
|
|
1
1
|
module Gaku
|
2
2
|
class Admin::BadgeTypesController < Admin::BaseController
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
respond_to :js, only: %i( new edit destroy )
|
7
|
-
respond_to :html, only: %i( index create update )
|
4
|
+
respond_to :js, only: %i( new create edit update destroy index )
|
8
5
|
|
9
6
|
before_action :set_badge_type, only: %i( edit update destroy )
|
10
7
|
|
@@ -21,10 +18,12 @@ module Gaku
|
|
21
18
|
|
22
19
|
def create
|
23
20
|
@badge_type = BadgeType.new(badge_type_params)
|
24
|
-
@badge_type.save
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
if @badge_type.save
|
22
|
+
set_count
|
23
|
+
respond_with @badge_type
|
24
|
+
else
|
25
|
+
render :new
|
26
|
+
end
|
28
27
|
end
|
29
28
|
|
30
29
|
def edit
|
@@ -32,13 +31,11 @@ module Gaku
|
|
32
31
|
|
33
32
|
def update
|
34
33
|
@badge_type.update(badge_type_params)
|
35
|
-
|
36
|
-
respond_with [:admin, :badge_types]
|
34
|
+
respond_with @badge_type
|
37
35
|
end
|
38
36
|
|
39
37
|
def destroy
|
40
38
|
@badge_type.destroy
|
41
|
-
flash[:notice] = t(:'notice.destroyed', resource: t_resource)
|
42
39
|
set_count
|
43
40
|
respond_with @badge_type
|
44
41
|
end
|
@@ -58,11 +55,7 @@ module Gaku
|
|
58
55
|
end
|
59
56
|
|
60
57
|
def attributes
|
61
|
-
%i(name description code authority url issuer badge_image )
|
62
|
-
end
|
63
|
-
|
64
|
-
def t_resource
|
65
|
-
t(:'badge_type.singular')
|
58
|
+
%i( name description code authority url issuer badge_image )
|
66
59
|
end
|
67
60
|
|
68
61
|
end
|
@@ -1,10 +1,9 @@
|
|
1
1
|
module Gaku
|
2
|
-
class Admin::
|
2
|
+
class Admin::Campuses::AddressesController < Admin::BaseController
|
3
3
|
|
4
4
|
respond_to :js, only: %i( new create destroy edit update )
|
5
5
|
|
6
6
|
before_action :set_address, only: %i( edit update destroy )
|
7
|
-
before_action :set_school
|
8
7
|
before_action :set_campus
|
9
8
|
before_action :set_countries, only: %i( new edit )
|
10
9
|
|
@@ -30,7 +29,7 @@ module Gaku
|
|
30
29
|
|
31
30
|
def update
|
32
31
|
@address.update(address_params)
|
33
|
-
respond_with @address
|
32
|
+
respond_with @address
|
34
33
|
end
|
35
34
|
|
36
35
|
private
|
@@ -40,11 +39,7 @@ module Gaku
|
|
40
39
|
end
|
41
40
|
|
42
41
|
def attributes
|
43
|
-
%i( title address1 address2 city zipcode state state_id country country_id
|
44
|
-
end
|
45
|
-
|
46
|
-
def set_school
|
47
|
-
@school = School.find(params[:school_id])
|
42
|
+
%i( title address1 address2 city zipcode state state_id country country_id primary past )
|
48
43
|
end
|
49
44
|
|
50
45
|
def set_campus
|
@@ -61,4 +56,3 @@ module Gaku
|
|
61
56
|
|
62
57
|
end
|
63
58
|
end
|
64
|
-
|
@@ -1,11 +1,10 @@
|
|
1
1
|
module Gaku
|
2
|
-
class Admin::
|
2
|
+
class Admin::Campuses::ContactsController < Admin::BaseController
|
3
3
|
|
4
4
|
respond_to :js
|
5
5
|
|
6
6
|
before_action :set_contact_types, only: %i( new edit )
|
7
7
|
before_action :set_contact, only: %i( edit update destroy make_primary )
|
8
|
-
before_action :set_school
|
9
8
|
before_action :set_campus
|
10
9
|
|
11
10
|
def new
|
@@ -14,8 +13,9 @@ module Gaku
|
|
14
13
|
end
|
15
14
|
|
16
15
|
def create
|
17
|
-
|
18
|
-
|
16
|
+
creator = ContactCreation.new(contact_params.merge(contactable: @campus))
|
17
|
+
creator.save
|
18
|
+
@contact = creator.contact
|
19
19
|
set_count
|
20
20
|
respond_with @contact
|
21
21
|
end
|
@@ -25,8 +25,9 @@ module Gaku
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def update
|
28
|
+
ContactUpdation.new(@contact).update(contact_params)
|
28
29
|
@contact.update(contact_params)
|
29
|
-
respond_with @contact
|
30
|
+
respond_with @contact
|
30
31
|
end
|
31
32
|
|
32
33
|
def destroy
|
@@ -37,7 +38,6 @@ module Gaku
|
|
37
38
|
respond_with @contact
|
38
39
|
end
|
39
40
|
|
40
|
-
|
41
41
|
def make_primary
|
42
42
|
@contact.make_primary
|
43
43
|
respond_with @contact
|
@@ -49,10 +49,6 @@ module Gaku
|
|
49
49
|
@contact = Contact.find(params[:id])
|
50
50
|
end
|
51
51
|
|
52
|
-
def set_school
|
53
|
-
@school = School.find(params[:school_id])
|
54
|
-
end
|
55
|
-
|
56
52
|
def set_campus
|
57
53
|
@campus = Campus.find(params[:campus_id])
|
58
54
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Gaku
|
2
|
-
class Admin::
|
2
|
+
class Admin::CampusesController < Admin::BaseController
|
3
|
+
include AdminPictureController
|
3
4
|
|
4
|
-
respond_to :js, only: %i( new create destroy )
|
5
|
-
respond_to :html, only: %i( edit
|
6
|
-
|
7
|
-
before_action :set_campus, only: %i( edit show update destroy )
|
8
|
-
before_action :set_school
|
5
|
+
respond_to :js, only: %i( new create destroy edit update index )
|
6
|
+
respond_to :html, only: %i( edit )
|
9
7
|
|
8
|
+
before_action :set_campus, only: %i( edit update destroy )
|
9
|
+
before_action :set_school, except: %i( set_picture remove_picture )
|
10
10
|
|
11
11
|
def destroy
|
12
12
|
@campus.destroy
|
@@ -31,13 +31,9 @@ module Gaku
|
|
31
31
|
respond_with @campus
|
32
32
|
end
|
33
33
|
|
34
|
-
def show
|
35
|
-
respond_with @campus
|
36
|
-
end
|
37
|
-
|
38
34
|
def update
|
39
35
|
@campus.update(campus_params)
|
40
|
-
respond_with @campus
|
36
|
+
respond_with @campus
|
41
37
|
end
|
42
38
|
|
43
39
|
def index
|
@@ -1,16 +1,13 @@
|
|
1
1
|
module Gaku
|
2
2
|
class Admin::CommuteMethodTypesController < Admin::BaseController
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
respond_to :js, only: %i( new create edit update destroy )
|
7
|
-
respond_to :html, only: :index
|
4
|
+
respond_to :js, only: %i( new create edit update destroy index )
|
8
5
|
|
9
6
|
before_action :set_commute_method_type, only: %i( edit update destroy )
|
10
7
|
|
11
8
|
def index
|
12
9
|
@commute_method_types = CommuteMethodType.all
|
13
|
-
|
10
|
+
set_count
|
14
11
|
respond_with @commute_method_types
|
15
12
|
end
|
16
13
|
|
@@ -22,7 +19,7 @@ module Gaku
|
|
22
19
|
def create
|
23
20
|
@commute_method_type = CommuteMethodType.new(commute_method_type_params)
|
24
21
|
@commute_method_type.save
|
25
|
-
|
22
|
+
set_count
|
26
23
|
respond_with @commute_method_type
|
27
24
|
end
|
28
25
|
|
@@ -36,7 +33,7 @@ module Gaku
|
|
36
33
|
|
37
34
|
def destroy
|
38
35
|
@commute_method_type.destroy
|
39
|
-
|
36
|
+
set_count
|
40
37
|
respond_with @commute_method_type
|
41
38
|
end
|
42
39
|
|
@@ -50,5 +47,9 @@ module Gaku
|
|
50
47
|
params.require(:commute_method_type).permit(:name)
|
51
48
|
end
|
52
49
|
|
50
|
+
def set_count
|
51
|
+
@count = CommuteMethodType.count
|
52
|
+
end
|
53
|
+
|
53
54
|
end
|
54
55
|
end
|
@@ -1,16 +1,13 @@
|
|
1
1
|
module Gaku
|
2
2
|
class Admin::ContactTypesController < Admin::BaseController
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
respond_to :js, only: %i( new create edit update destroy )
|
7
|
-
respond_to :html, only: :index
|
4
|
+
respond_to :js, only: %i( new create edit update destroy index )
|
8
5
|
|
9
6
|
before_action :set_contact_type, only: %i( edit update destroy )
|
10
7
|
|
11
8
|
def index
|
12
9
|
@contact_types = ContactType.all
|
13
|
-
|
10
|
+
set_count
|
14
11
|
respond_with @contact_types
|
15
12
|
end
|
16
13
|
|
@@ -22,7 +19,7 @@ module Gaku
|
|
22
19
|
def create
|
23
20
|
@contact_type = ContactType.new(contact_type_params)
|
24
21
|
@contact_type.save
|
25
|
-
|
22
|
+
set_count
|
26
23
|
respond_with @contact_type
|
27
24
|
end
|
28
25
|
|
@@ -36,7 +33,7 @@ module Gaku
|
|
36
33
|
|
37
34
|
def destroy
|
38
35
|
@contact_type.destroy
|
39
|
-
|
36
|
+
set_count
|
40
37
|
respond_with @contact_type
|
41
38
|
end
|
42
39
|
|
@@ -50,6 +47,9 @@ module Gaku
|
|
50
47
|
params.require(:contact_type).permit(:name)
|
51
48
|
end
|
52
49
|
|
50
|
+
def set_count
|
51
|
+
@count = ContactType.count
|
52
|
+
end
|
53
53
|
|
54
54
|
end
|
55
55
|
end
|
@@ -1,16 +1,13 @@
|
|
1
1
|
module Gaku
|
2
2
|
class Admin::DepartmentsController < Admin::BaseController
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
respond_to :js, only: %i( new create edit update destroy )
|
7
|
-
respond_to :html, only: :index
|
4
|
+
respond_to :js, only: %i( new create edit update destroy index )
|
8
5
|
|
9
6
|
before_action :set_department, only: %i( edit update destroy )
|
10
7
|
|
11
8
|
def index
|
12
9
|
@departments = Department.all
|
13
|
-
|
10
|
+
set_count
|
14
11
|
respond_with @departments
|
15
12
|
end
|
16
13
|
|
@@ -22,7 +19,7 @@ module Gaku
|
|
22
19
|
def create
|
23
20
|
@department = Department.new(department_params)
|
24
21
|
@department.save
|
25
|
-
|
22
|
+
set_count
|
26
23
|
respond_with @department
|
27
24
|
end
|
28
25
|
|
@@ -36,7 +33,7 @@ module Gaku
|
|
36
33
|
|
37
34
|
def destroy
|
38
35
|
@department.destroy
|
39
|
-
|
36
|
+
set_count
|
40
37
|
respond_with @department
|
41
38
|
end
|
42
39
|
|
@@ -50,6 +47,9 @@ module Gaku
|
|
50
47
|
params.require(:department).permit(:name)
|
51
48
|
end
|
52
49
|
|
50
|
+
def set_count
|
51
|
+
@count = Department.count
|
52
|
+
end
|
53
53
|
|
54
54
|
end
|
55
55
|
end
|
@@ -1,16 +1,13 @@
|
|
1
1
|
module Gaku
|
2
2
|
class Admin::EnrollmentStatusesController < Admin::BaseController
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
respond_to :js, only: %i( new create edit update destroy )
|
7
|
-
respond_to :html, only: :index
|
4
|
+
respond_to :js, only: %i( new create edit update destroy index )
|
8
5
|
|
9
6
|
before_action :set_enrollment_status, only: %i( edit update destroy )
|
10
7
|
|
11
8
|
def index
|
12
9
|
@enrollment_statuses = EnrollmentStatus.includes(:translations)
|
13
|
-
|
10
|
+
set_count
|
14
11
|
respond_with @enrollment_statuss
|
15
12
|
end
|
16
13
|
|
@@ -22,7 +19,7 @@ module Gaku
|
|
22
19
|
def create
|
23
20
|
@enrollment_status = EnrollmentStatus.new(enrollment_status_params)
|
24
21
|
@enrollment_status.save
|
25
|
-
|
22
|
+
set_count
|
26
23
|
respond_with @enrollment_status
|
27
24
|
end
|
28
25
|
|
@@ -36,7 +33,7 @@ module Gaku
|
|
36
33
|
|
37
34
|
def destroy
|
38
35
|
@enrollment_status.destroy
|
39
|
-
|
36
|
+
set_count
|
40
37
|
respond_with @enrollment_status
|
41
38
|
end
|
42
39
|
|
@@ -51,7 +48,11 @@ module Gaku
|
|
51
48
|
end
|
52
49
|
|
53
50
|
def attributes
|
54
|
-
%i(code name active immutable)
|
51
|
+
%i( code name active immutable )
|
52
|
+
end
|
53
|
+
|
54
|
+
def set_count
|
55
|
+
@count = EnrollmentStatus.count
|
55
56
|
end
|
56
57
|
|
57
58
|
end
|
@@ -1,16 +1,14 @@
|
|
1
1
|
module Gaku
|
2
2
|
class Admin::GradingMethodSetsController < Admin::BaseController
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
respond_to :js, only: %i( new create edit update destroy make_primary )
|
7
|
-
respond_to :html, only: %i( index show )
|
4
|
+
respond_to :js, only: %i( new create edit update destroy make_primary index )
|
5
|
+
respond_to :html, only: %i( show )
|
8
6
|
|
9
7
|
before_action :set_grading_method_set, only: %i( edit update show destroy make_primary )
|
10
8
|
|
11
9
|
def index
|
12
10
|
@grading_method_sets = GradingMethodSet.all
|
13
|
-
|
11
|
+
set_count
|
14
12
|
respond_with @grading_method_sets
|
15
13
|
end
|
16
14
|
|
@@ -22,7 +20,7 @@ module Gaku
|
|
22
20
|
def create
|
23
21
|
@grading_method_set = GradingMethodSet.new(grading_method_set_params)
|
24
22
|
@grading_method_set.save
|
25
|
-
|
23
|
+
set_count
|
26
24
|
respond_with @grading_method_set
|
27
25
|
end
|
28
26
|
|
@@ -38,11 +36,9 @@ module Gaku
|
|
38
36
|
end
|
39
37
|
|
40
38
|
def destroy
|
41
|
-
if @grading_method_set.primary?
|
42
|
-
GradingMethodSet.first.try(:make_primary)
|
43
|
-
end
|
39
|
+
GradingMethodSet.first.try(:make_primary) if @grading_method_set.primary?
|
44
40
|
@grading_method_set.destroy
|
45
|
-
|
41
|
+
set_count
|
46
42
|
respond_with @grading_method_set
|
47
43
|
end
|
48
44
|
|
@@ -62,7 +58,11 @@ module Gaku
|
|
62
58
|
end
|
63
59
|
|
64
60
|
def attributes
|
65
|
-
%i(display_deviation display_rank name primary rank_order)
|
61
|
+
%i( display_deviation display_rank name primary rank_order )
|
62
|
+
end
|
63
|
+
|
64
|
+
def set_count
|
65
|
+
@count = GradingMethodSet.count
|
66
66
|
end
|
67
67
|
|
68
68
|
end
|