rails_com 1.2.9 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +20 -165
- data/README.md +45 -22
- data/Rakefile +2 -1
- data/app/apis/ali_dns.rb +66 -0
- data/app/assets/images/avatar.png +0 -0
- data/app/channels/com/session_channel.rb +16 -0
- data/app/channels/rails_com/connection.rb +31 -0
- data/app/controllers/admin_controller.rb +4 -0
- data/app/controllers/application_controller.rb +7 -0
- data/app/controllers/base_controller.rb +2 -0
- data/app/controllers/board/base_controller.rb +3 -0
- data/app/controllers/board/home_controller.rb +6 -0
- data/app/controllers/board_controller.rb +3 -0
- data/app/controllers/com/audios_controller.rb +27 -0
- data/app/controllers/com/base_controller.rb +4 -0
- data/app/controllers/com/common_controller.rb +69 -0
- data/app/controllers/com/controller/admin.rb +114 -0
- data/app/controllers/com/controller/err_handler.rb +13 -0
- data/app/controllers/com/direct_uploads_controller.rb +11 -0
- data/app/controllers/com/log_controller.rb +30 -0
- data/app/controllers/com/nodes_controller.rb +22 -0
- data/app/controllers/com/panel/acme_accounts_controller.rb +12 -0
- data/app/controllers/com/panel/acme_identifiers_controller.rb +31 -0
- data/app/controllers/com/panel/acme_orders_controller.rb +64 -0
- data/app/controllers/com/panel/attachments_controller.rb +31 -0
- data/app/controllers/com/panel/base_controller.rb +5 -0
- data/app/controllers/com/panel/blob_defaults_controller.rb +13 -0
- data/app/controllers/com/panel/blobs_controller.rb +52 -0
- data/app/controllers/com/panel/cache_lists_controller.rb +5 -0
- data/app/controllers/com/panel/csps_controller.rb +18 -0
- data/app/controllers/com/panel/errs_controller.rb +18 -0
- data/app/controllers/com/panel/inbound_emails_controller.rb +15 -0
- data/app/controllers/com/panel/infos_controller.rb +9 -0
- data/app/controllers/com/panel/meta_actions_controller.rb +46 -0
- data/app/controllers/com/panel/meta_businesses_controller.rb +21 -0
- data/app/controllers/com/panel/meta_columns_controller.rb +47 -0
- data/app/controllers/com/panel/meta_controllers_controller.rb +46 -0
- data/app/controllers/com/panel/meta_models_controller.rb +32 -0
- data/app/controllers/com/panel/meta_namespaces_controller.rb +29 -0
- data/app/controllers/com/pdfs_controller.rb +37 -0
- data/app/controllers/com/videos_controller.rb +28 -0
- data/app/controllers/home_controller.rb +6 -0
- data/app/controllers/my/base_controller.rb +4 -0
- data/app/controllers/my/home_controller.rb +8 -0
- data/app/controllers/my_controller.rb +3 -0
- data/app/controllers/panel/base_controller.rb +4 -0
- data/app/controllers/panel/home_controller.rb +8 -0
- data/app/controllers/panel_controller.rb +5 -0
- data/app/controllers/rails_com/application.rb +113 -0
- data/app/helpers/rails_com/active_helper.rb +35 -39
- data/app/helpers/rails_com/form_helper.rb +21 -0
- data/app/helpers/rails_com/format_helper.rb +13 -0
- data/app/helpers/rails_com/frame_helper.rb +13 -0
- data/app/helpers/rails_com/kaminari_helper.rb +9 -0
- data/app/helpers/rails_com/time_helper.rb +23 -0
- data/app/helpers/rails_com/url_helper.rb +12 -0
- data/app/jobs/active_storage/identify_job.rb +9 -0
- data/app/jobs/application_job.rb +2 -0
- data/app/jobs/com/acme_job.rb +9 -0
- data/app/jobs/com/err_job.rb +10 -0
- data/app/mailboxes/application_mailbox.rb +2 -0
- data/app/mailers/application_mailer.rb +3 -0
- data/app/models/com/acme_account.rb +5 -0
- data/app/models/com/acme_identifier.rb +5 -0
- data/app/models/com/acme_order.rb +5 -0
- data/app/models/com/application_record.rb +5 -0
- data/app/models/com/blob_default.rb +5 -0
- data/app/models/com/cache_list.rb +5 -0
- data/app/models/com/csp.rb +5 -0
- data/app/models/com/err.rb +5 -0
- data/app/models/com/ext/debug.rb +71 -0
- data/app/models/com/ext/extra.rb +20 -0
- data/app/models/com/ext/parameter.rb +19 -0
- data/app/models/com/ext/sequence.rb +36 -0
- data/app/models/com/ext/state_machine.rb +82 -0
- data/app/models/com/ext/taxon.rb +81 -0
- data/app/models/com/ext/taxon_prepend.rb +21 -0
- data/app/models/com/info.rb +5 -0
- data/app/models/com/meta_action.rb +5 -0
- data/app/models/com/meta_business.rb +5 -0
- data/app/models/com/meta_column.rb +5 -0
- data/app/models/com/meta_controller.rb +5 -0
- data/app/models/com/meta_model.rb +5 -0
- data/app/models/com/meta_namespace.rb +5 -0
- data/app/models/com/meta_operation.rb +5 -0
- data/app/models/com/meta_route.rb +5 -0
- data/app/models/com/model/acme_account.rb +70 -0
- data/app/models/com/model/acme_identifier.rb +132 -0
- data/app/models/com/model/acme_order.rb +139 -0
- data/app/models/com/model/blob_default.rb +36 -0
- data/app/models/com/model/cache_list.rb +15 -0
- data/app/models/com/model/csp.rb +23 -0
- data/app/models/com/model/err.rb +108 -0
- data/app/models/com/model/info.rb +31 -0
- data/app/models/com/model/meta_action.rb +70 -0
- data/app/models/com/model/meta_business.rb +66 -0
- data/app/models/com/model/meta_column.rb +36 -0
- data/app/models/com/model/meta_controller.rb +115 -0
- data/app/models/com/model/meta_model.rb +58 -0
- data/app/models/com/model/meta_namespace.rb +61 -0
- data/app/models/com/model/meta_operation.rb +18 -0
- data/app/models/com/model/meta_permission.rb +10 -0
- data/app/models/com/model/meta_relation.rb +6 -0
- data/app/models/com/model/meta_route.rb +10 -0
- data/app/models/com.rb +11 -0
- data/app/models/concerns/feishu_bot.rb +15 -0
- data/app/models/concerns/log_record_bot.rb +40 -0
- data/app/models/concerns/work_wechat_bot.rb +18 -0
- data/app/stores/com/env_yaml.rb +96 -0
- data/app/stores/com/yaml.rb +89 -0
- data/app/views/admin/_breadcrumb.html.erb +5 -0
- data/app/views/application/_actionsheet.html.erb +20 -0
- data/app/views/application/_alert.html+phone.erb +6 -0
- data/app/views/application/_alert.html.erb +9 -0
- data/app/views/application/_auth_navbar.html.erb +18 -0
- data/app/views/application/_breadcrumb.html.erb +0 -0
- data/app/views/application/_button.html+phone.erb +3 -0
- data/app/views/application/_button.html.erb +3 -0
- data/app/views/application/_edit_form.html+phone.erb +10 -0
- data/app/views/application/_edit_form.html.erb +4 -0
- data/app/views/application/_error_messages.html.erb +11 -0
- data/app/views/application/_filter_form.html+phone.erb +14 -0
- data/app/views/application/_filter_form.html.erb +9 -0
- data/app/views/application/_filter_table.html.erb +0 -0
- data/app/views/application/_footer.html.erb +8 -0
- data/app/views/application/_form.html.erb +4 -0
- data/app/views/application/_index_sortable_table.html.erb +22 -0
- data/app/views/application/_index_table.html+phone.erb +13 -0
- data/app/views/application/_index_table.html.erb +22 -0
- data/app/views/application/_index_tbody.html.erb +3 -0
- data/app/views/application/_index_thead.html.erb +4 -0
- data/app/views/application/_index_tr.html+phone.erb +4 -0
- data/app/views/application/_index_tr.html.erb +16 -0
- data/app/views/application/_index_tree_table.html.erb +18 -0
- data/app/views/application/_locales.html.erb +11 -0
- data/app/views/application/_modal.html+phone.erb +14 -0
- data/app/views/application/_modal.html.erb +14 -0
- data/app/views/application/_nav.html.erb +0 -0
- data/app/views/application/_nav_bar.html+phone.erb +0 -0
- data/app/views/application/_nav_bar.html.erb +25 -0
- data/app/views/application/_nav_brand.html.erb +3 -0
- data/app/views/application/_nav_with_login.html.erb +0 -0
- data/app/views/application/_nav_without_login.html.erb +0 -0
- data/app/views/application/_new_form.html+phone.erb +10 -0
- data/app/views/application/_new_form.html.erb +4 -0
- data/app/views/application/_pagination.json.jbuilder +7 -0
- data/app/views/application/_show.html+phone.erb +20 -0
- data/app/views/application/_show.html.erb +13 -0
- data/app/views/application/_show_table.html.erb +0 -0
- data/app/views/application/_tab_bar.html.erb +3 -0
- data/app/views/application/_tab_bar_item.erb +4 -0
- data/app/views/application/alert.turbo_stream.erb +1 -0
- data/app/views/application/controller_not_found.json.jbuilder +4 -0
- data/app/views/application/create.json.jbuilder +1 -0
- data/app/views/application/create.turbo_stream.erb +3 -0
- data/app/views/application/destroy.json.jbuilder +0 -0
- data/app/views/application/destroy.turbo_stream.erb +3 -0
- data/app/views/application/edit.html.erb +7 -0
- data/app/views/application/edit.json.jbuilder +2 -0
- data/app/views/{shared/_error_messages.html.erb → application/err.turbo_stream.erb} +4 -4
- data/app/views/application/index.html.erb +5 -0
- data/app/views/application/index.json.jbuilder +1 -0
- data/app/views/application/move_higher.turbo_stream.erb +3 -0
- data/app/views/application/move_lower.turbo_stream.erb +3 -0
- data/app/views/application/new.html.erb +7 -0
- data/app/views/application/new.json.jbuilder +2 -0
- data/app/views/application/show.html.erb +3 -0
- data/app/views/application/show.json.jbuilder +1 -0
- data/app/views/application/update.json.jbuilder +1 -0
- data/app/views/application/update.turbo_stream.erb +3 -0
- data/app/views/board/home/index.html.erb +0 -0
- data/app/views/com/attachments/_file_upload.html.erb +19 -0
- data/app/views/com/attachments/_image_preview.html.erb +9 -0
- data/app/views/com/attachments/_list.html.erb +31 -0
- data/app/views/com/attachments/_list_edit.html.erb +28 -0
- data/app/views/com/attachments/_list_field.html.erb +6 -0
- data/app/views/com/attachments/_list_many.html.erb +17 -0
- data/app/views/com/attachments/_video_item.html.erb +6 -0
- data/app/views/com/audios/show.html.erb +3 -0
- data/app/views/com/common/deploy.html.erb +0 -0
- data/app/views/com/common/info.json.jbuilder +1 -0
- data/app/views/com/extra/_extra_form.html.erb +5 -0
- data/app/views/com/extra/_item.html.erb +15 -0
- data/app/views/com/nodes/_children_options.html.erb +4 -0
- data/app/views/com/nodes/_children_select.html.erb +15 -0
- data/app/views/com/nodes/_outer_children_options.html.erb +4 -0
- data/app/views/com/nodes/_outer_options.html+phone.erb +2 -0
- data/app/views/com/nodes/_outer_options.html.erb +4 -0
- data/app/views/com/nodes/_outer_select.html.erb +12 -0
- data/app/views/com/nodes/_self_and_siblings_options.html.erb +4 -0
- data/app/views/com/nodes/_siblings_options.html.erb +4 -0
- data/app/views/com/nodes/_siblings_select.html.erb +14 -0
- data/app/views/com/nodes/children.turbo_stream.erb +3 -0
- data/app/views/com/nodes/outer.turbo_stream.erb +3 -0
- data/app/views/com/panel/acme_accounts/_filter_form.html.erb +9 -0
- data/app/views/com/panel/acme_accounts/_index_tbody.html.erb +7 -0
- data/app/views/com/panel/acme_accounts/_index_thead.html.erb +4 -0
- data/app/views/com/panel/acme_accounts/_index_tr.html.erb +16 -0
- data/app/views/com/panel/acme_identifiers/_breadcrumb.html.erb +7 -0
- data/app/views/com/panel/acme_identifiers/_button.html.erb +0 -0
- data/app/views/com/panel/acme_identifiers/_filter_form.html.erb +9 -0
- data/app/views/com/panel/acme_identifiers/_form.html.erb +2 -0
- data/app/views/com/panel/acme_identifiers/_index_tbody.html.erb +16 -0
- data/app/views/com/panel/acme_identifiers/_index_thead.html.erb +17 -0
- data/app/views/com/panel/acme_identifiers/_show_table.html.erb +24 -0
- data/app/views/com/panel/acme_identifiers/index.html.erb +3 -0
- data/app/views/com/panel/acme_orders/_breadcrumb.html.erb +6 -0
- data/app/views/com/panel/acme_orders/_filter_form.html.erb +9 -0
- data/app/views/com/panel/acme_orders/_form.html.erb +4 -0
- data/app/views/com/panel/acme_orders/_index_tbody.html.erb +11 -0
- data/app/views/com/panel/acme_orders/_index_thead.html.erb +8 -0
- data/app/views/com/panel/acme_orders/_index_tr.html.erb +25 -0
- data/app/views/com/panel/acme_orders/_item_form.html.erb +14 -0
- data/app/views/com/panel/acme_orders/_new_form.html.erb +7 -0
- data/app/views/com/panel/acme_orders/_show_table.html.erb +4 -0
- data/app/views/com/panel/attachments/_breadcrumb.html.erb +10 -0
- data/app/views/com/panel/attachments/_button.html.erb +0 -0
- data/app/views/com/panel/attachments/_filter_form.html.erb +13 -0
- data/app/views/com/panel/attachments/_index_tbody.html.erb +6 -0
- data/app/views/com/panel/attachments/_index_thead.html.erb +7 -0
- data/app/views/com/panel/attachments/_index_tr.html.erb +10 -0
- data/app/views/com/panel/attachments/index.html.erb +5 -0
- data/app/views/com/panel/base/_index_meta_action.html.erb +14 -0
- data/app/views/com/panel/base/_nav.html.erb +3 -0
- data/app/views/com/panel/blob_defaults/_add_form.html.erb +7 -0
- data/app/views/com/panel/blob_defaults/_filter_form.html.erb +10 -0
- data/app/views/com/panel/blob_defaults/_form.html.erb +4 -0
- data/app/views/com/panel/blob_defaults/_index_tbody.html.erb +7 -0
- data/app/views/com/panel/blob_defaults/_index_thead.html.erb +5 -0
- data/app/views/com/panel/blob_defaults/_index_tr.html.erb +13 -0
- data/app/views/com/panel/blob_defaults/add.turbo_stream.erb +1 -0
- data/app/views/com/panel/blobs/_breadcrumb.html.erb +6 -0
- data/app/views/com/panel/blobs/_filter_form.html.erb +13 -0
- data/app/views/com/panel/blobs/_index_tbody.html.erb +22 -0
- data/app/views/com/panel/blobs/_index_thead.html.erb +12 -0
- data/app/views/com/panel/blobs/_index_tr.html.erb +13 -0
- data/app/views/com/panel/blobs/_new_form.html.erb +5 -0
- data/app/views/com/panel/blobs/index.html.erb +5 -0
- data/app/views/com/panel/cache_lists/_index_tbody.html.erb +4 -0
- data/app/views/com/panel/cache_lists/_index_thead.html.erb +5 -0
- data/app/views/com/panel/cache_lists/_show_table.html.erb +8 -0
- data/app/views/com/panel/csps/_button.html.erb +0 -0
- data/app/views/com/panel/csps/_filter_form.html.erb +8 -0
- data/app/views/com/panel/csps/_index_tbody.html.erb +11 -0
- data/app/views/com/panel/csps/_index_thead.html.erb +12 -0
- data/app/views/com/panel/csps/_index_tr.html.erb +13 -0
- data/app/views/com/panel/csps/_show/_breadcrumb.html.erb +6 -0
- data/app/views/com/panel/csps/_show_table.html.erb +48 -0
- data/app/views/com/panel/csps/show.html.erb +7 -0
- data/app/views/com/panel/errs/_button.html.erb +0 -0
- data/app/views/com/panel/errs/_filter_form.html.erb +11 -0
- data/app/views/com/panel/errs/_index_tbody.html.erb +16 -0
- data/app/views/com/panel/errs/_index_thead.html.erb +11 -0
- data/app/views/com/panel/errs/_index_tr.html.erb +13 -0
- data/app/views/com/panel/errs/_show/_breadcrumb.html.erb +6 -0
- data/app/views/com/panel/errs/_show_table.html.erb +44 -0
- data/app/views/com/panel/errs/show.html.erb +7 -0
- data/app/views/com/panel/inbound_emails/_button.html.erb +0 -0
- data/app/views/com/panel/inbound_emails/_filter_form.html.erb +9 -0
- data/app/views/com/panel/inbound_emails/_index_tbody.html.erb +5 -0
- data/app/views/com/panel/inbound_emails/_index_thead.html.erb +6 -0
- data/app/views/com/panel/inbound_emails/_show_table.html.erb +10 -0
- data/app/views/com/panel/inbound_emails/index.html.erb +5 -0
- data/app/views/com/panel/infos/_filter_form.html.erb +9 -0
- data/app/views/com/panel/infos/_index_tbody.html.erb +4 -0
- data/app/views/com/panel/infos/_index_thead.html.erb +5 -0
- data/app/views/com/panel/infos/index.json.jbuilder +1 -0
- data/app/views/com/panel/meta_actions/_breadcrumb.html.erb +6 -0
- data/app/views/com/panel/meta_actions/_form.html.erb +1 -0
- data/app/views/com/panel/meta_actions/_index_tbody.html.erb +4 -0
- data/app/views/com/panel/meta_actions/_index_thead.html.erb +5 -0
- data/app/views/com/panel/meta_actions/_roles.html.erb +9 -0
- data/app/views/com/panel/meta_actions/index.html.erb +3 -0
- data/app/views/com/panel/meta_actions/roles.js.erb +6 -0
- data/app/views/com/panel/meta_actions/update.turbo_stream.erb +1 -0
- data/app/views/com/panel/meta_businesses/_breadcrumb.html.erb +10 -0
- data/app/views/com/panel/meta_businesses/_button.html.erb +3 -0
- data/app/views/com/panel/meta_businesses/_form.html.erb +3 -0
- data/app/views/com/panel/meta_businesses/_index_tbody.html.erb +12 -0
- data/app/views/com/panel/meta_businesses/_index_thead.html.erb +2 -0
- data/app/views/com/panel/meta_businesses/_index_tr.html.erb +16 -0
- data/app/views/com/panel/meta_businesses/_show_table.html.erb +8 -0
- data/app/views/com/panel/meta_businesses/sync.turbo_stream.erb +3 -0
- data/app/views/com/panel/meta_columns/_breadcrumb.html.erb +6 -0
- data/app/views/com/panel/meta_columns/_form.html.erb +6 -0
- data/app/views/com/panel/meta_columns/_index_tbody.html.erb +20 -0
- data/app/views/com/panel/meta_columns/_index_thead.html.erb +12 -0
- data/app/views/com/panel/meta_columns/_index_tr.html.erb +22 -0
- data/app/views/com/panel/meta_columns/_show_table.html.erb +20 -0
- data/app/views/com/panel/meta_columns/sync.turbo_stream.erb +3 -0
- data/app/views/com/panel/meta_columns/test.turbo_stream.erb +3 -0
- data/app/views/com/panel/meta_controllers/_button.html.erb +3 -0
- data/app/views/com/panel/meta_controllers/_filter_form.html.erb +8 -0
- data/app/views/com/panel/meta_controllers/_filter_tablex.html.erb +8 -0
- data/app/views/com/panel/meta_controllers/_form.html.erb +2 -0
- data/app/views/com/panel/meta_controllers/_index_meta_business.html.erb +10 -0
- data/app/views/com/panel/meta_controllers/_index_meta_controller.html.erb +15 -0
- data/app/views/com/panel/meta_controllers/_index_meta_namespace.html.erb +12 -0
- data/app/views/com/panel/meta_controllers/_index_tbody.html.erb +28 -0
- data/app/views/com/panel/meta_controllers/_index_thead.html.erb +2 -0
- data/app/views/com/panel/meta_controllers/index.html.erb +3 -0
- data/app/views/com/panel/meta_controllers/meta_actions.turbo_stream.erb +1 -0
- data/app/views/com/panel/meta_controllers/meta_controllers.turbo_stream.erb +1 -0
- data/app/views/com/panel/meta_controllers/meta_namespaces.turbo_stream.erb +1 -0
- data/app/views/com/panel/meta_controllers/sync.turbo_stream.erb +3 -0
- data/app/views/com/panel/meta_models/_button.html.erb +6 -0
- data/app/views/com/panel/meta_models/_form.html.erb +4 -0
- data/app/views/com/panel/meta_models/_index_tbody.html.erb +3 -0
- data/app/views/com/panel/meta_models/_index_thead.html.erb +4 -0
- data/app/views/com/panel/meta_models/_index_tr.html.erb +19 -0
- data/app/views/com/panel/meta_models/_show_table.html.erb +12 -0
- data/app/views/com/panel/meta_models/sync.turbo_stream.erb +3 -0
- data/app/views/com/panel/meta_namespaces/_breadcrumb.html.erb +10 -0
- data/app/views/com/panel/meta_namespaces/_button.html.erb +3 -0
- data/app/views/com/panel/meta_namespaces/_form.html.erb +5 -0
- data/app/views/com/panel/meta_namespaces/_index_tbody.html.erb +20 -0
- data/app/views/com/panel/meta_namespaces/_index_thead.html.erb +6 -0
- data/app/views/com/panel/meta_namespaces/_show_table.html.erb +20 -0
- data/app/views/com/panel/meta_namespaces/sync.turbo_stream.erb +3 -0
- data/app/views/com/videos/show.html.erb +9 -0
- data/app/{assets/javascripts/controllers/active_storage_ext/videos/show.ready.js → views/com/videos/show.js} +0 -0
- data/app/views/default_form/_date_field.html.erb +1 -0
- data/app/views/default_form/_datetime_field.html.erb +1 -0
- data/app/views/default_form/_number_field.html.erb +1 -0
- data/app/views/default_form/_outer_select.html.erb +14 -0
- data/app/views/default_form/_select_enum.html.erb +1 -0
- data/app/views/default_form/_text_field.html.erb +1 -0
- data/app/views/default_form/_time_field.html.erb +1 -0
- data/app/views/extra_form/_number_field.html.erb +1 -0
- data/app/views/extra_form/_outer_select.html.erb +14 -0
- data/app/views/extra_form/_text_field.html.erb +1 -0
- data/app/views/home/index.html.erb +0 -0
- data/app/views/kaminari/com/_first_page.html.erb +3 -0
- data/app/views/kaminari/{_gap.html.erb → com/_gap.html.erb} +1 -1
- data/app/views/kaminari/com/_last_page.html.erb +3 -0
- data/app/views/kaminari/com/_next_page.html.erb +3 -0
- data/app/views/kaminari/com/_page.html.erb +1 -0
- data/app/views/kaminari/{_paginator.html.erb → com/_paginator.html+phone.erb} +3 -3
- data/app/views/kaminari/com/_paginator.html.erb +17 -0
- data/app/views/kaminari/com/_prev_page.html.erb +3 -0
- data/app/views/layouts/_admin_head.html.erb +22 -0
- data/app/views/layouts/_application_head.html.erb +26 -0
- data/app/views/layouts/_phone_head.html.erb +28 -0
- data/app/views/layouts/admin.html.erb +12 -0
- data/app/views/layouts/application.html+phone.erb +12 -0
- data/app/views/layouts/application.html.erb +11 -0
- data/app/views/layouts/application.json.jbuilder +2 -0
- data/app/views/layouts/board.html+phone.erb +10 -0
- data/app/views/layouts/board.html.erb +12 -0
- data/app/views/layouts/mailer.html.erb +14 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/layouts/my.html+phone.erb +11 -0
- data/app/views/layouts/my.html.erb +13 -0
- data/app/views/layouts/panel.html.erb +12 -0
- data/app/views/my/home/index.html.erb +0 -0
- data/app/views/panel/_breadcrumb.html.erb +0 -0
- data/app/views/panel/_com_nav.html.erb +19 -0
- data/app/views/panel/_nav.html.erb +6 -0
- data/app/views/panel/_nav_without_login.html.erb +3 -0
- data/app/views/panel/destroy.turbo_stream.erb +1 -0
- data/app/views/panel/home/index.html.erb +0 -0
- data/config/default_form.yml +74 -0
- data/config/locales/en.controller.yml +46 -0
- data/config/locales/en.yml +2 -2
- data/config/locales/zh.attributes.yml +9 -0
- data/config/locales/zh.controller.yml +65 -0
- data/config/locales/zh.enum.yml +11 -0
- data/config/locales/zh.helper.yml +10 -0
- data/config/locales/zh.rb +34 -0
- data/config/locales/zh.yml +66 -10
- data/config/routes.rb +140 -8
- data/lib/active_storage/service/disc_service.rb +41 -0
- data/lib/default_form/active_record/extend.rb +38 -0
- data/lib/default_form/builder/default.rb +88 -0
- data/lib/default_form/builder/helper.rb +212 -0
- data/lib/default_form/builder/wrap.rb +58 -0
- data/lib/default_form/config.rb +50 -0
- data/lib/default_form/controller_helper.rb +14 -0
- data/lib/default_form/form_builder.rb +61 -0
- data/lib/default_form/override/action_view/helpers/tags/collection_check_boxes.rb +23 -0
- data/lib/default_form/override/action_view/helpers/tags/collection_radio_buttons.rb +23 -0
- data/lib/default_form/view_helper.rb +39 -0
- data/lib/generators/jbuilder_generator.rb +22 -0
- data/lib/generators/scaffold_generator.rb +27 -0
- data/lib/generators/templates/jbuilder/_show.json.jbuilder.tt +1 -0
- data/lib/generators/templates/jbuilder/index.json.jbuilder.tt +1 -0
- data/lib/generators/templates/jbuilder/partial.json.jbuilder.tt +17 -0
- data/lib/generators/templates/scaffold_erb/_edit_form.html.erb.tt +4 -0
- data/lib/generators/templates/scaffold_erb/_filter_form.html.erb.tt +9 -0
- data/lib/generators/templates/scaffold_erb/_form.html.erb.tt +4 -0
- data/lib/generators/templates/scaffold_erb/_index_tbody.html.erb.tt +3 -0
- data/lib/generators/templates/scaffold_erb/_index_thead.html.erb.tt +4 -0
- data/lib/generators/templates/scaffold_erb/_new_form.html.erb.tt +4 -0
- data/lib/generators/templates/scaffold_erb/_show_table.html.erb.tt +6 -0
- data/lib/generators/templates/scaffold_erb/index.html.erb.tt +5 -0
- data/lib/rails_com/action_controller/errors.rb +9 -2
- data/lib/rails_com/action_controller/extend.rb +20 -0
- data/lib/rails_com/action_controller/include.rb +31 -0
- data/lib/rails_com/action_controller/parameters.rb +3 -0
- data/lib/rails_com/action_controller/public_exceptions.rb +31 -0
- data/lib/rails_com/action_controller/subscriber.rb +32 -0
- data/lib/rails_com/action_controller.rb +9 -3
- data/lib/rails_com/action_mailbox/inbound_email.rb +23 -0
- data/lib/rails_com/action_mailbox/mail_ext.rb +34 -0
- data/lib/rails_com/action_mailbox.rb +4 -0
- data/lib/rails_com/action_text/rich_text.rb +16 -0
- data/lib/rails_com/action_text.rb +3 -0
- data/lib/rails_com/action_view/partial_renderer.rb +22 -0
- data/lib/rails_com/action_view/template_renderer.rb +27 -28
- data/lib/rails_com/action_view/translation_helper.rb +7 -4
- data/lib/rails_com/action_view.rb +5 -2
- data/lib/rails_com/active_storage/activestorage_attached.rb +7 -4
- data/lib/rails_com/active_storage/attached_macros.rb +17 -5
- data/lib/rails_com/active_storage/attachment_prepend.rb +14 -0
- data/lib/rails_com/active_storage/attachment_transfer.rb +12 -5
- data/lib/rails_com/active_storage/video_response.rb +5 -1
- data/lib/rails_com/active_storage.rb +9 -4
- data/lib/rails_com/all.rb +23 -0
- data/lib/rails_com/api.rb +24 -0
- data/lib/rails_com/config.rb +22 -14
- data/lib/rails_com/engine.rb +41 -25
- data/lib/rails_com/utils/hex_helper.rb +12 -0
- data/lib/rails_com/utils/jobber.rb +3 -1
- data/lib/rails_com/utils/num_helper.rb +7 -5
- data/lib/rails_com/utils/qrcode_helper.rb +35 -0
- data/lib/rails_com/utils/setting.rb +5 -5
- data/lib/rails_com/utils/time_helper.rb +2 -0
- data/lib/rails_com/utils/uid_helper.rb +18 -15
- data/lib/rails_com.rb +25 -17
- data/lib/templates/rails/scaffold_controller/api_controller.rb.tt +20 -19
- data/lib/templates/rails/scaffold_controller/controller.rb.tt +1 -52
- data/lib/templates/test_unit/scaffold/functional_test.rb.tt +64 -0
- metadata +511 -120
- data/app/assets/config/rails_com_manifest.js +0 -6
- data/app/assets/images/image-square.png +0 -0
- data/app/assets/images/verification.jpg +0 -0
- data/app/assets/javascripts/rails_com/application.js +0 -29
- data/app/assets/javascripts/rails_com/attachment.js +0 -421
- data/app/assets/javascripts/rails_com/checkbox.js +0 -59
- data/app/assets/javascripts/rails_com/fetch_xhr_script.js +0 -31
- data/app/assets/javascripts/rails_com/footer.js +0 -9
- data/app/assets/javascripts/rails_com/picture.js +0 -18
- data/app/assets/javascripts/rails_com/sidebar.js +0 -40
- data/app/assets/javascripts/rails_com/time_local.js +0 -9
- data/app/assets/stylesheets/controllers/active_storage_ext/videos/show.css +0 -7
- data/app/assets/stylesheets/controllers/active_storage_ext/videos/transfer.css +0 -4
- data/app/assets/stylesheets/rails_com/application.css +0 -3
- data/app/controllers/active_storage_ext/admin/attachments_controller.rb +0 -13
- data/app/controllers/active_storage_ext/admin/base_controller.rb +0 -4
- data/app/controllers/active_storage_ext/admin/blob_defaults_controller.rb +0 -55
- data/app/controllers/active_storage_ext/admin/blobs_controller.rb +0 -48
- data/app/controllers/active_storage_ext/audios_controller.rb +0 -24
- data/app/controllers/active_storage_ext/videos_controller.rb +0 -25
- data/app/controllers/concerns/rails_common_api.rb +0 -60
- data/app/controllers/concerns/rails_common_controller.rb +0 -46
- data/app/controllers/concerns/rails_common_xhr.rb +0 -15
- data/app/helpers/rails_com/assets_helper.rb +0 -109
- data/app/models/active_storage/blob_default.rb +0 -24
- data/app/models/concerns/state_machine.rb +0 -79
- data/app/views/active_storage_ext/admin/attachments/destroy.js.erb +0 -1
- data/app/views/active_storage_ext/admin/blob_defaults/_form.html.erb +0 -8
- data/app/views/active_storage_ext/admin/blob_defaults/_search_form.html.erb +0 -7
- data/app/views/active_storage_ext/admin/blob_defaults/edit.html.erb +0 -9
- data/app/views/active_storage_ext/admin/blob_defaults/index.html.erb +0 -49
- data/app/views/active_storage_ext/admin/blob_defaults/new.html.erb +0 -9
- data/app/views/active_storage_ext/admin/blob_defaults/show.html.erb +0 -10
- data/app/views/active_storage_ext/admin/blobs/_search_form.html.erb +0 -9
- data/app/views/active_storage_ext/admin/blobs/destroy.js.erb +0 -1
- data/app/views/active_storage_ext/admin/blobs/index.html.erb +0 -51
- data/app/views/active_storage_ext/admin/blobs/new.html.erb +0 -13
- data/app/views/active_storage_ext/admin/blobs/show.html.erb +0 -10
- data/app/views/active_storage_ext/attachments/_default_image_item.html.erb +0 -14
- data/app/views/active_storage_ext/attachments/_image_item.html.erb +0 -6
- data/app/views/active_storage_ext/attachments/_list.html.erb +0 -25
- data/app/views/active_storage_ext/attachments/_list_edit.html.erb +0 -27
- data/app/views/active_storage_ext/attachments/_list_field.html.erb +0 -6
- data/app/views/active_storage_ext/attachments/_video_item.html.erb +0 -6
- data/app/views/active_storage_ext/audios/show.html.erb +0 -5
- data/app/views/active_storage_ext/videos/show.html.erb +0 -6
- data/app/views/kaminari/_first_page.html.erb +0 -3
- data/app/views/kaminari/_last_page.html.erb +0 -3
- data/app/views/kaminari/_next_page.html.erb +0 -3
- data/app/views/kaminari/_page.html.erb +0 -1
- data/app/views/kaminari/_prev_page.html.erb +0 -3
- data/app/views/layouts/rails_com/application.html.erb +0 -17
- data/app/views/shared/_alert.html.erb +0 -8
- data/app/views/shared/_locales.html.erb +0 -8
- data/config/locales/zh.datetime.yml +0 -44
- data/db/migrate/20181012025833_rails_com_init.rb +0 -14
- data/lib/active_record/type/i18n.rb +0 -19
- data/lib/generators/doc_model_generator.rb +0 -37
- data/lib/generators/doc_models_generator.rb +0 -11
- data/lib/generators/templates/model.erb +0 -6
- data/lib/mina/git2.rb +0 -59
- data/lib/mina/puma.rb +0 -64
- data/lib/mina/sidekiq.rb +0 -67
- data/lib/mina/whenever.rb +0 -27
- data/lib/rails_com/action_controller/controller_helper.rb +0 -29
- data/lib/rails_com/active_record/model_helper.rb +0 -107
- data/lib/rails_com/active_record/persistence_sneakily.rb +0 -11
- data/lib/rails_com/active_record/translation.rb +0 -66
- data/lib/rails_com/active_record.rb +0 -3
- data/lib/rails_com/active_storage/blob_ext.rb +0 -34
- data/lib/rails_com/core/array.rb +0 -72
- data/lib/rails_com/core/date.rb +0 -25
- data/lib/rails_com/core/hash.rb +0 -38
- data/lib/rails_com/core/nil.rb +0 -7
- data/lib/rails_com/core/numeric.rb +0 -11
- data/lib/rails_com/core/string.rb +0 -15
- data/lib/rails_com/core.rb +0 -7
- data/lib/rails_com/generators/named_base.rb +0 -10
- data/lib/rails_com/generators/scaffold_generator.rb +0 -15
- data/lib/rails_com/meta/controllers.rb +0 -8
- data/lib/rails_com/meta/models.rb +0 -21
- data/lib/rails_com/meta/routes.rb +0 -53
- data/lib/rails_com/sprockets/non_digest_assets.rb +0 -16
- data/lib/rails_com/utils/babel.rb +0 -38
- data/lib/rails_com/version.rb +0 -3
- data/lib/tasks/rails_com_tasks.rake +0 -4
- data/lib/templates/erb/scaffold/_filter.html.erb.tt +0 -10
- data/lib/templates/erb/scaffold/_form.html.erb.tt +0 -12
- data/lib/templates/erb/scaffold/edit.html.erb.tt +0 -9
- data/lib/templates/erb/scaffold/index.html.erb.tt +0 -45
- data/lib/templates/erb/scaffold/new.html.erb.tt +0 -9
- data/lib/templates/erb/scaffold/show.html.erb.tt +0 -16
@@ -0,0 +1,96 @@
|
|
1
|
+
module Com
|
2
|
+
class EnvYaml
|
3
|
+
attr_reader :content
|
4
|
+
# uses config/viter_template.yml in rails_ui engine as default,
|
5
|
+
# config/viter_template.yml in Rails project will override this.
|
6
|
+
def initialize(file_name)
|
7
|
+
export_path = Rails.root + file_name
|
8
|
+
|
9
|
+
@yaml = Psych::Nodes::Stream.new
|
10
|
+
@content = @yaml.children[0].children[0].children
|
11
|
+
@parsed = @yaml.to_ruby[0]
|
12
|
+
@io = File.new(export_path, 'w+')
|
13
|
+
end
|
14
|
+
|
15
|
+
def template(template)
|
16
|
+
template_path = (Rails.root + template).existence
|
17
|
+
File.read(template_path)
|
18
|
+
end
|
19
|
+
|
20
|
+
def dump
|
21
|
+
@yaml.yaml @io
|
22
|
+
@io.fsync
|
23
|
+
@io.close
|
24
|
+
end
|
25
|
+
|
26
|
+
def append(env = 'default', key, value)
|
27
|
+
env_content, index = xx(env, key)
|
28
|
+
if index
|
29
|
+
value_content = env_content[index]
|
30
|
+
else
|
31
|
+
return
|
32
|
+
end
|
33
|
+
|
34
|
+
return if value_content.children.find { |i| i.value == value }
|
35
|
+
|
36
|
+
if value_content.is_a?(Psych::Nodes::Sequence)
|
37
|
+
value_content.style = 1 # block style
|
38
|
+
value_content.children << Psych::Nodes::Scalar.new(value)
|
39
|
+
end
|
40
|
+
|
41
|
+
value_content
|
42
|
+
end
|
43
|
+
|
44
|
+
def add(env = 'default', key, value)
|
45
|
+
env_content, index = xx(env, key)
|
46
|
+
if index
|
47
|
+
value_content = env_content[index]
|
48
|
+
else
|
49
|
+
return
|
50
|
+
end
|
51
|
+
|
52
|
+
if value_content.is_a?(Psych::Nodes::Sequence) # 数组
|
53
|
+
value_content.style = 1 # block style
|
54
|
+
value_content.children << Psych::Nodes::Scalar.new(value)
|
55
|
+
elsif value_content.is_a?(Psych::Nodes::Mapping) && value.is_a?(Hash) # 有下级内容
|
56
|
+
value.each do |item, val|
|
57
|
+
value_content.children << Psych::Nodes::Scalar.new(item)
|
58
|
+
value_content.children << Psych::Nodes::Scalar.new(val)
|
59
|
+
end
|
60
|
+
elsif value_content.is_a?(Psych::Nodes::Scalar) && value.is_a?(Hash)
|
61
|
+
value_content.children = []
|
62
|
+
value.each do |item, val|
|
63
|
+
value_content.children << Psych::Nodes::Scalar.new(item)
|
64
|
+
value_content.children << Psych::Nodes::Scalar.new(val)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
value_content
|
69
|
+
end
|
70
|
+
|
71
|
+
def set(env = 'default', key, value)
|
72
|
+
env_content, index = xx(env, key)
|
73
|
+
if index
|
74
|
+
value_content = env_content[index]
|
75
|
+
value_content.value = value
|
76
|
+
elsif key && value
|
77
|
+
env_content << Psych::Nodes::Scalar.new(key)
|
78
|
+
env_content << Psych::Nodes::Scalar.new(value)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def xx(env, key)
|
83
|
+
env_index = @content.find_index { |i| i.is_a?(Psych::Nodes::Scalar) && i.value == env }
|
84
|
+
env_content = @content[env_index + 1].children
|
85
|
+
value_index = env_content.find_index { |i| i.is_a?(Psych::Nodes::Scalar) && i.value == key }
|
86
|
+
if value_index
|
87
|
+
index = value_index + 1
|
88
|
+
else
|
89
|
+
index = nil
|
90
|
+
end
|
91
|
+
|
92
|
+
[env_content, index]
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
module Com
|
2
|
+
class Yaml
|
3
|
+
attr_reader :content
|
4
|
+
# uses config/viter_template.yml in rails_ui engine as default,
|
5
|
+
# config/viter_template.yml in Rails project will override this.
|
6
|
+
def initialize(file_name)
|
7
|
+
export_path = Rails.root + file_name
|
8
|
+
|
9
|
+
@yaml = Psych::Nodes::Stream.new
|
10
|
+
@content = @yaml.children
|
11
|
+
@io = File.new(export_path, 'w+')
|
12
|
+
end
|
13
|
+
|
14
|
+
def template(template)
|
15
|
+
template_path = (Rails.root + template).existence
|
16
|
+
File.read(template_path)
|
17
|
+
end
|
18
|
+
|
19
|
+
def dump
|
20
|
+
@yaml.yaml @io
|
21
|
+
@io.fsync
|
22
|
+
@io.close
|
23
|
+
end
|
24
|
+
|
25
|
+
def set(key, value)
|
26
|
+
@content << Psych::Nodes::Scalar.new(key)
|
27
|
+
@content << Psych::Nodes::Scalar.new(value)
|
28
|
+
end
|
29
|
+
|
30
|
+
def append(env = 'default', key, value)
|
31
|
+
env_content, index = xx(env, key)
|
32
|
+
if index
|
33
|
+
value_content = env_content[index]
|
34
|
+
else
|
35
|
+
return
|
36
|
+
end
|
37
|
+
|
38
|
+
return if value_content.children.find { |i| i.value == value }
|
39
|
+
|
40
|
+
if value_content.is_a?(Psych::Nodes::Sequence)
|
41
|
+
value_content.style = 1 # block style
|
42
|
+
value_content.children << Psych::Nodes::Scalar.new(value)
|
43
|
+
end
|
44
|
+
|
45
|
+
value_content
|
46
|
+
end
|
47
|
+
|
48
|
+
def add(env = 'default', key, value)
|
49
|
+
env_content, index = xx(env, key)
|
50
|
+
if index
|
51
|
+
value_content = env_content[index]
|
52
|
+
else
|
53
|
+
return
|
54
|
+
end
|
55
|
+
|
56
|
+
if value_content.is_a?(Psych::Nodes::Sequence) # 数组
|
57
|
+
value_content.style = 1 # block style
|
58
|
+
value_content.children << Psych::Nodes::Scalar.new(value)
|
59
|
+
elsif value_content.is_a?(Psych::Nodes::Mapping) && value.is_a?(Hash) # 有下级内容
|
60
|
+
value.each do |item, val|
|
61
|
+
value_content.children << Psych::Nodes::Scalar.new(item)
|
62
|
+
value_content.children << Psych::Nodes::Scalar.new(val)
|
63
|
+
end
|
64
|
+
elsif value_content.is_a?(Psych::Nodes::Scalar) && value.is_a?(Hash)
|
65
|
+
value_content.children = []
|
66
|
+
value.each do |item, val|
|
67
|
+
value_content.children << Psych::Nodes::Scalar.new(item)
|
68
|
+
value_content.children << Psych::Nodes::Scalar.new(val)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
value_content
|
73
|
+
end
|
74
|
+
|
75
|
+
def xx(env, key)
|
76
|
+
env_index = @content.find_index { |i| i.is_a?(Psych::Nodes::Scalar) && i.value == env }
|
77
|
+
env_content = @content[env_index + 1].children
|
78
|
+
value_index = env_content.find_index { |i| i.is_a?(Psych::Nodes::Scalar) && i.value == key }
|
79
|
+
if value_index
|
80
|
+
index = value_index + 1
|
81
|
+
else
|
82
|
+
index = nil
|
83
|
+
end
|
84
|
+
|
85
|
+
[env_content, index]
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<div data-controller="weui-actionsheet" id="actionsheet">
|
2
|
+
<div data-weui-actionsheet-target="mask" data-action="click->weui-actionsheet#close" class="weui-mask" style="opacity: 0; display: none"></div>
|
3
|
+
<div class="weui-actionsheet" data-weui-actionsheet-target="sheet">
|
4
|
+
<div class="weui-actionsheet__menu">
|
5
|
+
<div class="weui-actionsheet__cell">
|
6
|
+
<%= link_to({ action: 'edit' }) do %>
|
7
|
+
<i class="fa-light fa-pencil"></i><span><%= t('.edit') %></span>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
<div class="weui-actionsheet__cell weui-actionsheet__cell_warn">
|
11
|
+
<%= button_to({ action: 'destroy' }, method: :delete, data: { confirm: t('.confirm') }, class: 'has-text-danger') do %>
|
12
|
+
<i class="fa-light fa-trash"></i><span><%= t('.destroy') %></span>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="weui-actionsheet__action">
|
17
|
+
<div class="weui-actionsheet__cell" data-action="click->weui-actionsheet#close">取消</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<% flash.each do |type, msg| %>
|
2
|
+
<div class="notification is-radiusless is-danger" data-controller="notice">
|
3
|
+
<button class="delete" data-action="notice#close"></button>
|
4
|
+
<%= msg %>
|
5
|
+
</div>
|
6
|
+
<div class="ui bottom attached warning progress" data-percent="0">
|
7
|
+
<div class="bar"></div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if defined?(current_user) && current_user %>
|
2
|
+
<div class="navbar-item has-dropdown is-hoverable is-hidden-touch">
|
3
|
+
<div class="navbar-link">
|
4
|
+
<%= image_tag current_user.avatar if current_user.avatar.attached? %>
|
5
|
+
<span><%= current_user.name %></span>
|
6
|
+
</div>
|
7
|
+
<div class="navbar-dropdown is-right">
|
8
|
+
<%= link_to '个人中心', { controller: '/my/home' }, class: active_helper(controllers: ['my/home'], active: 'navbar-item is-active', item: 'navbar-item') %>
|
9
|
+
<%= link_to '设置', { controller: '/board/home' }, class: active_helper(controllers: ['board/home'], active: 'navbar-item is-active', item: 'navbar-item') %>
|
10
|
+
<%= link_to '退出', { controller: '/auth/sign', action: 'logout' }, data: { confirm: '确认退出' }, class: 'navbar-item' %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<% elsif defined?(RailsAuth) %>
|
14
|
+
<%= link_to({ controller: '/auth/sign', action: 'sign' }, class: 'navbar-item') do %>
|
15
|
+
<i class="fa-light fa-user"></i>
|
16
|
+
<span>登陆/注册</span>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= form_with theme: 'weui', model: model, scope: model_name, url: { action: 'update' } do |f| %>
|
2
|
+
<div class="weui-form__control-area">
|
3
|
+
<div class="weui-cells__group weui-cells__group_form">
|
4
|
+
<div class="weui-cells">
|
5
|
+
<%= render partial: 'form', locals: { f: f } %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<%= f.submit %>
|
10
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% if target.errors.any? %>
|
2
|
+
<div class="notification is-danger">
|
3
|
+
<button class="delete"></button>
|
4
|
+
<div class="header"><%= target.errors.count %> <% if target.errors.count == 1 %> error <% else %> errors <% end %>: </div>
|
5
|
+
<ul class="list">
|
6
|
+
<% target.errors.full_messages.each do |msg| %>
|
7
|
+
<li><%= msg %></li>
|
8
|
+
<% end %>
|
9
|
+
</ul>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="weui-search-bar" data-controller="search">
|
2
|
+
<%= form_with theme: nil, class: 'weui-search-bar__form', method: :get do |f| %>
|
3
|
+
<div class="weui-search-bar__box">
|
4
|
+
<i class="weui-icon-search"></i>
|
5
|
+
<%= f.search_field 'name-like', value: params['name-like'], class: 'weui-search-bar__input', placeholder: '搜索', data: { search_target: 'input' } %>
|
6
|
+
<a class="weui-icon-clear" data-action="search#clear"></a>
|
7
|
+
</div>
|
8
|
+
<label class="weui-search-bar__label" data-search-target="label" data-action="click->search#focus">
|
9
|
+
<i class="weui-icon-search"></i>
|
10
|
+
<span>搜索</span>
|
11
|
+
</label>
|
12
|
+
<% end %>
|
13
|
+
<a class="weui-search-bar__cancel-btn" data-action="search#cancel">取消</a>
|
14
|
+
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: model_klass.new, url: { action: params[:action] } 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 %>
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<%= render 'filter_form' %>
|
2
|
+
<%= render 'filter_table' %>
|
3
|
+
<div class="buttons are-small mb-0 pt-2">
|
4
|
+
<%= render 'button' %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<table class="table is-striped is-hoverable is-fullwidth">
|
8
|
+
<thead>
|
9
|
+
<tr>
|
10
|
+
<% if defined? cache_key %>
|
11
|
+
<% cache cache_key do %>
|
12
|
+
<%= render 'index_thead' %>
|
13
|
+
<% end %>
|
14
|
+
<% else %>
|
15
|
+
<%= render 'index_thead' %>
|
16
|
+
<% end %>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody id="tbody" data-controller="sortable">
|
20
|
+
<%= yield %>
|
21
|
+
</tbody>
|
22
|
+
</table>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= render 'filter_form' %>
|
2
|
+
<%= render 'filter_table' %>
|
3
|
+
|
4
|
+
<div class="weui-panel">
|
5
|
+
<div class="weui-panel__hd"><%= t('.title') %></div>
|
6
|
+
<div class="weui-panel__bd">
|
7
|
+
<div class="weui-cells mt-0">
|
8
|
+
<%= yield %>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<%= render 'button' %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<%= render 'filter_form' %>
|
2
|
+
<%= render 'filter_table' %>
|
3
|
+
<div class="buttons are-small mb-0 pt-2">
|
4
|
+
<%= render 'button' %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<table class="table is-striped is-hoverable is-fullwidth">
|
8
|
+
<thead>
|
9
|
+
<tr>
|
10
|
+
<% if defined? cache_key %>
|
11
|
+
<% cache cache_key do %>
|
12
|
+
<%= render 'index_thead' %>
|
13
|
+
<% end %>
|
14
|
+
<% else %>
|
15
|
+
<%= render 'index_thead' %>
|
16
|
+
<% end %>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody id="tbody">
|
20
|
+
<%= yield %>
|
21
|
+
</tbody>
|
22
|
+
</table>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<tr id="tr_<%= model.id %>" 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: 'show', id: model.id }, data: { turbo_frame: 'modal' }, aria: { label: t('.show') }, class: 'button is-small is-rounded is-light') do %>
|
6
|
+
<i class="fa-light fa-circle-info"></i>
|
7
|
+
<% end %>
|
8
|
+
<%= link_to({ action: 'edit', id: model.id }, data: { turbo_frame: 'modal' }, aria: { label: t('.edit') }, class: 'button is-small is-rounded is-light') do %>
|
9
|
+
<i class="fa-light fa-pencil"></i>
|
10
|
+
<% end %>
|
11
|
+
<%= 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 %>
|
12
|
+
<i class="fa-light fa-trash"></i>
|
13
|
+
<% end %>
|
14
|
+
</span>
|
15
|
+
</td>
|
16
|
+
</tr>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%= render 'filter_form' %>
|
2
|
+
<%= render 'filter_table' %>
|
3
|
+
<div class="buttons are-small mb-0 pt-2">
|
4
|
+
<%= render 'button' %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<table class="table is-hoverable is-fullwidth">
|
8
|
+
<thead>
|
9
|
+
<tr>
|
10
|
+
<% cache cache_key do %>
|
11
|
+
<%= render 'index_thead' %>
|
12
|
+
<% end %>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody data-controller="tree">
|
16
|
+
<%= yield %>
|
17
|
+
</tbody>
|
18
|
+
</table>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="navbar-item has-dropdown is-hoverable is-hidden-touch">
|
2
|
+
<div class="navbar-link is-arrowless">
|
3
|
+
<i class="fa-light fa-globe"></i>
|
4
|
+
<span><%= t(I18n.locale) %></span>
|
5
|
+
</div>
|
6
|
+
<div class="navbar-dropdown">
|
7
|
+
<% Auth::User.options_i18n(:locale).each do |text, value| %>
|
8
|
+
<%= link_to text, { locale: value }, class: 'navbar-item' %>
|
9
|
+
<% end if defined? RailsAuth %>
|
10
|
+
</div>
|
11
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="modal" data-controller="modal">
|
2
|
+
<div class="modal-background" data-action="click->modal#close"></div>
|
3
|
+
<div class="modal-card">
|
4
|
+
<header class="modal-card-head">
|
5
|
+
<p class="modal-card-title"><%= t('.title') %></p>
|
6
|
+
<button class="delete" data-action="modal#close"></button>
|
7
|
+
</header>
|
8
|
+
<turbo-frame class="modal-card-body p-0" id="modal" data-action="turbo:frame-load->modal#loaded">
|
9
|
+
<% if defined? action %>
|
10
|
+
<%= render action %>
|
11
|
+
<% end %>
|
12
|
+
</turbo-frame>
|
13
|
+
</div>
|
14
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div id="modal_wrapper" class="modal" data-controller="modal">
|
2
|
+
<div class="modal-background" data-action="click->modal#close"></div>
|
3
|
+
<div class="modal-card">
|
4
|
+
<header class="modal-card-head">
|
5
|
+
<p class="modal-card-title"><%= t('.title') %></p>
|
6
|
+
<button class="delete" data-action="modal#close"></button>
|
7
|
+
</header>
|
8
|
+
<turbo-frame class="modal-card-body" id="modal">
|
9
|
+
<% if defined? action %>
|
10
|
+
<%= render action %>
|
11
|
+
<% end %>
|
12
|
+
</turbo-frame>
|
13
|
+
</div>
|
14
|
+
</div>
|
File without changes
|
File without changes
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<nav class="navbar is-dark" data-controller="navbar">
|
2
|
+
<div class="navbar-brand">
|
3
|
+
<%= render 'nav_brand' %>
|
4
|
+
<a class="navbar-burger" data-action="navbar#toggle">
|
5
|
+
<span aria-hidden="true"></span>
|
6
|
+
<span aria-hidden="true"></span>
|
7
|
+
<span aria-hidden="true"></span>
|
8
|
+
</a>
|
9
|
+
</div>
|
10
|
+
<div class="navbar-menu" data-navbar-target="menu">
|
11
|
+
<div class="navbar-start">
|
12
|
+
<% if defined?(current_user) && current_user %>
|
13
|
+
<%= render 'nav_with_login' %>
|
14
|
+
<% else %>
|
15
|
+
<%= render 'nav_without_login' %>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
18
|
+
<div class="navbar-end">
|
19
|
+
<%= render partial: 'locales' %>
|
20
|
+
<%= render partial: 'notice_navbar' if defined? RailsNotice %>
|
21
|
+
<%= render partial: 'org_navbar' if defined?(current_user) && current_user && defined?(RailsOrg) %>
|
22
|
+
<%= render partial: 'auth_navbar' %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</nav>
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= form_with theme: 'weui', model: model, scope: model_name, url: { action: 'create' } do |f| %>
|
2
|
+
<div class="weui-form__control-area">
|
3
|
+
<div class="weui-cells__group weui-cells__group_form">
|
4
|
+
<div class="weui-cells">
|
5
|
+
<%= render partial: 'form', locals: { f: f } %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<%= f.submit %>
|
10
|
+
<% end %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<table class="table is-fullwidth is-hoverable as-show">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th class="has-text-left">
|
5
|
+
<%= link_to({ action: 'index' }, class: 'button is-borderless') do %>
|
6
|
+
<i class="fa-light fa-angle-left fa-lg"></i>
|
7
|
+
<% end %>
|
8
|
+
</th>
|
9
|
+
<th class="has-text-right">
|
10
|
+
<button class="button is-borderless" data-controller="weui-actionsheet" data-weui-actionsheet-id-value="actionsheet" data-action="weui-actionsheet#toggle">
|
11
|
+
<i class="fa-light fa-ellipsis-h fa-lg"></i>
|
12
|
+
</button>
|
13
|
+
</th>
|
14
|
+
</tr>
|
15
|
+
</thead>
|
16
|
+
<tbody>
|
17
|
+
<%= render 'show_table' %>
|
18
|
+
</tbody>
|
19
|
+
</table>
|
20
|
+
<%= render 'actionsheet' %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<table class="table is-fullwidth is-hoverable as-show">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th>
|
5
|
+
<%= link_to t('.edit'), { action: 'edit' }, data: { turbo_frame: 'modal' }, class: 'button is-small is-link' %>
|
6
|
+
</th>
|
7
|
+
<th></th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<%= render 'show_table' %>
|
12
|
+
</tbody>
|
13
|
+
</table>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= turbo_stream.update 'alert', partial: 'alert' %>
|
@@ -0,0 +1 @@
|
|
1
|
+
json.partial! 'show'
|
File without changes
|