ActionButton.vue
2 years ago
BoxActions.vue
2 years ago
EditTableSwitcher.vue
2 years ago
RedirectToSingle.vue
2 years ago
ShowOverflowTable.vue
2 years ago
UndoChangesTable.vue
2 years ago
BoxActions.vue
62 lines
| 1 | <template> |
| 2 | <div class="major-publishing-actions" v-if="primary.length"> |
| 3 | <div class="jfb-primary-actions"> |
| 4 | <ActionButton |
| 5 | v-for="action in primary" |
| 6 | :scope="scope" |
| 7 | :key="action.slug" |
| 8 | :action="action" |
| 9 | :class="[ |
| 10 | 'box-actions-item', |
| 11 | 'action-' + action.slug, |
| 12 | ]" |
| 13 | /> |
| 14 | </div> |
| 15 | <div class="clear"></div> |
| 16 | </div> |
| 17 | </template> |
| 18 | |
| 19 | <script> |
| 20 | import ScopeStoreMixin from '../../mixins/ScopeStoreMixin'; |
| 21 | import ActionButton from './ActionButton'; |
| 22 | |
| 23 | const { |
| 24 | mapState, |
| 25 | mapGetters, |
| 26 | mapMutations, |
| 27 | mapActions, |
| 28 | } = Vuex; |
| 29 | |
| 30 | export default { |
| 31 | name: 'BoxActions', |
| 32 | components: { ActionButton }, |
| 33 | mixins: [ ScopeStoreMixin ], |
| 34 | computed: { |
| 35 | primary() { |
| 36 | const actions = this.getter( 'actions/actions' ); |
| 37 | |
| 38 | return actions |
| 39 | ? actions.filter( action => 'primary' === action.position ) |
| 40 | : []; |
| 41 | }, |
| 42 | }, |
| 43 | }; |
| 44 | </script> |
| 45 | |
| 46 | <style> |
| 47 | .jfb-primary-actions { |
| 48 | display: flex; |
| 49 | justify-content: space-between; |
| 50 | } |
| 51 | |
| 52 | .cx-vui-button.cx-vui-button--size-link { |
| 53 | font-size: inherit; |
| 54 | } |
| 55 | |
| 56 | .major-publishing-actions { |
| 57 | padding: 10px; |
| 58 | clear: both; |
| 59 | border-top: 1px solid #dcdcde; |
| 60 | background: #f6f7f7; |
| 61 | } |
| 62 | </style> |