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 backlogs pages in favor of custom css

Oliver Günther5995f0a05d19
diff --git a/app/helpers/frontend_asset_helper.rb b/app/helpers/frontend_asset_helper.rb
index 575c1e7e9f8..9adfd5dbefd 100644
--- a/app/helpers/frontend_asset_helper.rb
+++ b/app/helpers/frontend_asset_helper.rb
@@ -46,16 +46,20 @@ module FrontendAssetHelper
concat nonced_javascript_include_tag variable_asset_path(file), skip_pipeline: true
end
- concat stylesheet_link_tag variable_asset_path("styles.css"), media: :all, skip_pipeline: true
+ concat frontend_stylesheet_link_tag("styles.css")
end
end
def include_spot_assets
capture do
- concat stylesheet_link_tag variable_asset_path("spot.css"), media: :all, skip_pipeline: true
+ concat frontend_stylesheet_link_tag("spot.css")
end
end
+ def frontend_stylesheet_link_tag(path)
+ stylesheet_link_tag variable_asset_path(path), media: :all, skip_pipeline: true
+ end
+
def nonced_javascript_include_tag(path, **)
javascript_include_tag(path, nonce: content_security_policy_script_nonce, **)
end
diff --git a/frontend/angular.json b/frontend/angular.json
index 4afd08d3e94..4be28893883 100644
--- a/frontend/angular.json
+++ b/frontend/angular.json
@@ -52,6 +52,10 @@
"input": "src/spot.scss",
"bundleName": "spot"
},
+ {
+ "input": "src/backlogs.scss",
+ "bundleName": "backlogs"
+ },
"src/styles.scss",
"node_modules/codemirror/lib/codemirror.css",
"node_modules/jquery-ui/themes/base/core.css",
diff --git a/frontend/src/app/core/routing/openproject.routes.ts b/frontend/src/app/core/routing/openproject.routes.ts
index bcad9a59e68..be65ffa58d0 100644
--- a/frontend/src/app/core/routing/openproject.routes.ts
+++ b/frontend/src/app/core/routing/openproject.routes.ts
@@ -82,18 +82,6 @@ export const OPENPROJECT_ROUTES:Ng2StateDeclaration[] = [
url: '/bcf',
loadChildren: () => import('../../features/bim/ifc_models/openproject-ifc-models.module').then((m) => m.OpenprojectIFCModelsModule),
},
- {
- name: 'backlogs.**',
- parent: 'optional_project',
- url: '/backlogs',
- loadChildren: () => import('../../features/backlogs/openproject-backlogs.module').then((m) => m.OpenprojectBacklogsModule),
- },
- {
- name: 'backlogs_sprint.**',
- parent: 'optional_project',
- url: '/sprints',
- loadChildren: () => import('../../features/backlogs/openproject-backlogs.module').then((m) => m.OpenprojectBacklogsModule),
- },
{
name: 'reporting.**',
parent: 'optional_project',
diff --git a/frontend/src/app/core/setup/global-dynamic-components.const.ts b/frontend/src/app/core/setup/global-dynamic-components.const.ts
index 17d5cd5d452..fab9e31a012 100644
--- a/frontend/src/app/core/setup/global-dynamic-components.const.ts
+++ b/frontend/src/app/core/setup/global-dynamic-components.const.ts
@@ -90,10 +90,6 @@ import {
TriggerActionsEntryComponent,
triggerActionsEntryComponentSelector,
} from 'core-app/shared/components/time_entries/edit/trigger-actions-entry.component';
-import {
- BacklogsPageComponent,
- backlogsPageComponentSelector,
-} from 'core-app/features/backlogs/backlogs-page/backlogs-page.component';
import {
AttributeHelpTextComponent,
attributeHelpTextSelector,
@@ -224,7 +220,6 @@ export const globalDynamicComponents:OptionalBootstrapDefinition[] = [
{ selector: opTeamPlannerSidemenuSelector, cls: TeamPlannerSidemenuComponent },
{ selector: opCalendarSidemenuSelector, cls: CalendarSidemenuComponent },
{ selector: triggerActionsEntryComponentSelector, cls: TriggerActionsEntryComponent, embeddable: true },
- { selector: backlogsPageComponentSelector, cls: BacklogsPageComponent },
{ selector: editableQueryPropsSelector, cls: EditableQueryPropsComponent },
{ selector: backupSelector, cls: BackupComponent },
{ selector: opInAppNotificationBellSelector, cls: InAppNotificationBellComponent },
diff --git a/frontend/src/app/features/backlogs/backlogs-page/backlogs-page.component.ts b/frontend/src/app/features/backlogs/backlogs-page/backlogs-page.component.ts
deleted file mode 100644
index abd59ec3e7e..00000000000
--- a/frontend/src/app/features/backlogs/backlogs-page/backlogs-page.component.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component, OnInit, ViewEncapsulation } from '@angular/core';
-
-export const backlogsPageComponentSelector = 'op-backlogs-page';
-
-@Component({
- selector: backlogsPageComponentSelector,
- // Empty wrapper around legacy backlogs for CSS loading
- // that got removed in the Rails assets pipeline
- encapsulation: ViewEncapsulation.None,
- template: '',
- styleUrls: [
- './styles/backlogs.sass',
- ],
-})
-export class BacklogsPageComponent implements OnInit {
- ngOnInit() {
- document.getElementById('projected-content')!.hidden = false;
- }
-}
diff --git a/frontend/src/app/features/backlogs/openproject-backlogs.module.ts b/frontend/src/app/features/backlogs/openproject-backlogs.module.ts
deleted file mode 100644
index ae9c61fe248..00000000000
--- a/frontend/src/app/features/backlogs/openproject-backlogs.module.ts
+++ /dev/null
@@ -1,46 +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 { NgModule } from '@angular/core';
-import { UIRouterModule } from '@uirouter/angular';
-import { BacklogsPageComponent } from 'core-app/features/backlogs/backlogs-page/backlogs-page.component';
-import { BACKLOGS_ROUTES } from 'core-app/features/backlogs/openproject-backlogs.routes';
-
-@NgModule({
- imports: [
- // Routes for /backlogs
- UIRouterModule.forChild({
- states: BACKLOGS_ROUTES,
- }),
- ],
- declarations: [
- BacklogsPageComponent,
- ],
-})
-export class OpenprojectBacklogsModule {
-}
diff --git a/frontend/src/app/features/backlogs/openproject-backlogs.routes.ts b/frontend/src/app/features/backlogs/openproject-backlogs.routes.ts
deleted file mode 100644
index 913856efcfe..00000000000
--- a/frontend/src/app/features/backlogs/openproject-backlogs.routes.ts
+++ /dev/null
@@ -1,51 +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 { Ng2StateDeclaration } from '@uirouter/angular';
-import { BacklogsPageComponent } from 'core-app/features/backlogs/backlogs-page/backlogs-page.component';
-
-export const BACKLOGS_ROUTES:Ng2StateDeclaration[] = [
- {
- name: 'backlogs',
- parent: 'optional_project',
- url: '/backlogs',
- component: BacklogsPageComponent,
- },
- {
- name: 'backlogs_sprint',
- parent: 'optional_project',
- url: '/sprints/{sprintId:int}/taskboard',
- component: BacklogsPageComponent,
- },
- {
- name: 'backlogs_burndown',
- parent: 'optional_project',
- url: '/sprints/{sprintId:int}/burndown_chart',
- component: BacklogsPageComponent,
- },
-];
diff --git a/frontend/src/app/features/backlogs/backlogs-page/styles/dialogues.sass b/frontend/src/assets/sass/backlogs/_dialogues.sass
similarity index 100%
rename from frontend/src/app/features/backlogs/backlogs-page/styles/dialogues.sass
rename to frontend/src/assets/sass/backlogs/_dialogues.sass
diff --git a/frontend/src/app/features/backlogs/backlogs-page/styles/global.css b/frontend/src/assets/sass/backlogs/_global.css
similarity index 100%
rename from frontend/src/app/features/backlogs/backlogs-page/styles/global.css
rename to frontend/src/assets/sass/backlogs/_global.css
diff --git a/frontend/src/app/features/backlogs/backlogs-page/styles/global_print.css b/frontend/src/assets/sass/backlogs/_global_print.css
similarity index 100%
rename from frontend/src/app/features/backlogs/backlogs-page/styles/global_print.css
rename to frontend/src/assets/sass/backlogs/_global_print.css
diff --git a/frontend/src/app/features/backlogs/backlogs-page/styles/backlogs.sass b/frontend/src/assets/sass/backlogs/_index.sass
similarity index 100%
rename from frontend/src/app/features/backlogs/backlogs-page/styles/backlogs.sass
rename to frontend/src/assets/sass/backlogs/_index.sass
diff --git a/frontend/src/app/features/backlogs/backlogs-page/styles/jqplot.css b/frontend/src/assets/sass/backlogs/_jqplot.css
similarity index 100%
rename from frontend/src/app/features/backlogs/backlogs-page/styles/jqplot.css
rename to frontend/src/assets/sass/backlogs/_jqplot.css
diff --git a/frontend/src/app/features/backlogs/backlogs-page/styles/master_backlog.sass b/frontend/src/assets/sass/backlogs/_master_backlog.sass
similarity index 100%
rename from frontend/src/app/features/backlogs/backlogs-page/styles/master_backlog.sass
rename to frontend/src/assets/sass/backlogs/_master_backlog.sass
diff --git a/frontend/src/app/features/backlogs/backlogs-page/styles/statistics.css b/frontend/src/assets/sass/backlogs/_statistics.css
similarity index 100%
rename from frontend/src/app/features/backlogs/backlogs-page/styles/statistics.css
rename to frontend/src/assets/sass/backlogs/_statistics.css
diff --git a/frontend/src/app/features/backlogs/backlogs-page/styles/taskboard.sass b/frontend/src/assets/sass/backlogs/_taskboard.sass
similarity index 100%
rename from frontend/src/app/features/backlogs/backlogs-page/styles/taskboard.sass
rename to frontend/src/assets/sass/backlogs/_taskboard.sass
diff --git a/frontend/src/backlogs.scss b/frontend/src/backlogs.scss
new file mode 100644
index 00000000000..159ad4f149a
--- /dev/null
+++ b/frontend/src/backlogs.scss
@@ -0,0 +1,2 @@
+// Backlogs
+@import "assets/sass/backlogs";
diff --git a/frontend/src/global_styles/openproject/_index.sass b/frontend/src/global_styles/openproject/_index.sass
index 857b3e217af..5f8f22afa63 100644
--- a/frontend/src/global_styles/openproject/_index.sass
+++ b/frontend/src/global_styles/openproject/_index.sass
@@ -13,3 +13,5 @@
@import working-days-admin-settings
@import ndc-dynamic
+
+@import backlogs
diff --git a/modules/backlogs/app/views/layouts/backlogs.html.erb b/modules/backlogs/app/views/layouts/backlogs.html.erb
index 7bd1b63c5ff..2f59d02f608 100644
--- a/modules/backlogs/app/views/layouts/backlogs.html.erb
+++ b/modules/backlogs/app/views/layouts/backlogs.html.erb
@@ -31,14 +31,10 @@ See COPYRIGHT and LICENSE files for more details.
<%= nonced_javascript_tag do %>
<%= render(partial: 'shared/server_variables', formats: [:js]) %>
<% end %>
+ <%= frontend_stylesheet_link_tag "backlogs.css" %>
<% end %>
-<% content_for :content_body do %>
- <openproject-base></openproject-base>
- <%# Allow projection pages to show rails rendered content after initialization %>
- <div data-controller="backlogs" data-application-target="dynamic" id="projected-content" hidden>
- <%= yield %>
- </div>
-<% end -%>
+<% content_controller 'backlogs',
+ dynamic: true %>
-<%= render template: 'layouts/base', locals: local_assigns.merge({ no_layout_yield: true }) %>
+<%= render template: 'layouts/base', locals: local_assigns %>