avo 1.25.0 → 2.1.1
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 +10 -1
- data/Gemfile.lock +18 -3
- data/README.md +33 -28
- data/app/assets/stylesheets/avo.css +8 -3
- data/app/assets/stylesheets/css/breadcrumbs.css +6 -2
- data/app/assets/stylesheets/css/buttons.css +16 -0
- data/app/assets/stylesheets/css/fonts.css +42 -16
- data/app/assets/stylesheets/css/pagination.css +9 -9
- data/app/assets/stylesheets/css/search.css +18 -7
- data/app/assets/stylesheets/css/tooltips.css +1 -0
- data/app/assets/stylesheets/css/typography.css +4 -2
- data/app/assets/svgs/bell.svg +3 -0
- data/app/assets/svgs/dashboards-icon.svg +6 -0
- data/app/assets/svgs/detach.svg +8 -0
- data/app/assets/svgs/edit.svg +5 -1
- data/app/assets/svgs/grid-empty-state.svg +37 -0
- data/app/assets/svgs/grid-view-type.svg +5 -0
- data/app/assets/svgs/heroicons/outline/academic-cap.svg +5 -0
- data/app/assets/svgs/heroicons/outline/adjustments.svg +3 -0
- data/app/assets/svgs/heroicons/outline/annotation.svg +3 -0
- data/app/assets/svgs/heroicons/outline/archive.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-circle-down.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-circle-left.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-circle-right.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-circle-up.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-down.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-left.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-narrow-down.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-narrow-left.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-narrow-right.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-narrow-up.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-right.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-sm-down.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-sm-left.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-sm-right.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-sm-up.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrow-up.svg +3 -0
- data/app/assets/svgs/heroicons/outline/arrows-expand.svg +3 -0
- data/app/assets/svgs/heroicons/outline/at-symbol.svg +3 -0
- data/app/assets/svgs/heroicons/outline/backspace.svg +3 -0
- data/app/assets/svgs/heroicons/outline/badge-check.svg +3 -0
- data/app/assets/svgs/heroicons/outline/ban.svg +3 -0
- data/app/assets/svgs/heroicons/outline/beaker.svg +3 -0
- data/app/assets/svgs/heroicons/outline/bell.svg +3 -0
- data/app/assets/svgs/heroicons/outline/book-open.svg +3 -0
- data/app/assets/svgs/heroicons/outline/bookmark-alt.svg +3 -0
- data/app/assets/svgs/heroicons/outline/bookmark.svg +3 -0
- data/app/assets/svgs/heroicons/outline/briefcase.svg +3 -0
- data/app/assets/svgs/heroicons/outline/cake.svg +3 -0
- data/app/assets/svgs/heroicons/outline/calculator.svg +3 -0
- data/app/assets/svgs/heroicons/outline/calendar.svg +3 -0
- data/app/assets/svgs/heroicons/outline/camera.svg +4 -0
- data/app/assets/svgs/heroicons/outline/cash.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chart-bar.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chart-pie.svg +4 -0
- data/app/assets/svgs/heroicons/outline/chart-square-bar.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chat-alt-2.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chat-alt.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chat.svg +3 -0
- data/app/assets/svgs/heroicons/outline/check-circle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/check.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chevron-double-down.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chevron-double-left.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chevron-double-right.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chevron-double-up.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chevron-down.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chevron-left.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chevron-right.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chevron-up.svg +3 -0
- data/app/assets/svgs/heroicons/outline/chip.svg +3 -0
- data/app/assets/svgs/heroicons/outline/clipboard-check.svg +3 -0
- data/app/assets/svgs/heroicons/outline/clipboard-copy.svg +3 -0
- data/app/assets/svgs/heroicons/outline/clipboard-list.svg +3 -0
- data/app/assets/svgs/heroicons/outline/clipboard.svg +3 -0
- data/app/assets/svgs/heroicons/outline/clock.svg +3 -0
- data/app/assets/svgs/heroicons/outline/cloud-download.svg +3 -0
- data/app/assets/svgs/heroicons/outline/cloud-upload.svg +3 -0
- data/app/assets/svgs/heroicons/outline/cloud.svg +3 -0
- data/app/assets/svgs/heroicons/outline/code.svg +3 -0
- data/app/assets/svgs/heroicons/outline/cog.svg +4 -0
- data/app/assets/svgs/heroicons/outline/collection.svg +3 -0
- data/app/assets/svgs/heroicons/outline/color-swatch.svg +3 -0
- data/app/assets/svgs/heroicons/outline/credit-card.svg +3 -0
- data/app/assets/svgs/heroicons/outline/cube-transparent.svg +3 -0
- data/app/assets/svgs/heroicons/outline/cube.svg +3 -0
- data/app/assets/svgs/heroicons/outline/currency-bangladeshi.svg +3 -0
- data/app/assets/svgs/heroicons/outline/currency-dollar.svg +3 -0
- data/app/assets/svgs/heroicons/outline/currency-euro.svg +3 -0
- data/app/assets/svgs/heroicons/outline/currency-pound.svg +3 -0
- data/app/assets/svgs/heroicons/outline/currency-rupee.svg +3 -0
- data/app/assets/svgs/heroicons/outline/currency-yen.svg +3 -0
- data/app/assets/svgs/heroicons/outline/cursor-click.svg +3 -0
- data/app/assets/svgs/heroicons/outline/database.svg +3 -0
- data/app/assets/svgs/heroicons/outline/desktop-computer.svg +3 -0
- data/app/assets/svgs/heroicons/outline/device-mobile.svg +3 -0
- data/app/assets/svgs/heroicons/outline/device-tablet.svg +3 -0
- data/app/assets/svgs/heroicons/outline/document-add.svg +3 -0
- data/app/assets/svgs/heroicons/outline/document-download.svg +3 -0
- data/app/assets/svgs/heroicons/outline/document-duplicate.svg +3 -0
- data/app/assets/svgs/heroicons/outline/document-remove.svg +3 -0
- data/app/assets/svgs/heroicons/outline/document-report.svg +3 -0
- data/app/assets/svgs/heroicons/outline/document-search.svg +3 -0
- data/app/assets/svgs/heroicons/outline/document-text.svg +3 -0
- data/app/assets/svgs/heroicons/outline/document.svg +3 -0
- data/app/assets/svgs/heroicons/outline/dots-circle-horizontal.svg +3 -0
- data/app/assets/svgs/heroicons/outline/dots-horizontal.svg +3 -0
- data/app/assets/svgs/heroicons/outline/dots-vertical.svg +3 -0
- data/app/assets/svgs/heroicons/outline/download.svg +3 -0
- data/app/assets/svgs/heroicons/outline/duplicate.svg +3 -0
- data/app/assets/svgs/heroicons/outline/emoji-happy.svg +3 -0
- data/app/assets/svgs/heroicons/outline/emoji-sad.svg +3 -0
- data/app/assets/svgs/heroicons/outline/exclamation-circle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/exclamation.svg +3 -0
- data/app/assets/svgs/heroicons/outline/external-link.svg +3 -0
- data/app/assets/svgs/heroicons/outline/eye-off.svg +3 -0
- data/app/assets/svgs/heroicons/outline/eye.svg +4 -0
- data/app/assets/svgs/heroicons/outline/fast-forward.svg +3 -0
- data/app/assets/svgs/heroicons/outline/film.svg +3 -0
- data/app/assets/svgs/heroicons/outline/filter.svg +3 -0
- data/app/assets/svgs/heroicons/outline/finger-print.svg +3 -0
- data/app/assets/svgs/heroicons/outline/fire.svg +4 -0
- data/app/assets/svgs/heroicons/outline/flag.svg +3 -0
- data/app/assets/svgs/heroicons/outline/folder-add.svg +3 -0
- data/app/assets/svgs/heroicons/outline/folder-download.svg +3 -0
- data/app/assets/svgs/heroicons/outline/folder-open.svg +3 -0
- data/app/assets/svgs/heroicons/outline/folder-remove.svg +3 -0
- data/app/assets/svgs/heroicons/outline/folder.svg +3 -0
- data/app/assets/svgs/heroicons/outline/gift.svg +3 -0
- data/app/assets/svgs/heroicons/outline/globe-alt.svg +3 -0
- data/app/assets/svgs/heroicons/outline/globe.svg +3 -0
- data/app/assets/svgs/heroicons/outline/hand.svg +3 -0
- data/app/assets/svgs/heroicons/outline/hashtag.svg +3 -0
- data/app/assets/svgs/heroicons/outline/heart.svg +3 -0
- data/app/assets/svgs/heroicons/outline/home.svg +3 -0
- data/app/assets/svgs/heroicons/outline/identification.svg +3 -0
- data/app/assets/svgs/heroicons/outline/inbox-in.svg +3 -0
- data/app/assets/svgs/heroicons/outline/inbox.svg +3 -0
- data/app/assets/svgs/heroicons/outline/information-circle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/key.svg +3 -0
- data/app/assets/svgs/heroicons/outline/library.svg +3 -0
- data/app/assets/svgs/heroicons/outline/light-bulb.svg +3 -0
- data/app/assets/svgs/heroicons/outline/lightning-bolt.svg +3 -0
- data/app/assets/svgs/heroicons/outline/link.svg +3 -0
- data/app/assets/svgs/heroicons/outline/location-marker.svg +4 -0
- data/app/assets/svgs/heroicons/outline/lock-closed.svg +3 -0
- data/app/assets/svgs/heroicons/outline/lock-open.svg +3 -0
- data/app/assets/svgs/heroicons/outline/login.svg +3 -0
- data/app/assets/svgs/heroicons/outline/logout.svg +3 -0
- data/app/assets/svgs/heroicons/outline/mail-open.svg +3 -0
- data/app/assets/svgs/heroicons/outline/mail.svg +3 -0
- data/app/assets/svgs/heroicons/outline/map.svg +3 -0
- data/app/assets/svgs/heroicons/outline/menu-alt-1.svg +3 -0
- data/app/assets/svgs/heroicons/outline/menu-alt-2.svg +3 -0
- data/app/assets/svgs/heroicons/outline/menu-alt-3.svg +3 -0
- data/app/assets/svgs/heroicons/outline/menu-alt-4.svg +3 -0
- data/app/assets/svgs/heroicons/outline/menu.svg +3 -0
- data/app/assets/svgs/heroicons/outline/microphone.svg +3 -0
- data/app/assets/svgs/heroicons/outline/minus-circle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/minus-sm.svg +3 -0
- data/app/assets/svgs/heroicons/outline/minus.svg +3 -0
- data/app/assets/svgs/heroicons/outline/moon.svg +3 -0
- data/app/assets/svgs/heroicons/outline/music-note.svg +3 -0
- data/app/assets/svgs/heroicons/outline/newspaper.svg +3 -0
- data/app/assets/svgs/heroicons/outline/office-building.svg +3 -0
- data/app/assets/svgs/heroicons/outline/paper-airplane.svg +3 -0
- data/app/assets/svgs/heroicons/outline/paper-clip.svg +3 -0
- data/app/assets/svgs/heroicons/outline/pause.svg +3 -0
- data/app/assets/svgs/heroicons/outline/pencil-alt.svg +3 -0
- data/app/assets/svgs/heroicons/outline/pencil.svg +3 -0
- data/app/assets/svgs/heroicons/outline/phone-incoming.svg +3 -0
- data/app/assets/svgs/heroicons/outline/phone-missed-call.svg +3 -0
- data/app/assets/svgs/heroicons/outline/phone-outgoing.svg +3 -0
- data/app/assets/svgs/heroicons/outline/phone.svg +3 -0
- data/app/assets/svgs/heroicons/outline/photograph.svg +3 -0
- data/app/assets/svgs/heroicons/outline/play.svg +4 -0
- data/app/assets/svgs/heroicons/outline/plus-circle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/plus-sm.svg +3 -0
- data/app/assets/svgs/heroicons/outline/plus.svg +3 -0
- data/app/assets/svgs/heroicons/outline/presentation-chart-bar.svg +3 -0
- data/app/assets/svgs/heroicons/outline/presentation-chart-line.svg +3 -0
- data/app/assets/svgs/heroicons/outline/printer.svg +3 -0
- data/app/assets/svgs/heroicons/outline/puzzle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/qrcode.svg +3 -0
- data/app/assets/svgs/heroicons/outline/question-mark-circle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/receipt-refund.svg +3 -0
- data/app/assets/svgs/heroicons/outline/receipt-tax.svg +3 -0
- data/app/assets/svgs/heroicons/outline/refresh.svg +3 -0
- data/app/assets/svgs/heroicons/outline/reply.svg +3 -0
- data/app/assets/svgs/heroicons/outline/rewind.svg +3 -0
- data/app/assets/svgs/heroicons/outline/rss.svg +3 -0
- data/app/assets/svgs/heroicons/outline/save-as.svg +3 -0
- data/app/assets/svgs/heroicons/outline/save.svg +3 -0
- data/app/assets/svgs/heroicons/outline/scale.svg +3 -0
- data/app/assets/svgs/heroicons/outline/scissors.svg +3 -0
- data/app/assets/svgs/heroicons/outline/search-circle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/search.svg +3 -0
- data/app/assets/svgs/heroicons/outline/selector.svg +3 -0
- data/app/assets/svgs/heroicons/outline/server.svg +3 -0
- data/app/assets/svgs/heroicons/outline/share.svg +3 -0
- data/app/assets/svgs/heroicons/outline/shield-check.svg +3 -0
- data/app/assets/svgs/heroicons/outline/shield-exclamation.svg +3 -0
- data/app/assets/svgs/heroicons/outline/shopping-bag.svg +3 -0
- data/app/assets/svgs/heroicons/outline/shopping-cart.svg +3 -0
- data/app/assets/svgs/heroicons/outline/sort-ascending.svg +3 -0
- data/app/assets/svgs/heroicons/outline/sort-descending.svg +3 -0
- data/app/assets/svgs/heroicons/outline/sparkles.svg +3 -0
- data/app/assets/svgs/heroicons/outline/speakerphone.svg +3 -0
- data/app/assets/svgs/heroicons/outline/star.svg +3 -0
- data/app/assets/svgs/heroicons/outline/status-offline.svg +3 -0
- data/app/assets/svgs/heroicons/outline/status-online.svg +3 -0
- data/app/assets/svgs/heroicons/outline/stop.svg +4 -0
- data/app/assets/svgs/heroicons/outline/sun.svg +3 -0
- data/app/assets/svgs/heroicons/outline/support.svg +3 -0
- data/app/assets/svgs/heroicons/outline/switch-horizontal.svg +3 -0
- data/app/assets/svgs/heroicons/outline/switch-vertical.svg +3 -0
- data/app/assets/svgs/heroicons/outline/table.svg +3 -0
- data/app/assets/svgs/heroicons/outline/tag.svg +3 -0
- data/app/assets/svgs/heroicons/outline/template.svg +3 -0
- data/app/assets/svgs/heroicons/outline/terminal.svg +3 -0
- data/app/assets/svgs/heroicons/outline/thumb-down.svg +3 -0
- data/app/assets/svgs/heroicons/outline/thumb-up.svg +3 -0
- data/app/assets/svgs/heroicons/outline/ticket.svg +3 -0
- data/app/assets/svgs/heroicons/outline/translate.svg +3 -0
- data/app/assets/svgs/heroicons/outline/trash.svg +3 -0
- data/app/assets/svgs/heroicons/outline/trending-down.svg +3 -0
- data/app/assets/svgs/heroicons/outline/trending-up.svg +3 -0
- data/app/assets/svgs/heroicons/outline/truck.svg +4 -0
- data/app/assets/svgs/heroicons/outline/upload.svg +3 -0
- data/app/assets/svgs/heroicons/outline/user-add.svg +3 -0
- data/app/assets/svgs/heroicons/outline/user-circle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/user-group.svg +3 -0
- data/app/assets/svgs/heroicons/outline/user-remove.svg +3 -0
- data/app/assets/svgs/heroicons/outline/user.svg +3 -0
- data/app/assets/svgs/heroicons/outline/users.svg +3 -0
- data/app/assets/svgs/heroicons/outline/variable.svg +3 -0
- data/app/assets/svgs/heroicons/outline/video-camera.svg +3 -0
- data/app/assets/svgs/heroicons/outline/view-boards.svg +3 -0
- data/app/assets/svgs/heroicons/outline/view-grid-add.svg +3 -0
- data/app/assets/svgs/heroicons/outline/view-grid.svg +3 -0
- data/app/assets/svgs/heroicons/outline/view-list.svg +3 -0
- data/app/assets/svgs/heroicons/outline/volume-off.svg +4 -0
- data/app/assets/svgs/heroicons/outline/volume-up.svg +3 -0
- data/app/assets/svgs/heroicons/outline/wifi.svg +3 -0
- data/app/assets/svgs/heroicons/outline/x-circle.svg +3 -0
- data/app/assets/svgs/heroicons/outline/x.svg +3 -0
- data/app/assets/svgs/heroicons/outline/zoom-in.svg +3 -0
- data/app/assets/svgs/heroicons/outline/zoom-out.svg +3 -0
- data/app/assets/svgs/heroicons/solid/academic-cap.svg +3 -0
- data/app/assets/svgs/heroicons/solid/adjustments.svg +3 -0
- data/app/assets/svgs/heroicons/solid/annotation.svg +3 -0
- data/app/assets/svgs/heroicons/solid/archive.svg +4 -0
- data/app/assets/svgs/heroicons/solid/arrow-circle-down.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-circle-left.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-circle-right.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-circle-up.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-down.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-left.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-narrow-down.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-narrow-left.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-narrow-right.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-narrow-up.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-right.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-sm-down.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-sm-left.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-sm-right.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-sm-up.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrow-up.svg +3 -0
- data/app/assets/svgs/heroicons/solid/arrows-expand.svg +3 -0
- data/app/assets/svgs/heroicons/solid/at-symbol.svg +3 -0
- data/app/assets/svgs/heroicons/solid/backspace.svg +3 -0
- data/app/assets/svgs/heroicons/solid/badge-check.svg +3 -0
- data/app/assets/svgs/heroicons/solid/ban.svg +3 -0
- data/app/assets/svgs/heroicons/solid/beaker.svg +3 -0
- data/app/assets/svgs/heroicons/solid/bell.svg +3 -0
- data/app/assets/svgs/heroicons/solid/book-open.svg +3 -0
- data/app/assets/svgs/heroicons/solid/bookmark-alt.svg +3 -0
- data/app/assets/svgs/heroicons/solid/bookmark.svg +3 -0
- data/app/assets/svgs/heroicons/solid/briefcase.svg +4 -0
- data/app/assets/svgs/heroicons/solid/cake.svg +3 -0
- data/app/assets/svgs/heroicons/solid/calculator.svg +3 -0
- data/app/assets/svgs/heroicons/solid/calendar.svg +3 -0
- data/app/assets/svgs/heroicons/solid/camera.svg +3 -0
- data/app/assets/svgs/heroicons/solid/cash.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chart-bar.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chart-pie.svg +4 -0
- data/app/assets/svgs/heroicons/solid/chart-square-bar.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chat-alt-2.svg +4 -0
- data/app/assets/svgs/heroicons/solid/chat-alt.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chat.svg +3 -0
- data/app/assets/svgs/heroicons/solid/check-circle.svg +3 -0
- data/app/assets/svgs/heroicons/solid/check.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chevron-double-down.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chevron-double-left.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chevron-double-right.svg +4 -0
- data/app/assets/svgs/heroicons/solid/chevron-double-up.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chevron-down.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chevron-left.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chevron-right.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chevron-up.svg +3 -0
- data/app/assets/svgs/heroicons/solid/chip.svg +4 -0
- data/app/assets/svgs/heroicons/solid/clipboard-check.svg +4 -0
- data/app/assets/svgs/heroicons/solid/clipboard-copy.svg +4 -0
- data/app/assets/svgs/heroicons/solid/clipboard-list.svg +4 -0
- data/app/assets/svgs/heroicons/solid/clipboard.svg +4 -0
- data/app/assets/svgs/heroicons/solid/clock.svg +3 -0
- data/app/assets/svgs/heroicons/solid/cloud-download.svg +3 -0
- data/app/assets/svgs/heroicons/solid/cloud-upload.svg +4 -0
- data/app/assets/svgs/heroicons/solid/cloud.svg +3 -0
- data/app/assets/svgs/heroicons/solid/code.svg +3 -0
- data/app/assets/svgs/heroicons/solid/cog.svg +3 -0
- data/app/assets/svgs/heroicons/solid/collection.svg +3 -0
- data/app/assets/svgs/heroicons/solid/color-swatch.svg +3 -0
- data/app/assets/svgs/heroicons/solid/credit-card.svg +4 -0
- data/app/assets/svgs/heroicons/solid/cube-transparent.svg +3 -0
- data/app/assets/svgs/heroicons/solid/cube.svg +3 -0
- data/app/assets/svgs/heroicons/solid/currency-bangladeshi.svg +3 -0
- data/app/assets/svgs/heroicons/solid/currency-dollar.svg +4 -0
- data/app/assets/svgs/heroicons/solid/currency-euro.svg +3 -0
- data/app/assets/svgs/heroicons/solid/currency-pound.svg +3 -0
- data/app/assets/svgs/heroicons/solid/currency-rupee.svg +3 -0
- data/app/assets/svgs/heroicons/solid/currency-yen.svg +3 -0
- data/app/assets/svgs/heroicons/solid/cursor-click.svg +3 -0
- data/app/assets/svgs/heroicons/solid/database.svg +5 -0
- data/app/assets/svgs/heroicons/solid/desktop-computer.svg +3 -0
- data/app/assets/svgs/heroicons/solid/device-mobile.svg +3 -0
- data/app/assets/svgs/heroicons/solid/device-tablet.svg +3 -0
- data/app/assets/svgs/heroicons/solid/document-add.svg +3 -0
- data/app/assets/svgs/heroicons/solid/document-download.svg +3 -0
- data/app/assets/svgs/heroicons/solid/document-duplicate.svg +4 -0
- data/app/assets/svgs/heroicons/solid/document-remove.svg +3 -0
- data/app/assets/svgs/heroicons/solid/document-report.svg +3 -0
- data/app/assets/svgs/heroicons/solid/document-search.svg +4 -0
- data/app/assets/svgs/heroicons/solid/document-text.svg +3 -0
- data/app/assets/svgs/heroicons/solid/document.svg +3 -0
- data/app/assets/svgs/heroicons/solid/dots-circle-horizontal.svg +3 -0
- data/app/assets/svgs/heroicons/solid/dots-horizontal.svg +3 -0
- data/app/assets/svgs/heroicons/solid/dots-vertical.svg +3 -0
- data/app/assets/svgs/heroicons/solid/download.svg +3 -0
- data/app/assets/svgs/heroicons/solid/duplicate.svg +4 -0
- data/app/assets/svgs/heroicons/solid/emoji-happy.svg +3 -0
- data/app/assets/svgs/heroicons/solid/emoji-sad.svg +3 -0
- data/app/assets/svgs/heroicons/solid/exclamation-circle.svg +3 -0
- data/app/assets/svgs/heroicons/solid/exclamation.svg +3 -0
- data/app/assets/svgs/heroicons/solid/external-link.svg +4 -0
- data/app/assets/svgs/heroicons/solid/eye-off.svg +4 -0
- data/app/assets/svgs/heroicons/solid/eye.svg +4 -0
- data/app/assets/svgs/heroicons/solid/fast-forward.svg +3 -0
- data/app/assets/svgs/heroicons/solid/film.svg +3 -0
- data/app/assets/svgs/heroicons/solid/filter.svg +3 -0
- data/app/assets/svgs/heroicons/solid/finger-print.svg +5 -0
- data/app/assets/svgs/heroicons/solid/fire.svg +3 -0
- data/app/assets/svgs/heroicons/solid/flag.svg +3 -0
- data/app/assets/svgs/heroicons/solid/folder-add.svg +3 -0
- data/app/assets/svgs/heroicons/solid/folder-download.svg +3 -0
- data/app/assets/svgs/heroicons/solid/folder-open.svg +4 -0
- data/app/assets/svgs/heroicons/solid/folder-remove.svg +3 -0
- data/app/assets/svgs/heroicons/solid/folder.svg +3 -0
- data/app/assets/svgs/heroicons/solid/gift.svg +4 -0
- data/app/assets/svgs/heroicons/solid/globe-alt.svg +3 -0
- data/app/assets/svgs/heroicons/solid/globe.svg +3 -0
- data/app/assets/svgs/heroicons/solid/hand.svg +3 -0
- data/app/assets/svgs/heroicons/solid/hashtag.svg +3 -0
- data/app/assets/svgs/heroicons/solid/heart.svg +3 -0
- data/app/assets/svgs/heroicons/solid/home.svg +3 -0
- data/app/assets/svgs/heroicons/solid/identification.svg +3 -0
- data/app/assets/svgs/heroicons/solid/inbox-in.svg +4 -0
- data/app/assets/svgs/heroicons/solid/inbox.svg +3 -0
- data/app/assets/svgs/heroicons/solid/information-circle.svg +3 -0
- data/app/assets/svgs/heroicons/solid/key.svg +3 -0
- data/app/assets/svgs/heroicons/solid/library.svg +3 -0
- data/app/assets/svgs/heroicons/solid/light-bulb.svg +3 -0
- data/app/assets/svgs/heroicons/solid/lightning-bolt.svg +3 -0
- data/app/assets/svgs/heroicons/solid/link.svg +3 -0
- data/app/assets/svgs/heroicons/solid/location-marker.svg +3 -0
- data/app/assets/svgs/heroicons/solid/lock-closed.svg +3 -0
- data/app/assets/svgs/heroicons/solid/lock-open.svg +3 -0
- data/app/assets/svgs/heroicons/solid/login.svg +3 -0
- data/app/assets/svgs/heroicons/solid/logout.svg +3 -0
- data/app/assets/svgs/heroicons/solid/mail-open.svg +3 -0
- data/app/assets/svgs/heroicons/solid/mail.svg +4 -0
- data/app/assets/svgs/heroicons/solid/map.svg +3 -0
- data/app/assets/svgs/heroicons/solid/menu-alt-1.svg +3 -0
- data/app/assets/svgs/heroicons/solid/menu-alt-2.svg +3 -0
- data/app/assets/svgs/heroicons/solid/menu-alt-3.svg +3 -0
- data/app/assets/svgs/heroicons/solid/menu-alt-4.svg +3 -0
- data/app/assets/svgs/heroicons/solid/menu.svg +3 -0
- data/app/assets/svgs/heroicons/solid/microphone.svg +3 -0
- data/app/assets/svgs/heroicons/solid/minus-circle.svg +3 -0
- data/app/assets/svgs/heroicons/solid/minus-sm.svg +3 -0
- data/app/assets/svgs/heroicons/solid/minus.svg +3 -0
- data/app/assets/svgs/heroicons/solid/moon.svg +3 -0
- data/app/assets/svgs/heroicons/solid/music-note.svg +3 -0
- data/app/assets/svgs/heroicons/solid/newspaper.svg +4 -0
- data/app/assets/svgs/heroicons/solid/office-building.svg +3 -0
- data/app/assets/svgs/heroicons/solid/paper-airplane.svg +3 -0
- data/app/assets/svgs/heroicons/solid/paper-clip.svg +3 -0
- data/app/assets/svgs/heroicons/solid/pause.svg +3 -0
- data/app/assets/svgs/heroicons/solid/pencil-alt.svg +4 -0
- data/app/assets/svgs/heroicons/solid/pencil.svg +3 -0
- data/app/assets/svgs/heroicons/solid/phone-incoming.svg +4 -0
- data/app/assets/svgs/heroicons/solid/phone-missed-call.svg +4 -0
- data/app/assets/svgs/heroicons/solid/phone-outgoing.svg +4 -0
- data/app/assets/svgs/heroicons/solid/phone.svg +3 -0
- data/app/assets/svgs/heroicons/solid/photograph.svg +3 -0
- data/app/assets/svgs/heroicons/solid/play.svg +3 -0
- data/app/assets/svgs/heroicons/solid/plus-circle.svg +3 -0
- data/app/assets/svgs/heroicons/solid/plus-sm.svg +3 -0
- data/app/assets/svgs/heroicons/solid/plus.svg +3 -0
- data/app/assets/svgs/heroicons/solid/presentation-chart-bar.svg +3 -0
- data/app/assets/svgs/heroicons/solid/presentation-chart-line.svg +3 -0
- data/app/assets/svgs/heroicons/solid/printer.svg +3 -0
- data/app/assets/svgs/heroicons/solid/puzzle.svg +3 -0
- data/app/assets/svgs/heroicons/solid/qrcode.svg +4 -0
- data/app/assets/svgs/heroicons/solid/question-mark-circle.svg +3 -0
- data/app/assets/svgs/heroicons/solid/receipt-refund.svg +3 -0
- data/app/assets/svgs/heroicons/solid/receipt-tax.svg +3 -0
- data/app/assets/svgs/heroicons/solid/refresh.svg +3 -0
- data/app/assets/svgs/heroicons/solid/reply.svg +3 -0
- data/app/assets/svgs/heroicons/solid/rewind.svg +3 -0
- data/app/assets/svgs/heroicons/solid/rss.svg +4 -0
- data/app/assets/svgs/heroicons/solid/save-as.svg +4 -0
- data/app/assets/svgs/heroicons/solid/save.svg +3 -0
- data/app/assets/svgs/heroicons/solid/scale.svg +3 -0
- data/app/assets/svgs/heroicons/solid/scissors.svg +4 -0
- data/app/assets/svgs/heroicons/solid/search-circle.svg +4 -0
- data/app/assets/svgs/heroicons/solid/search.svg +3 -0
- data/app/assets/svgs/heroicons/solid/selector.svg +3 -0
- data/app/assets/svgs/heroicons/solid/server.svg +3 -0
- data/app/assets/svgs/heroicons/solid/share.svg +3 -0
- data/app/assets/svgs/heroicons/solid/shield-check.svg +3 -0
- data/app/assets/svgs/heroicons/solid/shield-exclamation.svg +3 -0
- data/app/assets/svgs/heroicons/solid/shopping-bag.svg +3 -0
- data/app/assets/svgs/heroicons/solid/shopping-cart.svg +3 -0
- data/app/assets/svgs/heroicons/solid/sort-ascending.svg +3 -0
- data/app/assets/svgs/heroicons/solid/sort-descending.svg +3 -0
- data/app/assets/svgs/heroicons/solid/sparkles.svg +3 -0
- data/app/assets/svgs/heroicons/solid/speakerphone.svg +3 -0
- data/app/assets/svgs/heroicons/solid/star.svg +3 -0
- data/app/assets/svgs/heroicons/solid/status-offline.svg +3 -0
- data/app/assets/svgs/heroicons/solid/status-online.svg +3 -0
- data/app/assets/svgs/heroicons/solid/stop.svg +3 -0
- data/app/assets/svgs/heroicons/solid/sun.svg +3 -0
- data/app/assets/svgs/heroicons/solid/support.svg +3 -0
- data/app/assets/svgs/heroicons/solid/switch-horizontal.svg +3 -0
- data/app/assets/svgs/heroicons/solid/switch-vertical.svg +3 -0
- data/app/assets/svgs/heroicons/solid/table.svg +3 -0
- data/app/assets/svgs/heroicons/solid/tag.svg +3 -0
- data/app/assets/svgs/heroicons/solid/template.svg +3 -0
- data/app/assets/svgs/heroicons/solid/terminal.svg +3 -0
- data/app/assets/svgs/heroicons/solid/thumb-down.svg +3 -0
- data/app/assets/svgs/heroicons/solid/thumb-up.svg +3 -0
- data/app/assets/svgs/heroicons/solid/ticket.svg +3 -0
- data/app/assets/svgs/heroicons/solid/translate.svg +3 -0
- data/app/assets/svgs/heroicons/solid/trash.svg +3 -0
- data/app/assets/svgs/heroicons/solid/trending-down.svg +3 -0
- data/app/assets/svgs/heroicons/solid/trending-up.svg +3 -0
- data/app/assets/svgs/heroicons/solid/truck.svg +4 -0
- data/app/assets/svgs/heroicons/solid/upload.svg +3 -0
- data/app/assets/svgs/heroicons/solid/user-add.svg +3 -0
- data/app/assets/svgs/heroicons/solid/user-circle.svg +3 -0
- data/app/assets/svgs/heroicons/solid/user-group.svg +3 -0
- data/app/assets/svgs/heroicons/solid/user-remove.svg +3 -0
- data/app/assets/svgs/heroicons/solid/user.svg +3 -0
- data/app/assets/svgs/heroicons/solid/users.svg +3 -0
- data/app/assets/svgs/heroicons/solid/variable.svg +3 -0
- data/app/assets/svgs/heroicons/solid/video-camera.svg +3 -0
- data/app/assets/svgs/heroicons/solid/view-boards.svg +3 -0
- data/app/assets/svgs/heroicons/solid/view-grid-add.svg +3 -0
- data/app/assets/svgs/heroicons/solid/view-grid.svg +3 -0
- data/app/assets/svgs/heroicons/solid/view-list.svg +3 -0
- data/app/assets/svgs/heroicons/solid/volume-off.svg +3 -0
- data/app/assets/svgs/heroicons/solid/volume-up.svg +3 -0
- data/app/assets/svgs/heroicons/solid/wifi.svg +3 -0
- data/app/assets/svgs/{x-circle-sm.svg → heroicons/solid/x-circle.svg} +2 -2
- data/app/assets/svgs/heroicons/solid/x.svg +3 -0
- data/app/assets/svgs/heroicons/solid/zoom-in.svg +4 -0
- data/app/assets/svgs/heroicons/solid/zoom-out.svg +4 -0
- data/app/assets/svgs/logout.svg +3 -0
- data/app/assets/svgs/menu-back.svg +4 -0
- data/app/assets/svgs/menu.svg +3 -0
- data/app/assets/svgs/resources-icon.svg +13 -0
- data/app/assets/svgs/save.svg +8 -1
- data/app/assets/svgs/table-empty-state.svg +57 -0
- data/app/assets/svgs/table-view-type.svg +6 -0
- data/app/assets/svgs/three-dots.svg +5 -0
- data/app/assets/svgs/tools-icon.svg +3 -0
- data/app/assets/svgs/trash.svg +7 -1
- data/app/assets/svgs/user-circle.svg +3 -0
- data/app/components/avo/actions_component.html.erb +43 -0
- data/app/components/avo/actions_component.rb +14 -0
- data/app/components/avo/alert_component.html.erb +25 -1
- data/app/components/avo/alert_component.rb +24 -0
- data/app/components/avo/blank_field_component.html.erb +0 -0
- data/app/components/avo/blank_field_component.rb +4 -0
- data/app/components/avo/button_component.html.erb +1 -0
- data/app/components/avo/button_component.rb +143 -0
- data/app/components/avo/card_component.html.erb +40 -0
- data/app/components/avo/card_component.rb +11 -0
- data/app/components/avo/common_field_wrapper_component.html.erb +15 -0
- data/app/components/avo/common_field_wrapper_component.rb +20 -0
- data/app/components/avo/dashboards/divider_component.html.erb +9 -0
- data/app/components/avo/dashboards/divider_component.rb +19 -0
- data/app/components/avo/edit/field_wrapper_component.html.erb +10 -19
- data/app/components/avo/edit/field_wrapper_component.rb +0 -8
- data/app/components/avo/empty_state_component.html.erb +12 -0
- data/app/components/avo/empty_state_component.rb +24 -0
- data/app/components/avo/fields/badge_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +2 -1
- data/app/components/avo/fields/boolean_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_group_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/common/boolean_check_component.html.erb +4 -4
- data/app/components/avo/fields/common/boolean_group_component.html.erb +2 -2
- data/app/components/avo/fields/common/files_list_viewer_component.html.erb +2 -2
- data/app/components/avo/fields/common/gravatar_viewer_component.html.erb +1 -1
- data/app/components/avo/fields/common/heading_component.html.erb +2 -2
- data/app/components/avo/fields/common/key_value_component.html.erb +2 -2
- data/app/components/avo/fields/common/single_file_viewer_component.html.erb +42 -23
- data/app/components/avo/fields/common/single_file_viewer_component.rb +34 -6
- data/app/components/avo/fields/common/status_viewer_component.html.erb +2 -2
- data/app/components/avo/fields/external_image_field/index_component.html.erb +2 -3
- data/app/components/avo/fields/file_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/file_field/index_component.html.erb +3 -3
- data/app/components/avo/fields/file_field/index_component.rb +11 -0
- data/app/components/avo/fields/file_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/gravatar_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/has_many_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/has_one_field/show_component.html.erb +4 -4
- data/app/components/avo/fields/heading_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/heading_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/progress_bar_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/trix_field/edit_component.html.erb +1 -0
- data/app/components/avo/filters_component.html.erb +37 -0
- data/app/components/avo/filters_component.rb +14 -0
- data/app/components/avo/{alerts_component.html.erb → flash_alerts_component.html.erb} +1 -1
- data/app/components/avo/flash_alerts_component.rb +9 -0
- data/app/components/avo/index/field_wrapper_component.html.erb +8 -2
- data/app/components/avo/index/field_wrapper_component.rb +13 -1
- data/app/components/avo/index/grid_item_component.html.erb +13 -10
- data/app/components/avo/index/ordering/buttons_component.rb +2 -0
- data/app/components/avo/index/resource_controls_component.html.erb +11 -6
- data/app/components/avo/index/resource_grid_component.html.erb +3 -3
- data/app/components/avo/index/resource_table_component.html.erb +10 -14
- data/app/components/avo/index/table_row_component.html.erb +1 -1
- data/app/components/avo/modal_component.html.erb +9 -7
- data/app/{views/avo/partials/_paginator.html.erb → components/avo/paginator_component.html.erb} +16 -16
- data/app/components/avo/paginator_component.rb +17 -0
- data/app/components/avo/panel_component.html.erb +29 -17
- data/app/components/avo/panel_component.rb +17 -2
- data/app/components/avo/profile_item_component.html.erb +3 -0
- data/app/components/avo/profile_item_component.rb +11 -0
- data/app/components/avo/referrer_params_component.html.erb +4 -0
- data/app/components/avo/referrer_params_component.rb +9 -0
- data/app/components/avo/resource_component.rb +1 -1
- data/app/components/avo/show/field_wrapper_component.html.erb +8 -15
- data/app/components/avo/show/field_wrapper_component.rb +0 -4
- data/app/components/avo/sidebar_component.html.erb +51 -0
- data/app/components/avo/sidebar_component.rb +21 -0
- data/app/components/avo/sidebar_heading_component.html.erb +3 -0
- data/app/components/avo/sidebar_heading_component.rb +11 -0
- data/app/components/avo/sidebar_item_component.html.erb +3 -0
- data/app/components/avo/sidebar_item_component.rb +10 -0
- data/app/components/avo/sidebar_profile_component.html.erb +36 -0
- data/app/components/avo/sidebar_profile_component.rb +43 -0
- data/app/components/avo/turbo_frame_wrapper_component.html.erb +8 -9
- data/app/components/avo/views/resource_edit_component.html.erb +27 -17
- data/app/components/avo/views/resource_index_component.html.erb +44 -35
- data/app/components/avo/views/resource_new_component.html.erb +31 -16
- data/app/components/avo/views/resource_show_component.html.erb +37 -34
- data/app/components/avo/views/resource_show_component.rb +2 -3
- data/app/controllers/avo/application_controller.rb +44 -13
- data/app/controllers/avo/{relations_controller.rb → associations_controller.rb} +1 -3
- data/app/controllers/avo/attachments_controller.rb +1 -5
- data/app/controllers/avo/base_controller.rb +75 -49
- data/app/controllers/avo/dashboards_controller.rb +28 -0
- data/app/controllers/avo/private_controller.rb +8 -0
- data/app/controllers/avo/search_controller.rb +5 -1
- data/app/helpers/avo/application_helper.rb +29 -47
- data/app/helpers/avo/resources_helper.rb +2 -2
- data/app/helpers/avo/url_helpers.rb +3 -3
- data/app/javascript/avo.js +26 -5
- data/app/javascript/js/application.js +2 -1
- data/app/javascript/js/controllers/actions_picker_controller.js +12 -10
- data/app/javascript/js/controllers/dashboard_card_controller.js +33 -0
- data/app/javascript/js/controllers/item_selector_controller.js +8 -4
- data/app/javascript/js/controllers/mobile_controller.js +9 -0
- data/app/javascript/js/controllers/select_controller.js +23 -0
- data/app/javascript/js/controllers.js +6 -0
- data/app/views/avo/actions/show.html.erb +23 -17
- data/app/views/avo/{relations → associations}/new.html.erb +17 -6
- data/app/views/avo/base/_multiple_select_filter.html.erb +5 -1
- data/app/views/avo/base/_text_filter.html.erb +3 -1
- data/app/views/avo/base/show.html.erb +1 -1
- data/app/views/avo/dashboards/_chartkick_card.html.erb +3 -0
- data/app/views/avo/dashboards/_metric_card.html.erb +5 -0
- data/app/views/avo/dashboards/card.html.erb +3 -0
- data/app/views/avo/dashboards/show.html.erb +35 -0
- data/app/views/avo/home/failed_to_load.html.erb +21 -1
- data/app/views/avo/home/index.html.erb +1 -5
- data/app/views/avo/partials/_custom_tools_alert.html.erb +2 -2
- data/app/views/avo/partials/_global_search.html.erb +3 -3
- data/app/views/avo/partials/_header.html.erb +1 -1
- data/app/views/avo/partials/_logo.html.erb +1 -1
- data/app/views/avo/partials/_navbar.html.erb +11 -0
- data/app/views/avo/partials/_resource_search.html.erb +1 -1
- data/app/views/avo/partials/_sortable_component.html.erb +1 -1
- data/app/views/avo/partials/_table_header.html.erb +4 -4
- data/app/views/avo/partials/_view_toggle_button.html.erb +36 -16
- data/app/views/avo/private/_links_and_buttons.html.erb +57 -0
- data/app/views/avo/private/design.html.erb +27 -0
- data/app/views/layouts/avo/application.html.erb +26 -30
- data/avo.gemspec +4 -2
- data/bin/dev +7 -6
- data/config/routes.rb +19 -11
- data/lib/avo/app.rb +38 -4
- data/lib/avo/base_action.rb +4 -4
- data/lib/avo/base_resource.rb +31 -10
- data/lib/avo/configuration.rb +2 -0
- data/lib/avo/dashboards/base_card.rb +151 -0
- data/lib/avo/dashboards/base_dashboard.rb +71 -0
- data/lib/avo/dashboards/base_divider.rb +23 -0
- data/lib/avo/dashboards/chartkick_card.rb +77 -0
- data/lib/avo/dashboards/metric_card.rb +9 -0
- data/lib/avo/dashboards/partial_card.rb +7 -0
- data/lib/avo/dynamic_router.rb +3 -0
- data/lib/avo/engine.rb +5 -1
- data/lib/avo/fields/base_field.rb +19 -6
- data/lib/avo/fields/belongs_to_field.rb +1 -1
- data/lib/avo/fields/external_image_field.rb +2 -2
- data/lib/avo/fields/gravatar_field.rb +2 -2
- data/lib/avo/hosts/dashboard_card.rb +21 -0
- data/lib/avo/hosts/dashboard_visibility.rb +19 -0
- data/lib/avo/hosts/ordering.rb +1 -1
- data/lib/avo/licensing/license.rb +4 -2
- data/lib/avo/licensing/pro_license.rb +3 -1
- data/lib/avo/version.rb +1 -1
- data/lib/avo.rb +24 -0
- data/lib/generators/avo/chartkick_card_generator.rb +16 -0
- data/lib/generators/avo/dashboard_generator.rb +16 -0
- data/lib/generators/avo/metric_card_generator.rb +16 -0
- data/lib/generators/avo/partial_card_generator.rb +17 -0
- data/lib/generators/avo/templates/cards/chartkick_card.tt +16 -0
- data/lib/generators/avo/templates/cards/chartkick_card_sample.tt +26 -0
- data/lib/generators/avo/templates/cards/metric_card.tt +8 -0
- data/lib/generators/avo/templates/cards/metric_card_sample.tt +38 -0
- data/lib/generators/avo/templates/cards/partial_card.tt +8 -0
- data/lib/generators/avo/templates/cards/partial_card_partial.tt +8 -0
- data/lib/generators/avo/templates/cards/partial_card_sample.tt +8 -0
- data/lib/generators/avo/templates/dashboards/dashboard.tt +12 -0
- data/lib/generators/avo/templates/locales/avo.en.yml +11 -4
- data/lib/generators/avo/templates/locales/avo.nb-NO.yml +5 -2
- data/lib/generators/avo/templates/locales/avo.pt-BR.yml +4 -2
- data/lib/generators/avo/templates/locales/avo.ro.yml +4 -1
- data/lib/generators/avo/templates/tool/sidebar_item.tt +1 -1
- data/public/avo-assets/avo.css +1322 -1127
- data/public/avo-assets/avo.js +346 -88687
- data/public/avo-assets/avo.js.map +3 -3
- data/public/avo-assets/fonts/inter-v7-latin-500.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.svg +351 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.woff2 +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.svg +351 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.woff2 +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.svg +352 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.woff2 +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.svg +351 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.woff2 +0 -0
- data/public/avo-assets/logo-on-white.png +0 -0
- data/public/avo-assets/logo.png +0 -0
- metadata +584 -42
- data/app/assets/images/avo/logo.png +0 -0
- data/app/assets/svgs/check-circle-sm.svg +0 -3
- data/app/components/avo/alerts_component.rb +0 -5
- data/app/components/avo/fields/common/multiple_file_viewer_component.html.erb +0 -35
- data/app/components/avo/fields/common/multiple_file_viewer_component.rb +0 -15
- data/app/components/avo/navigation_heading_component.html.erb +0 -3
- data/app/components/avo/navigation_heading_component.rb +0 -7
- data/app/components/avo/navigation_link_component.html.erb +0 -3
- data/app/components/avo/navigation_link_component.rb +0 -11
- data/app/javascript/js/toastr.js +0 -10
- data/app/views/avo/attachments/show.html.erb +0 -14
- data/app/views/avo/base/_actions.html.erb +0 -36
- data/app/views/avo/base/_filters.html.erb +0 -34
- data/app/views/avo/partials/_a_button.html.erb +0 -7
- data/app/views/avo/partials/_a_link.html.erb +0 -7
- data/app/views/avo/partials/_empty_state.html.erb +0 -17
- data/app/views/avo/partials/_failed_state.html.erb +0 -16
- data/app/views/avo/partials/_profile_dropdown.html.erb +0 -25
- data/app/views/avo/sidebar/_sidebar.html.erb +0 -31
- data/lib/avo/services/panel_service.rb +0 -27
- data/public/avo-assets/fonts/nunito-v16-latin-700.eot +0 -0
- data/public/avo-assets/fonts/nunito-v16-latin-700.svg +0 -388
- data/public/avo-assets/fonts/nunito-v16-latin-700.ttf +0 -0
- data/public/avo-assets/fonts/nunito-v16-latin-700.woff +0 -0
- data/public/avo-assets/fonts/nunito-v16-latin-700.woff2 +0 -0
- data/public/avo-assets/fonts/nunito-v16-latin-regular.eot +0 -0
- data/public/avo-assets/fonts/nunito-v16-latin-regular.svg +0 -380
- data/public/avo-assets/fonts/nunito-v16-latin-regular.ttf +0 -0
- data/public/avo-assets/fonts/nunito-v16-latin-regular.woff +0 -0
- data/public/avo-assets/fonts/nunito-v16-latin-regular.woff2 +0 -0
@@ -1,80 +1,83 @@
|
|
1
1
|
<div data-model-id="<%= @resource.model.id %>"
|
2
2
|
data-selected-resources-name="<%= @resource.model_key %>"
|
3
3
|
data-selected-resources='["<%= @resource.model.id %>"]'
|
4
|
+
class="space-y-8"
|
4
5
|
>
|
5
6
|
<% @resource.panels.each_with_index do |resource_panel, index| %>
|
6
7
|
<%= render Avo::PanelComponent.new(title: title, description: @resource.resource_description, display_breadcrumbs: @reflection.blank?, index: index) do |c| %>
|
7
8
|
<% c.tools do %>
|
8
9
|
<% if resource_panel[:name] == @resource.default_panel_name %>
|
9
|
-
<%= render 'actions' %>
|
10
|
-
|
11
10
|
<% if @reflection.present? && @resource.model.present? %>
|
11
|
+
<%= render Avo::ActionsComponent.new actions: @actions, resource: @resource %>
|
12
12
|
<% if can_detach? %>
|
13
|
-
<%=
|
14
|
-
|
13
|
+
<%= a_button url: detach_path,
|
14
|
+
icon: 'detach',
|
15
|
+
method: :delete,
|
16
|
+
form_class: 'flex flex-col sm:flex-row sm:inline-flex',
|
17
|
+
data: {
|
18
|
+
confirm: "Are you sure you want to detach this #{@reflection.name.to_s}."
|
19
|
+
} do %>
|
20
|
+
<%= t('avo.detach_item', item: @reflection.name.to_s).capitalize %>
|
15
21
|
<% end %>
|
16
22
|
<% end %>
|
17
23
|
<% if can_see_the_edit_button? %>
|
18
|
-
<%= a_link edit_path, color: '
|
19
|
-
<%=
|
24
|
+
<%= a_link edit_path, color: :primary, icon: 'edit' do %>
|
25
|
+
<%= t('avo.edit').capitalize %>
|
20
26
|
<% end %>
|
21
27
|
<% end %>
|
22
28
|
<% else %>
|
23
|
-
<%= a_link back_path do %>
|
24
|
-
<%=
|
29
|
+
<%= a_link back_path, icon: 'arrow-left' do %>
|
30
|
+
<%= t('avo.go_back') %>
|
25
31
|
<% end %>
|
26
|
-
|
32
|
+
<%= render Avo::ActionsComponent.new actions: @actions, resource: @resource %>
|
27
33
|
<% if can_see_the_destroy_button? %>
|
28
|
-
<%=
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
34
|
+
<%= a_button url: helpers.resource_path(model: @resource.model, resource: @resource),
|
35
|
+
method: :delete,
|
36
|
+
local: true,
|
37
|
+
title: t('avo.delete_item', item: @resource.model.model_name.name.downcase).capitalize,
|
38
|
+
spinner: true,
|
39
|
+
color: :red,
|
40
|
+
icon: 'trash',
|
41
|
+
form_class: 'flex flex-col sm:flex-row sm:inline-flex',
|
42
|
+
data: {
|
43
|
+
confirm: t('avo.are_you_sure', item: @resource.model.model_name.name.downcase),
|
44
|
+
control: :destroy,
|
45
|
+
'resource-id': @resource.model.id,
|
46
|
+
'tippy': 'tooltip',
|
47
|
+
} do %>
|
48
|
+
<%= t('avo.delete').capitalize %>
|
43
49
|
<% end %>
|
44
50
|
<% end %>
|
45
|
-
|
46
51
|
<% if @resource.authorization.authorize_action(:edit, raise_exception: false) %>
|
47
|
-
<%= a_link edit_path, color: '
|
48
|
-
<%=
|
52
|
+
<%= a_link edit_path, color: :primary, icon: 'edit' do %>
|
53
|
+
<%= t('avo.edit').capitalize %>
|
49
54
|
<% end %>
|
50
55
|
<% end %>
|
51
56
|
<% end %>
|
52
57
|
<% end %>
|
53
58
|
<% end %>
|
54
|
-
|
55
59
|
<% c.body do %>
|
56
60
|
<% if fields_by_panel[resource_panel[:name]].present? %>
|
57
|
-
|
58
|
-
|
59
|
-
|
61
|
+
<div class="divide-y">
|
62
|
+
<% fields_by_panel[resource_panel[:name]].each_with_index do |field, index| %>
|
63
|
+
<%= render field.component_for_view(:show).new(field: field, resource: @resource, index: index) %>
|
64
|
+
<% end %>
|
65
|
+
</div>
|
60
66
|
<% end %>
|
61
67
|
<% end %>
|
62
68
|
<% end %>
|
63
69
|
<% end %>
|
64
|
-
|
65
70
|
<% if @reflection.blank? %>
|
66
71
|
<% if has_one_panels.present? %>
|
67
72
|
<% has_one_panels.each_with_index do |field, index| %>
|
68
73
|
<%= render field.component_for_view(:show).new(field: field, resource: @resource, index: index) %>
|
69
74
|
<% end %>
|
70
75
|
<% end %>
|
71
|
-
|
72
76
|
<% if has_many_panels.present? %>
|
73
77
|
<% has_many_panels.each_with_index do |field, index| %>
|
74
78
|
<%= render field.component_for_view(:show).new(field: field, resource: @resource, index: index) %>
|
75
79
|
<% end %>
|
76
80
|
<% end %>
|
77
|
-
|
78
81
|
<% if has_as_belongs_to_many_panels.present? %>
|
79
82
|
<% has_as_belongs_to_many_panels.each_with_index do |field, index| %>
|
80
83
|
<%= render field.component_for_view(:show).new(field: field, resource: @resource, index: index) %>
|
@@ -6,18 +6,17 @@ class Avo::Views::ResourceShowComponent < Avo::ResourceComponent
|
|
6
6
|
|
7
7
|
attr_reader :fields_by_panel, :has_one_panels, :has_many_panels, :has_as_belongs_to_many_panels
|
8
8
|
|
9
|
-
def initialize(resource: nil, reflection: nil, parent_model: nil, resource_panel: nil)
|
9
|
+
def initialize(resource: nil, reflection: nil, parent_model: nil, resource_panel: nil, actions: [])
|
10
10
|
@resource = resource
|
11
11
|
@reflection = reflection
|
12
12
|
@resource_panel = resource_panel
|
13
|
+
@actions = actions
|
13
14
|
|
14
15
|
split_panel_fields
|
15
16
|
end
|
16
17
|
|
17
18
|
def title
|
18
19
|
if @reflection.present?
|
19
|
-
return field.name if field.present?
|
20
|
-
|
21
20
|
reflection_resource.name
|
22
21
|
else
|
23
22
|
@resource.panels.first[:name]
|
@@ -28,7 +28,7 @@ module Avo
|
|
28
28
|
add_flash_types :info, :warning, :success, :error
|
29
29
|
|
30
30
|
def init_app
|
31
|
-
Avo::App.init request: request, context: context, root_path: avo.root_path.delete_suffix("/"), current_user: _current_user, view_context: view_context
|
31
|
+
Avo::App.init request: request, context: context, root_path: avo.root_path.delete_suffix("/"), current_user: _current_user, view_context: view_context, params: params
|
32
32
|
|
33
33
|
@license = Avo::App.license
|
34
34
|
end
|
@@ -53,20 +53,38 @@ module Avo
|
|
53
53
|
raise Avo::LicenseVerificationTemperedError, "License verification mechanism tempered with." unless method(:index).source_location.first.match?(/.*\/app\/controllers\/avo\/search_controller\.rb/)
|
54
54
|
end
|
55
55
|
|
56
|
+
if params[:controller] == "avo/dashboards" && params[:action] == "show"
|
57
|
+
raise Avo::LicenseVerificationTemperedError, "License verification mechanism tempered with." unless method(:show).source_location.first.match?(/.*\/app\/controllers\/avo\/dashboards_controller\.rb/)
|
58
|
+
end
|
59
|
+
|
60
|
+
if params[:controller] == "avo/dashboards" && params[:action] == "card"
|
61
|
+
raise Avo::LicenseVerificationTemperedError, "License verification mechanism tempered with." unless method(:card).source_location.first.match?(/.*\/app\/controllers\/avo\/dashboards_controller\.rb/)
|
62
|
+
end
|
63
|
+
|
56
64
|
super(*args)
|
57
65
|
end
|
58
66
|
|
59
67
|
def check_avo_license
|
60
|
-
# Check to see if the path is
|
61
|
-
|
62
|
-
# Display alert on custom tool page if in development.
|
68
|
+
# Check to see if the path is a custom tool
|
69
|
+
if on_custom_tool_page
|
63
70
|
if @license.lacks(:custom_tools) || @license.invalid?
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
71
|
+
message = "Your license is invalid or doesn't support custom tools."
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Check to see if the path is a dashboard
|
76
|
+
if on_dashboards_path
|
77
|
+
if @license.lacks(:dashboards) || @license.invalid?
|
78
|
+
message = "Your license is invalid or doesn't support dashboards."
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
if message.present?
|
83
|
+
if Rails.env.development? || Rails.env.test?
|
84
|
+
@custom_tools_alert_visible = message
|
85
|
+
elsif @license.lacks_with_trial(:custom_tools)
|
86
|
+
# Raise error in non-development environments.
|
87
|
+
raise Avo::LicenseInvalidError, message
|
70
88
|
end
|
71
89
|
end
|
72
90
|
end
|
@@ -210,7 +228,7 @@ module Avo
|
|
210
228
|
|
211
229
|
def render_unauthorized(exception)
|
212
230
|
if !exception.is_a? Pundit::NotDefinedError
|
213
|
-
flash[:notice] = t "avo.not_authorized"
|
231
|
+
flash.now[:notice] = t "avo.not_authorized"
|
214
232
|
|
215
233
|
redirect_url = if request.referrer.blank? || (request.referrer == request.url)
|
216
234
|
root_url
|
@@ -227,8 +245,13 @@ module Avo
|
|
227
245
|
end
|
228
246
|
|
229
247
|
def set_container_classes
|
230
|
-
contain =
|
231
|
-
|
248
|
+
contain = true
|
249
|
+
|
250
|
+
if Avo.configuration.full_width_container
|
251
|
+
contain = false
|
252
|
+
elsif Avo.configuration.full_width_index_view && action_name.to_sym == :index && self.class.superclass.to_s == "Avo::ResourcesController"
|
253
|
+
contain = false
|
254
|
+
end
|
232
255
|
|
233
256
|
@container_classes = contain ? "2xl:container 2xl:mx-auto" : ""
|
234
257
|
end
|
@@ -249,6 +272,14 @@ module Avo
|
|
249
272
|
request.original_url.match?(/.*#{Avo::App.root_path}\/avo_api\/.*/)
|
250
273
|
end
|
251
274
|
|
275
|
+
def on_dashboards_path
|
276
|
+
request.original_url.match?(/.*#{Avo::App.root_path}\/dashboards\/.*/)
|
277
|
+
end
|
278
|
+
|
279
|
+
def on_custom_tool_page
|
280
|
+
!(on_root_path || on_resources_path || on_api_path || on_dashboards_path)
|
281
|
+
end
|
282
|
+
|
252
283
|
def model_param_key
|
253
284
|
@resource.form_scope
|
254
285
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_dependency "avo/base_controller"
|
2
2
|
|
3
3
|
module Avo
|
4
|
-
class
|
4
|
+
class AssociationsController < BaseController
|
5
5
|
before_action :set_model, only: [:show, :index, :new, :create, :destroy, :order]
|
6
6
|
before_action :set_related_resource_name
|
7
7
|
before_action :set_related_resource, only: [:show, :index, :new, :create, :destroy, :order]
|
@@ -61,10 +61,8 @@ module Avo
|
|
61
61
|
respond_to do |format|
|
62
62
|
if @model.save
|
63
63
|
format.html { redirect_to resource_path(model: @model, resource: @resource), notice: t("avo.attachment_class_attached", attachment_class: @related_resource.name) }
|
64
|
-
format.json { render :show, status: :created, location: resource_path(model: @model, resource: @resource) }
|
65
64
|
else
|
66
65
|
format.html { render :new }
|
67
|
-
format.json { render json: @model.errors, status: :unprocessable_entity }
|
68
66
|
end
|
69
67
|
end
|
70
68
|
end
|
@@ -17,12 +17,8 @@ module Avo
|
|
17
17
|
}
|
18
18
|
end
|
19
19
|
|
20
|
-
def show
|
21
|
-
end
|
22
|
-
|
23
20
|
def destroy
|
24
|
-
|
25
|
-
attachment = blob.attachments.find_by record_id: params[:id], record_type: @model.class.to_s
|
21
|
+
attachment = ActiveStorage::Attachment.find(params[:attachment_id])
|
26
22
|
path = resource_path(model: @model, resource: @resource)
|
27
23
|
|
28
24
|
if attachment.present?
|
@@ -7,20 +7,21 @@ module Avo
|
|
7
7
|
before_action :hydrate_resource
|
8
8
|
before_action :set_model, only: [:show, :edit, :destroy, :update, :order]
|
9
9
|
before_action :set_model_to_fill
|
10
|
+
before_action :set_edit_title_and_breadcrumbs, only: [:edit, :update]
|
10
11
|
before_action :fill_model, only: [:create, :update]
|
11
12
|
before_action :authorize_action
|
12
13
|
before_action :reset_pagination_if_filters_changed, only: :index
|
13
14
|
before_action :cache_applied_filters, only: :index
|
14
15
|
|
15
16
|
def index
|
16
|
-
@page_title =
|
17
|
-
add_breadcrumb
|
17
|
+
@page_title = @resource.plural_name.humanize
|
18
|
+
add_breadcrumb @resource.plural_name.humanize
|
18
19
|
|
19
20
|
set_index_params
|
20
21
|
set_filters
|
21
22
|
set_actions
|
22
23
|
|
23
|
-
# If we don't get a query object predefined from a child controller like
|
24
|
+
# If we don't get a query object predefined from a child controller like associations, just spin one up
|
24
25
|
unless defined? @query
|
25
26
|
@query = @resource.class.query_scope
|
26
27
|
end
|
@@ -30,7 +31,7 @@ module Avo
|
|
30
31
|
@query = @query.unscoped
|
31
32
|
end
|
32
33
|
|
33
|
-
# Eager load the
|
34
|
+
# Eager load the associations
|
34
35
|
if @resource.includes.present?
|
35
36
|
@query = @query.includes(*@resource.includes)
|
36
37
|
end
|
@@ -62,9 +63,9 @@ module Avo
|
|
62
63
|
def show
|
63
64
|
set_actions
|
64
65
|
|
65
|
-
@resource
|
66
|
+
@resource.hydrate(model: @model, view: :show, user: _current_user, params: params)
|
66
67
|
|
67
|
-
@page_title = @resource.default_panel_name
|
68
|
+
@page_title = @resource.default_panel_name.to_s
|
68
69
|
|
69
70
|
# If we're accessing this resource via another resource add the parent to the breadcrumbs.
|
70
71
|
if params[:via_resource_class].present? && params[:via_resource_id].present?
|
@@ -75,45 +76,25 @@ module Avo
|
|
75
76
|
add_breadcrumb via_resource.plural_name, resources_path(resource: via_resource)
|
76
77
|
add_breadcrumb via_resource.model_title, resource_path(model: via_model, resource: via_resource)
|
77
78
|
else
|
78
|
-
add_breadcrumb
|
79
|
+
add_breadcrumb @resource.plural_name.humanize, resources_path(resource: @resource)
|
79
80
|
end
|
80
81
|
|
81
82
|
add_breadcrumb @resource.model_title
|
83
|
+
add_breadcrumb I18n.t("avo.details").upcase_first
|
82
84
|
end
|
83
85
|
|
84
86
|
def new
|
85
87
|
@model = @resource.model_class.new
|
86
88
|
@resource = @resource.hydrate(model: @model, view: :new, user: _current_user)
|
87
89
|
|
88
|
-
@page_title = @resource.default_panel_name
|
89
|
-
add_breadcrumb
|
90
|
+
@page_title = @resource.default_panel_name.to_s
|
91
|
+
add_breadcrumb @resource.plural_name.humanize, resources_path(resource: @resource)
|
90
92
|
add_breadcrumb t("avo.new").humanize
|
91
93
|
end
|
92
94
|
|
93
|
-
def edit
|
94
|
-
@resource = @resource.hydrate(model: @model, view: :edit, user: _current_user)
|
95
|
-
|
96
|
-
@page_title = @resource.default_panel_name
|
97
|
-
|
98
|
-
# If we're accessing this resource via another resource add the parent to the breadcrumbs.
|
99
|
-
if params[:via_resource_class].present? && params[:via_resource_id].present?
|
100
|
-
via_resource = Avo::App.get_resource_by_model_name params[:via_resource_class]
|
101
|
-
via_model = via_resource.class.find_scope.find params[:via_resource_id]
|
102
|
-
via_resource.hydrate model: via_model
|
103
|
-
|
104
|
-
add_breadcrumb via_resource.plural_name, resources_path(resource: @resource)
|
105
|
-
add_breadcrumb via_resource.model_title, resource_path(model: via_model, resource: via_resource)
|
106
|
-
else
|
107
|
-
add_breadcrumb resource_name.humanize, resources_path(resource: @resource)
|
108
|
-
end
|
109
|
-
|
110
|
-
add_breadcrumb @resource.model_title, resource_path(model: @resource.model, resource: @resource)
|
111
|
-
add_breadcrumb t("avo.edit").humanize
|
112
|
-
end
|
113
|
-
|
114
95
|
def create
|
115
96
|
# model gets instantiated and filled in the fill_model method
|
116
|
-
saved =
|
97
|
+
saved = save_model
|
117
98
|
@resource.hydrate(model: @model, view: :new, user: _current_user)
|
118
99
|
|
119
100
|
# This means that the record has been created through another parent record and we need to attach it somehow.
|
@@ -155,38 +136,40 @@ module Avo
|
|
155
136
|
end
|
156
137
|
|
157
138
|
format.html { redirect_to redirect_path, notice: "#{@model.class.name} #{t("avo.was_successfully_created")}." }
|
158
|
-
format.json { render :show, status: :created, location: @model }
|
159
139
|
else
|
160
|
-
flash[:error] = t "avo.you_missed_something_check_form"
|
140
|
+
flash.now[:error] = t "avo.you_missed_something_check_form"
|
161
141
|
format.html { render :new, status: :unprocessable_entity }
|
162
|
-
format.json { render json: @model.errors, status: :unprocessable_entity }
|
163
142
|
end
|
164
143
|
end
|
165
144
|
end
|
166
145
|
|
146
|
+
def edit
|
147
|
+
end
|
148
|
+
|
167
149
|
def update
|
168
150
|
# model gets instantiated and filled in the fill_model method
|
169
|
-
saved =
|
151
|
+
saved = save_model
|
170
152
|
@resource = @resource.hydrate(model: @model, view: :edit, user: _current_user)
|
171
153
|
|
172
154
|
respond_to do |format|
|
173
155
|
if saved
|
174
156
|
format.html { redirect_to params[:referrer] || resource_path(model: @model, resource: @resource), notice: "#{@model.class.name} #{t("avo.was_successfully_updated")}." }
|
175
|
-
format.json { render :show, status: :ok, location: @model }
|
176
157
|
else
|
177
|
-
flash[:error] = t "avo.you_missed_something_check_form"
|
158
|
+
flash.now[:error] = t "avo.you_missed_something_check_form"
|
178
159
|
format.html { render :edit, status: :unprocessable_entity }
|
179
|
-
format.json { render json: @model.errors, status: :unprocessable_entity }
|
180
160
|
end
|
181
161
|
end
|
182
162
|
end
|
183
163
|
|
184
164
|
def destroy
|
185
|
-
@model.destroy!
|
186
|
-
|
187
165
|
respond_to do |format|
|
188
|
-
|
189
|
-
|
166
|
+
if destroy_model
|
167
|
+
format.html { redirect_to params[:referrer] || resources_path(resource: @resource, turbo_frame: params[:turbo_frame], view_type: params[:view_type]), notice: t("avo.resource_destroyed", attachment_class: @attachment_class) }
|
168
|
+
else
|
169
|
+
error_message = @errors.present? ? @errors.first : t("avo.failed")
|
170
|
+
|
171
|
+
format.html { redirect_back fallback_location: params[:referrer] || resources_path(resource: @resource, turbo_frame: params[:turbo_frame], view_type: params[:view_type]), error: error_message }
|
172
|
+
end
|
190
173
|
end
|
191
174
|
end
|
192
175
|
|
@@ -207,6 +190,31 @@ module Avo
|
|
207
190
|
|
208
191
|
private
|
209
192
|
|
193
|
+
def save_model
|
194
|
+
perform_action_and_record_errors do
|
195
|
+
@model.save!
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
def destroy_model
|
200
|
+
perform_action_and_record_errors do
|
201
|
+
@model.destroy!
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
def perform_action_and_record_errors(&block)
|
206
|
+
begin
|
207
|
+
succeeded = block.call
|
208
|
+
rescue => exception
|
209
|
+
# In case there's an error somewhere else than the model
|
210
|
+
# Example: When you save a license that should create a user for it and creating that user throws and error.
|
211
|
+
# Example: When you Try to delete a record and has a foreign key constraint.
|
212
|
+
@errors = Array.wrap(exception.message)
|
213
|
+
end
|
214
|
+
|
215
|
+
succeeded
|
216
|
+
end
|
217
|
+
|
210
218
|
def model_params
|
211
219
|
request_params = params.require(model_param_key).permit(permitted_params)
|
212
220
|
|
@@ -291,13 +299,12 @@ module Avo
|
|
291
299
|
model = @resource.class.find_scope.find params[:resource_id]
|
292
300
|
end
|
293
301
|
|
294
|
-
@actions =
|
295
|
-
|
296
|
-
|
297
|
-
.
|
298
|
-
|
299
|
-
|
300
|
-
.select { |action| action.visible_in_view }
|
302
|
+
@actions = @resource
|
303
|
+
.get_actions
|
304
|
+
.map do |action|
|
305
|
+
action.new(model: model, resource: @resource, view: @view)
|
306
|
+
end
|
307
|
+
.select { |action| action.visible_in_view }
|
301
308
|
end
|
302
309
|
|
303
310
|
def applied_filters
|
@@ -331,5 +338,24 @@ module Avo
|
|
331
338
|
def applied_filters_cache_key
|
332
339
|
"avo.base_controller.#{@resource.model_key}.applied_filters"
|
333
340
|
end
|
341
|
+
|
342
|
+
def set_edit_title_and_breadcrumbs
|
343
|
+
@resource = @resource.hydrate(model: @model, view: :edit, user: _current_user)
|
344
|
+
@page_title = @resource.default_panel_name.to_s
|
345
|
+
# If we're accessing this resource via another resource add the parent to the breadcrumbs.
|
346
|
+
if params[:via_resource_class].present? && params[:via_resource_id].present?
|
347
|
+
via_resource = Avo::App.get_resource_by_model_name params[:via_resource_class]
|
348
|
+
via_model = via_resource.class.find_scope.find params[:via_resource_id]
|
349
|
+
via_resource.hydrate model: via_model
|
350
|
+
|
351
|
+
add_breadcrumb via_resource.plural_name, resources_path(resource: @resource)
|
352
|
+
add_breadcrumb via_resource.model_title, resource_path(model: via_model, resource: via_resource)
|
353
|
+
else
|
354
|
+
add_breadcrumb @resource.plural_name.humanize, resources_path(resource: @resource)
|
355
|
+
end
|
356
|
+
|
357
|
+
add_breadcrumb @resource.model_title, resource_path(model: @resource.model, resource: @resource)
|
358
|
+
add_breadcrumb t("avo.edit").humanize
|
359
|
+
end
|
334
360
|
end
|
335
361
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require_dependency "avo/application_controller"
|
2
|
+
|
3
|
+
module Avo
|
4
|
+
class DashboardsController < ApplicationController
|
5
|
+
before_action :set_dashboard
|
6
|
+
|
7
|
+
def show
|
8
|
+
end
|
9
|
+
|
10
|
+
def card
|
11
|
+
@card = @dashboard.items.find do |item|
|
12
|
+
next unless item.is_card?
|
13
|
+
|
14
|
+
item.id.to_s == params[:card_id]
|
15
|
+
end.tap do |card|
|
16
|
+
card.hydrate(dashboard: @dashboard, params: params)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def set_dashboard
|
23
|
+
@dashboard = Avo::App.get_dashboard_by_id params[:dashboard_id]
|
24
|
+
|
25
|
+
raise ActionController::RoutingError.new("Not Found") if @dashboard.nil? || @dashboard.is_hidden?
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -10,7 +10,11 @@ module Avo
|
|
10
10
|
def index
|
11
11
|
raise ActionController::BadRequest.new("This feature requires the pro license https://avohq.io/purchase/pro") if App.license.lacks_with_trial(:global_search)
|
12
12
|
|
13
|
-
|
13
|
+
resources = Avo::App.resources.reject do |resource|
|
14
|
+
resource.class.hide_from_global_search
|
15
|
+
end
|
16
|
+
|
17
|
+
render json: search_resources(resources)
|
14
18
|
end
|
15
19
|
|
16
20
|
def show
|