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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Remove view selector as it is not necessary any more with the separate gantt module
Henriette Darge04e6cfc85ea9
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component.ts b/frontend/src/app/features/work-packages/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component.tsdeleted file mode 100644index 35825b1c412..00000000000--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component.ts+++ /dev/null@@ -1,102 +0,0 @@-// -- copyright-// OpenProject is an open source project management software.-// Copyright (C) 2012-2024 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 COPYRIGHT and LICENSE files for more details.-//++--import {- ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit,-} from '@angular/core';-import { I18nService } from 'core-app/core/i18n/i18n.service';-import {- WorkPackageViewDisplayRepresentationService,- wpDisplayCardRepresentation,- wpDisplayListRepresentation,-} from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-display-representation.service';-import { WorkPackageViewTimelineService } from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-timeline.service';-import { combineLatest } from 'rxjs';-import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';--@Component({- template: `- <button class="button"- id="wp-view-toggle-button"- wpViewDropdown>- <op-icon icon-classes="button--icon icon-view-{{view}}"></op-icon>- <span class="button--text"- aria-hidden="true"- [textContent]="text[view]">- </span>- <span class="spot-icon spot-icon_dropdown"></span>- </button>- `,- changeDetection: ChangeDetectionStrategy.OnPush,- selector: 'wp-view-toggle-button',-})-export class WorkPackageViewToggleButtonComponent extends UntilDestroyedMixin implements OnInit {- public view:string;-- public text:any = {- card: this.I18n.t('js.views.card'),- list: this.I18n.t('js.views.list'),- timeline: this.I18n.t('js.views.timeline'),- };-- constructor(- readonly I18n:I18nService,- readonly cdRef:ChangeDetectorRef,- readonly wpDisplayRepresentationService:WorkPackageViewDisplayRepresentationService,- readonly wpTableTimeline:WorkPackageViewTimelineService,- ) {- super();- }-- ngOnInit() {- const statesCombined = combineLatest([- this.wpDisplayRepresentationService.live$(),- this.wpTableTimeline.live$(),- ]);-- statesCombined.pipe(- this.untilDestroyed(),- ).subscribe(([display, timelines]) => {- this.detectView(display, timelines.visible);- this.cdRef.detectChanges();- });- }-- public detectView(display:string|null, timelineVisible:boolean) {- if (display === wpDisplayCardRepresentation) {- this.view = wpDisplayCardRepresentation;- return;- }-- if (timelineVisible) {- this.view = 'timeline';- } else {- this.view = wpDisplayListRepresentation;- }- }-}diff --git a/frontend/src/app/features/work-packages/openproject-work-packages.module.ts b/frontend/src/app/features/work-packages/openproject-work-packages.module.tsindex 9dda705ea77..433283cc79d 100644--- a/frontend/src/app/features/work-packages/openproject-work-packages.module.ts+++ b/frontend/src/app/features/work-packages/openproject-work-packages.module.ts@@ -230,9 +230,6 @@ import {import {WorkPackagesTableConfigMenuComponent,} from 'core-app/features/work-packages/components/wp-table/config-menu/config-menu.component';-import {- WorkPackageViewToggleButtonComponent,-} from 'core-app/features/work-packages/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component';import {WorkPackageViewDropdownMenuDirective,} from 'core-app/shared/components/op-context-menu/handlers/wp-view-dropdown-menu.directive';@@ -647,7 +644,6 @@ import {// Card viewWorkPackageCardViewComponent,WorkPackageSingleCardComponent,- WorkPackageViewToggleButtonComponent,// NotificationsWorkPackageMarkNotificationButtonComponent,diff --git a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.tsindex feff4e477df..f24f68304d4 100644--- a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts+++ b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts@@ -37,7 +37,6 @@ import {} from 'core-app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component';import { WorkPackageCreateButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/wp-create-button/wp-create-button.component';import { WorkPackageFilterButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/wp-filter-button/wp-filter-button.component';-import { WorkPackageViewToggleButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component';import { WorkPackageDetailsViewButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/wp-details-view-button/wp-details-view-button.component';import { WorkPackageTimelineButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component';import { ZenModeButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component';@@ -80,10 +79,6 @@ export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageCompo{component: WorkPackageFilterButtonComponent,},- {- component: WorkPackageViewToggleButtonComponent,- containerClasses: 'hidden-for-tablet',- },{component: WorkPackageFoldToggleButtonComponent,show: () => !!(this.currentQuery && this.currentQuery.groupBy),