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
PostBoxSimple.vue
79 lines
| 1 | <template> |
| 2 | <div class="jfb-post-box" :id="slug + '-wrapper'"> |
| 3 | <div class="jfb-post-box--content" v-if="$slots.default"> |
| 4 | <slot></slot> |
| 5 | </div> |
| 6 | <div class="jfb-post-box--content" v-else> |
| 7 | <slot name="before"></slot> |
| 8 | <PostBoxSkeleton |
| 9 | :title="title" |
| 10 | :slug="slug" |
| 11 | > |
| 12 | <template #header-actions> |
| 13 | <slot name="header-actions"></slot> |
| 14 | </template> |
| 15 | <template #default> |
| 16 | <slot name="in-header"></slot> |
| 17 | <EntriesTable |
| 18 | v-if="'table' === renderType" |
| 19 | :scope="slug" |
| 20 | /> |
| 21 | <EntriesList |
| 22 | v-else-if="'list' === renderType" |
| 23 | :scope="slug" |
| 24 | /> |
| 25 | <div |
| 26 | id="misc-publishing-actions" |
| 27 | v-else |
| 28 | > |
| 29 | <div |
| 30 | class="misc-pub-section" |
| 31 | v-for="(value, name) in list" |
| 32 | :key="name" |
| 33 | > |
| 34 | {{ name }}: <strong>{{ value }}</strong> |
| 35 | </div> |
| 36 | </div> |
| 37 | <slot name="in-footer"></slot> |
| 38 | </template> |
| 39 | </PostBoxSkeleton> |
| 40 | <slot name="after"></slot> |
| 41 | </div> |
| 42 | </div> |
| 43 | </template> |
| 44 | |
| 45 | <script> |
| 46 | import PostBoxSkeleton from './PostBoxSkeleton'; |
| 47 | import EntriesTable from './EntriesTable'; |
| 48 | import EntriesList from './EntriesList'; |
| 49 | import EditTableSwitcher from './BoxActions/EditTableSwitcher'; |
| 50 | |
| 51 | |
| 52 | export default { |
| 53 | name: 'PostBoxSimple', |
| 54 | props: [ |
| 55 | 'title', |
| 56 | 'slug', |
| 57 | 'list', |
| 58 | 'renderType', |
| 59 | ], |
| 60 | components: { |
| 61 | EntriesTable, |
| 62 | EntriesList, |
| 63 | PostBoxSkeleton, |
| 64 | EditTableSwitcher, |
| 65 | }, |
| 66 | }; |
| 67 | </script> |
| 68 | |
| 69 | <style> |
| 70 | |
| 71 | .misc-pub-section { |
| 72 | border-bottom: 1px solid #ececec; |
| 73 | } |
| 74 | |
| 75 | .misc-pub-section:last-child { |
| 76 | border-bottom: unset; |
| 77 | } |
| 78 | |
| 79 | </style> |