Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

show drag icon only when the widget is draggable

Behrokh Satarnejaddae6d3692a0b
diff --git a/frontend/src/app/shared/components/grids/widgets/header/header.component.html b/frontend/src/app/shared/components/grids/widgets/header/header.component.html
index 3724c0b0d70..7a85da685ea 100644
--- a/frontend/src/app/shared/components/grids/widgets/header/header.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/header/header.component.html
@@ -1,7 +1,8 @@
<h3 class="op-widget-box--header"
data-test-selector="op-widget-box--header"
[ngClass]="{ '-editable': isRenameable }">
- <svg grabber-icon
+ <svg *ngIf="drag.isDraggable"
+ grabber-icon
size="small"
cdkDragHandle
class="grid--area-drag-handle hidden-for-mobile"></svg>
diff --git a/frontend/src/app/shared/components/grids/widgets/header/header.component.ts b/frontend/src/app/shared/components/grids/widgets/header/header.component.ts
index 5d3ab9fa971..7e8f18ef9e1 100644
--- a/frontend/src/app/shared/components/grids/widgets/header/header.component.ts
+++ b/frontend/src/app/shared/components/grids/widgets/header/header.component.ts
@@ -30,6 +30,7 @@ import {
ChangeDetectionStrategy, Component, EventEmitter, Input, Output,
} from '@angular/core';
import { GridAreaService } from 'core-app/shared/components/grids/grid/area.service';
+import { GridDragAndDropService } from 'core-app/shared/components/grids/grid/drag-and-drop.service';
@Component({
selector: 'widget-header',
@@ -45,7 +46,10 @@ export class WidgetHeaderComponent {
@Output() onRenamed = new EventEmitter<string>();
- constructor(readonly layout:GridAreaService) {
+ constructor(
+ readonly layout:GridAreaService,
+ readonly drag:GridDragAndDropService,
+ ) {
}