diff --git a/models/board/src/index.ts b/models/board/src/index.ts index f326ac984f..8b37f52b43 100644 --- a/models/board/src/index.ts +++ b/models/board/src/index.ts @@ -214,6 +214,12 @@ export function createModel (builder: Builder): void { config: [] }) + builder.createDoc(view.class.Viewlet, core.space.Model, { + attachTo: board.class.Card, + descriptor: board.viewlet.Table, + config: [] + }) + builder.mixin(board.class.Card, core.class.Class, task.mixin.KanbanCard, { card: board.component.KanbanCard }) @@ -260,6 +266,17 @@ export function createModel (builder: Builder): void { board.viewlet.Kanban ) + builder.createDoc( + view.class.ViewletDescriptor, + core.space.Model, + { + label: view.string.Table, + icon: view.icon.Table, + component: board.component.TableView + }, + board.viewlet.Table + ) + // card actions builder.createDoc( board.class.CardAction, diff --git a/models/board/src/plugin.ts b/models/board/src/plugin.ts index 3c1ffc807f..022d9b7d26 100644 --- a/models/board/src/plugin.ts +++ b/models/board/src/plugin.ts @@ -33,7 +33,8 @@ export default mergeIds(boardId, board, { BoardPresenter: '' as AnyComponent, TemplatesIcon: '' as AnyComponent, Cards: '' as AnyComponent, - KanbanView: '' as AnyComponent + KanbanView: '' as AnyComponent, + TableView: '' as AnyComponent }, space: { DefaultBoard: '' as Ref @@ -45,7 +46,8 @@ export default mergeIds(boardId, board, { Sequence: '' as Ref }, viewlet: { - Kanban: '' as Ref + Kanban: '' as Ref, + Table: '' as Ref }, string: { LabelsCompactMode: '' as IntlString diff --git a/plugins/board-resources/src/components/BoardHeader.svelte b/plugins/board-resources/src/components/BoardHeader.svelte index 6d0f4bba15..ebaeeb7c47 100644 --- a/plugins/board-resources/src/components/BoardHeader.svelte +++ b/plugins/board-resources/src/components/BoardHeader.svelte @@ -1,11 +1,17 @@
{#if space}
+ {#if viewlets.length > 1} +
+ {#each viewlets as v, i} + + + + {/each} +
+ {/if} {#if showMenuButton}