avo 0.4.7 → 0.5.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +36 -10
- data/Gemfile.lock +114 -88
- data/README.md +8 -0
- data/app/components/avo/common/badge_viewer_component.html.erb +24 -0
- data/app/components/avo/common/badge_viewer_component.rb +8 -0
- data/app/components/avo/common/boolean_check_component.html.erb +12 -0
- data/app/components/avo/common/boolean_check_component.rb +7 -0
- data/app/components/avo/common/boolean_group_component.html.erb +16 -0
- data/app/components/avo/common/boolean_group_component.rb +8 -0
- data/app/components/avo/common/files_list_viewer_component.html.erb +5 -0
- data/app/components/avo/common/files_list_viewer_component.rb +8 -0
- data/app/components/avo/common/gravatar_viewer_component.html.erb +12 -0
- data/app/components/avo/common/gravatar_viewer_component.rb +12 -0
- data/app/components/avo/common/heading_component.html.erb +13 -0
- data/app/components/avo/common/heading_component.rb +8 -0
- data/app/components/avo/common/multiple_file_viewer_component.html.erb +26 -0
- data/app/components/avo/common/multiple_file_viewer_component.rb +13 -0
- data/app/components/avo/common/single_file_viewer_component.html.erb +28 -0
- data/app/components/avo/common/single_file_viewer_component.rb +13 -0
- data/app/components/avo/common/status_viewer_component.html.erb +10 -0
- data/app/components/avo/common/status_viewer_component.rb +8 -0
- data/app/components/avo/edit/field_wrapper_component.html.erb +20 -0
- data/app/components/avo/edit/field_wrapper_component.rb +19 -0
- data/app/components/avo/edit/fields/belongs_to_field_component.html.erb +19 -0
- data/app/components/avo/edit/fields/belongs_to_field_component.rb +4 -0
- data/app/components/avo/edit/fields/boolean_field_component.html.erb +9 -0
- data/app/components/avo/edit/fields/boolean_field_component.rb +4 -0
- data/app/components/avo/edit/fields/boolean_group_field_component.html.erb +25 -0
- data/app/components/avo/edit/fields/boolean_group_field_component.rb +4 -0
- data/app/components/avo/edit/fields/code_field_component.html.erb +19 -0
- data/app/components/avo/edit/fields/code_field_component.rb +4 -0
- data/app/components/avo/edit/fields/country_field_component.html.erb +7 -0
- data/app/components/avo/edit/fields/country_field_component.rb +4 -0
- data/app/components/avo/edit/fields/date_field_component.html.erb +18 -0
- data/app/components/avo/edit/fields/date_field_component.rb +4 -0
- data/app/components/avo/edit/fields/date_time_field_component.html.erb +20 -0
- data/app/components/avo/edit/fields/date_time_field_component.rb +4 -0
- data/app/components/avo/edit/fields/external_image_field_component.html.erb +6 -0
- data/app/components/avo/edit/fields/external_image_field_component.rb +4 -0
- data/app/components/avo/edit/fields/field_component.rb +13 -0
- data/app/components/avo/edit/fields/file_field_component.html.erb +9 -0
- data/app/components/avo/edit/fields/file_field_component.rb +4 -0
- data/app/components/avo/edit/fields/files_field_component.html.erb +5 -0
- data/app/components/avo/edit/fields/files_field_component.rb +4 -0
- data/app/components/avo/edit/fields/heading_field_component.html.erb +3 -0
- data/app/components/avo/edit/fields/heading_field_component.rb +4 -0
- data/app/components/avo/edit/fields/hidden_field_component.html.erb +1 -0
- data/app/components/avo/edit/fields/hidden_field_component.rb +4 -0
- data/app/components/avo/edit/fields/id_field_component.html.erb +3 -0
- data/app/components/avo/edit/fields/id_field_component.rb +4 -0
- data/app/components/avo/edit/fields/markdown_field_component.html.erb +11 -0
- data/app/components/avo/edit/fields/markdown_field_component.rb +4 -0
- data/app/components/avo/edit/fields/number_field_component.html.erb +9 -0
- data/app/components/avo/edit/fields/number_field_component.rb +4 -0
- data/app/components/avo/edit/fields/password_field_component.html.erb +7 -0
- data/app/components/avo/edit/fields/password_field_component.rb +4 -0
- data/app/components/avo/edit/fields/select_field_component.html.erb +6 -0
- data/app/components/avo/edit/fields/select_field_component.rb +4 -0
- data/app/components/avo/edit/fields/status_field_component.html.erb +7 -0
- data/app/components/avo/edit/fields/status_field_component.rb +4 -0
- data/app/components/avo/edit/fields/text_field_component.html.erb +6 -0
- data/app/components/avo/edit/fields/text_field_component.rb +4 -0
- data/app/components/avo/edit/fields/textarea_field_component.html.erb +7 -0
- data/app/components/avo/edit/fields/textarea_field_component.rb +4 -0
- data/app/components/avo/edit/fields/trix_field_component.html.erb +11 -0
- data/app/components/avo/edit/fields/trix_field_component.rb +4 -0
- data/app/components/avo/index/field_wrapper_component.html.erb +7 -0
- data/app/components/avo/index/field_wrapper_component.rb +10 -0
- data/app/components/avo/index/fields/badge_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/badge_field_component.rb +4 -0
- data/app/components/avo/index/fields/belongs_to_field_component.html.erb +7 -0
- data/app/components/avo/index/fields/belongs_to_field_component.rb +4 -0
- data/app/components/avo/index/fields/boolean_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/boolean_field_component.rb +4 -0
- data/app/components/avo/index/fields/boolean_group_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/boolean_group_field_component.rb +4 -0
- data/app/components/avo/index/fields/country_field_component.html.erb +7 -0
- data/app/components/avo/index/fields/country_field_component.rb +4 -0
- data/app/components/avo/index/fields/date_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/date_field_component.rb +4 -0
- data/app/components/avo/index/fields/date_time_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/date_time_field_component.rb +4 -0
- data/app/components/avo/index/fields/external_image_field_component.html.erb +9 -0
- data/app/components/avo/index/fields/external_image_field_component.rb +4 -0
- data/app/components/avo/index/fields/field_component.html.erb +1 -0
- data/app/components/avo/index/fields/field_component.rb +11 -0
- data/app/components/avo/index/fields/file_field_component.html.erb +11 -0
- data/app/components/avo/index/fields/file_field_component.rb +4 -0
- data/app/components/avo/index/fields/files_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/files_field_component.rb +4 -0
- data/app/components/avo/index/fields/gravatar_field_component.html.erb +11 -0
- data/app/components/avo/index/fields/gravatar_field_component.rb +4 -0
- data/app/components/avo/index/fields/has_one_field_component.html.erb +7 -0
- data/app/components/avo/index/fields/has_one_field_component.rb +4 -0
- data/app/components/avo/index/fields/id_field_component.html.erb +10 -0
- data/app/components/avo/index/fields/id_field_component.rb +4 -0
- data/app/components/avo/index/fields/number_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/number_field_component.rb +4 -0
- data/app/components/avo/index/fields/select_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/select_field_component.rb +4 -0
- data/app/components/avo/index/fields/status_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/status_field_component.rb +4 -0
- data/app/components/avo/index/fields/text_field_component.html.erb +3 -0
- data/app/components/avo/index/fields/text_field_component.rb +4 -0
- data/app/components/avo/index/grid_item_component.html.erb +41 -0
- data/app/components/avo/index/grid_item_component.rb +31 -0
- data/app/components/avo/index/resource_controls_component.html.erb +56 -0
- data/app/components/avo/index/resource_controls_component.rb +39 -0
- data/app/components/avo/index/resource_grid_component.html.erb +13 -0
- data/app/components/avo/index/resource_grid_component.rb +10 -0
- data/app/components/avo/index/resource_table_component.html.erb +16 -0
- data/app/components/avo/index/resource_table_component.rb +10 -0
- data/app/components/avo/index/table_row_component.html.erb +18 -0
- data/app/components/avo/index/table_row_component.rb +11 -0
- data/app/components/avo/loading_component.html.erb +10 -0
- data/app/components/avo/loading_component.rb +7 -0
- data/app/components/avo/modal_component.html.erb +20 -0
- data/app/components/avo/modal_component.rb +5 -0
- data/app/components/avo/navigation_heading_component.html.erb +3 -0
- data/app/components/avo/navigation_heading_component.rb +7 -0
- data/app/components/avo/navigation_link_component.html.erb +3 -0
- data/app/components/avo/navigation_link_component.rb +10 -0
- data/app/components/avo/panel_component.html.erb +27 -0
- data/app/components/avo/panel_component.rb +20 -0
- data/app/components/avo/resource_component.rb +14 -0
- data/app/components/avo/show/field_wrapper_component.html.erb +16 -0
- data/app/components/avo/show/field_wrapper_component.rb +15 -0
- data/app/components/avo/show/fields/badge_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/badge_field_component.rb +4 -0
- data/app/components/avo/show/fields/belongs_to_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/belongs_to_field_component.rb +4 -0
- data/app/components/avo/show/fields/boolean_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/boolean_field_component.rb +4 -0
- data/app/components/avo/show/fields/boolean_group_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/boolean_group_field_component.rb +4 -0
- data/app/components/avo/show/fields/code_field_component.html.erb +19 -0
- data/app/components/avo/show/fields/code_field_component.rb +4 -0
- data/app/components/avo/show/fields/country_field_component.html.erb +7 -0
- data/app/components/avo/show/fields/country_field_component.rb +4 -0
- data/app/components/avo/show/fields/date_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/date_field_component.rb +4 -0
- data/app/components/avo/show/fields/date_time_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/date_time_field_component.rb +4 -0
- data/app/components/avo/show/fields/external_image_field_component.html.erb +5 -0
- data/app/components/avo/show/fields/external_image_field_component.rb +4 -0
- data/app/components/avo/show/fields/field_component.rb +11 -0
- data/app/components/avo/show/fields/file_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/file_field_component.rb +4 -0
- data/app/components/avo/show/fields/files_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/files_field_component.rb +4 -0
- data/app/components/avo/show/fields/gravatar_field_component.html.erb +7 -0
- data/app/components/avo/show/fields/gravatar_field_component.rb +4 -0
- data/app/components/avo/show/fields/has_many_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/has_many_field_component.rb +4 -0
- data/app/components/avo/show/fields/has_one_field_component.html.erb +19 -0
- data/app/components/avo/show/fields/has_one_field_component.rb +5 -0
- data/app/components/avo/show/fields/heading_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/heading_field_component.rb +4 -0
- data/app/components/avo/show/fields/id_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/id_field_component.rb +4 -0
- data/app/components/avo/show/fields/markdown_field_component.html.erb +10 -0
- data/app/components/avo/show/fields/markdown_field_component.rb +4 -0
- data/app/components/avo/show/fields/number_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/number_field_component.rb +4 -0
- data/app/components/avo/show/fields/select_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/select_field_component.rb +4 -0
- data/app/components/avo/show/fields/status_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/status_field_component.rb +4 -0
- data/app/components/avo/show/fields/text_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/text_field_component.rb +4 -0
- data/app/components/avo/show/fields/textarea_field_component.html.erb +3 -0
- data/app/components/avo/show/fields/textarea_field_component.rb +4 -0
- data/app/components/avo/show/fields/trix_field_component.html.erb +14 -0
- data/app/components/avo/show/fields/trix_field_component.rb +4 -0
- data/app/components/avo/views/resource_edit_component.html.erb +29 -0
- data/app/components/avo/views/resource_edit_component.rb +23 -0
- data/app/components/avo/views/resource_index_component.html.erb +62 -0
- data/app/components/avo/views/resource_index_component.rb +93 -0
- data/app/components/avo/views/resource_new_component.html.erb +25 -0
- data/app/components/avo/views/resource_new_component.rb +27 -0
- data/app/components/avo/views/resource_show_component.html.erb +64 -0
- data/app/components/avo/views/resource_show_component.rb +66 -0
- data/app/controllers/avo/actions_controller.rb +53 -22
- data/app/controllers/avo/application_controller.rb +183 -24
- data/app/controllers/avo/attachments_controller.rb +25 -0
- data/app/controllers/avo/base_controller.rb +229 -0
- data/app/controllers/avo/home_controller.rb +3 -0
- data/app/controllers/avo/relations_controller.rb +88 -19
- data/app/controllers/avo/resources_controller.rb +2 -259
- data/app/controllers/avo/search_controller.rb +7 -6
- data/app/frontend/css/alerts.css +35 -0
- data/app/frontend/css/application.css +73 -0
- data/app/frontend/css/components/code.css +27 -0
- data/app/frontend/css/components/status.css +30 -0
- data/app/frontend/css/fonts.css +26 -0
- data/app/frontend/css/loader.css +134 -0
- data/app/frontend/css/pagination.css +67 -0
- data/app/frontend/css/tailwindcss/base.css +1 -0
- data/app/frontend/css/tailwindcss/components.css +1 -0
- data/app/frontend/css/tailwindcss/utilities.css +1 -0
- data/app/frontend/css/tooltips.css +105 -0
- data/app/frontend/css/typography.css +23 -0
- data/app/frontend/fonts/nunito-v16-latin-700.eot +0 -0
- data/app/frontend/fonts/nunito-v16-latin-700.svg +388 -0
- data/app/frontend/fonts/nunito-v16-latin-700.ttf +0 -0
- data/app/frontend/fonts/nunito-v16-latin-700.woff +0 -0
- data/app/frontend/fonts/nunito-v16-latin-700.woff2 +0 -0
- data/app/frontend/fonts/nunito-v16-latin-regular.eot +0 -0
- data/app/frontend/fonts/nunito-v16-latin-regular.svg +380 -0
- data/app/frontend/fonts/nunito-v16-latin-regular.ttf +0 -0
- data/app/frontend/fonts/nunito-v16-latin-regular.woff +0 -0
- data/app/frontend/fonts/nunito-v16-latin-regular.woff2 +0 -0
- data/app/frontend/images/logo.png +0 -0
- data/app/frontend/importmap.json.erb +5 -0
- data/app/frontend/js/controllers/action_controller.js +32 -0
- data/app/frontend/js/controllers/actions_picker_controller.js +44 -0
- data/app/frontend/js/controllers/alerts_controller.js +26 -0
- data/app/frontend/js/controllers/attachments_controller.js +9 -0
- data/app/frontend/js/controllers/boolean_filter_controller.js +21 -0
- data/app/frontend/js/controllers/fields/code_field_controller.js +35 -0
- data/app/frontend/js/controllers/fields/date_field_controller.js +53 -0
- data/app/frontend/js/controllers/fields/simple_mde_controller.js +26 -0
- data/app/frontend/js/controllers/filter_controller.js +52 -0
- data/app/frontend/js/controllers/hidden_input_controller.js +10 -0
- data/app/frontend/js/controllers/item_selector_controller.js +68 -0
- data/app/frontend/js/controllers/modal_controller.js +11 -0
- data/app/frontend/js/controllers/per_page_controller.js +9 -0
- data/app/frontend/js/controllers/select_filter_controller.js +15 -0
- data/app/frontend/js/controllers/tippy_controller.js +14 -0
- data/app/frontend/js/controllers/toggle_panel_controller.js +18 -0
- data/app/frontend/js/helpers/cast_boolean.js +2 -0
- data/app/frontend/js/toastr.js +9 -0
- data/app/frontend/packs/application.js +45 -0
- data/{public/avo-packs/media/svgs/arrow-circle-right-1ad1e15ec9a7aa54b67d126566a5aa2d.svg → app/frontend/svgs/arrow-circle-right.svg} +0 -0
- data/{public/avo-packs/media/svgs/arrow-left-0e8e808ff771a62a348d0232c8ccf539.svg → app/frontend/svgs/arrow-left.svg} +0 -0
- data/{public/avo-packs/media/svgs/avocado-bca389be7cf81162df902dfbd09b8adb.svg → app/frontend/svgs/avocado.svg} +0 -0
- data/app/frontend/svgs/badge-check-sm.svg +3 -0
- data/{public/avo-packs/media/svgs/check-circle-be9e4dcbd25467ae9a3d3c6c5c7a09fa.svg → app/frontend/svgs/check-circle.svg} +0 -0
- data/{public/avo-packs/media/svgs/chevron-down-01208b17a1f70a1bb8d82bba131da4f4.svg → app/frontend/svgs/chevron-down.svg} +0 -0
- data/{public/avo-packs/media/svgs/chevron-up-25ecf340dd76966d5ed63c85c025befc.svg → app/frontend/svgs/chevron-up.svg} +0 -0
- data/{public/avo-packs/media/svgs/code-69010c6ddb6ad50be8677f16468c51f8.svg → app/frontend/svgs/code.svg} +0 -0
- data/{public/avo-packs/media/svgs/color-swatch-60cf90fb6b5386e38f3b003f34e7ecbe.svg → app/frontend/svgs/color-swatch.svg} +0 -0
- data/app/frontend/svgs/document-text.svg +3 -0
- data/{public/avo-packs/media/svgs/download-c6ae3f12364a467c28cbf41dc90afbdd.svg → app/frontend/svgs/download.svg} +0 -0
- data/{public/avo-packs/media/svgs/edit-46c6dbef52ba6ddfc9afbc37186dfa2b.svg → app/frontend/svgs/edit.svg} +0 -0
- data/app/frontend/svgs/exclamation-circle-sm.svg +3 -0
- data/app/frontend/svgs/exclamation-sm.svg +3 -0
- data/{public/avo-packs/media/svgs/exclamation-8d1c0baa390a8df9bb52176011eb5892.svg → app/frontend/svgs/exclamation.svg} +0 -0
- data/{public/avo-packs/media/svgs/eye-cc6f85c70ebed6929712a5c7d51f102d.svg → app/frontend/svgs/eye.svg} +0 -0
- data/{public/avo-packs/media/svgs/filter-0007cddbc85cfe207f9876d4d184444a.svg → app/frontend/svgs/filter.svg} +0 -0
- data/{public/avo-packs/media/svgs/fire-782f08df79993311b6d907e12d9ebe9f.svg → app/frontend/svgs/fire.svg} +0 -0
- data/{public/avo-packs/media/svgs/game-board-6c59fe04181ac9954356c9f1f4d28053.svg → app/frontend/svgs/game-board.svg} +0 -0
- data/{public/avo-packs/media/svgs/globe-dfd9977c9d65814d2fc576904406dd08.svg → app/frontend/svgs/globe.svg} +0 -0
- data/app/frontend/svgs/information-circle-sm.svg +3 -0
- data/app/frontend/svgs/information-circle.svg +1 -0
- data/{public/avo-packs/media/svgs/library-7d391192a15da64fbb527908c9e035c7.svg → app/frontend/svgs/library.svg} +0 -0
- data/{public/avo-packs/media/svgs/photograph-9f37f1f5e6a48e68ce3b7d9cbe7b6fad.svg → app/frontend/svgs/photograph.svg} +0 -0
- data/app/frontend/svgs/play.svg +1 -0
- data/{public/avo-packs/media/svgs/plus-circle-b379b2a2aa803511ae5945b6fd323204.svg → app/frontend/svgs/plus-circle.svg} +0 -0
- data/{public/avo-packs/media/svgs/plus-530f0af27b9f1a4552454233c2f9a641.svg → app/frontend/svgs/plus.svg} +0 -0
- data/{public/avo-packs/media/svgs/question-mark-circle-3ece1d61091827910cdd097db711062b.svg → app/frontend/svgs/question-mark-circle.svg} +0 -0
- data/{public/avo-packs/media/svgs/save-e54acd7ac9646053e36382776f822756.svg → app/frontend/svgs/save.svg} +0 -0
- data/{public/avo-packs/media/svgs/selector-b43b3957d7cc121d06be14312613c218.svg → app/frontend/svgs/selector.svg} +0 -0
- data/{public/avo-packs/media/svgs/sort-ascending-f5bc0761702809cab20b0ea3065cb88a.svg → app/frontend/svgs/sort-ascending.svg} +0 -0
- data/{public/avo-packs/media/svgs/sort-descending-1c8ddc56c72be6781e59d808f9d06203.svg → app/frontend/svgs/sort-descending.svg} +0 -0
- data/{public/avo-packs/media/svgs/switch-horizontal-d23337f0fb533a86d14b746d25ad48ae.svg → app/frontend/svgs/switch-horizontal.svg} +0 -0
- data/{public/avo-packs/media/svgs/thumbs-down-44f83eacbf5b8fe0f2f085da75866ce0.svg → app/frontend/svgs/thumbs-down.svg} +0 -0
- data/{public/avo-packs/media/svgs/thumbs-up-b866900017db179b50d6b19a1424ed25.svg → app/frontend/svgs/thumbs-up.svg} +0 -0
- data/app/frontend/svgs/times.svg +3 -0
- data/app/frontend/svgs/trash-sm.svg +3 -0
- data/{public/avo-packs/media/svgs/trash-a61412a066e358bcc24494a5080b7255.svg → app/frontend/svgs/trash.svg} +0 -0
- data/{public/avo-packs/media/svgs/view-grid-add-d0ee477a044e5d46c0c62af66cb6de77.svg → app/frontend/svgs/view-grid-add.svg} +0 -0
- data/{public/avo-packs/media/svgs/view-grid-393669034db69f59497616d5416ae411.svg → app/frontend/svgs/view-grid.svg} +0 -0
- data/{public/avo-packs/media/svgs/view-list-8a7a159ca5d892f72cf8c6744a2074e2.svg → app/frontend/svgs/view-list.svg} +0 -0
- data/{public/avo-packs/media/svgs/x-circle-c540f9ccfe937ad9b4f662e0b65e47e2.svg → app/frontend/svgs/x-circle.svg} +0 -0
- data/app/helpers/avo/actions_helper.rb +4 -0
- data/app/helpers/avo/application_helper.rb +156 -3
- data/app/helpers/avo/attachments_helper.rb +4 -0
- data/app/helpers/avo/resources_helper.rb +101 -0
- data/app/views/avo/actions/show.html.erb +71 -0
- data/app/views/avo/attachments/show.html.erb +7 -0
- data/app/views/avo/base/_actions.html.erb +36 -0
- data/app/views/avo/base/_boolean_filter.html.erb +33 -0
- data/app/views/avo/base/_filters.html.erb +37 -0
- data/app/views/avo/base/_select_filter.html.erb +20 -0
- data/app/views/avo/base/edit.html.erb +1 -0
- data/app/views/avo/base/index.html.erb +15 -0
- data/app/views/avo/base/new.html.erb +1 -0
- data/app/views/avo/base/show.html.erb +3 -0
- data/app/views/avo/home/_actions.html.erb +16 -0
- data/app/views/avo/home/_docs.html.erb +9 -0
- data/app/views/avo/home/_filters.html.erb +16 -0
- data/app/views/avo/home/_resources.html.erb +29 -0
- data/app/views/avo/home/index.html.erb +54 -3
- data/app/views/avo/partials/_a_button.html.erb +7 -0
- data/app/views/avo/partials/_a_link.html.erb +7 -0
- data/app/views/avo/partials/_alert.html.erb +1 -0
- data/app/views/avo/partials/_alerts.html.erb +3 -0
- data/app/views/avo/partials/_empty_state.html.erb +17 -0
- data/app/views/{partials → avo/partials}/_footer.html.erb +0 -0
- data/app/views/{partials → avo/partials}/_header.html.erb +0 -0
- data/app/views/avo/partials/_javascript.html.erb +3 -0
- data/app/views/{partials → avo/partials}/_logo.html.erb +0 -0
- data/app/views/avo/partials/_paginator.html.erb +30 -0
- data/app/views/avo/partials/_sortable_component.html.erb +14 -0
- data/app/views/avo/partials/_table_header.html.erb +50 -0
- data/app/views/avo/partials/_view_toggle_button.html.erb +17 -0
- data/app/views/avo/relations/new.html.erb +29 -0
- data/app/views/avo/sidebar/_license_warning.html.erb +12 -0
- data/app/views/avo/sidebar/_license_warnings.html.erb +6 -0
- data/app/views/avo/sidebar/_sidebar.html.erb +23 -0
- data/app/views/kaminari/_first_page.html.erb +3 -0
- data/app/views/kaminari/_last_page.html.erb +3 -0
- data/app/views/kaminari/_next_page.html.erb +9 -0
- data/app/views/kaminari/_page.html.erb +12 -0
- data/app/views/kaminari/_prev_page.html.erb +9 -0
- data/app/views/layouts/avo/_filter_wrapper.html.erb +8 -0
- data/app/views/layouts/avo/application.html.erb +28 -40
- data/app/views/layouts/avo/application_vue.html.erb +61 -0
- data/avo.gemspec +5 -2
- data/bin/helpers.rb +34 -0
- data/bin/init +35 -0
- data/bin/rspec +8 -0
- data/bin/spring +17 -0
- data/bin/test +21 -0
- data/bin/webpack +9 -10
- data/bin/webpack-dev-server +9 -10
- data/config/cable.yml +11 -0
- data/config/initializers/inline_svg.rb +33 -0
- data/config/initializers/pagy.rb +1 -0
- data/config/routes.rb +22 -18
- data/config/spring.rb +7 -0
- data/config/webpack/environment.js +14 -10
- data/config/webpacker.yml +5 -4
- data/config/webpacker_packed.yml +86 -0
- data/db/factories.rb +10 -3
- data/db/migrate/20210305082639_add_url_to_teams.rb +5 -0
- data/lib/avo.rb +3 -0
- data/lib/avo/app/action.rb +50 -61
- data/lib/avo/app/actions_loader.rb +11 -0
- data/lib/avo/app/app.rb +57 -45
- data/lib/avo/app/fields/badge_field.rb +3 -30
- data/lib/avo/app/fields/belongs_to.rb +38 -50
- data/lib/avo/app/fields/boolean_field.rb +8 -10
- data/lib/avo/app/fields/boolean_group_field.rb +13 -11
- data/lib/avo/app/fields/code_field.rb +11 -9
- data/lib/avo/app/fields/country_field.rb +12 -21
- data/lib/avo/app/fields/currency_field.rb +1 -2
- data/lib/avo/app/fields/date_field.rb +16 -11
- data/lib/avo/app/fields/date_time_field.rb +38 -0
- data/lib/avo/app/fields/external_image_field.rb +24 -0
- data/lib/avo/app/fields/field.rb +76 -84
- data/lib/avo/app/fields/field_extensions/visible_in_different_views.rb +5 -5
- data/lib/avo/app/fields/file_field.rb +8 -14
- data/lib/avo/app/fields/files_field.rb +10 -18
- data/lib/avo/app/fields/gravatar_field.rb +18 -13
- data/lib/avo/app/fields/has_and_belongs_to_many.rb +13 -24
- data/lib/avo/app/fields/has_many.rb +13 -26
- data/lib/avo/app/fields/has_one.rb +23 -30
- data/lib/avo/app/fields/heading_field.rb +2 -8
- data/lib/avo/app/fields/hidden_field.rb +2 -2
- data/lib/avo/app/fields/id_field.rb +2 -8
- data/lib/avo/app/fields/key_value_field.rb +5 -2
- data/lib/avo/app/fields/markdown_field.rb +1 -1
- data/lib/avo/app/fields/number_field.rb +5 -12
- data/lib/avo/app/fields/password_field.rb +1 -1
- data/lib/avo/app/fields/select_field.rb +33 -10
- data/lib/avo/app/fields/status_field.rb +9 -7
- data/lib/avo/app/fields/text_field.rb +1 -8
- data/lib/avo/app/fields/textarea_field.rb +2 -9
- data/lib/avo/app/fields/trix_field.rb +3 -7
- data/lib/avo/app/fields_loader.rb +29 -0
- data/lib/avo/app/filter.rb +0 -11
- data/lib/avo/app/licensing/hq.rb +3 -3
- data/lib/avo/app/licensing/license.rb +1 -1
- data/lib/avo/app/resource.rb +184 -126
- data/lib/avo/app/services/authorization_service.rb +68 -6
- data/lib/avo/app/services/panel_service.rb +25 -0
- data/lib/avo/configuration.rb +6 -0
- data/lib/avo/engine.rb +4 -1
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/controller_generator.rb +13 -0
- data/lib/generators/avo/locales_generator.rb +12 -0
- data/lib/generators/avo/partials_generator.rb +8 -0
- data/lib/generators/avo/resource_generator.rb +16 -2
- data/lib/generators/avo/templates/action.rb +3 -3
- data/lib/generators/avo/templates/filters/boolean_filter.rb +2 -2
- data/lib/generators/avo/templates/filters/select_filter.rb +2 -2
- data/lib/generators/avo/templates/initializer/avo.rb +3 -4
- data/lib/generators/avo/templates/locales/avo.en.yml +22 -1
- data/lib/generators/avo/templates/partials/_footer.html.erb +3 -0
- data/lib/generators/avo/templates/partials/_header.html.erb +1 -0
- data/lib/generators/avo/templates/{views → partials}/_logo.html.erb +0 -0
- data/lib/generators/avo/templates/{views → partials}/_scripts.html.erb +0 -0
- data/lib/generators/avo/templates/resource/%plural_name%_controller.tt +2 -0
- data/lib/generators/avo/templates/resource/%singular_name%.tt +20 -0
- data/public/avo-packs/css/application-3598cfbb.css +6 -0
- data/public/avo-packs/css/application-3598cfbb.css.br +0 -0
- data/public/avo-packs/css/application-3598cfbb.css.gz +0 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js +2 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.br +0 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.gz +0 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.map +1 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.map.br +0 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.map.gz +0 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js +26 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.LICENSE.txt +77 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.br +0 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.gz +0 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.map +1 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.map.br +0 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.map.gz +0 -0
- data/public/avo-packs/manifest.json +17 -46
- data/public/avo-packs/manifest.json.br +0 -0
- data/public/avo-packs/manifest.json.gz +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-700-2cc22f9c0cf217cbfc371f3b74992305.ttf +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-700-2cc22f9c0cf217cbfc371f3b74992305.ttf.br +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-700-2cc22f9c0cf217cbfc371f3b74992305.ttf.gz +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-700-35bd1c96bc2e402cf22ea812ae067995.svg +388 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-700-35bd1c96bc2e402cf22ea812ae067995.svg.br +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-700-35bd1c96bc2e402cf22ea812ae067995.svg.gz +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-700-412073df419ad5f6f8f2ea76eb4aced9.woff2 +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-700-7c472b19cb573f537bad8ef62ca917ac.woff +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-700-df7e79af617f98cd3b95d320e8b2a1af.eot +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-regular-00fbd8a72a3708b8314cce5f0515640e.svg +380 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-regular-00fbd8a72a3708b8314cce5f0515640e.svg.br +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-regular-00fbd8a72a3708b8314cce5f0515640e.svg.gz +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-regular-2fae1e2418251b68fe5d0505ab93dd5c.eot +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-regular-bcf84d6cb8a0ac214c8c14ba9af834f3.woff2 +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-regular-cb632c9fe211ba2c2bf1564c9a9295cc.woff +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-regular-df8c4bee41b6ca0ed2b7b71456ed7fbb.ttf +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-regular-df8c4bee41b6ca0ed2b7b71456ed7fbb.ttf.br +0 -0
- data/public/avo-packs/media/fonts/nunito-v16-latin-regular-df8c4bee41b6ca0ed2b7b71456ed7fbb.ttf.gz +0 -0
- metadata +427 -140
- data/app/controllers/avo/filters_controller.rb +0 -19
- data/app/controllers/avo/resource_overview_controller.rb +0 -24
- data/app/views/avo/home/router.html.erb +0 -8
- data/app/views/layouts/avo/_javascript.html.erb +0 -8
- data/app/views/layouts/avo/_translations.html.erb +0 -5
- data/config/webpack/loaders/vue-post-css.js +0 -20
- data/config/webpack/loaders/vue-svg.js +0 -21
- data/config/webpack/loaders/vue.js +0 -6
- data/lib/avo/app/fields/datetime_field.rb +0 -34
- data/lib/avo/app/resource_actions.rb +0 -18
- data/lib/avo/app/resource_fields.rb +0 -26
- data/lib/avo/app/resource_filters.rb +0 -18
- data/lib/generators/avo/templates/resource.rb +0 -14
- data/lib/generators/avo/templates/views/_footer.html.erb +0 -3
- data/lib/generators/avo/templates/views/_header.html.erb +0 -1
- data/lib/generators/avo/views_generator.rb +0 -8
- data/public/avo-packs/css/application-c9595d99.css +0 -3
- data/public/avo-packs/css/application-c9595d99.css.br +0 -0
- data/public/avo-packs/css/application-c9595d99.css.gz +0 -0
- data/public/avo-packs/js/application-144b5ffff4c561077ba5.js +0 -3
- data/public/avo-packs/js/application-144b5ffff4c561077ba5.js.LICENSE.txt +0 -767
- data/public/avo-packs/js/application-144b5ffff4c561077ba5.js.br +0 -0
- data/public/avo-packs/js/application-144b5ffff4c561077ba5.js.gz +0 -0
- data/public/avo-packs/js/application-144b5ffff4c561077ba5.js.map +0 -1
- data/public/avo-packs/js/application-144b5ffff4c561077ba5.js.map.br +0 -0
- data/public/avo-packs/js/application-144b5ffff4c561077ba5.js.map.gz +0 -0
- data/public/avo-packs/media/font/fontello-068ca2b3.ttf +0 -0
- data/public/avo-packs/media/font/fontello-068ca2b3.ttf.br +0 -0
- data/public/avo-packs/media/font/fontello-068ca2b3.ttf.gz +0 -0
- data/public/avo-packs/media/font/fontello-8d4a4e6f.woff2 +0 -0
- data/public/avo-packs/media/font/fontello-9354499c.svg +0 -72
- data/public/avo-packs/media/font/fontello-9354499c.svg.br +0 -0
- data/public/avo-packs/media/font/fontello-9354499c.svg.gz +0 -0
- data/public/avo-packs/media/font/fontello-a782baa8.woff +0 -0
- data/public/avo-packs/media/font/fontello-e73a0647.eot +0 -0
- data/public/avo-packs/media/font/fontello-e73a0647.eot.br +0 -0
- data/public/avo-packs/media/font/fontello-e73a0647.eot.gz +0 -0
- data/public/avo-packs/media/svgs/arrow-circle-right-1ad1e15ec9a7aa54b67d126566a5aa2d.svg.br +0 -0
- data/public/avo-packs/media/svgs/arrow-circle-right-1ad1e15ec9a7aa54b67d126566a5aa2d.svg.gz +0 -0
- data/public/avo-packs/media/svgs/arrow-left-0e8e808ff771a62a348d0232c8ccf539.svg.br +0 -0
- data/public/avo-packs/media/svgs/avocado-bca389be7cf81162df902dfbd09b8adb.svg.br +0 -0
- data/public/avo-packs/media/svgs/avocado-bca389be7cf81162df902dfbd09b8adb.svg.gz +0 -0
- data/public/avo-packs/media/svgs/check-circle-be9e4dcbd25467ae9a3d3c6c5c7a09fa.svg.br +0 -0
- data/public/avo-packs/media/svgs/chevron-down-01208b17a1f70a1bb8d82bba131da4f4.svg.br +0 -0
- data/public/avo-packs/media/svgs/chevron-down-01208b17a1f70a1bb8d82bba131da4f4.svg.gz +0 -0
- data/public/avo-packs/media/svgs/chevron-up-25ecf340dd76966d5ed63c85c025befc.svg.br +0 -0
- data/public/avo-packs/media/svgs/chevron-up-25ecf340dd76966d5ed63c85c025befc.svg.gz +0 -0
- data/public/avo-packs/media/svgs/code-69010c6ddb6ad50be8677f16468c51f8.svg.br +0 -0
- data/public/avo-packs/media/svgs/color-swatch-60cf90fb6b5386e38f3b003f34e7ecbe.svg.br +0 -0
- data/public/avo-packs/media/svgs/color-swatch-60cf90fb6b5386e38f3b003f34e7ecbe.svg.gz +0 -0
- data/public/avo-packs/media/svgs/download-c6ae3f12364a467c28cbf41dc90afbdd.svg.br +0 -0
- data/public/avo-packs/media/svgs/download-c6ae3f12364a467c28cbf41dc90afbdd.svg.gz +0 -0
- data/public/avo-packs/media/svgs/edit-46c6dbef52ba6ddfc9afbc37186dfa2b.svg.br +0 -0
- data/public/avo-packs/media/svgs/edit-46c6dbef52ba6ddfc9afbc37186dfa2b.svg.gz +0 -0
- data/public/avo-packs/media/svgs/exclamation-8d1c0baa390a8df9bb52176011eb5892.svg.br +0 -0
- data/public/avo-packs/media/svgs/exclamation-8d1c0baa390a8df9bb52176011eb5892.svg.gz +0 -0
- data/public/avo-packs/media/svgs/eye-cc6f85c70ebed6929712a5c7d51f102d.svg.br +0 -1
- data/public/avo-packs/media/svgs/eye-cc6f85c70ebed6929712a5c7d51f102d.svg.gz +0 -0
- data/public/avo-packs/media/svgs/filter-0007cddbc85cfe207f9876d4d184444a.svg.br +0 -0
- data/public/avo-packs/media/svgs/filter-0007cddbc85cfe207f9876d4d184444a.svg.gz +0 -0
- data/public/avo-packs/media/svgs/fire-782f08df79993311b6d907e12d9ebe9f.svg.br +0 -0
- data/public/avo-packs/media/svgs/fire-782f08df79993311b6d907e12d9ebe9f.svg.gz +0 -0
- data/public/avo-packs/media/svgs/game-board-6c59fe04181ac9954356c9f1f4d28053.svg.br +0 -0
- data/public/avo-packs/media/svgs/game-board-6c59fe04181ac9954356c9f1f4d28053.svg.gz +0 -0
- data/public/avo-packs/media/svgs/globe-dfd9977c9d65814d2fc576904406dd08.svg.br +0 -0
- data/public/avo-packs/media/svgs/globe-dfd9977c9d65814d2fc576904406dd08.svg.gz +0 -0
- data/public/avo-packs/media/svgs/library-7d391192a15da64fbb527908c9e035c7.svg.br +0 -0
- data/public/avo-packs/media/svgs/photograph-9f37f1f5e6a48e68ce3b7d9cbe7b6fad.svg.br +0 -2
- data/public/avo-packs/media/svgs/photograph-9f37f1f5e6a48e68ce3b7d9cbe7b6fad.svg.gz +0 -0
- data/public/avo-packs/media/svgs/plus-530f0af27b9f1a4552454233c2f9a641.svg.br +0 -0
- data/public/avo-packs/media/svgs/plus-circle-b379b2a2aa803511ae5945b6fd323204.svg.br +0 -0
- data/public/avo-packs/media/svgs/question-mark-circle-3ece1d61091827910cdd097db711062b.svg.br +0 -0
- data/public/avo-packs/media/svgs/question-mark-circle-3ece1d61091827910cdd097db711062b.svg.gz +0 -0
- data/public/avo-packs/media/svgs/save-e54acd7ac9646053e36382776f822756.svg.br +0 -0
- data/public/avo-packs/media/svgs/save-e54acd7ac9646053e36382776f822756.svg.gz +0 -0
- data/public/avo-packs/media/svgs/selector-b43b3957d7cc121d06be14312613c218.svg.br +0 -0
- data/public/avo-packs/media/svgs/sort-ascending-f5bc0761702809cab20b0ea3065cb88a.svg.br +0 -0
- data/public/avo-packs/media/svgs/sort-descending-1c8ddc56c72be6781e59d808f9d06203.svg.br +0 -0
- data/public/avo-packs/media/svgs/switch-horizontal-d23337f0fb533a86d14b746d25ad48ae.svg.br +0 -2
- data/public/avo-packs/media/svgs/switch-horizontal-d23337f0fb533a86d14b746d25ad48ae.svg.gz +0 -0
- data/public/avo-packs/media/svgs/thumbs-down-44f83eacbf5b8fe0f2f085da75866ce0.svg.br +0 -0
- data/public/avo-packs/media/svgs/thumbs-down-44f83eacbf5b8fe0f2f085da75866ce0.svg.gz +0 -0
- data/public/avo-packs/media/svgs/thumbs-up-b866900017db179b50d6b19a1424ed25.svg.br +0 -4
- data/public/avo-packs/media/svgs/thumbs-up-b866900017db179b50d6b19a1424ed25.svg.gz +0 -0
- data/public/avo-packs/media/svgs/times-539256e95a00360c3bbc6160c6b695cd.svg +0 -1
- data/public/avo-packs/media/svgs/times-539256e95a00360c3bbc6160c6b695cd.svg.br +0 -0
- data/public/avo-packs/media/svgs/times-539256e95a00360c3bbc6160c6b695cd.svg.gz +0 -0
- data/public/avo-packs/media/svgs/trash-a61412a066e358bcc24494a5080b7255.svg.br +0 -0
- data/public/avo-packs/media/svgs/trash-a61412a066e358bcc24494a5080b7255.svg.gz +0 -0
- data/public/avo-packs/media/svgs/view-grid-393669034db69f59497616d5416ae411.svg.br +0 -1
- data/public/avo-packs/media/svgs/view-grid-393669034db69f59497616d5416ae411.svg.gz +0 -0
- data/public/avo-packs/media/svgs/view-grid-add-d0ee477a044e5d46c0c62af66cb6de77.svg.br +0 -0
- data/public/avo-packs/media/svgs/view-grid-add-d0ee477a044e5d46c0c62af66cb6de77.svg.gz +0 -0
- data/public/avo-packs/media/svgs/view-list-8a7a159ca5d892f72cf8c6744a2074e2.svg.br +0 -3
- data/public/avo-packs/media/svgs/view-list-8a7a159ca5d892f72cf8c6744a2074e2.svg.gz +0 -0
- data/public/avo-packs/media/svgs/x-circle-c540f9ccfe937ad9b4f662e0b65e47e2.svg.br +0 -0
- data/public/avo-packs/media/svgs/x-circle-c540f9ccfe937ad9b4f662e0b65e47e2.svg.gz +0 -0
@@ -0,0 +1,71 @@
|
|
1
|
+
<%= turbo_frame_tag "actions_show" do %>
|
2
|
+
<div
|
3
|
+
data-controller="action"
|
4
|
+
data-no-confirmation="<%= @action.no_confirmation %>"
|
5
|
+
data-action-target="controllerDiv"
|
6
|
+
data-resource-name="<%= @resource.model_class.model_name.route_key %>"
|
7
|
+
data-resource-id="<%= params[:id] %>"
|
8
|
+
class="hidden text-blue-gray-800"
|
9
|
+
>
|
10
|
+
<%= form_with scope: 'fields', url: "/avo/resources/#{@resource.model_class.model_name.route_key}/actions/#{@action.param_id}", data: {'turbo-frame': '_top', 'action-target': 'form'} do |form| %>
|
11
|
+
<%= render Avo::ModalComponent.new do |c| %>
|
12
|
+
<% c.with :heading do %>
|
13
|
+
<%= @action.name %>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<div class="flex-1 flex items-center justify-center px-8 text-lg mt-8 mb-12">
|
17
|
+
<%= @action.message %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<%= form.hidden_field :resource_ids, value: params[:resource_ids], 'data-action-target': 'resourceIds' %>
|
21
|
+
|
22
|
+
<% if @action.get_fields.present? %>
|
23
|
+
<% @action.get_fields.each_with_index do |field, index| %>
|
24
|
+
<%= edit_field field, index, nil, form, displayed_in_modal: true %>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<% c.with :controls do %>
|
29
|
+
<%= a_button @action.cancel_text, 'data-action': 'click->modal#close', size: :sm %>
|
30
|
+
<%= a_button @action.confirm_text, type: :submit, color: :green, size: :sm %>
|
31
|
+
<% end %>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
<%#
|
38
|
+
<div v-if="hasFields">
|
39
|
+
<component
|
40
|
+
v-for="(field, index) in fields"
|
41
|
+
:key="uniqueKey(field, index)"
|
42
|
+
:index="index"
|
43
|
+
:is="`edit-${field.component}`"
|
44
|
+
:field="field"
|
45
|
+
:errors="errors"
|
46
|
+
:resource-name="resourceName"
|
47
|
+
:field-id="field.id"
|
48
|
+
:via-resource-name="viaResourceName"
|
49
|
+
:via-resource-id="viaResourceId"
|
50
|
+
:field-component="field.component"
|
51
|
+
displayed-in="modal"
|
52
|
+
/>
|
53
|
+
</div>
|
54
|
+
<div class="flex-1 flex items-center justify-center px-8 text-lg mt-8 mb-12" v-else>
|
55
|
+
{{ action.message }}
|
56
|
+
</div>
|
57
|
+
<div class="flex justify-end items-baseline space-x-4 p-4 bg-gray-200">
|
58
|
+
<a-button
|
59
|
+
size="sm"
|
60
|
+
@click="$emit('close')"
|
61
|
+
v-text="action.cancel_text"
|
62
|
+
/>
|
63
|
+
<a-button
|
64
|
+
ref="confirm-button"
|
65
|
+
:color="buttonColor"
|
66
|
+
size="sm"
|
67
|
+
@click="handle"
|
68
|
+
v-text="action.confirm_text"
|
69
|
+
/>
|
70
|
+
</div>
|
71
|
+
</div> %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= turbo_frame_tag 'destroy_attachment_form' do %>
|
2
|
+
<%= form_with url: "/avo/resources/#{params[:resource_name]}/#{params[:id]
|
3
|
+
}/active_storage_attachments/#{params[:attachment_name]}/#{params[:signed_attachment_id]}", method: :delete, html: {'data-turbo-frame': 'destroy_attachment_form', 'data-controller': 'attachments', 'data-attachments-target': 'form', class: 'hidden' } do |form| %>
|
4
|
+
<%= form.button 'destroy', type: :submit %>
|
5
|
+
<%= form.hidden_field :referrer, value: request.referer, id: "referrer_destroy_attachment_#{params[:signed_attachment_id]}" %>
|
6
|
+
<% end %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<% if @actions.count > 0 %>
|
2
|
+
<div class="relative z-30" data-controller="toggle-panel actions-picker">
|
3
|
+
<%= a_button class: "focus:outline-none",
|
4
|
+
color: 'light-blue',
|
5
|
+
'data-action': "click->toggle-panel#togglePanel",
|
6
|
+
'data-actions-dropdown-button': @resource.plural_name.downcase,
|
7
|
+
disabled: action_name != 'show' do
|
8
|
+
%>
|
9
|
+
<%= svg 'arrow-left', class: 'h-4 mr-1 transform -rotate-90' %> <%= t 'avo.actions' %>
|
10
|
+
<% end %>
|
11
|
+
<div
|
12
|
+
class="absolute block inset-auto right-0 top-full bg-white min-w-300px mt-2 py-4 z-20 shadow-context rounded-xl overflow-hidden hidden"
|
13
|
+
data-toggle-panel-target="panel"
|
14
|
+
>
|
15
|
+
<%
|
16
|
+
@actions.each_with_index do |action, index|
|
17
|
+
case action.class.superclass.to_s
|
18
|
+
when Avo::Filters::SelectFilter.to_s
|
19
|
+
template = 'select_action'
|
20
|
+
when Avo::Filters::BooleanFilter.to_s
|
21
|
+
template = 'boolean_action'
|
22
|
+
end
|
23
|
+
path = action_name == 'show' ?
|
24
|
+
"/avo/resources/#{@resource.model_class.model_name.route_key}/#{@model.id}/actions/#{action.param_id}" :
|
25
|
+
"/avo/resources/#{@resource.model_class.model_name.route_key}/actions/#{action.param_id}"
|
26
|
+
%>
|
27
|
+
<%= link_to path,
|
28
|
+
'data-turbo-frame': 'actions_show',
|
29
|
+
'data-action': 'click->actions-picker#visitAction',
|
30
|
+
class: 'flex items-center w-full py-2 px-4 font-bold text-gray-700 hover:text-white hover:bg-blue-500' do %>
|
31
|
+
<%= svg 'play', class: 'h-5 mr-1 inline' %> <%= action.name %>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<% end %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%
|
2
|
+
begin
|
3
|
+
decoded_filters_param = JSON.parse(Base64.decode64(params[:filters]))
|
4
|
+
set_value = decoded_filters_param[filter.class.to_s]
|
5
|
+
rescue => exception
|
6
|
+
if filter.default.present?
|
7
|
+
set_value = filter.default.stringify_keys
|
8
|
+
else
|
9
|
+
set_value = {}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
set_value = {} if set_value.nil?
|
13
|
+
%>
|
14
|
+
<div data-controller="boolean-filter">
|
15
|
+
<%= filter_wrapper name: filter.name, index: index do %>
|
16
|
+
<div class="flex items-center">
|
17
|
+
<div class="space-y-2">
|
18
|
+
<% filter.options.each do |value, label| %>
|
19
|
+
<label class="flex items-center text-gray-700 text-sm">
|
20
|
+
<%= check_box_tag filter.id, value, set_value[value.to_s],
|
21
|
+
class: 'mr-2 text-lg h-4 w-4',
|
22
|
+
'data-filter-class': filter.class,
|
23
|
+
'data-boolean-filter-target': 'option',
|
24
|
+
'data-action': 'input->boolean-filter#changeFilter'
|
25
|
+
%>
|
26
|
+
<%= label %>
|
27
|
+
</label>
|
28
|
+
<% end %>
|
29
|
+
</div>
|
30
|
+
<%= link_to 'url_redirect', request.url, data: { 'boolean-filter-target': 'urlRedirect', 'turbo-frame': params[:turbo_frame] }, style: 'hidden', class: 'hidden' %>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<div data-controller="toggle-panel">
|
2
|
+
<div class="relative w-full flex justify-between z-30">
|
3
|
+
<%= a_button class: 'focus:outline-none',
|
4
|
+
color: 'blue-gray',
|
5
|
+
title: t('avo.click_to_reveal_filters'),
|
6
|
+
'data-action': 'click->toggle-panel#togglePanel',
|
7
|
+
'data-tippy': 'tooltip' do
|
8
|
+
%>
|
9
|
+
<%= svg 'filter' %> <%= t 'avo.filters' %>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div
|
13
|
+
class="absolute block inset-auto right-0 top-full bg-white min-w-300px mt-2 z-20 shadow-context rounded-xl hidden"
|
14
|
+
data-toggle-panel-target="panel"
|
15
|
+
>
|
16
|
+
<%
|
17
|
+
@filters.each_with_index do |filter, index|
|
18
|
+
case filter.class.superclass.to_s
|
19
|
+
when Avo::Filters::SelectFilter.to_s
|
20
|
+
template = 'avo/base/select_filter'
|
21
|
+
when Avo::Filters::BooleanFilter.to_s
|
22
|
+
template = 'avo/base/boolean_filter'
|
23
|
+
end
|
24
|
+
%>
|
25
|
+
<%= render partial: template, locals: {filter: filter, index: index} %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<div class="p-4 border-gray-300 border-t">
|
29
|
+
<% if params[:filters].present? %>
|
30
|
+
<%= a_link t('avo.reset_filters'), resources_path(@resource.model_class, filters: nil, keep_query_params: true), color: 'blue-gray', class: 'w-full justify-center' %>
|
31
|
+
<% else %>
|
32
|
+
<%= a_button t('avo.reset_filters'), color: 'blue-gray', class: 'w-full justify-center', disabled: true %>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%
|
2
|
+
begin
|
3
|
+
decoded_filters_param = JSON.parse(Base64.decode64(params[:filters]))
|
4
|
+
set_value = decoded_filters_param[filter.class.to_s]
|
5
|
+
rescue => exception
|
6
|
+
set_value = filter.default
|
7
|
+
end
|
8
|
+
%>
|
9
|
+
<div data-controller="select-filter">
|
10
|
+
<%= filter_wrapper name: filter.name, index: index do %>
|
11
|
+
<%= select_tag filter.id, options_for_select(filter.options.invert, set_value),
|
12
|
+
class: input_classes('w-full mb-0'),
|
13
|
+
include_blank: '—',
|
14
|
+
'data-filter-class': filter.class,
|
15
|
+
'data-select-filter-target': 'selector',
|
16
|
+
'data-action': "change->select-filter#changeFilter"
|
17
|
+
%>
|
18
|
+
<%= link_to 'url_redirect', request.url, data: { 'select-filter-target': 'urlRedirect', 'turbo-frame': params[:turbo_frame] }, style: 'hidden', class: 'hidden' %>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render Avo::Views::ResourceEditComponent.new(resource: @resource) %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= turbo_frame_start params[:turbo_frame] %>
|
2
|
+
<%= render Avo::Views::ResourceIndexComponent.new(
|
3
|
+
resource: @resource,
|
4
|
+
resources: @resources,
|
5
|
+
models: @models,
|
6
|
+
pagy: @pagy,
|
7
|
+
index_params: @index_params,
|
8
|
+
filters: @filters,
|
9
|
+
actions: @actions,
|
10
|
+
reflection: @reflection,
|
11
|
+
turbo_frame: params[:turbo_frame],
|
12
|
+
parent_model: @parent_model,
|
13
|
+
)
|
14
|
+
%>
|
15
|
+
<%= turbo_frame_end params[:turbo_frame] %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render Avo::Views::ResourceNewComponent.new(resource: @resource, model: @model) %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div>
|
2
|
+
<h3>Actions</h3>
|
3
|
+
|
4
|
+
<div class="mt-2" data-controller="hidden-input">
|
5
|
+
Avo actions allow you to perform specific tasks on one or more of your records. For example, you might want to mark a user as inactive and optionally send a message that may be customized by the person that wants to run the action.
|
6
|
+
|
7
|
+
<strong class="cursor-pointer block mt-2" data-action="click->hidden-input#showContent">Generate action 👇</strong>
|
8
|
+
|
9
|
+
<div class="mt-2 hidden" data-hidden-input-target="content">
|
10
|
+
<code class="text-lg">Toggle published</code>
|
11
|
+
<div>
|
12
|
+
<code class="p-1 rounded bg-light-blue-500 text-white">bin/rails generate avo:action toggle_published</code>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<div>
|
2
|
+
<h3>Documentation</h3>
|
3
|
+
|
4
|
+
<div class="mt-2">
|
5
|
+
We take pride in our documentation. Please check it out to see what you can build with Avo
|
6
|
+
|
7
|
+
<a href="https://docs.avohq.io" class="text-bold cursor-pointer block mt-2">Check out the docs 👉</a>
|
8
|
+
</div>
|
9
|
+
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div>
|
2
|
+
<h3>Filters</h3>
|
3
|
+
|
4
|
+
<div class="mt-2" data-controller="hidden-input">
|
5
|
+
Filters allow you to better scope the index queries for records you are looking for.
|
6
|
+
|
7
|
+
<strong class="cursor-pointer block mt-2" data-action="click->hidden-input#showContent">Generate filter 👇</strong>
|
8
|
+
|
9
|
+
<div class="mt-2 hidden" data-hidden-input-target="content">
|
10
|
+
<code class="text-lg">Published filter</code>
|
11
|
+
<div>
|
12
|
+
<code class="p-1 rounded bg-light-blue-500 text-white">bin/rails generate avo:filter published_filter</code>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<%
|
2
|
+
Rails.application.eager_load!
|
3
|
+
models = ApplicationRecord.descendants
|
4
|
+
%>
|
5
|
+
<div>
|
6
|
+
<h3>Resources</h3>
|
7
|
+
|
8
|
+
<div>The primary goal of Avo is to administer your database records. To do that Avo, uses the concept of a <strong>Resource</strong>. Each Avo <strong>Resource</strong> corresponds to a <strong>Rails Model</strong>.</div>
|
9
|
+
|
10
|
+
<% if models.present? %>
|
11
|
+
<div class="mt-2" data-controller="hidden-input">
|
12
|
+
It seems you already have <%= models.count %> <%= 'model'.pluralize models.count %> in your app. You can generate resources for each one with the following commands.
|
13
|
+
|
14
|
+
<strong class="cursor-pointer block mt-2" data-action="click->hidden-input#showContent">Generate resources 👇</strong>
|
15
|
+
|
16
|
+
<div class="mt-2 hidden" data-hidden-input-target="content">
|
17
|
+
<% models.each do |model| %>
|
18
|
+
<code class="text-lg"><%= model.to_s %></code>
|
19
|
+
<div>
|
20
|
+
<code class="p-1 rounded bg-light-blue-500 text-white">bin/rails generate avo:resource <%= model.to_s %></code>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<% else %>
|
26
|
+
|
27
|
+
<% end %>
|
28
|
+
</div>
|
29
|
+
|
@@ -1,3 +1,54 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
1
|
+
<div class="flex flex-col">
|
2
|
+
<%= panel title: 'Welcome to Avo' do |c| %>
|
3
|
+
<% c.with :tools do %>
|
4
|
+
<div class="text-sm italic">This page is visible only in development. It will be hidden in other environments.</div>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<% c.with :body do %>
|
8
|
+
<div class="flex flex-col justify-between py-6 min-h-24">
|
9
|
+
<div class="px-6 space-y-4">
|
10
|
+
<h3>About</h3>
|
11
|
+
|
12
|
+
<p>
|
13
|
+
<strong>Avo</strong>'s mission is to make it easy for you to manage your content and build tools that are ready to deploy, all while using your favorite framework, Ruby on Rails.
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<h3>Vision</h3>
|
17
|
+
|
18
|
+
<p>
|
19
|
+
We have big plans for Avo to make it the default starting point of your application. We'll be releasing features as soon as their ready.
|
20
|
+
|
21
|
+
<ul class="grid sm:grid-cols-2 max-w-168">
|
22
|
+
<li><span class="mr-2">👍</span> Built with Hotwire</li>
|
23
|
+
<li><span class="mr-2">👍</span> Resources</li>
|
24
|
+
<li><span class="mr-2">👍</span> Ordering</li>
|
25
|
+
<li><span class="mr-2">👍</span> Filters</li>
|
26
|
+
<li><span class="mr-2">👍</span> Actions</li>
|
27
|
+
<li><span class="mr-2">👍</span> Grid view</li>
|
28
|
+
<li><span class="mr-2">👍</span> Authorization</li>
|
29
|
+
<li><span class="mr-2">👍</span> Localization</li>
|
30
|
+
<li><span class="mr-2">⏳</span> Custom tools</li>
|
31
|
+
<li><span class="mr-2">⏳</span> Custom fields</li>
|
32
|
+
<li><span class="mr-2">⏳</span> Search</li>
|
33
|
+
<li><span class="mr-2">🕐</span> Dashboards</li>
|
34
|
+
<li><span class="mr-2">🕐</span> Themes</li>
|
35
|
+
</ul>
|
36
|
+
</p>
|
37
|
+
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div class="px-6 mt-8">
|
41
|
+
<div class="space">
|
42
|
+
<%= render partial: 'resources' %>
|
43
|
+
<hr class="my-6">
|
44
|
+
<%= render partial: 'filters' %>
|
45
|
+
<hr class="my-6">
|
46
|
+
<%= render partial: 'actions' %>
|
47
|
+
<hr class="my-6">
|
48
|
+
<%= render partial: 'docs' %>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
53
|
+
<% end %>
|
54
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div data-controller="alerts" data-alerts-target="container" data-alert-type="<%= type %>" class="hidden"><%= message %></div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%
|
2
|
+
classes = 'absolute inset-auto left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2'
|
3
|
+
translation_tag = params[:related_name].present? ? 'avo.no_related_item_found' : 'avo.no_item_found'
|
4
|
+
label = t translation_tag, { item: resource_name }
|
5
|
+
%>
|
6
|
+
<div class="relative flex-1 py-12">
|
7
|
+
<div class="relative block text-gray-300 h-64 w-full">
|
8
|
+
<%= svg 'avocado', class: "#{classes} h-20 text-gray-400" %>
|
9
|
+
<%= svg 'code', class: "#{classes} h-8 -ml-20 -mt-12" %>
|
10
|
+
<%= svg 'fire', class: "#{classes} h-8 -ml-10 -mt-24" %>
|
11
|
+
<%= svg 'color-swatch', class: "#{classes} h-8 ml-8 -mt-24" %>
|
12
|
+
<%= svg 'globe', class: "#{classes} h-8 ml-20 -mt-12" %>
|
13
|
+
<%= svg 'library', class: "#{classes} h-8 -ml-20 mt-4" %>
|
14
|
+
<%= svg 'photograph', class: "#{classes} h-8 ml-20 mt-4" %>
|
15
|
+
</div>
|
16
|
+
<div class="relative block text-center text-lg text-gray-400 font-semibold -mt-10"><%= label %></div>
|
17
|
+
</div>
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<%
|
2
|
+
# @todo: add avo styling to paginator
|
3
|
+
per_page_options = [*Avo.configuration.per_page_steps, Avo.configuration.per_page.to_i, @index_params[:per_page].to_i].sort.uniq
|
4
|
+
%>
|
5
|
+
|
6
|
+
<div class="bg-white px-4 flex items-center justify-between aborder-t aborder-blue-gray-200 sm:px-6 rounded-xl">
|
7
|
+
<div class="hidden sm:flex-2 sm:flex sm:items-center sm:justify-between">
|
8
|
+
<div>
|
9
|
+
<div class="text-sm leading-5 text-blue-gray-600 flex items-center">
|
10
|
+
<div class="mr-2"><%== pagy_info @pagy %></div>
|
11
|
+
|
12
|
+
<div data-controller="per-page">
|
13
|
+
<div class="flex items-center">
|
14
|
+
<%= select_tag 'per_page', options_for_select(per_page_options, @index_params[:per_page]), class: 'appearance-none inline-flex bg-blue-gray-100 disabled:bg-blue-gray-400 disabled:cursor-not-allowed focus:bg-white text-blue-gray-700 disabled:text-blue-gray-600 rounded-md py-1 px-2 leading-tight border border-blue-gray-300 outline-none focus:border-blue-gray-400 outline w-16 mr-1 text-sm', 'data-per-page-target': 'selector', 'data-action': 'change->per-page#reload' %> <%= t('avo.per_page').downcase %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<% per_page_options.each do |option| %>
|
18
|
+
<%= link_to "Change to #{option} items per page", resources_path(@resource.model_class, per_page: option, keep_query_params: true), class: 'hidden', 'data-per-page-option': option, 'data-turbo-frame': turbo_frame %>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<div class="flex">
|
25
|
+
<div class="flex-2 sm:flex sm:items-center sm:justify-between">
|
26
|
+
<%# @todo: add first & last page. make the first and last buttons rounded %>
|
27
|
+
<%== pagy_nav @pagy %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|