rails_org 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +30 -0
- data/Rakefile +20 -0
- data/app/controllers/me/base_controller.rb +4 -0
- data/app/controllers/me/home_controller.rb +9 -0
- data/app/controllers/me_controller.rb +4 -0
- data/app/controllers/org/admin/authorized_tokens_controller.rb +48 -0
- data/app/controllers/org/admin/base_controller.rb +4 -0
- data/app/controllers/org/admin/current_organ_controller.rb +43 -0
- data/app/controllers/org/admin/department_grants_controller.rb +44 -0
- data/app/controllers/org/admin/departments_controller.rb +92 -0
- data/app/controllers/org/admin/home_controller.rb +8 -0
- data/app/controllers/org/admin/job_descriptions_controller.rb +49 -0
- data/app/controllers/org/admin/job_titles_controller.rb +69 -0
- data/app/controllers/org/admin/job_transfers_controller.rb +88 -0
- data/app/controllers/org/admin/member_departments_controller.rb +82 -0
- data/app/controllers/org/admin/members_controller.rb +129 -0
- data/app/controllers/org/admin/organ_domains_controller.rb +61 -0
- data/app/controllers/org/admin/organs_controller.rb +57 -0
- data/app/controllers/org/admin/resign_reasons_controller.rb +19 -0
- data/app/controllers/org/admin/resigns_controller.rb +103 -0
- data/app/controllers/org/admin/super_job_titles_controller.rb +70 -0
- data/app/controllers/org/admin/supports_controller.rb +93 -0
- data/app/controllers/org/admin/tutorials_controller.rb +74 -0
- data/app/controllers/org/base_controller.rb +4 -0
- data/app/controllers/org/board/base_controller.rb +4 -0
- data/app/controllers/org/board/members_controller.rb +61 -0
- data/app/controllers/org/board/organs_controller.rb +78 -0
- data/app/controllers/org/controller/application.rb +84 -0
- data/app/controllers/org/controller/me.rb +25 -0
- data/app/controllers/org/controller/our.rb +12 -0
- data/app/controllers/org/layout/me.rb +16 -0
- data/app/controllers/org/layout/panel.rb +16 -0
- data/app/controllers/org/me/base_controller.rb +4 -0
- data/app/controllers/org/me/departments_controller.rb +78 -0
- data/app/controllers/org/me/job_transfers_controller.rb +62 -0
- data/app/controllers/org/me/members_controller.rb +37 -0
- data/app/controllers/org/me/orders_controller.rb +66 -0
- data/app/controllers/org/me/resigns_controller.rb +53 -0
- data/app/controllers/org/me/tutorials_controller.rb +76 -0
- data/app/controllers/org/members_controller.rb +48 -0
- data/app/controllers/org/organs_controller.rb +30 -0
- data/app/controllers/org/panel/base_controller.rb +4 -0
- data/app/controllers/org/panel/organ_domains_controller.rb +5 -0
- data/app/controllers/org/panel/organs_controller.rb +40 -0
- data/app/mailers/org/attendance_mailer.rb +17 -0
- data/app/mailers/org/exam_mailer.rb +26 -0
- data/app/mailers/org/lesson_mailer.rb +15 -0
- data/app/mailers/org/lesson_member_mailer.rb +25 -0
- data/app/models/org/account.rb +8 -0
- data/app/models/org/application_record.rb +5 -0
- data/app/models/org/department.rb +6 -0
- data/app/models/org/department_grant.rb +5 -0
- data/app/models/org/department_hierarchy.rb +5 -0
- data/app/models/org/job_description.rb +5 -0
- data/app/models/org/job_title.rb +6 -0
- data/app/models/org/job_transfer.rb +5 -0
- data/app/models/org/member.rb +7 -0
- data/app/models/org/member_department.rb +6 -0
- data/app/models/org/model/account.rb +11 -0
- data/app/models/org/model/department.rb +67 -0
- data/app/models/org/model/department_grant.rb +13 -0
- data/app/models/org/model/department_hierarchy.rb +10 -0
- data/app/models/org/model/job_description.rb +18 -0
- data/app/models/org/model/job_title.rb +54 -0
- data/app/models/org/model/job_transfer.rb +108 -0
- data/app/models/org/model/member.rb +142 -0
- data/app/models/org/model/member_department.rb +66 -0
- data/app/models/org/model/organ.rb +62 -0
- data/app/models/org/model/organ_domain.rb +44 -0
- data/app/models/org/model/organ_handle.rb +15 -0
- data/app/models/org/model/resign.rb +66 -0
- data/app/models/org/model/resign_reason.rb +17 -0
- data/app/models/org/model/resign_reference.rb +11 -0
- data/app/models/org/model/super_job_title.rb +25 -0
- data/app/models/org/model/support.rb +19 -0
- data/app/models/org/model/tutorial.rb +64 -0
- data/app/models/org/model/user.rb +30 -0
- data/app/models/org/organ.rb +7 -0
- data/app/models/org/organ_domain.rb +5 -0
- data/app/models/org/organ_handle.rb +5 -0
- data/app/models/org/resign.rb +5 -0
- data/app/models/org/resign_reason.rb +5 -0
- data/app/models/org/resign_reference.rb +5 -0
- data/app/models/org/super_job_title.rb +6 -0
- data/app/models/org/support.rb +5 -0
- data/app/models/org/tutorial.rb +5 -0
- data/app/models/org.rb +11 -0
- data/app/views/admin/_department_navbar.html.erb +6 -0
- data/app/views/admin/_nav_show.erb +17 -0
- data/app/views/admin/_nav_with_login.html.erb +37 -0
- data/app/views/admin/_org_nav.html.erb +16 -0
- data/app/views/admin/_right_menu.html.erb +17 -0
- data/app/views/application/_org_navbar.html.erb +19 -0
- data/app/views/application/require_member.html.erb +4 -0
- data/app/views/application/require_member.js.erb +2 -0
- data/app/views/application/require_member.json.jbuilder +1 -0
- data/app/views/application/require_organ.html.erb +4 -0
- data/app/views/application/require_organ.js.erb +2 -0
- data/app/views/application/require_organ.json.jbuilder +1 -0
- data/app/views/layouts/me.html+phone.erb +12 -0
- data/app/views/layouts/me.html.erb +17 -0
- data/app/views/me/_nav_with_login.html.erb +3 -0
- data/app/views/me/_org_nav.html.erb +13 -0
- data/app/views/me/_right_menu.html.erb +23 -0
- data/app/views/me/home/index.html.erb +17 -0
- data/app/views/me/update.turbo_stream.erb +3 -0
- data/app/views/org/admin/authorized_tokens/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/authorized_tokens/_button.html.erb +0 -0
- data/app/views/org/admin/authorized_tokens/_edit_form.html.erb +4 -0
- data/app/views/org/admin/authorized_tokens/_filter_form.html.erb +9 -0
- data/app/views/org/admin/authorized_tokens/_form.html.erb +4 -0
- data/app/views/org/admin/authorized_tokens/_index_tbody.html.erb +18 -0
- data/app/views/org/admin/authorized_tokens/_index_thead.html.erb +6 -0
- data/app/views/org/admin/authorized_tokens/_new_form.html.erb +4 -0
- data/app/views/org/admin/authorized_tokens/_show_table.html.erb +20 -0
- data/app/views/org/admin/authorized_tokens/index.html.erb +3 -0
- data/app/views/org/admin/base/_nav.html.erb +3 -0
- data/app/views/org/admin/current_organ/_edit_form.html.erb +11 -0
- data/app/views/org/admin/current_organ/_edit_x_form.html.erb +5 -0
- data/app/views/org/admin/current_organ/_show_table.html.erb +16 -0
- data/app/views/org/admin/current_organ/show.html.erb +1 -0
- data/app/views/org/admin/department_grants/_add.html.erb +3 -0
- data/app/views/org/admin/department_grants/_index.html.erb +29 -0
- data/app/views/org/admin/department_grants/_new.html.erb +6 -0
- data/app/views/org/admin/department_grants/index.js.erb +7 -0
- data/app/views/org/admin/departments/_department.json.jbuilder +6 -0
- data/app/views/org/admin/departments/_department_form.html.erb +8 -0
- data/app/views/org/admin/departments/_department_support.html.erb +26 -0
- data/app/views/org/admin/departments/_edit_form.html.erb +4 -0
- data/app/views/org/admin/departments/_filter_form.html.erb +9 -0
- data/app/views/org/admin/departments/_filter_table.html.erb +11 -0
- data/app/views/org/admin/departments/_form.html.erb +23 -0
- data/app/views/org/admin/departments/_index_tbody.html.erb +29 -0
- data/app/views/org/admin/departments/_index_thead.html.erb +14 -0
- data/app/views/org/admin/departments/_index_tr.html.erb +23 -0
- data/app/views/org/admin/departments/_member.html.erb +28 -0
- data/app/views/org/admin/departments/_menu.html.erb +12 -0
- data/app/views/org/admin/departments/_new_form.html.erb +4 -0
- data/app/views/org/admin/departments/_show/_breadcrumb.html.erb +9 -0
- data/app/views/org/admin/departments/_show/_thead.html.erb +9 -0
- data/app/views/org/admin/departments/_show.json.jbuilder +1 -0
- data/app/views/org/admin/departments/index.html.erb +14 -0
- data/app/views/org/admin/departments/index.json.jbuilder +1 -0
- data/app/views/org/admin/departments/need.html.erb +12 -0
- data/app/views/org/admin/departments/show.html.erb +25 -0
- data/app/views/org/admin/departments/supports.html.erb +28 -0
- data/app/views/org/admin/home/index.html.erb +0 -0
- data/app/views/org/admin/job_descriptions/_edit_form.html.erb +4 -0
- data/app/views/org/admin/job_descriptions/_filter_form.html.erb +7 -0
- data/app/views/org/admin/job_descriptions/_form.html.erb +8 -0
- data/app/views/org/admin/job_descriptions/_index_tbody.html.erb +7 -0
- data/app/views/org/admin/job_descriptions/_index_thead.html.erb +8 -0
- data/app/views/org/admin/job_descriptions/_new_form.html.erb +4 -0
- data/app/views/org/admin/job_titles/_breadcrumb.html.erb +7 -0
- data/app/views/org/admin/job_titles/_edit_form.html.erb +4 -0
- data/app/views/org/admin/job_titles/_form.html.erb +3 -0
- data/app/views/org/admin/job_titles/_index_thead.html.erb +9 -0
- data/app/views/org/admin/job_titles/_job_titles.html.erb +49 -0
- data/app/views/org/admin/job_titles/_new_form.html.erb +4 -0
- data/app/views/org/admin/job_titles/_show_table.html.erb +12 -0
- data/app/views/org/admin/job_titles/_super_job_titles.html.erb +14 -0
- data/app/views/org/admin/job_titles/create_department.turbo_stream.erb +3 -0
- data/app/views/org/admin/job_titles/index.html.erb +4 -0
- data/app/views/org/admin/job_transfers/_edit_form.html.erb +4 -0
- data/app/views/org/admin/job_transfers/_filter_table.html.erb +11 -0
- data/app/views/org/admin/job_transfers/_form.html.erb +7 -0
- data/app/views/org/admin/job_transfers/_index_thead.html.erb +6 -0
- data/app/views/org/admin/job_transfers/_list.html.erb +29 -0
- data/app/views/org/admin/job_transfers/_new_form.html.erb +4 -0
- data/app/views/org/admin/job_transfers/index.html.erb +3 -0
- data/app/views/org/admin/job_transfers/my.html.erb +7 -0
- data/app/views/org/admin/job_transfers/show.html.erb +54 -0
- data/app/views/org/admin/member_departments/_edit_form.html.erb +3 -0
- data/app/views/org/admin/member_departments/_filter_form.html.erb +8 -0
- data/app/views/org/admin/member_departments/_form.html.erb +4 -0
- data/app/views/org/admin/member_departments/_job_title_options.html.erb +10 -0
- data/app/views/org/admin/member_departments/_new_form.html.erb +3 -0
- data/app/views/org/admin/member_departments/_organ_options.html.erb +1 -0
- data/app/views/org/admin/member_departments/_show_table.html.erb +20 -0
- data/app/views/org/admin/member_departments/_super_job_title_options.html.erb +10 -0
- data/app/views/org/admin/member_departments/index.html.erb +38 -0
- data/app/views/org/admin/member_departments/options.js.erb +4 -0
- data/app/views/org/admin/member_departments/show.html.erb +7 -0
- data/app/views/org/admin/members/_button.html.erb +6 -0
- data/app/views/org/admin/members/_edit/_breadcrumb.html.erb +12 -0
- data/app/views/org/admin/members/_edit_form.html.erb +4 -0
- data/app/views/org/admin/members/_edit_table.html.erb +3 -0
- data/app/views/org/admin/members/_filter_form.html.erb +10 -0
- data/app/views/org/admin/members/_filter_table.html.erb +9 -0
- data/app/views/org/admin/members/_form.html.erb +9 -0
- data/app/views/org/admin/members/_index_tbody.html.erb +24 -0
- data/app/views/org/admin/members/_index_thead.html.erb +7 -0
- data/app/views/org/admin/members/_index_tr.html.erb +22 -0
- data/app/views/org/admin/members/_item_field.html.erb +3 -0
- data/app/views/org/admin/members/_item_form.html.erb +27 -0
- data/app/views/org/admin/members/_member.json.jbuilder +5 -0
- data/app/views/org/admin/members/_menu.html.erb +11 -0
- data/app/views/org/admin/members/_new/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/members/_new_form.html.erb +4 -0
- data/app/views/org/admin/members/_outer_options.html.erb +4 -0
- data/app/views/org/admin/members/_profile/_show_table.html.erb +38 -0
- data/app/views/org/admin/members/_profile_form.html.erb +17 -0
- data/app/views/org/admin/members/_show/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/members/_show.json.jbuilder +1 -0
- data/app/views/org/admin/members/_show_table.html.erb +54 -0
- data/app/views/org/admin/members/edit_profile.html.erb +1 -0
- data/app/views/org/admin/members/index.html.erb +5 -0
- data/app/views/org/admin/members/index.json.jbuilder +1 -0
- data/app/views/org/admin/members/options.turbo_stream.erb +7 -0
- data/app/views/org/admin/members/profile.html.erb +16 -0
- data/app/views/org/admin/members/super_options.js.erb +15 -0
- data/app/views/org/admin/organ_domains/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/organ_domains/_edit_form.html.erb +4 -0
- data/app/views/org/admin/organ_domains/_filter_form.html.erb +9 -0
- data/app/views/org/admin/organ_domains/_form.html.erb +5 -0
- data/app/views/org/admin/organ_domains/_index_tbody.html.erb +12 -0
- data/app/views/org/admin/organ_domains/_index_thead.html.erb +8 -0
- data/app/views/org/admin/organ_domains/_new_form.html.erb +4 -0
- data/app/views/org/admin/organ_domains/_show_table.html.erb +20 -0
- data/app/views/org/admin/organ_domains/index.html.erb +5 -0
- data/app/views/org/admin/organs/_edit_form.html.erb +6 -0
- data/app/views/org/admin/organs/_filter_form.html.erb +9 -0
- data/app/views/org/admin/organs/_form.html.erb +6 -0
- data/app/views/org/admin/organs/_index_tbody.html.erb +17 -0
- data/app/views/org/admin/organs/_index_thead.html.erb +9 -0
- data/app/views/org/admin/organs/_index_tr.html.erb +22 -0
- data/app/views/org/admin/organs/_new_form.html.erb +8 -0
- data/app/views/org/admin/organs/_organ.json.jbuilder +7 -0
- data/app/views/org/admin/organs/_show.json.jbuilder +1 -0
- data/app/views/org/admin/organs/_show_table.html.erb +16 -0
- data/app/views/org/admin/organs/index.html.erb +4 -0
- data/app/views/org/admin/organs/index.json.jbuilder +1 -0
- data/app/views/org/admin/organs/show.json.jbuilder +1 -0
- data/app/views/org/admin/resign_reasons/_edit_form.html.erb +4 -0
- data/app/views/org/admin/resign_reasons/_filter_form.html.erb +7 -0
- data/app/views/org/admin/resign_reasons/_form.html.erb +3 -0
- data/app/views/org/admin/resign_reasons/_new_form.html.erb +4 -0
- data/app/views/org/admin/resign_reasons/_resign_reason.html.erb +13 -0
- data/app/views/org/admin/resign_reasons/index.html.erb +30 -0
- data/app/views/org/admin/resigns/_edit_form.html.erb +4 -0
- data/app/views/org/admin/resigns/_form.html.erb +6 -0
- data/app/views/org/admin/resigns/_index_tbody.html.erb +23 -0
- data/app/views/org/admin/resigns/_index_thead.html.erb +6 -0
- data/app/views/org/admin/resigns/_new_form.html.erb +4 -0
- data/app/views/org/admin/resigns/_search_chart1_form.html.erb +9 -0
- data/app/views/org/admin/resigns/_search_chart2_form.html.erb +8 -0
- data/app/views/org/admin/resigns/_search_form.html.erb +8 -0
- data/app/views/org/admin/resigns/charts.html.erb +19 -0
- data/app/views/org/admin/resigns/index.html.erb +1 -0
- data/app/views/org/admin/resigns/my.html.erb +1 -0
- data/app/views/org/admin/resigns/show.html.erb +47 -0
- data/app/views/org/admin/super_job_titles/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/super_job_titles/_edit_form.html.erb +4 -0
- data/app/views/org/admin/super_job_titles/_filter_form.html.erb +9 -0
- data/app/views/org/admin/super_job_titles/_form.html.erb +3 -0
- data/app/views/org/admin/super_job_titles/_index_tbody.html.erb +13 -0
- data/app/views/org/admin/super_job_titles/_index_thead.html.erb +6 -0
- data/app/views/org/admin/super_job_titles/_new_form.html.erb +4 -0
- data/app/views/org/admin/super_job_titles/_show_table.html.erb +12 -0
- data/app/views/org/admin/super_job_titles/index.html.erb +5 -0
- data/app/views/org/admin/supports/_edit_form.html.erb +4 -0
- data/app/views/org/admin/supports/_filter_form.html.erb +8 -0
- data/app/views/org/admin/supports/_form.html.erb +6 -0
- data/app/views/org/admin/supports/_index_tbody.html.erb +5 -0
- data/app/views/org/admin/supports/_index_thead.html.erb +6 -0
- data/app/views/org/admin/supports/_new_form.html.erb +4 -0
- data/app/views/org/admin/supports/index.html.erb +5 -0
- data/app/views/org/admin/tutorials/_edit_form.html.erb +4 -0
- data/app/views/org/admin/tutorials/_filter_form.html.erb +9 -0
- data/app/views/org/admin/tutorials/_form.html.erb +5 -0
- data/app/views/org/admin/tutorials/_index_tbody.html.erb +19 -0
- data/app/views/org/admin/tutorials/_index_thead.html.erb +15 -0
- data/app/views/org/admin/tutorials/_new_form.html.erb +8 -0
- data/app/views/org/admin/tutorials/index.html.erb +5 -0
- data/app/views/org/admin/tutorials/my.html.erb +5 -0
- data/app/views/org/board/base/_nav.html.erb +4 -0
- data/app/views/org/board/members/_form.html+phone.erb +29 -0
- data/app/views/org/board/members/_form.html.erb +4 -0
- data/app/views/org/board/members/_member.json.jbuilder +11 -0
- data/app/views/org/board/members/_new_form.html+phone.erb +4 -0
- data/app/views/org/board/members/_new_form.html.erb +4 -0
- data/app/views/org/board/members/index.html+phone.erb +40 -0
- data/app/views/org/board/members/index.html.erb +28 -0
- data/app/views/org/board/members/index.json.jbuilder +1 -0
- data/app/views/org/board/members/login.json.jbuilder +1 -0
- data/app/views/org/board/organs/_form.html.erb +4 -0
- data/app/views/org/board/organs/_new_form.html.erb +4 -0
- data/app/views/org/board/organs/create.turbo_stream.erb +3 -0
- data/app/views/org/board/organs/index.html+phone.erb +9 -0
- data/app/views/org/board/organs/index.html.erb +41 -0
- data/app/views/org/board/organs/showx.html.erb +1 -0
- data/app/views/org/me/base/_nav.html.erb +3 -0
- data/app/views/org/me/departments/_breadcrumb.html.erb +5 -0
- data/app/views/org/me/departments/_department.html.erb +31 -0
- data/app/views/org/me/departments/_filter_form.html.erb +9 -0
- data/app/views/org/me/departments/_index_thead.html.erb +5 -0
- data/app/views/org/me/departments/_index_tr.html.erb +10 -0
- data/app/views/org/me/departments/_member.html.erb +11 -0
- data/app/views/org/me/departments/_nav_show.erb +16 -0
- data/app/views/org/me/departments/index.html.erb +11 -0
- data/app/views/org/me/departments/index2.html.erb +46 -0
- data/app/views/org/me/home/index.html.erb +8 -0
- data/app/views/org/me/job_transfers/_form.html.erb +8 -0
- data/app/views/org/me/job_transfers/_index_tbody.html.erb +7 -0
- data/app/views/org/me/job_transfers/_index_thead.html.erb +6 -0
- data/app/views/org/me/job_transfers/_tabs.html.erb +9 -0
- data/app/views/org/me/job_transfers/index.html.erb +25 -0
- data/app/views/org/me/members/_badges.html.erb +13 -0
- data/app/views/org/me/members/_edit.html+phone.erb +10 -0
- data/app/views/org/me/members/_edit_form.html.erb +6 -0
- data/app/views/org/me/members/_member.json.jbuilder +6 -0
- data/app/views/org/me/members/_show.json.jbuilder +1 -0
- data/app/views/org/me/members/_show_table.html.erb +24 -0
- data/app/views/org/me/members/index.json.jbuilder +1 -0
- data/app/views/org/me/members/show.json.jbuilder +1 -0
- data/app/views/org/me/orders/_search_form.html.erb +7 -0
- data/app/views/org/me/orders/dinners.html.erb +32 -0
- data/app/views/org/me/orders/new.html.erb +5 -0
- data/app/views/org/me/orders/show.html.erb +0 -0
- data/app/views/org/me/resigns/_form.html.erb +12 -0
- data/app/views/org/me/resigns/_tabs.html.erb +4 -0
- data/app/views/org/me/resigns/show.html.erb +45 -0
- data/app/views/org/me/tutorials/_form.html.erb +6 -0
- data/app/views/org/me/tutorials/_menu.html.erb +11 -0
- data/app/views/org/me/tutorials/_search_form.html.erb +7 -0
- data/app/views/org/me/tutorials/index.html.erb +35 -0
- data/app/views/org/me/tutorials/perform.html.erb +21 -0
- data/app/views/org/me/tutorials/tutorings.html.erb +40 -0
- data/app/views/org/members/_filter_form.html.erb +9 -0
- data/app/views/org/members/_filter_table.html.erb +11 -0
- data/app/views/org/members/groups.json.jbuilder +5 -0
- data/app/views/org/members/index.html.erb +24 -0
- data/app/views/org/members/journals.json.jbuilder +9 -0
- data/app/views/org/members/people.json.jbuilder +14 -0
- data/app/views/org/members/sections.json.jbuilder +5 -0
- data/app/views/org/members/show.html+phone.erb +23 -0
- data/app/views/org/members/show.html.erb +39 -0
- data/app/views/org/organs/_form_search.html.erb +11 -0
- data/app/views/org/organs/form_search.js.erb +1 -0
- data/app/views/org/organs/index.html+phone.erb +20 -0
- data/app/views/org/organs/index.html.erb +18 -0
- data/app/views/org/organs/show.html.erb +0 -0
- data/app/views/org/panel/base/_nav.html.erb +3 -0
- data/app/views/org/panel/organs/_edit_form.html.erb +6 -0
- data/app/views/org/panel/organs/_filter_form.html.erb +9 -0
- data/app/views/org/panel/organs/_form.html.erb +5 -0
- data/app/views/org/panel/organs/_index_tbody.html.erb +28 -0
- data/app/views/org/panel/organs/_index_thead.html.erb +12 -0
- data/app/views/org/panel/organs/_index_tr.html.erb +19 -0
- data/app/views/org/panel/organs/_new_form.html.erb +6 -0
- data/app/views/org/panel/organs/_show_table.html.erb +16 -0
- data/app/views/org/panel/organs/index.html.erb +5 -0
- data/app/views/our/_nav_bar.html.erb +18 -0
- data/app/views/our/_nav_choosex.html.erb +23 -0
- data/app/views/panel/_org_nav.html.erb +10 -0
- data/config/locales/en.attributes.yml +37 -0
- data/config/locales/en.controller.yml +113 -0
- data/config/locales/en.enum.yml +31 -0
- data/config/locales/zh.attributes.yml +89 -0
- data/config/locales/zh.controller.yml +116 -0
- data/config/locales/zh.enum.yml +31 -0
- data/config/locales/zh.help.yml +7 -0
- data/config/routes.rb +152 -0
- data/lib/rails_org/config.rb +13 -0
- data/lib/rails_org/default_form.rb +17 -0
- data/lib/rails_org/engine.rb +19 -0
- data/lib/rails_org.rb +3 -0
- data/test/application_system_test_case.rb +5 -0
- data/test/controllers/department_journals_controller_test.rb +48 -0
- data/test/controllers/job_transfers_controller_test.rb +48 -0
- data/test/controllers/journal_transfers_controller_test.rb +48 -0
- data/test/controllers/org/admin/authorized_tokens_controller_test.rb +49 -0
- data/test/controllers/org/admin/department_grants_controller_test.rb +48 -0
- data/test/controllers/org/admin/departments_controller_test.rb +51 -0
- data/test/controllers/org/admin/job_descriptions_controller_test.rb +48 -0
- data/test/controllers/org/admin/job_titles_controller_test.rb +51 -0
- data/test/controllers/org/admin/member_departments_controller_test.rb +48 -0
- data/test/controllers/org/admin/organ_domains_controller_test.rb +49 -0
- data/test/controllers/org/admin/organ_handles_controller_test.rb +48 -0
- data/test/controllers/org/admin/organ_tokens_controller_test.rb +48 -0
- data/test/controllers/org/admin/super_job_titles_controller_test.rb +51 -0
- data/test/controllers/org/mine/members_controller_test.rb +49 -0
- data/test/controllers/resign_reasons_controller_test.rb +48 -0
- data/test/controllers/resigns_controller_test.rb +48 -0
- data/test/controllers/tutorials_controller_test.rb +48 -0
- data/test/dummy/Gemfile +59 -0
- data/test/dummy/Gemfile.lock +379 -0
- data/test/dummy/README.md +12 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/default_avatar.jpg +0 -0
- data/test/dummy/app/assets/images/logo.png +0 -0
- data/test/dummy/app/assets/javascripts/admin/application.js +1 -0
- data/test/dummy/app/assets/javascripts/application.js +11 -0
- data/test/dummy/app/assets/javascripts/phone.js +5 -0
- data/test/dummy/app/assets/stylesheets/css.scss +4 -0
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/active_storage/base_controller.rb +19 -0
- data/test/dummy/app/controllers/admin_controller.rb +3 -0
- data/test/dummy/app/controllers/application_controller.rb +12 -0
- data/test/dummy/app/controllers/home_controller.rb +6 -0
- data/test/dummy/app/controllers/me_controller.rb +4 -0
- data/test/dummy/app/controllers/my_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/auth/user.rb +7 -0
- data/test/dummy/app/views/home/index.css +3 -0
- data/test/dummy/app/views/home/index.html.erb +0 -0
- data/test/dummy/app/views/layouts/_right_menu.html.erb +3 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +34 -0
- data/test/dummy/bin/vite +19 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config/application.rb +20 -0
- data/test/dummy/config/boot.rb +9 -0
- data/test/dummy/config/cable.yml +9 -0
- data/test/dummy/config/credentials/development.key +1 -0
- data/test/dummy/config/credentials/test.key +1 -0
- data/test/dummy/config/credentials.yml.enc +1 -0
- data/test/dummy/config/database.yml +16 -0
- data/test/dummy/config/environment.rb +3 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +74 -0
- data/test/dummy/config/environments/test.rb +47 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/new_framework_defaults.rb +14 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +2 -0
- data/test/dummy/config/master.key +1 -0
- data/test/dummy/config/puma.rb +34 -0
- data/test/dummy/config/routes.rb +14 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config/storage.yml +11 -0
- data/test/dummy/config/vite/base.js +7 -0
- data/test/dummy/config/vite/development.js +6 -0
- data/test/dummy/config/vite/production.js +6 -0
- data/test/dummy/config.ru +7 -0
- data/test/dummy/lib/deploy.rb +115 -0
- data/test/dummy/package.json +27 -0
- data/test/dummy/postcss.config.js +11 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/yarn.lock +2147 -0
- data/test/factories/attendance_logs.rb +5 -0
- data/test/factories/badges.rb +5 -0
- data/test/factories/bands.rb +5 -0
- data/test/factories/department_grants.rb +8 -0
- data/test/factories/department_journals.rb +5 -0
- data/test/factories/departments.rb +12 -0
- data/test/factories/job_descriptions.rb +5 -0
- data/test/factories/job_titles.rb +9 -0
- data/test/factories/job_transfers.rb +5 -0
- data/test/factories/resigns.rb +5 -0
- data/test/factories/super_job_titles.rb +8 -0
- data/test/factories/tutorials.rb +5 -0
- data/test/mailers/previews/the_notify_mailer_preview.rb +9 -0
- data/test/models/department_test.rb +7 -0
- data/test/models/job_description_test.rb +7 -0
- data/test/models/job_title/department_job_title_test.rb +1 -0
- data/test/models/job_title/super_job_title_test.rb +1 -0
- data/test/models/job_title_test.rb +10 -0
- data/test/models/job_transfer_test.rb +7 -0
- data/test/models/resign_test.rb +7 -0
- data/test/models/teacher_test.rb +7 -0
- data/test/models/tutorial_test.rb +7 -0
- data/test/system/org/admin/authorized_tokens_test.rb +51 -0
- data/test/system/org/admin/organ_domains_test.rb +51 -0
- data/test/system/org/mine/members_test.rb +41 -0
- data/test/test_helper.rb +14 -0
- metadata +654 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="menu-label">
|
2
|
+
<span><%= t('org.me.title') %></span>
|
3
|
+
<%= link_to({ controller: 'org/admin/members' }, aria: { label: '管理' }) do %>
|
4
|
+
<i class="fas fa-cog"></i>
|
5
|
+
<% end %>
|
6
|
+
</div>
|
7
|
+
<div class="menu-list">
|
8
|
+
<%= link_to t('org.me.members.show.title'), { controller: 'org/me/members', action: 'show' }, class: active_helper(controllers: ['members'], active: 'is-active') %>
|
9
|
+
<%= link_to t('org.me.departments.index.title'), { controller: 'org/me/departments' }, class: active_helper(controllers: 'departments', active: 'is-active') %>
|
10
|
+
<%# link_to 'Job Transfer', me_job_transfers_path, class: active_helper(controllers: ['job_transfers'], active: 'is-active') %>
|
11
|
+
<%# link_to 'Resign', me_resign_path, class: active_helper(controllers: ['resigns'], active: 'is-active') %>
|
12
|
+
<%# link_to 'Tutorials', me_tutorials_path, class: active_helper(controllers: ['tutorials'], active: 'is-active') %>
|
13
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
<% if current_member %>
|
3
|
+
<div class="navbar-item has-dropdown is-hoverable">
|
4
|
+
<div class="navbar-link is-arrowless">
|
5
|
+
<i class="fas fa-user-secret"></i>
|
6
|
+
<span>Mock 模式</span>
|
7
|
+
</div>
|
8
|
+
<div class="navbar-dropdown">
|
9
|
+
<%= link_to '退出mock', admin_root_url, class: 'navbar-item' %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<div class="navbar-item has-dropdown is-hoverable">
|
14
|
+
<div class="navbar-link">
|
15
|
+
<%= image_tag current_member.avatar, class: 'image is-24x24' if current_member.avatar.attached? %>
|
16
|
+
<%= current_member.name %>
|
17
|
+
</div>
|
18
|
+
<div class="navbar-dropdown is-right">
|
19
|
+
<%= link_to '个人中心', me_root_url, class: active_helper(controllers: ['users'], active: 'navbar-item is-active', item: 'navbar-item') %>
|
20
|
+
<%= link_to '管理', admin_root_url, class: 'navbar-item' %>
|
21
|
+
<%= link_to '退出', logout_path, data: { confirm: '确认退出' }, class: 'navbar-item' %>
|
22
|
+
</div>
|
23
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% @meta_businesses.each do |meta_business, meta_actions| %>
|
2
|
+
<div class="media">
|
3
|
+
<figure class="media-left">
|
4
|
+
<%= image_tag meta_business.logo, class: 'image is-64x64' if meta_business.logo.present? %>
|
5
|
+
</figure>
|
6
|
+
<div class="media-content">
|
7
|
+
<div class="content">
|
8
|
+
<strong><%= meta_business.name %></strong>
|
9
|
+
</div>
|
10
|
+
<% meta_actions.each do |meta_action| %>
|
11
|
+
<div>
|
12
|
+
<%= link_to meta_action.name, { controller: meta_action.controller_path, action: meta_action.action_name, **params.except(:business, :namespace, :controller, :action).permit! } %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: AuthorizedToken.new do |f| %>
|
2
|
+
<div class="field-body">
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<div class="field is-narrow">
|
5
|
+
<%= f.submit %>
|
6
|
+
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<tr>
|
2
|
+
<td><%= authorized_token.user_id %></td>
|
3
|
+
<td><%= authorized_token.oauth_user_id %></td>
|
4
|
+
<td style="word-break: break-all"><%= authorized_token.token %></td>
|
5
|
+
<td><time data-controller="time"><%= authorized_token.expire_at.to_s(:rfc822) %></time></td>
|
6
|
+
<td><%= authorized_token.mock_member %></td>
|
7
|
+
<td>
|
8
|
+
<%= link_to({ action: 'show', id: authorized_token.id }, { aria: { label: t('.show') }, class: 'button is-small is-rounded is-light' }) do %>
|
9
|
+
<i class="fas fa-info"></i>
|
10
|
+
<% end %>
|
11
|
+
<%= link_to({ action: 'edit', id: authorized_token.id }, { aria: { label: t('.edit') }, class: 'button is-small is-rounded is-light' }) do %>
|
12
|
+
<i class="fas fa-pencil-alt"></i>
|
13
|
+
<% end %>
|
14
|
+
<%= link_to({ action: 'destroy', id: authorized_token.id }, { method: :delete, aria: { label: t('.destroy') }, data: { confirm: t('.confirm') }, class: 'button is-small is-rounded is-light' }) do %>
|
15
|
+
<i class="fas fa-trash-alt"></i>
|
16
|
+
<% end %>
|
17
|
+
</td>
|
18
|
+
</tr>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<th><%= AuthorizedToken.human_attribute_name(:user_id) %></th>
|
2
|
+
<th><%= AuthorizedToken.human_attribute_name(:oauth_user_id) %></th>
|
3
|
+
<th><%= AuthorizedToken.human_attribute_name(:token) %></th>
|
4
|
+
<th><%= AuthorizedToken.human_attribute_name(:expire_at) %></th>
|
5
|
+
<th><%= AuthorizedToken.human_attribute_name(:mock_member) %></th>
|
6
|
+
<th></th>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= AuthorizedToken.human_attribute_name(:user_id) %></td>
|
3
|
+
<td><%= @authorized_token.user_id %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= AuthorizedToken.human_attribute_name(:oauth_user_id) %></td>
|
7
|
+
<td><%= @authorized_token.oauth_user_id %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td class="has-text-right"><%= AuthorizedToken.human_attribute_name(:token) %></td>
|
11
|
+
<td><%= @authorized_token.token %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td class="has-text-right"><%= AuthorizedToken.human_attribute_name(:expire_at) %></td>
|
15
|
+
<td><%= @authorized_token.expire_at %></td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<td class="has-text-right"><%= AuthorizedToken.human_attribute_name(:mock_member) %></td>
|
19
|
+
<td><%= @authorized_token.mock_member %></td>
|
20
|
+
</tr>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= form_with model: @organ, url: { action: 'update' } do |f| %>
|
2
|
+
<%= render 'error_messages', target: @organ %>
|
3
|
+
<%= f.text_field :name, required: true %>
|
4
|
+
<%= f.text_field :name_short %>
|
5
|
+
<%= f.file_field :logo %>
|
6
|
+
<%= render partial: 'com/nodes/outer_select', locals: { f: f, node: @organ.area, outer: 'area' } %>
|
7
|
+
<%= f.text_area :address %>
|
8
|
+
<%= f.time_zone_select :timezone %>
|
9
|
+
<%= f.select :locale, options_for_select(User.options_i18n(:locale), @organ.locale) %>
|
10
|
+
<%= f.submit %>
|
11
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= Org::Organ.human_attribute_name(:name) %></td>
|
3
|
+
<td><%= current_organ.name %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= Org::Organ.human_attribute_name(:organ_uuid) %></td>
|
7
|
+
<td><%= current_organ.organ_uuid %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td class="has-text-right"><%= Org::Organ.human_attribute_name(:area_id) %></td>
|
11
|
+
<td><%= current_organ.area&.full_name %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td class="has-text-right"><%= Org::Organ.human_attribute_name(:limit_wechat) %></td>
|
15
|
+
<td><%= current_organ.limit_wechat %></td>
|
16
|
+
</tr>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'show_table' %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<div class="ui modal" id="modal">
|
2
|
+
<i class="fas fa-times close icon"></i>
|
3
|
+
<div class="ui header">
|
4
|
+
<%= t('.title') %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="content">
|
8
|
+
<table class="ui table">
|
9
|
+
<tbody>
|
10
|
+
<tr>
|
11
|
+
<td></td>
|
12
|
+
<td class="ui labels">
|
13
|
+
<% @organ_handle.department_grants.where(organ_id: current_organ&.id).includes(:job_title).each do |department_grant| %>
|
14
|
+
<span class="ui label">
|
15
|
+
<%= department_grant.job_title&.name %>
|
16
|
+
<%= link_to admin_department_grant_path(@organ_handle.record_class, @organ_handle.record_column, department_grant), method: :delete, aria: { label: t('.destroy') }, data: { confirm: t('.confirm') } do %>
|
17
|
+
<i class="fas fa-trash-alt"></i>
|
18
|
+
<% end %>
|
19
|
+
</span>
|
20
|
+
<% end %>
|
21
|
+
</td>
|
22
|
+
<td id="add">
|
23
|
+
<%= render 'add' %>
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
28
|
+
</div>
|
29
|
+
</div>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%= form_with model: @department_grant, url: admin_department_grants_path(@organ_handle.record_class, @organ_handle.record_column), builder: SimpleFormBuilder do |f| %>
|
2
|
+
<%= render 'error_messages', target: @department_grant %>
|
3
|
+
<%# f.text_field :department_id %>
|
4
|
+
<%= f.collection_select :job_title_id, JobTitle.default_where({ organ_id: current_organ&.id, super_job_title_id: nil, allow: { super_job_title_id: nil } }), :id, :name %>
|
5
|
+
<%= f.submit %>
|
6
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="two wide field" id="q_department_wrapper_<%= @department.id %>">
|
2
|
+
<%= f.collection_select "department_ancestors(#{@department.depth}i)",
|
3
|
+
@departments,
|
4
|
+
:id,
|
5
|
+
:name,
|
6
|
+
{ include_blank: true, selected: @department.id, label: false, can: { wrap_all: false, wrap_input: false } },
|
7
|
+
{ id: "q_department_id_#{params[:department_id]}", data: { id: @department.id, title: 'department_ancestors' } } %>
|
8
|
+
</div>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<tr data-depth="<%= node.depth_str %>">
|
2
|
+
<td>
|
3
|
+
<span><%= (' ' * node.depth * 2).html_safe %></span>
|
4
|
+
<% unless node.leaf? %>
|
5
|
+
<a onclick="collapse(this)" href="javascript:void(0)"><i class="grey caret down icon"></i></a>
|
6
|
+
<% end %>
|
7
|
+
<%= link_to admin_department_path(node) do %>
|
8
|
+
<span><%= node.name %></span>
|
9
|
+
<span class="grey text">(<%= node.all_members_count %>)</span>
|
10
|
+
<% end %>
|
11
|
+
</td>
|
12
|
+
<td><%= node.offices.map { |i| i.name }.join(', ') %></td>
|
13
|
+
<td><%= node.leader&.name %></td>
|
14
|
+
<% Department::SUPPORTS.each do |kind| %>
|
15
|
+
<td><%= node.public_send(kind)&.name %></td>
|
16
|
+
<% end %>
|
17
|
+
<td class="ui labels">
|
18
|
+
<%= link_to 'Supports', admin_supports_path(department_id: node.id), class: 'ui yellow label' %>
|
19
|
+
<%= link_to edit_admin_department_path(node), class: 'ui pink mini icon button' do %>
|
20
|
+
<i class="fas fa-pencil-alt"></i>
|
21
|
+
<% end %>
|
22
|
+
<%= link_to admin_department_path(node), method: :delete, data: {confirm: t('.confirm')}, class: 'ui red mini icon button' do %>
|
23
|
+
<i class="times icon"></i>
|
24
|
+
<% end %>
|
25
|
+
</td>
|
26
|
+
</tr>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: Org::Department.new(params.permit(:name)) do |f| %>
|
2
|
+
<div class="field-body">
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<div class="field is-narrow">
|
5
|
+
<%= f.submit %>
|
6
|
+
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<table class="as-search">
|
2
|
+
<tr>
|
3
|
+
<th><%= Org::Department.human_attribute_name(:type) %></th>
|
4
|
+
<td>
|
5
|
+
<%= link_to t('.all'), filter_params(except: [:type]), class: active_params(type: '', active: 'button is-info', item: 'button is-light') %>
|
6
|
+
<% Org::Department.options_i18n(:type).each do |text, value| %>
|
7
|
+
<%= link_to text, filter_params(type: value), class: active_params(type: value, active: 'button is-info', item: 'button is-light') %>
|
8
|
+
<% end %>
|
9
|
+
</td>
|
10
|
+
</tr>
|
11
|
+
</table>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%= render 'error_messages', target: f.object %>
|
2
|
+
<% if f.object.parent %>
|
3
|
+
<%= f.hidden_field :parent_id %>
|
4
|
+
<%# elsif current_organ&.parent %>
|
5
|
+
<%#= render partial: 'com/nodes/outer_select', locals: { f: f, outer: 'superior', node: @root } %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% if current_organ %>
|
9
|
+
<% if current_organ.parent %>
|
10
|
+
<%# 上级组织不为空时,可选上级组织下的根部门 %>
|
11
|
+
<%= f.collection_select :superior_id, current_organ.parent.departments.roots, :id, :name, { include_blank: true } %>
|
12
|
+
<% elsif current_organ == f.object.organ && current_organ.departments.include?(f.object) %>
|
13
|
+
<%# 所选部门的组织是当前组织时,什么都不显示 %>
|
14
|
+
<% else %>
|
15
|
+
<%# 上级组织为空时,可选当前组织下根部门 %>
|
16
|
+
<%= f.collection_select :superior_id, current_organ.departments.roots, :id, :name, { include_blank: true } %>
|
17
|
+
<% end %>
|
18
|
+
<% else %>
|
19
|
+
<%# 当前组织为空时不显示 superior 选择器 %>
|
20
|
+
<% end %>
|
21
|
+
<%= f.text_field :name, required: true %>
|
22
|
+
<%= f.number_field :needed_number %>
|
23
|
+
<%= f.file_field :logo %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<td>
|
2
|
+
<span style="width: <%= model.depth * 1.43 %>em; display: inline-block"></span>
|
3
|
+
<% if model.leaf? %>
|
4
|
+
<i class="fas fa-fw fa-minus"></i>
|
5
|
+
<% else %>
|
6
|
+
<i class="fas fa-fw fa-caret-right" data-action="click->tree#expand" style="cursor: pointer"></i>
|
7
|
+
<% end %>
|
8
|
+
<%= link_to admin_department_path(model) do %>
|
9
|
+
<span><%= model.name %></span>
|
10
|
+
<span class="has-text-grey">(<%= model.all_member_departments_count %>)</span>
|
11
|
+
<% end %>
|
12
|
+
</td>
|
13
|
+
<td>
|
14
|
+
<%= model.needed_number %> /
|
15
|
+
<span class="<%= active_asserts('red': model.needed_number.to_i > model.member_departments_count, 'grey': model.needed_number.to_i == model.member_departments_count, 'green': model.needed_number.to_i < model.member_departments_count) %> text">
|
16
|
+
<%= model.member_departments_count %>
|
17
|
+
</span>
|
18
|
+
</td>
|
19
|
+
<td>
|
20
|
+
<% model.job_titles.each do |job_title| %>
|
21
|
+
<div class="button is-small is-light" aria-label="<%= job_title.grade %>"><%= job_title.name %></div>
|
22
|
+
<% end %>
|
23
|
+
<%= link_to admin_department_job_titles_path(model), aria: { label: t('.job_title') }, class: 'button is-small is-rounded is-light' do %>
|
24
|
+
<i class="fas fa-user-tag"></i>
|
25
|
+
<% end %>
|
26
|
+
</td>
|
27
|
+
<td>
|
28
|
+
<%= link_to model.leader.name, admin_member_path(model.leader.id) if model.leader %>
|
29
|
+
</td>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<th><%= Org::Department.human_attribute_name(:name) %></th>
|
2
|
+
<th>
|
3
|
+
<%= Org::Department.human_attribute_name(:needed_number) %>
|
4
|
+
<span class="has-grey-text">/</span>
|
5
|
+
<%= Org::Department.human_attribute_name(:members_count) %>
|
6
|
+
</th>
|
7
|
+
<th>
|
8
|
+
<%= Org::Department.human_attribute_name(:job_titles) %>
|
9
|
+
<%= link_to({ controller: 'super_job_titles' }, aria: { label: '不限部门职级' }) do %>
|
10
|
+
<i class="fas fa-cog"></i>
|
11
|
+
<% end %>
|
12
|
+
</th>
|
13
|
+
<th><%= Org::Department.human_attribute_name(:leader) %></th>
|
14
|
+
<th></th>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<tr id="tr_<%= model.id %>" data-depth="<%= model.depth_str %>" style="display: <%= display %>" data-tree-target="item" data-controller="show" data-action="mouseenter->show#show mouseleave->show#hide">
|
2
|
+
<%= yield %>
|
3
|
+
<td>
|
4
|
+
<span data-show-target="item" style="visibility: hidden">
|
5
|
+
<%= link_to({ action: 'new', parent_id: model.id }, data: { turbo_frame: 'modal' }, aria: { label: '添加下级' }, class: 'button is-link is-small') do %>
|
6
|
+
<i class="fas fa-plus"></i>
|
7
|
+
<% end %>
|
8
|
+
<%#= link_to 'JD', admin_department_job_descriptions_path(model), class: 'button is-small is-rounded is-light' %>
|
9
|
+
<%= link_to({ action: 'show', id: model.id }, aria: { label: t('.show') }, class: 'button is-small is-rounded is-light') do %>
|
10
|
+
<i class="fas fa-users"></i>
|
11
|
+
<% end %>
|
12
|
+
<%= link_to({ action: 'edit', id: model.id }, data: { turbo_frame: 'modal' }, aria: { label: t('.edit') }, class: 'button is-small is-rounded is-light') do %>
|
13
|
+
<i class="fas fa-pencil-alt"></i>
|
14
|
+
<% end %>
|
15
|
+
<%= button_to({ action: 'destroy', id: model.id }, method: :delete, data: { confirm: t('.confirm') }, aria: { label: t('.destroy') }, class: 'button is-small is-rounded is-light') do %>
|
16
|
+
<i class="fas fa-trash-alt"></i>
|
17
|
+
<% end %>
|
18
|
+
</span>
|
19
|
+
</td>
|
20
|
+
</tr>
|
21
|
+
<% model.children.each do |child| %>
|
22
|
+
<%= render partial: 'index_tbody', layout: 'index_tr', locals: { model: child, display: 'none' } %>
|
23
|
+
<% end %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<tr>
|
2
|
+
<td>
|
3
|
+
<%= link_to({ controller: 'auth/panel/users', action: 'show', id: member.user_id }, data: { turbo_frame: 'modal' }, class: 'is-several') do %>
|
4
|
+
<%= image_tag member.user.avatar.variant(resize_to_limit: [35, 35]), class: 'image is-24x24' if member.user.avatar.present? %>
|
5
|
+
<span><%= member.name %></span>
|
6
|
+
<% end if member.user %>
|
7
|
+
</td>
|
8
|
+
<td><%= member.identity %></td>
|
9
|
+
<td>
|
10
|
+
<% member.member_departments.select(&->(o){ @department.self_and_descendant_ids.include?(o.department_id) }).each do |md| %>
|
11
|
+
<div>
|
12
|
+
<%= md.job_title&.name %>
|
13
|
+
<%= button_to({ controller: 'member_departments', action: 'destroy', member_id: member.id, id: md.id }, method: :delete, aria: { label: t('.destroy') }, data: { confirm: t('.confirm') }) do %>
|
14
|
+
<i class="fas fa-trash"></i>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
</td>
|
19
|
+
<td><%= member.join_on %></td>
|
20
|
+
<td>
|
21
|
+
<%= link_to({ controller: 'members', action: 'edit', id: member.id }, data: { turbo_frame: 'modal' }, aria: { label: t('.edit') }, class: 'button is-small is-rounded is-light') do %>
|
22
|
+
<i class="fas fa-pencil-alt"></i>
|
23
|
+
<% end %>
|
24
|
+
<%= button_to({ controller: 'members', action: 'destroy', id: member.id }, method: :delete, data: { confirm: t('.confirm') }, aria: { label: t('.destroy') }, class: 'button is-small is-rounded is-light') do %>
|
25
|
+
<i class="fas fa-trash-alt"></i>
|
26
|
+
<% end %>
|
27
|
+
</td>
|
28
|
+
</tr>
|