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.
Files changed (233) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/gaku/admin/admin.coffee +6 -6
  3. data/app/assets/javascripts/gaku/admin/base.js.coffee +11 -2
  4. data/app/assets/javascripts/gaku/admin.js.coffee +6 -0
  5. data/app/assets/stylesheets/gaku/admin/bootstrap_and_theme.css.scss +16 -1
  6. data/app/assets/stylesheets/gaku/admin.css +0 -1
  7. data/app/controllers/concerns/admin_picture_controller.rb +28 -0
  8. data/app/controllers/gaku/admin/attendance_types_controller.rb +8 -8
  9. data/app/controllers/gaku/admin/badge_types_controller.rb +9 -16
  10. data/app/controllers/gaku/admin/base_controller.rb +1 -1
  11. data/app/controllers/gaku/admin/{schools/campuses → campuses}/addresses_controller.rb +3 -9
  12. data/app/controllers/gaku/admin/{schools/campuses → campuses}/contacts_controller.rb +6 -10
  13. data/app/controllers/gaku/admin/{schools/campuses_controller.rb → campuses_controller.rb} +7 -11
  14. data/app/controllers/gaku/admin/commute_method_types_controller.rb +8 -7
  15. data/app/controllers/gaku/admin/contact_types_controller.rb +7 -7
  16. data/app/controllers/gaku/admin/departments_controller.rb +7 -7
  17. data/app/controllers/gaku/admin/enrollment_statuses_controller.rb +9 -8
  18. data/app/controllers/gaku/admin/grading_method_sets/grading_method_set_items_controller.rb +1 -1
  19. data/app/controllers/gaku/admin/grading_method_sets_controller.rb +11 -11
  20. data/app/controllers/gaku/admin/grading_methods_controller.rb +10 -9
  21. data/app/controllers/gaku/admin/home_controller.rb +11 -0
  22. data/app/controllers/gaku/admin/presets_controller.rb +4 -6
  23. data/app/controllers/gaku/admin/roles_controller.rb +8 -7
  24. data/app/controllers/gaku/admin/school_years/semesters_controller.rb +0 -1
  25. data/app/controllers/gaku/admin/school_years_controller.rb +3 -7
  26. data/app/controllers/gaku/admin/schools/programs_controller.rb +11 -4
  27. data/app/controllers/gaku/admin/schools_controller.rb +82 -79
  28. data/app/controllers/gaku/admin/{achievements/simple_grade_types_controller.rb → simple_grade_types_controller.rb} +4 -3
  29. data/app/controllers/gaku/admin/specialties_controller.rb +2 -5
  30. data/app/controllers/gaku/admin/states_controller.rb +71 -71
  31. data/app/controllers/gaku/admin/student_review_categories_controller.rb +57 -0
  32. data/app/controllers/gaku/admin/templates_controller.rb +47 -50
  33. data/app/controllers/gaku/admin/users_controller.rb +5 -7
  34. data/app/controllers/gaku/states_controller.rb +2 -0
  35. data/app/helpers/gaku/admin_helper.rb +16 -1
  36. data/app/helpers/gaku/shared_helper.rb +2 -2
  37. data/app/overrides/admin_menu.rb +7 -6
  38. data/app/views/gaku/admin/attendance_types/{index.html.slim → _attendance_types.html.slim} +9 -8
  39. data/app/views/gaku/admin/attendance_types/index.js.erb +1 -0
  40. data/app/views/gaku/admin/attendance_types/index.json.rb +1 -1
  41. data/app/views/gaku/admin/badge_types/{index.html.slim → _badge_types.html.slim} +9 -8
  42. data/app/views/gaku/admin/badge_types/_form.html.slim +1 -1
  43. data/app/views/gaku/admin/badge_types/_modal.html.slim +1 -1
  44. data/app/views/gaku/admin/badge_types/create.js.erb +7 -0
  45. data/app/views/gaku/admin/badge_types/index.js.erb +1 -0
  46. data/app/views/gaku/admin/badge_types/new.js.erb +1 -1
  47. data/app/views/gaku/admin/badge_types/update.js.erb +3 -0
  48. data/app/views/gaku/admin/campuses/_campus.html.slim +4 -0
  49. data/app/views/gaku/admin/{schools/campuses → campuses}/_campuses.html.slim +4 -6
  50. data/app/views/gaku/admin/campuses/_edit_form.html.slim +3 -0
  51. data/app/views/gaku/admin/campuses/addresses/_address.html.slim +6 -0
  52. data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_address_row_fields.html.slim +1 -1
  53. data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_addresses.html.slim +3 -4
  54. data/app/views/gaku/admin/campuses/addresses/index.js.erb +1 -0
  55. data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/update.js.erb +1 -1
  56. data/app/views/gaku/admin/campuses/contacts/_contact.html.slim +3 -0
  57. data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_contacts.html.slim +4 -4
  58. data/app/views/gaku/admin/campuses/contacts/_fields.html.slim +11 -0
  59. data/app/views/gaku/admin/campuses/contacts/_primary_field.html.slim +6 -0
  60. data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/create.js.erb +1 -1
  61. data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/destroy.js.erb +1 -1
  62. data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/edit.js.erb +1 -1
  63. data/app/views/gaku/admin/campuses/contacts/index.js.erb +1 -0
  64. data/app/views/gaku/admin/campuses/edit.html.slim +34 -0
  65. data/app/views/gaku/admin/campuses/edit.js.erb +1 -0
  66. data/app/views/gaku/admin/campuses/index.js.erb +1 -0
  67. data/app/views/gaku/admin/campuses/update.js.erb +2 -0
  68. data/app/views/gaku/admin/commute_method_types/_commute_method_types.html.slim +18 -0
  69. data/app/views/gaku/admin/commute_method_types/index.js.erb +1 -0
  70. data/app/views/gaku/admin/contact_types/_contact_types.html.slim +18 -0
  71. data/app/views/gaku/admin/contact_types/index.js.erb +1 -0
  72. data/app/views/gaku/admin/departments/_departments.html.slim +21 -0
  73. data/app/views/gaku/admin/departments/index.js.erb +1 -0
  74. data/app/views/gaku/admin/enrollment_statuses/{index.html.slim → _enrollment_statuses.html.slim} +9 -10
  75. data/app/views/gaku/admin/enrollment_statuses/index.js.erb +1 -0
  76. data/app/views/gaku/admin/grading_method_sets/_fields.html.slim +1 -1
  77. data/app/views/gaku/admin/grading_method_sets/{index.html.slim → _grading_method_sets.html.slim} +9 -8
  78. data/app/views/gaku/admin/grading_method_sets/_show.html.slim +4 -0
  79. data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_fields.html.slim +2 -2
  80. data/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_items.html.slim +1 -1
  81. data/app/views/gaku/admin/grading_method_sets/index.js.erb +1 -0
  82. data/app/views/gaku/admin/grading_method_sets/show.js.erb +1 -0
  83. data/app/views/gaku/admin/grading_methods/_criteria_form_fields.html.slim +19 -0
  84. data/app/views/gaku/admin/grading_methods/_criteria_template.html.slim +11 -0
  85. data/app/views/gaku/admin/grading_methods/_fields.html.slim +1 -1
  86. data/app/views/gaku/admin/grading_methods/_form_fields.html.slim +3 -2
  87. data/app/views/gaku/admin/grading_methods/_grading_methods.html.slim +21 -0
  88. data/app/views/gaku/admin/grading_methods/index.js.erb +1 -0
  89. data/app/views/gaku/admin/home/index.html.slim +5 -0
  90. data/app/views/gaku/admin/presets/_address.html.slim +8 -7
  91. data/app/views/gaku/admin/presets/_chooser_fields.html.slim +1 -1
  92. data/app/views/gaku/admin/presets/_export_formats.html.slim +5 -4
  93. data/app/views/gaku/admin/presets/_fields.html.slim +1 -1
  94. data/app/views/gaku/admin/presets/_grading.html.slim +4 -3
  95. data/app/views/gaku/admin/presets/_locale.html.slim +6 -3
  96. data/app/views/gaku/admin/presets/_names_order.html.slim +1 -1
  97. data/app/views/gaku/admin/presets/_pagination.html.slim +10 -9
  98. data/app/views/gaku/admin/presets/_person.html.slim +3 -2
  99. data/app/views/gaku/admin/presets/{index.html.slim → _presets.html.slim} +7 -4
  100. data/app/views/gaku/admin/presets/_student.html.slim +1 -1
  101. data/app/views/gaku/admin/presets/_tabs.html.slim +2 -3
  102. data/app/views/gaku/admin/presets/edit.js.erb +1 -0
  103. data/app/views/gaku/admin/presets/index.js.erb +1 -0
  104. data/app/views/gaku/admin/presets/update.js.erb +1 -0
  105. data/app/views/gaku/admin/roles/_roles.html.slim +21 -0
  106. data/app/views/gaku/admin/roles/index.js.erb +1 -0
  107. data/app/views/gaku/admin/school_years/_edit_form.html.slim +4 -0
  108. data/app/views/gaku/admin/school_years/_fields.html.slim +1 -2
  109. data/app/views/gaku/admin/school_years/_school_years.html.slim +23 -0
  110. data/app/views/gaku/admin/school_years/edit.html.slim +20 -0
  111. data/app/views/gaku/admin/school_years/edit.js.erb +4 -2
  112. data/app/views/gaku/admin/school_years/index.js.erb +1 -0
  113. data/app/views/gaku/admin/school_years/semesters/_semesters.html.slim +1 -1
  114. data/app/views/gaku/admin/school_years/semesters/index.js.erb +1 -0
  115. data/app/views/gaku/admin/schools/_edit_form.html.slim +3 -0
  116. data/app/views/gaku/admin/schools/_edit_master_form.html.slim +10 -0
  117. data/app/views/gaku/admin/schools/_school.html.slim +4 -2
  118. data/app/views/gaku/admin/schools/{index.html.slim → _schools.html.slim} +10 -9
  119. data/app/views/gaku/admin/schools/_tabs.html.slim +1 -1
  120. data/app/views/gaku/admin/schools/edit.html.slim +37 -14
  121. data/app/views/gaku/admin/schools/edit.js.erb +1 -0
  122. data/app/views/gaku/admin/schools/edit_master.html.slim +36 -16
  123. data/app/views/gaku/admin/schools/index.js.erb +1 -0
  124. data/app/views/gaku/admin/schools/programs/_fields.html.slim +3 -4
  125. data/app/views/gaku/admin/schools/programs/_programs.html.slim +2 -2
  126. data/app/views/gaku/admin/schools/programs/create.js.erb +1 -0
  127. data/app/views/gaku/admin/schools/programs/destroy.js.erb +1 -0
  128. data/app/views/gaku/admin/schools/programs/index.js.erb +1 -0
  129. data/app/views/gaku/admin/schools/update.js.erb +1 -0
  130. data/app/views/gaku/admin/shared/_ajax_picture.html.slim +8 -0
  131. data/app/views/gaku/admin/shared/_ajax_upload_picture.html.slim +14 -0
  132. data/app/views/gaku/admin/shared/remove_picture.js.erb +3 -0
  133. data/app/views/gaku/admin/shared/set_picture.js.erb +3 -0
  134. data/app/views/gaku/admin/simple_grade_types/_simple_grade_types.html.slim +24 -0
  135. data/app/views/gaku/admin/simple_grade_types/index.js.erb +1 -0
  136. data/app/views/gaku/admin/specialties/{index.html.slim → _specialties.html.slim} +9 -8
  137. data/app/views/gaku/admin/specialties/index.js.erb +1 -0
  138. data/app/views/gaku/admin/states/_country_select_form.html.slim +1 -2
  139. data/app/views/gaku/admin/states/_form_fields.html.slim +1 -1
  140. data/app/views/gaku/admin/states/_states.html.slim +16 -0
  141. data/app/views/gaku/admin/states/index.js.erb +1 -0
  142. data/app/views/gaku/admin/student_review_categories/_form.html.slim +3 -0
  143. data/app/views/gaku/admin/student_review_categories/_form_fields.html.slim +1 -0
  144. data/app/views/gaku/admin/student_review_categories/_modal.html.slim +4 -0
  145. data/app/views/gaku/admin/student_review_categories/_student_review_categories.html.slim +18 -0
  146. data/app/views/gaku/admin/student_review_categories/_student_review_category.html.slim +2 -0
  147. data/app/views/gaku/admin/student_review_categories/_table_fields.html.slim +4 -0
  148. data/app/views/gaku/admin/student_review_categories/create.js.erb +7 -0
  149. data/app/views/gaku/admin/student_review_categories/destroy.js.erb +2 -0
  150. data/app/views/gaku/admin/student_review_categories/edit.js.erb +3 -0
  151. data/app/views/gaku/admin/student_review_categories/index.js.erb +1 -0
  152. data/app/views/gaku/admin/student_review_categories/new.js.erb +3 -0
  153. data/app/views/gaku/admin/student_review_categories/update.js.erb +3 -0
  154. data/app/views/gaku/admin/templates/_fields.html.slim +2 -2
  155. data/app/views/gaku/admin/templates/_form.html.slim +1 -1
  156. data/app/views/gaku/admin/templates/_modal.html.slim +5 -2
  157. data/app/views/gaku/admin/templates/_templates.html.slim +21 -0
  158. data/app/views/gaku/admin/templates/create.js.erb +7 -0
  159. data/app/views/gaku/admin/templates/edit.js.erb +3 -0
  160. data/app/views/gaku/admin/templates/index.js.erb +1 -0
  161. data/app/views/gaku/admin/templates/new.js.erb +3 -0
  162. data/app/views/gaku/admin/templates/update.js.erb +3 -0
  163. data/app/views/gaku/admin/users/_users.html.slim +22 -0
  164. data/app/views/gaku/admin/users/index.js.erb +1 -0
  165. data/app/views/gaku/layouts/admin/index.html.slim +0 -1
  166. data/app/views/gaku/shared/menu/_admin.html.erb +1 -71
  167. data/app/views/gaku/shared/menu/_admin_menu.html.erb +154 -0
  168. data/config/routes.rb +20 -10
  169. data/lib/gaku/admin/engine.rb +3 -5
  170. data/lib/gaku/admin.rb +2 -1
  171. data/lib/gaku/app_responder.rb +1 -1
  172. data/lib/gaku_admin.rb +1 -1
  173. data/lib/tasks/admin_user.rake +2 -1
  174. metadata +456 -374
  175. data/app/views/gaku/admin/achievements/simple_grade_types/index.html.slim +0 -23
  176. data/app/views/gaku/admin/commute_method_types/index.html.slim +0 -18
  177. data/app/views/gaku/admin/contact_types/index.html.slim +0 -18
  178. data/app/views/gaku/admin/departments/index.html.slim +0 -20
  179. data/app/views/gaku/admin/grading_method_sets/show.html.slim +0 -13
  180. data/app/views/gaku/admin/grading_methods/index.html.slim +0 -20
  181. data/app/views/gaku/admin/roles/index.html.slim +0 -20
  182. data/app/views/gaku/admin/school_years/index.html.slim +0 -21
  183. data/app/views/gaku/admin/school_years/show.html.slim +0 -15
  184. data/app/views/gaku/admin/schools/campuses/_campus.html.slim +0 -6
  185. data/app/views/gaku/admin/schools/campuses/_picture.html.slim +0 -8
  186. data/app/views/gaku/admin/schools/campuses/_show_table.html.slim +0 -10
  187. data/app/views/gaku/admin/schools/campuses/_tabs.html.slim +0 -15
  188. data/app/views/gaku/admin/schools/campuses/_upload_picture.html.slim +0 -7
  189. data/app/views/gaku/admin/schools/campuses/addresses/_address.html.slim +0 -7
  190. data/app/views/gaku/admin/schools/campuses/contacts/_contact.html.slim +0 -3
  191. data/app/views/gaku/admin/schools/campuses/contacts/_fields.html.slim +0 -12
  192. data/app/views/gaku/admin/schools/campuses/contacts/_primary_field.html.slim +0 -13
  193. data/app/views/gaku/admin/schools/campuses/edit.html.slim +0 -19
  194. data/app/views/gaku/admin/schools/campuses/show.html.slim +0 -13
  195. data/app/views/gaku/admin/schools/show.html.slim +0 -13
  196. data/app/views/gaku/admin/schools/show_master.html.slim +0 -14
  197. data/app/views/gaku/admin/states/index.html.slim +0 -15
  198. data/app/views/gaku/admin/templates/edit.html.slim +0 -1
  199. data/app/views/gaku/admin/templates/index.html.slim +0 -20
  200. data/app/views/gaku/admin/templates/new.html.slim +0 -1
  201. data/app/views/gaku/admin/users/index.html.slim +0 -21
  202. data/config/initializers/client_side_validations.rb +0 -9
  203. /data/app/views/gaku/admin/{schools/campuses → campuses}/_form.html.slim +0 -0
  204. /data/app/views/gaku/admin/{schools/campuses → campuses}/_form_fields.html.slim +0 -0
  205. /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_fields.html.slim +0 -0
  206. /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_form.html.slim +0 -0
  207. /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_form_fields.html.slim +0 -0
  208. /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_modal.html.slim +0 -0
  209. /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/create.js.erb +0 -0
  210. /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/destroy.js.erb +0 -0
  211. /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/edit.js.erb +0 -0
  212. /data/app/views/gaku/admin/{schools/campuses → campuses}/addresses/new.js.erb +0 -0
  213. /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_delete_link.html.slim +0 -0
  214. /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_form.html.slim +0 -0
  215. /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_form_fields.html.slim +0 -0
  216. /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_modal.html.slim +0 -0
  217. /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/make_primary.js.erb +0 -0
  218. /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/new.js.erb +0 -0
  219. /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/soft_delete.js.erb +0 -0
  220. /data/app/views/gaku/admin/{schools/campuses → campuses}/contacts/update.js.erb +0 -0
  221. /data/app/views/gaku/admin/{schools/campuses → campuses}/create.js.erb +0 -0
  222. /data/app/views/gaku/admin/{schools/campuses → campuses}/destroy.js.erb +0 -0
  223. /data/app/views/gaku/admin/{schools/campuses → campuses}/new.js.erb +0 -0
  224. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_fields.html.slim +0 -0
  225. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_form.html.slim +0 -0
  226. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_form_fields.html.slim +0 -0
  227. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_modal.html.slim +0 -0
  228. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_simple_grade_type.html.slim +0 -0
  229. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/create.js.erb +0 -0
  230. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/destroy.js.erb +0 -0
  231. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/edit.js.erb +0 -0
  232. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/new.js.erb +0 -0
  233. /data/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/update.js.erb +0 -0
