Alerts
2 years ago
BoxActions
2 years ago
PaymentsPage
2 years ago
TableColumns
2 years ago
VuiBoxes
2 years ago
ActionsWithFilters.vue
2 years ago
ChooseAction.vue
2 years ago
ClearFiltersButton.vue
2 years ago
DetailsTableWithStore.vue
2 years ago
EntriesList.vue
2 years ago
EntriesTable.vue
2 years ago
EntriesTableSkeleton.vue
2 years ago
EntryColumnList.vue
2 years ago
EntryColumnsTable.vue
2 years ago
FormBuilderPage.vue
2 years ago
PageActions.vue
2 years ago
PostBoxContainer.vue
2 years ago
PostBoxGrid.vue
2 years ago
PostBoxSimple.vue
2 years ago
PostBoxSkeleton.vue
2 years ago
PostBoxTable.vue
2 years ago
SideBarBoxes.vue
2 years ago
TablePagination.vue
2 years ago
PostBoxGrid.vue
84 lines
| 1 | <template> |
| 2 | <div id="poststuff"> |
| 3 | <div id="post-body" :class="bodyClasses"> |
| 4 | <div id="post-body-content" v-if="$slots.topBody"> |
| 5 | <slot name="topBody"></slot> |
| 6 | </div> |
| 7 | <PostBoxContainer |
| 8 | v-for="({ wrap_id, id, classes, boxes }) in containers" |
| 9 | :key="wrap_id" |
| 10 | :wrap-id="wrap_id" |
| 11 | :id="id" |
| 12 | :classes="classes" |
| 13 | > |
| 14 | <PostBoxSimple |
| 15 | v-for="({ |
| 16 | slug, |
| 17 | title, |
| 18 | list, |
| 19 | render_type = false |
| 20 | }) in boxes" |
| 21 | :key="slug" |
| 22 | :slug="slug" |
| 23 | :title="title" |
| 24 | :list="list" |
| 25 | :render-type="render_type" |
| 26 | > |
| 27 | <template #header-actions> |
| 28 | <slot :name="'header-actions-' + slug" v-bind="{ list }"></slot> |
| 29 | </template> |
| 30 | <template #default> |
| 31 | <slot :name="'body-' + slug" v-bind="{ list }"></slot> |
| 32 | </template> |
| 33 | <template #before> |
| 34 | <slot :name="'before-' + slug" v-bind="{ list }"></slot> |
| 35 | </template> |
| 36 | <template #after> |
| 37 | <slot :name="'after-' + slug" v-bind="{ list }"></slot> |
| 38 | </template> |
| 39 | <template #in-header v-if="$slots['in-header-' + slug ]"> |
| 40 | <slot :name="'in-header-' + slug"></slot> |
| 41 | </template> |
| 42 | <template #in-footer v-if="$slots['in-footer-' + slug ]"> |
| 43 | <slot :name="'in-footer-' + slug"></slot> |
| 44 | </template> |
| 45 | </PostBoxSimple> |
| 46 | </PostBoxContainer> |
| 47 | </div> |
| 48 | </div> |
| 49 | </template> |
| 50 | |
| 51 | <script> |
| 52 | import PostBoxContainer from './PostBoxContainer'; |
| 53 | import PostBoxSimple from './PostBoxSimple'; |
| 54 | import EditTableSwitcher from './BoxActions/EditTableSwitcher'; |
| 55 | |
| 56 | export default { |
| 57 | name: 'PostBoxGrid', |
| 58 | props: { |
| 59 | containers: { |
| 60 | type: Array, |
| 61 | default() { |
| 62 | return window?.JetFBPageConfig?.containers ?? []; |
| 63 | }, |
| 64 | }, |
| 65 | }, |
| 66 | components: { |
| 67 | EditTableSwitcher, |
| 68 | PostBoxContainer, |
| 69 | PostBoxSimple, |
| 70 | }, |
| 71 | computed: { |
| 72 | bodyClasses() { |
| 73 | return { |
| 74 | 'metabox-holder': true, |
| 75 | [ 'columns-' + this.containers?.length ]: true, |
| 76 | }; |
| 77 | }, |
| 78 | }, |
| 79 | }; |
| 80 | </script> |
| 81 | |
| 82 | <style> |
| 83 | |
| 84 | </style> |