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
Correctly show title of query and ifc
Oliver Güntherd9bfadc2af55
diff --git a/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.ts b/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.tsindex 0a8329d25b8..9059be67f45 100644--- a/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.ts+++ b/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.ts@@ -10,10 +10,15 @@ import {BcfExportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-expimport {WorkPackageFilterButtonComponent} from "core-components/wp-buttons/wp-filter-button/wp-filter-button.component";import {ZenModeButtonComponent} from "core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component";import {componentDestroyed} from "ng2-rx-componentdestroyed";-import {bimViewerViewIdentifier, BimViewService} from "core-app/modules/ifc_models/pages/viewer/bim-view.service";+import {+ bimListViewIdentifier,+ bimViewerViewIdentifier,+ BimViewService+} from "core-app/modules/ifc_models/pages/viewer/bim-view.service";import {BimViewToggleButtonComponent} from "core-app/modules/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component";import {IfcModelsDataService} from "core-app/modules/ifc_models/pages/viewer/ifc-models-data.service";import {QueryParamListenerService} from "core-components/wp-query/query-param-listener.service";+import {QueryResource} from "core-app/modules/hal/resources/query-resource";@Component({templateUrl: '/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html',@@ -72,12 +77,23 @@ export class IFCViewerPageComponent extends PartitionedQuerySpacePageComponent {});}- public get title() {- if (this.$state.includes('bim.space.defaults')) {- return this.I18n.t('js.ifc_models.models.default');+ /**+ * We disable using the query title for now,+ * but this might be useful later.+ *+ * To re-enable query titles, remove this function.+ *+ * @param _query+ */+ updateTitle(query?:QueryResource) {+ if (this.bimView.current === bimListViewIdentifier) {+ super.updateTitle(query);} else {- return this.ifcData.models[0]['name'];+ this.selectedTitle = this.I18n.t('js.ifc_models.models.default');}++ // For now, disable any editing+ this.titleEditingEnabled = false;}/** We do not have a mapping for html title in this module yet */diff --git a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.tsindex 5f4734c28f9..c5bdda1485e 100644--- a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts+++ b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts@@ -137,9 +137,7 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp// Update title on entering this statethis.unRegisterTitleListener = this.$transitions.onSuccess( {}, () => {- if (this.shouldUpdateHtmlTitle() && this.selectedTitle) {- this.titleService.setFirstPart(this.selectedTitle);- }+ this.updateTitle(this.querySpace.query.value);});this.querySpace.query.values$().pipe(@@ -206,7 +204,14 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp}- updateTitle(query:QueryResource) {+ updateTitle(query?:QueryResource) {++ // Too early for loaded query+ if (!query) {+ return;+ }++if (query.persisted) {this.selectedTitle = query.name;} else {