@@ -1,23 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-simple-grade-types-count' do
4
- = print_count @count, t(:'simple_grade_type.list')
5
- .pull-right
6
- = ajax_link_to_new t(:'simple_grade_type.add'), [:new, :admin, :simple_grade_type], id: 'new-admin-simple-grade-type-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-simple-grade-type.d-none
10
-
11
- #admin-simple-grade-types
12
- = table_for 'admin-simple-grade-types-index' do
13
- thead
14
- tr
15
- = th t(:'simple_grade_type.singular')
16
- = th t(:'simple_grade_type.max_score')
17
- = th t(:'simple_grade_type.passing_score')
18
- = th t(:'school.singular')
19
- = th t(:'grading_method.singular')
20
- = th_actions 2
21
- tbody
22
- = render partial: 'gaku/admin/achievements/simple_grade_types/simple_grade_type', collection: @simple_grade_types, as: :simple_grade_type
23
-
@@ -1,18 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-commute-method-types-count' do
4
- = print_count @count, t(:'commute_method_type.list')
5
- .pull-right
6
- = ajax_link_to_new t(:'commute_method_type.new'), [:new, :admin, :commute_method_type], id: 'new-admin-commute-method-type-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-commute-method-type.d-none
10
-
11
- #admin-commute-method-types
12
- = table_for 'admin-commute-method-types-index' do
13
- thead
14
- tr
15
- = th t(:'commute_method_type.plural')
16
- = th_actions 2
17
- tbody
18
- = render partial: 'commute_method_type', collection: @commute_method_types, as: :commute_method_type
@@ -1,18 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-contact-types-count' do
4
- = print_count @count, t(:'contact_type.list')
5
- .pull-right
6
- = ajax_link_to_new t(:'contact_type.add'), [:new, :admin, :contact_type], id: 'new-admin-contact-type-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-contact-type.d-none
10
-
11
- #admin-contact-types
12
- = table_for 'admin-contact-types-index' do
13
- thead
14
- tr
15
- = th t(:'contact_type.singular')
16
- = th_actions 2
17
- tbody
18
- = render partial: 'contact_type', collection: @contact_types, as: 'contact_type'
@@ -1,20 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-departments-count' do
4
- = print_count @count, t(:'department.list')
5
- .pull-right
6
- = ajax_link_to_new t(:'department.add'), [:new, :admin, :department], id: 'new-admin-department-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-department.d-none
10
-
11
- #admin-departments
12
- = table_for 'admin-departments-index' do
13
- thead
14
- tr
15
- = th t(:'department.name')
16
-
17
- = th_actions 2
18
- tbody
19
- = render partial: 'gaku/admin/departments/department', collection: @departments, as: :department
20
-
@@ -1,13 +0,0 @@
1
- = content_for :show_header do
2
- = t(:'grading_method_set.show')
3
-
4
- =hr
5
-
6
- = well_div do
7
- = render 'gaku/admin/grading_method_sets/grading_method_set_items/items'
8
-
9
- =hr
10
- .row
11
- .col-md-12
12
- = link_to_back admin_grading_method_sets_path
13
-
@@ -1,20 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-grading-methods-count' do
4
- = print_count @count, t(:'grading_method.list')
5
- .pull-right
6
- = ajax_link_to_new t(:'grading_method.add'), [:new, :admin, :grading_method], id: 'new-admin-grading-method-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-grading-method.d-none
10
-
11
- #admin-grading-methods
12
- = table_for 'admin-grading-methods-index' do
13
- thead
14
- tr
15
- = th t(:'grading_method.singular')
16
- = th t(:'grading_method.description')
17
- = th t(:'grading_method.method')
18
- = th_actions 2
19
- tbody
20
- = render partial: 'grading_method', collection: @grading_methods, as: :grading_method
@@ -1,20 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-roles-count' do
4
- = print_count @count, t(:'role.list')
5
- .pull-right
6
- = ajax_link_to_new t(:'role.add'), [:new, :admin, :role], id: 'new-admin-role-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-role.d-none
10
-
11
- #admin-roles
12
- = table_for 'admin-roles-index' do
13
- thead
14
- tr
15
- = th t(:'role.name')
16
- = th t(:'user.plural')
17
- = th_actions 2
18
- tbody
19
- = render partial: 'gaku/admin/roles/role', collection: @roles, as: :role
20
-
@@ -1,21 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-school-years-count' do
4
- = print_count @count, t(:'school_year.list')
5
- .pull-right
6
- = ajax_link_to_new t(:'school_year.add'), [:new, :admin, :school_year], id: 'new-admin-school-year-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-school-year-errors
10
- #new-admin-school-year.d-none
11
-
12
- #admin-school-years
13
- = table_for 'admin-school-years-index' do
14
- thead
15
- tr
16
- = th t(:'school_year.starting')
17
- = th t(:'school_year.ending')
18
- = th t(:'school_year.duration')
19
- = th_actions 3
20
- tbody
21
- = render partial: 'school_year', collection: @school_years, as: 'school_year'
@@ -1,15 +0,0 @@
1
- = content_for :show_header do
2
- = t(:'school_year.show')
3
- =well_div do
4
- =render 'show_table'
5
-
6
- =hr
7
-
8
- = well_div do
9
- =render 'gaku/admin/school_years/semesters/semesters'
10
-
11
- =hr
12
- .row
13
- .col-md-12
14
- = link_to_back admin_school_years_path
15
-
@@ -1,6 +0,0 @@
1
- tr id="campus-#{campus.id}"
2
- td
3
- td = campus.name
4
- td
5
- = link_to_show [:admin, @school, campus]
6
- = link_to_edit [:edit, :admin, @school, campus] if can_edit?
@@ -1,8 +0,0 @@
1
- = image_tag campus.picture.url(:thumb), id: "avatar-picture", class: "img-thumbnail"
2
-
3
- - if can_edit?
4
- .row.mt-m
5
- .col-md-12
6
- = link_to_upload_image 'JavaScript:void(0);', method: :get, id: "upload-picture-link"
7
- #upload-picture.d-none
8
- = render 'upload_picture', campus: campus
@@ -1,10 +0,0 @@
1
- tr
2
- th.active rowspan="2" width="15%" = t(:'campus.singular')
3
- th rowspan=2
4
- h2 = @campus.name
5
- th.active width="15%" = t(:'school.singular')
6
- td width="15%"
7
- h2 = @school.name
8
- th.active rowspan="6" width="222px"
9
- = render 'picture', campus: @campus
10
-
@@ -1,15 +0,0 @@
1
- .row
2
- .col-md-12
3
- ul.nav.nav-tabs.nav-justified
4
- li.active
5
- a#admin-school-campus-addresses-tab-link data-toggle="tab" href="#addresses"
6
- = print_count campus.addresses_count, t(:'address.plural')
7
- li
8
- a#admin-school-campus-contacts-tab-link data-toggle="tab" href="#contacts"
9
- = print_count campus.contacts_count, t(:'contact.plural')
10
-
11
- .tab-content
12
- #addresses.tab-pane.active
13
- = render 'gaku/admin/schools/campuses/addresses/addresses', campus: campus
14
- #contacts.tab-pane
15
- = render 'gaku/admin/schools/campuses/contacts/contacts', campus: campus
@@ -1,7 +0,0 @@
1
- = form_for [:admin, campus.school, campus], html: { multipart: true } do |form|
2
- .row.mt-m
3
- = form.file_field :picture, class: "form-file"
4
- .row.mt-xs
5
- = form.submit t('pictures.upload'), class: "span12 btn btn-primary"
6
- coffee:
7
- $(".form-file").attr('size', 9)
@@ -1,7 +0,0 @@
1
- - unless address.nil?
2
- tr id="address-#{address.id}"
3
- = render 'gaku/admin/schools/campuses/addresses/fields', address: address
4
- - if can_edit?
5
- td
6
- = ajax_link_to_edit [:edit, :admin, @school, @campus, address]
7
- = ajax_link_to_delete [:admin, @school, @campus, address]
@@ -1,3 +0,0 @@
1
- tr id="contact-#{contact.id}"
2
- = render 'gaku/admin/schools/campuses/contacts/fields', contact: contact
3
-
@@ -1,12 +0,0 @@
1
- = render 'gaku/admin/schools/campuses/contacts/primary_field', contact: contact
2
-
3
- td = contact.name
4
- td = contact.data
5
- td = contact.details
6
- td
7
- = t(:'contact.emergency') if contact.emergency?
8
-
9
- - if can_edit?
10
- td
11
- = ajax_link_to_edit [:edit, :admin, @school, @campus, contact]
12
- = render 'gaku/admin/schools/campuses/contacts/delete_link', contact: contact
@@ -1,13 +0,0 @@
1
- td class="primary-contact" width="28px"
2
- - if can_edit?
3
- - if contact.primary?
4
- = ajax_link_to_make_primary [:make_primary, :admin, @school, @campus, contact], method: :patch, id: 'set-primary-link', class: 'btn btn-xs btn-primary make-primary'
5
- - else
6
- = ajax_link_to_make_primary [:make_primary, :admin, @school, @campus, contact], method: :patch, id: 'set-primary-link', class: 'btn btn-xs btn-default'
7
-
8
- - else
9
- - if contact.primary?
10
- span.btn.btn-xs.btn-primary
11
- = primary_checkbox
12
-
13
-
@@ -1,19 +0,0 @@
1
- .row
2
- .col-md-9
3
- = normal_form_for [:admin, @school, @campus], label: 'nil' do |f|
4
- = render 'form_fields', f: f, school: @school
5
- = buttons_for @campus, resource: 'admin-school-campus'
6
-
7
- .col-md-3
8
- = render 'picture', campus: @campus
9
-
10
- hr
11
-
12
- = render 'tabs', campus: @campus, school: @school
13
-
14
- = footer do
15
- .col-md-9
16
- = link_to_index [:edit, :admin, @school, @campus]
17
- .col-md-3
18
- = link_to_modal_delete
19
- /= render 'gaku/shared/delete_modal', target: school
@@ -1,13 +0,0 @@
1
- = panel_for 'campus-panel' do
2
- = panel_header 'Campus information', @campus
3
-
4
- table.table.table-bordered.th-center
5
- tbody
6
- = render 'show_table'
7
-
8
- = render 'tabs', campus: @campus, school: @school
9
-
10
- = footer do
11
- .col-md-12
12
- = link_to_index admin_school_path(@school)
13
-
@@ -1,13 +0,0 @@
1
- = panel_for 'school-panel' do
2
- = panel_header 'School information', @school
3
-
4
- table.table.table-bordered.th-center
5
- tbody
6
- = render 'show_table', school: @school
7
-
8
- = render 'tabs', school: @school
9
-
10
- = footer do
11
- .col-md-12
12
- = link_to_index admin_schools_path
13
-
@@ -1,14 +0,0 @@
1
- = panel_for 'school-panel' do
2
- = panel_header 'School information', @school
3
-
4
- table.table.table-bordered.th-center
5
- tbody
6
- = render 'show_table', school: @school
7
-
8
- = render 'tabs'
9
-
10
- = footer do
11
- .col-md-3
12
- = link_to t(:'school.edit_master'), admin_school_details_edit_path, class: 'btn btn-danger col-md-12', data: { confirm: t(:'confirm') }, id: 'edit-admin-primary-school'
13
- .col-md-9
14
- = link_to_back admin_schools_path
@@ -1,15 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-states-count' do
4
- = print_count @count, t(:'address.state.list')
5
- .pull-right
6
- = ajax_link_to_new t(:'address.state.add'), [:new, :admin, :state], id: 'new-admin-state-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-state.d-none
10
- #show-admin-states-form
11
- =render 'country_select_form'
12
- =hr
13
- #admin-country-states
14
- = render 'country_table', states: @country.states, country: @country if @country
15
-
@@ -1 +0,0 @@
1
- = render 'form'
@@ -1,20 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-templates-count' do
4
- = print_count @count, t(:'template.list')
5
- .pull-right
6
- = link_to_new t(:'template.add'), [:new, :admin, :template], id: 'new-admin-template-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-template.d-none
10
-
11
- #admin-templates
12
- = table_for 'admin-templates-index' do
13
- thead
14
- tr
15
- = th t(:'template.singular')
16
- = th t(:'template.context')
17
- = th t(:'template.lock')
18
- = th_actions 3
19
- tbody
20
- = render partial: 'template', collection: @templates, as: :template
@@ -1 +0,0 @@
1
- = render 'form'
@@ -1,21 +0,0 @@
1
- = content_for :index_header do
2
- .pull-left
3
- = count_div 'admin-users-count' do
4
- = print_count @count, t(:'user.list')
5
- .pull-right
6
- = ajax_link_to_new t(:'user.add'), [:new, :admin, :user], id: 'new-admin-user-link'
7
-
8
- = content_for :new_form do
9
- #new-admin-user.d-none
10
-
11
- #admin-users
12
- = table_for 'admin-users-index' do
13
- thead
14
- tr
15
- = th t(:'user.username')
16
- = th t(:'user.email')
17
- = th_actions 2
18
- tbody
19
- = render partial: 'gaku/admin/users/user', collection: @users, as: :user
20
-
21
- = paginate @users
@@ -1,9 +0,0 @@
1
- ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
2
- unless html_tag =~ /^<label/
3
- %{<div class="field_with_errors">#{html_tag}<label for="#{
4
- instance.send(:tag_id)}" class="message">#{
5
- instance.error_message.first}</label></div>}.html_safe
6
- else
7
- %{<div class="field_with_errors">#{html_tag}</div>}.html_safe
8
- end
9
- end