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

remove trailing slash

ulferts89de00b4bd52
diff --git a/frontend/src/app/modules/ifc_models/openproject-ifc-models.module.ts b/frontend/src/app/modules/ifc_models/openproject-ifc-models.module.ts
index 12a19d41d81..dd2a14cb593 100644
--- a/frontend/src/app/modules/ifc_models/openproject-ifc-models.module.ts
+++ b/frontend/src/app/modules/ifc_models/openproject-ifc-models.module.ts
@@ -30,7 +30,7 @@ import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/open
import {UIRouterModule} from '@uirouter/angular';
import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module";
import {IFCViewerComponent} from './ifc-viewer/ifc-viewer.component';
-import {IFC_ROUTES, uiRouterIFCConfiguration} from "core-app/modules/ifc_models/openproject-ifc-models.routes";
+import {IFC_ROUTES} from "core-app/modules/ifc_models/openproject-ifc-models.routes";
import {IFCViewerPageComponent} from "core-app/modules/ifc_models/pages/viewer/ifc-viewer-page.component";
import {BCFContainerComponent} from "core-app/modules/ifc_models/bcf/container/bcf-container.component";
import {BimViewToggleDropdownDirective} from "core-app/modules/ifc_models/view-toggle/bim-view-toggle-dropdown.directive";
@@ -42,8 +42,7 @@ import {EmptyComponent} from "core-app/modules/ifc_models/empty/empty-component"
OpenprojectCommonModule,
OpenprojectWorkPackagesModule,
UIRouterModule.forChild({
- states: IFC_ROUTES,
- config: uiRouterIFCConfiguration
+ states: IFC_ROUTES
})
],
providers: [
diff --git a/frontend/src/app/modules/ifc_models/openproject-ifc-models.routes.ts b/frontend/src/app/modules/ifc_models/openproject-ifc-models.routes.ts
index 1ad5f1891e9..892bd86c5b6 100644
--- a/frontend/src/app/modules/ifc_models/openproject-ifc-models.routes.ts
+++ b/frontend/src/app/modules/ifc_models/openproject-ifc-models.routes.ts
@@ -93,17 +93,3 @@ export const IFC_ROUTES:Ng2StateDeclaration[] = [
}
},
];
-
-export function uiRouterIFCConfiguration(uiRouter:UIRouter) {
- uiRouter.urlService.rules
- .when(
- new RegExp("^/projects/(.*)/ifc_models/defaults$"),
- match => `/projects/${match[1]}/ifc_models/defaults/`
- );
-
- uiRouter.urlService.rules
- .when(
- new RegExp("^/projects/(.*)/ifc_models/([0-9]+)$"),
- match => `/projects/${match[1]}/ifc_models/${match[2]}/`
- );
-}
diff --git a/modules/ifc_models/config/routes.rb b/modules/ifc_models/config/routes.rb
index c6b34fce45e..454094e3c7c 100644
--- a/modules/ifc_models/config/routes.rb
+++ b/modules/ifc_models/config/routes.rb
@@ -38,7 +38,7 @@ OpenProject::Application.routes.draw do
end
member do
- get '(/*state)', action: :show
+ get '/*(?!edit)', action: :show
end
end
end
diff --git a/modules/ifc_models/spec/support/pages/ifc_models/index.rb b/modules/ifc_models/spec/support/pages/ifc_models/index.rb
index 723be78377e..4ecac6f48e8 100644
--- a/modules/ifc_models/spec/support/pages/ifc_models/index.rb
+++ b/modules/ifc_models/spec/support/pages/ifc_models/index.rb
@@ -96,9 +96,8 @@ module Pages
def show_model(model)
click_model_link model.title
- # The extra slash is required for angular
expect_correct_page_loaded '.ifc-model-viewer--container',
- ifc_models_project_ifc_model_path(project, model) + '/'
+ ifc_models_project_ifc_model_path(project, model)
visit!
end
@@ -106,9 +105,8 @@ module Pages
def show_defaults
click_toolbar_button 'Show defaults'
- # The extra slash is required for angular
expect_correct_page_loaded '.ifc-model-viewer--container',
- defaults_ifc_models_project_ifc_models_path(project) + '/'
+ defaults_ifc_models_project_ifc_models_path(project)
visit!
end