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

Add header component for status

Oliver Günther941820937240
diff --git a/frontend/src/app/modules/boards/board/board-actions/status/status-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/status/status-action.service.ts
index 830658f2228..d8715d78828 100644
--- a/frontend/src/app/modules/boards/board/board-actions/status/status-action.service.ts
+++ b/frontend/src/app/modules/boards/board/board-actions/status/status-action.service.ts
@@ -3,6 +3,7 @@ import {Board} from "core-app/modules/boards/board/board";
import {StatusResource} from "core-app/modules/hal/resources/status-resource";
import {BoardActionService} from "core-app/modules/boards/board/board-actions/board-action.service";
import {CachedBoardActionService} from "core-app/modules/boards/board/board-actions/cached-board-action.service";
+import {StatusBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/status/status-board-header.component";
@Injectable()
export class BoardStatusActionService extends CachedBoardActionService {
@@ -22,6 +23,10 @@ export class BoardStatusActionService extends CachedBoardActionService {
return this.I18n.t('js.work_packages.properties.status');
}
+ headerComponent() {
+ return StatusBoardHeaderComponent;
+ }
+
public addInitialColumnsForAction(board:Board):Promise<Board> {
return this
.loadValues()
diff --git a/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.component.ts b/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.component.ts
new file mode 100644
index 00000000000..d98e3dafd9c
--- /dev/null
+++ b/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.component.ts
@@ -0,0 +1,47 @@
+//-- copyright
+// OpenProject is an open source project management software.
+// Copyright (C) 2012-2020 the OpenProject GmbH
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License version 3.
+//
+// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+// Copyright (C) 2006-2013 Jean-Philippe Lang
+// Copyright (C) 2010-2013 the ChiliProject Team
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// See docs/COPYRIGHT.rdoc for more details.
+//++
+import {Component, Input} from "@angular/core";
+import {I18nService} from "core-app/modules/common/i18n/i18n.service";
+import {StatusResource} from "core-app/modules/hal/resources/status-resource";
+
+
+@Component({
+ templateUrl: './status-board-header.html',
+ styleUrls: ['./status-board-header.sass'],
+ host: { 'class': 'title-container -small' }
+})
+export class StatusBoardHeaderComponent {
+ @Input('resource') public status:StatusResource;
+
+ text = {
+ status: this.I18n.t('js.work_packages.properties.status')
+ };
+
+ constructor(readonly I18n:I18nService) {
+ }
+}
diff --git a/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.html b/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.html
new file mode 100644
index 00000000000..f2d64c8c46f
--- /dev/null
+++ b/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.html
@@ -0,0 +1,7 @@
+<div class="status-board-header" *ngIf="status">
+ <h2 class="editable-toolbar-title--fixed">
+ <small [textContent]="text.status"></small>
+ <br/>
+ {{ status.name }}
+ </h2>
+</div>
diff --git a/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.sass b/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.sass
new file mode 100644
index 00000000000..b37579485d2
--- /dev/null
+++ b/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.sass
@@ -0,0 +1,2 @@
+.editable-toolbar-title--fixed
+ line-height: 1 !important
\ No newline at end of file
diff --git a/frontend/src/app/modules/boards/openproject-boards.module.ts b/frontend/src/app/modules/boards/openproject-boards.module.ts
index 4f1a94f5277..bd51ade08be 100644
--- a/frontend/src/app/modules/boards/openproject-boards.module.ts
+++ b/frontend/src/app/modules/boards/openproject-boards.module.ts
@@ -54,6 +54,7 @@ import {AssigneeBoardHeaderComponent} from "core-app/modules/boards/board/board-
import { TileViewComponent } from './tile-view/tile-view.component';
import {SubprojectBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/subproject/subproject-board-header.component";
import {SubtasksBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/subtasks/subtasks-board-header.component";
+import {StatusBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/status/status-board-header.component";
@NgModule({
imports: [
@@ -91,6 +92,7 @@ import {SubtasksBoardHeaderComponent} from "core-app/modules/boards/board/board-
AssigneeBoardHeaderComponent,
SubprojectBoardHeaderComponent,
SubtasksBoardHeaderComponent,
+ StatusBoardHeaderComponent,
TileViewComponent,
]
})