From a7016ca153b97d2e61c5b0bdf3b073bf7b9ec7d6 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 7 May 2025 10:08:18 +0300 Subject: [PATCH] kanban starred --- client/res/templates/record/kanban-item.tpl | 2 +- client/src/views/record/kanban-item.js | 2 ++ client/src/views/record/kanban.js | 7 +++++++ frontend/less/espo/custom.less | 21 +++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/client/res/templates/record/kanban-item.tpl b/client/res/templates/record/kanban-item.tpl index ffaeec783a..786689bd0a 100644 --- a/client/res/templates/record/kanban-item.tpl +++ b/client/res/templates/record/kanban-item.tpl @@ -1,4 +1,4 @@ -
+
{{#each layoutDataList}}
diff --git a/client/src/views/record/kanban-item.js b/client/src/views/record/kanban-item.js index 1acb7c96a1..a57a2e48f6 100644 --- a/client/src/views/record/kanban-item.js +++ b/client/src/views/record/kanban-item.js @@ -36,6 +36,7 @@ class KanbanRecordItem extends View { return { layoutDataList: this.layoutDataList, rowActionsDisabled: this.rowActionsDisabled, + isStarred: this.hasStars && this.model.attributes.isStarred, }; } @@ -43,6 +44,7 @@ class KanbanRecordItem extends View { this.itemLayout = this.options.itemLayout; this.rowActionsView = this.options.rowActionsView; this.rowActionsDisabled = this.options.rowActionsDisabled; + this.hasStars = this.options.hasStars; this.layoutDataList = []; diff --git a/client/src/views/record/kanban.js b/client/src/views/record/kanban.js index 99d18942f6..8f40ee2975 100644 --- a/client/src/views/record/kanban.js +++ b/client/src/views/record/kanban.js @@ -433,6 +433,12 @@ class KanbanRecordView extends ListRecordView { this.wait( this.getHelper().processSetupHandlers(this, 'record/kanban') ); + + /** + * @private + * @type {boolean} + */ + this.hasStars = this.getMetadata().get(`scopes.${this.entityType}.stars`) || false; } afterRender() { @@ -1026,6 +1032,7 @@ class KanbanRecordView extends ListRecordView { moveOverRowAction: this.moveOverRowAction, additionalRowActionList: this._additionalRowActionList, scope: this.scope, + hasStars: this.hasStars, }, callback); } diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less index c4b4b1b3ef..b3da135c9d 100644 --- a/frontend/less/espo/custom.less +++ b/frontend/less/espo/custom.less @@ -1411,6 +1411,27 @@ section { } } +.list-kanban { + .panel.starred { + > .panel-body { + position: relative; + + &::before { + content: " "; + inset: 0; + position: absolute; + left: 0; + top: calc(50% - var(--8px)); + height: var(--16px); + width: var(--3px); + background-color: var(--brand-warning); + border-top-right-radius: var(--2px); + border-bottom-right-radius: var(--2px); + } + } + } +} + .list > { table > tbody, ul.list-group {