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
Add banner frame so we can load the banner component from the frontend
Oliver Günther9d4fb32c63f9
diff --git a/app/components/enterprise_edition/banner_component.html.erb b/app/components/enterprise_edition/banner_component.html.erbindex f202a85c2a9..9e1464a8c80 100644--- a/app/components/enterprise_edition/banner_component.html.erb+++ b/app/components/enterprise_edition/banner_component.html.erb@@ -1,47 +1,49 @@<%=- grid_layout("op-enterprise-banner",- **@system_arguments) do |grid|- grid.with_area(:visual) do- render(Primer::Beta::Octicon.new(icon: :"op-enterprise-addons", classes: "op-enterprise-banner--icon"))- end+ component_wrapper(tag: "turbo-frame") do+ grid_layout("op-enterprise-banner",+ **@system_arguments) do |grid|+ grid.with_area(:visual) do+ render(Primer::Beta::Octicon.new(icon: :"op-enterprise-addons", classes: "op-enterprise-banner--icon"))+ end- grid.with_area(:content) do- flex_layout do |flex|- flex.with_row do- render(Primer::Beta::Text.new(font_weight: :bold)) { title }- end+ grid.with_area(:content) do+ flex_layout do |flex|+ flex.with_row do+ render(Primer::Beta::Text.new(font_weight: :bold)) { title }+ end- flex.with_row(mt: 1) do- concat render(Primer::Beta::Text.new) { description }- concat " "- concat render(Primer::Beta::Text.new) { plan_text }- end+ flex.with_row(mt: 1) do+ concat render(Primer::Beta::Text.new) { description }+ concat " "+ concat render(Primer::Beta::Text.new) { plan_text }+ end- if features.present?- flex.with_row do- content_tag(:ul) { safe_join features.map { |text| render(Primer::Beta::Text.new(tag: :li)) { text } } }+ if features.present?+ flex.with_row do+ content_tag(:ul) { safe_join features.map { |text| render(Primer::Beta::Text.new(tag: :li)) { text } } }+ endend- end- flex.with_row(mt: 2) do- render EnterpriseEdition::UpsaleButtonsComponent.new(feature_key)+ flex.with_row(mt: 2) do+ render EnterpriseEdition::UpsaleButtonsComponent.new(feature_key)+ endendend- end- if @dismissable- grid.with_area(:dismiss) do- render(- Primer::Beta::IconButton.new(- classes: "op-enterprise-banner--close-icon",- scheme: :invisible,- tag: :a,- href: dismiss_enterprise_banner_path(feature_key: @dismiss_key),- data: { turbo_stream: true, turbo_method: :post },- icon: :x,- aria: { label: t("ee.upsale.hide_banner") }+ if @dismissable+ grid.with_area(:dismiss) do+ render(+ Primer::Beta::IconButton.new(+ classes: "op-enterprise-banner--close-icon",+ scheme: :invisible,+ tag: :a,+ href: dismiss_enterprise_banner_path(feature_key: @dismiss_key),+ data: { turbo_stream: true, turbo_method: :post },+ icon: :x,+ aria: { label: t("ee.upsale.hide_banner") }+ ))- )+ endendendenddiff --git a/app/components/enterprise_edition/banner_component.rb b/app/components/enterprise_edition/banner_component.rbindex 53830c76db5..45424221e25 100644--- a/app/components/enterprise_edition/banner_component.rb+++ b/app/components/enterprise_edition/banner_component.rb@@ -34,6 +34,7 @@ module EnterpriseEdition# It will only be rendered if necessary.class BannerComponent < ApplicationComponentinclude OpPrimer::ComponentHelpers+ include OpTurbo::Streamableinclude PlanForFeature# @param feature_key [Symbol, NilClass] The key of the feature to show the banner for.@@ -50,8 +51,7 @@ module EnterpriseEdition@system_arguments = system_arguments@system_arguments[:tag] = :div@system_arguments[:mb] ||= 2- @system_arguments[:id] = "op-enterprise-banner-#{feature_key.to_s.tr('_', '-')}"- @system_arguments[:test_selector] = @system_arguments[:id]+ @system_arguments[:test_selector] = "op-enterprise-banner-#{feature_key.to_s.tr('_', '-')}"superself.feature_key = feature_key@@ -60,6 +60,10 @@ module EnterpriseEdition@dismiss_key = dismiss_keyend+ def wrapper_key+ "enterprise_banner_#{feature_key}"+ end+privatedef render?diff --git a/app/controllers/my/enterprise_banners_controller.rb b/app/controllers/my/enterprise_banners_controller.rbindex 8c3ceee19b2..e627b18ae77 100644--- a/app/controllers/my/enterprise_banners_controller.rb+++ b/app/controllers/my/enterprise_banners_controller.rb@@ -28,24 +28,38 @@# See COPYRIGHT and LICENSE files for more details.#++class My::EnterpriseBannersController < ApplicationController+ include OpTurbo::ComponentStream+before_action :require_login+ before_action :get_feature_key- authorization_checked! :dismiss+ authorization_checked! :dismiss, :show- def dismiss- feature_key = params[:feature_key].to_s+ def show+ dismissable = ActiveRecord::Type::Boolean.new.cast(params[:dismissable])++ respond_to do |format|+ format.html do+ render(EnterpriseEdition::BannerComponent.new(@feature_key, dismissable:), layout: false)+ end+ end+ end+ def dismisspref = User.current.pref- pref.dismiss_banner(feature_key)+ pref.dismiss_banner(@feature_key)if pref.save- respond_to do |format|- format.turbo_stream do- id = "op-enterprise-banner-#{feature_key.tr('_', '-')}"- render turbo_stream: turbo_stream.remove(id)- end- end+ remove_via_turbo_stream(component: EnterpriseEdition::BannerComponent.new(@feature_key))+ respond_with_turbo_streamselserespond_with_flash_error(message: call.message)endend++ private++ def get_feature_key+ @feature_key = params[:feature_key].to_sym+ render_400 unless OpenProject::Token.lowest_plan_for(@feature_key)+ endenddiff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex c9ca744521a..75365bcf6c8 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -747,7 +747,6 @@ en:date_alerts:title: "Date alerts"description: "Automatic notifications when important dates are approaching for open work packages you are involved in (assignee, accountable or watcher)."- teaser_text: "With date alerts, you will be notified of upcoming start or finish dates so that you never miss or forget an important deadline."overdue: When overdueproject_specific:title: "Project-specific notification settings"diff --git a/config/routes.rb b/config/routes.rbindex f0831aae751..24b33e889ad 100644--- a/config/routes.rb+++ b/config/routes.rb@@ -796,6 +796,7 @@ Rails.application.routes.draw doresources :sessions, controller: "my/sessions", as: "my_sessions", only: %i[index show destroy]resources :auto_login_tokens, controller: "my/auto_login_tokens", as: "my_auto_login_tokens", only: %i[destroy]+ get "/banner" => "my/enterprise_banners#show", as: "show_enterprise_banner"post "/dismiss_banner" => "my/enterprise_banners#dismiss", as: "dismiss_enterprise_banner"enddiff --git a/frontend/src/app/core/path-helper/path-helper.service.ts b/frontend/src/app/core/path-helper/path-helper.service.tsindex ee848b3fe65..447be9d3ecc 100644--- a/frontend/src/app/core/path-helper/path-helper.service.ts+++ b/frontend/src/app/core/path-helper/path-helper.service.ts@@ -58,6 +58,10 @@ export class PathHelperService {return `${this.api.v3.apiV3Base}/file_links`;}+ public bannerFramePath(feature:string, dismissable:boolean):string {+ return `${this.staticBase}/my/banner?feature_key=${feature}&dismissable=${dismissable}`;+ }+public ifcModelsPath(projectIdentifier:string) {return `${this.staticBase}/projects/${projectIdentifier}/ifc_models`;}diff --git a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.htmlindex 3e2e4c2529e..dd47639caf2 100644--- a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html+++ b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html@@ -38,13 +38,9 @@</div></div></div>-- <op-enterprise-banner- *ngIf="needEnterpriseEdition"- [moreInfoLink]="text.more_info_link"- [leftMargin]="true"- [linkMessage]="text.upgrade_to_ee_text"- [textMessage]="text.teaser_text"- opReferrer="boards#board-show">- </op-enterprise-banner>+ <op-enterprise-banner-frame+ class="boards-list--enterprise-banner"+ feature="board_view"+ [dismissable]="true"+ ></op-enterprise-banner-frame></ng-container>diff --git a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.sass b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.sassindex 994d8398d9e..7b5ac8afe3b 100644--- a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.sass+++ b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.sass@@ -65,3 +65,7 @@ $board-list-top-offset: 18px.boards-list--tooltipalign-self: startmargin-top: $board-list-top-offset++.boards-list--enterprise-banner+ display: block+ margin-left: $spot-spacing-1diff --git a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.ts b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.tsindex f2b81523eb3..94c382b289e 100644--- a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.ts+++ b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.ts@@ -60,9 +60,6 @@ export class BoardListContainerComponent extends UntilDestroyedMixin implementsaddList: this.I18n.t('js.boards.add_list'),unnamedList: this.I18n.t('js.boards.label_unnamed_list'),hiddenListWarning: this.I18n.t('js.boards.text_hidden_list_warning'),- teaser_text: this.I18n.t('js.boards.upsale.teaser_text'),- upgrade_to_ee_text: this.I18n.t('js.boards.upsale.upgrade'),- more_info_link: enterpriseDocsUrl.boards,};/** Container reference */diff --git a/frontend/src/app/features/boards/openproject-boards.module.ts b/frontend/src/app/features/boards/openproject-boards.module.tsindex ccf84715db0..65847007c8d 100644--- a/frontend/src/app/features/boards/openproject-boards.module.ts+++ b/frontend/src/app/features/boards/openproject-boards.module.ts@@ -52,6 +52,7 @@ import { SubprojectBoardHeaderComponent } from 'core-app/features/boards/board/bimport { SubtasksBoardHeaderComponent } from 'core-app/features/boards/board/board-actions/subtasks/subtasks-board-header.component';import { StatusBoardHeaderComponent } from 'core-app/features/boards/board/board-actions/status/status-board-header.component';import { OpenprojectAutocompleterModule } from 'core-app/shared/components/autocompleter/openproject-autocompleter.module';+import { OpenprojectEnterpriseModule } from 'core-app/features/enterprise/openproject-enterprise.module';@NgModule({imports: [@@ -59,6 +60,7 @@ import { OpenprojectAutocompleterModule } from 'core-app/shared/components/autocOpenprojectWorkPackagesModule,OpenprojectModalModule,OpenprojectAutocompleterModule,+ OpenprojectEnterpriseModule,// Dynamic Module for actionsDynamicModule,diff --git a/frontend/src/app/features/enterprise/enterprise-banner-frame.component.html b/frontend/src/app/features/enterprise/enterprise-banner-frame.component.htmlnew file mode 100644index 00000000000..7aa8d8d3aff--- /dev/null+++ b/frontend/src/app/features/enterprise/enterprise-banner-frame.component.html@@ -0,0 +1,6 @@+<turbo-frame+ id="enterprise_banner_{{feature}}"+ *ngIf="visible"+ [src]="frameURL"+>+</turbo-frame>diff --git a/frontend/src/app/features/enterprise/enterprise-banner-frame.component.ts b/frontend/src/app/features/enterprise/enterprise-banner-frame.component.tsnew file mode 100644index 00000000000..b3f9cb4b6d8--- /dev/null+++ b/frontend/src/app/features/enterprise/enterprise-banner-frame.component.ts@@ -0,0 +1,57 @@+//-- copyright+// OpenProject is an open source project management software.+// Copyright (C) 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, Component, Input, OnInit } from '@angular/core';+import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';+import { BannersService } from 'core-app/core/enterprise/banners.service';++@Component({+ templateUrl: './enterprise-banner-frame.component.html',+ selector: 'op-enterprise-banner-frame',+ changeDetection: ChangeDetectionStrategy.OnPush,+ standalone: false,+})+export class EnterpriseBannerFrameComponent implements OnInit {+ @Input() public feature:string;++ @Input() public dismissable = false;++ visible:boolean;+ frameURL:string;++ constructor(+ protected pathHelper:PathHelperService,+ protected banners:BannersService,+ ) {+ }++ ngOnInit() {+ this.visible = this.banners.showBannerFor(this.feature);+ this.frameURL = this.pathHelper.bannerFramePath(this.feature, this.dismissable);+ }+}diff --git a/frontend/src/app/features/enterprise/openproject-enterprise.module.ts b/frontend/src/app/features/enterprise/openproject-enterprise.module.tsindex 2583ae78040..472bc5ae43b 100644--- a/frontend/src/app/features/enterprise/openproject-enterprise.module.ts+++ b/frontend/src/app/features/enterprise/openproject-enterprise.module.ts@@ -37,6 +37,7 @@ import { EETrialWaitingComponent } from 'core-app/features/enterprise/enterpriseimport { EEActiveTrialComponent } from 'core-app/features/enterprise/enterprise-active-trial/ee-active-trial.component';import { EEActiveSavedTrialComponent } from 'core-app/features/enterprise/enterprise-active-trial/ee-active-saved-trial.component';import { FormsModule, ReactiveFormsModule } from '@angular/forms';+import { EnterpriseBannerFrameComponent } from 'core-app/features/enterprise/enterprise-banner-frame.component';@NgModule({imports: [@@ -49,6 +50,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';EnterpriseTrialService,],exports: [+ EnterpriseBannerFrameComponent,],declarations: [EnterpriseBaseComponent,@@ -57,6 +59,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';EETrialWaitingComponent,EEActiveTrialComponent,EEActiveSavedTrialComponent,+ EnterpriseBannerFrameComponent,],})export class OpenprojectEnterpriseModule {diff --git a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.html b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.htmlindex 5693d6aff23..e5ea4522fbb 100644--- a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.html+++ b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.html@@ -166,15 +166,10 @@</div></div>- <op-enterprise-banner- *ngIf="eeShowBanners"- [moreInfoLink]="text.more_info_link"- [collapsible]="true"- [textMessage]="text.teaser_text"- opReferrer="notifications#date-alerts"- class="op-date-alert-ee-banner">- </op-enterprise-banner>-+ <op-enterprise-banner-frame+ feature="date_alerts"+ [dismissable]="true"+ ></op-enterprise-banner-frame><div class="op-form--section-header"><h3 class="op-form--section-header-title">{{ text.alsoNotifyFor.title }}</h3>diff --git a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.tsindex 9f14bb41ed2..21d11713558 100644--- a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts+++ b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts@@ -114,9 +114,6 @@ export class NotificationsSettingsPageComponent extends UntilDestroyedMixin implstartDate: this.I18n.t('js.work_packages.properties.startDate'),dueDate: this.I18n.t('js.work_packages.properties.dueDate'),overdue: this.I18n.t('js.notifications.settings.global.overdue'),- teaser_text: this.I18n.t('js.notifications.settings.global.date_alerts.teaser_text'),- upgrade_to_ee_text: this.I18n.t('js.boards.upsale.upgrade'),- more_info_link: enterpriseDocsUrl.website,};dateAlertsStatuses = {diff --git a/frontend/src/app/features/user-preferences/user-preferences.module.ts b/frontend/src/app/features/user-preferences/user-preferences.module.tsindex 798475a234d..42915655cb2 100644--- a/frontend/src/app/features/user-preferences/user-preferences.module.ts+++ b/frontend/src/app/features/user-preferences/user-preferences.module.ts@@ -27,6 +27,7 @@ import {} from 'core-app/features/user-preferences/reminder-settings/email-alerts/email-alerts-settings.component';import { WorkdaysSettingsComponent } from './reminder-settings/workdays/workdays-settings.component';import { PauseRemindersComponent } from './reminder-settings/pause-reminders/pause-reminders.component';+import { OpenprojectEnterpriseModule } from 'core-app/features/enterprise/openproject-enterprise.module';@NgModule({providers: [@@ -47,6 +48,7 @@ import { PauseRemindersComponent } from './reminder-settings/pause-reminders/pauCommonModule,OpSharedModule,OpenprojectAutocompleterModule,+ OpenprojectEnterpriseModule,FormsModule,ReactiveFormsModule,],diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/columns-tab.component.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/columns-tab.component.htmlindex bdeec625841..0b2e025556c 100644--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/columns-tab.component.html+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/columns-tab.component.html@@ -9,10 +9,7 @@</op-draggable-autocompleter></div>-<op-enterprise-banner class="ee-relation-columns-upsale"- *ngIf="eeShowBanners"- [linkMessage]="text.upsaleCheckOutLink"- [textMessage]="text.upsaleRelationColumns"- [moreInfoLink]="text.moreInfoLink"- opReferrer="wp-list-columns#relations">-</op-enterprise-banner>+<op-enterprise-banner-frame+ feature="work_package_query_relation_columns"+ [dismissable]="true"+></op-enterprise-banner-frame>diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/columns-tab.component.ts b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/columns-tab.component.tsindex d7d356dd8c5..089a7c93b04 100644--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/columns-tab.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/columns-tab.component.ts@@ -1,12 +1,15 @@import { Component, Injector, OnInit } from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';import { QueryColumn } from 'core-app/features/work-packages/components/wp-query/query-column';-import { ConfigurationService } from 'core-app/core/config/configuration.service';-import { WorkPackageViewColumnsService } from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-columns.service';-import { TabComponent } from 'core-app/features/work-packages/components/wp-table/configuration-modal/tab-portal-outlet';-import { BannersService } from 'core-app/core/enterprise/banners.service';-import { DraggableOption } from 'core-app/shared/components/autocompleter/draggable-autocomplete/draggable-autocomplete.component';-import { enterpriseDocsUrl } from 'core-app/core/setup/globals/constants.const';+import {+ WorkPackageViewColumnsService,+} from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-columns.service';+import {+ TabComponent,+} from 'core-app/features/work-packages/components/wp-table/configuration-modal/tab-portal-outlet';+import {+ DraggableOption,+} from 'core-app/shared/components/autocompleter/draggable-autocomplete/draggable-autocomplete.component';@Component({templateUrl: './columns-tab.component.html',@@ -22,17 +25,11 @@ export class WpTableConfigurationColumnsTabComponent implements TabComponent, Onpublic selectedColumnMap:{ [id:string]:boolean } = {};- public eeShowBanners = false;-public text = {columnsHelp: this.I18n.t('js.work_packages.table_configuration.columns_help_text'),columnsLabel: this.I18n.t('js.label_columns'),multiSelectLabel: this.I18n.t('js.work_packages.label_column_multiselect'),- upsaleRelationColumns: this.I18n.t('js.work_packages.table_configuration.upsale.relation_columns'),- upsaleCheckOutLink: this.I18n.t('js.work_packages.table_configuration.upsale.check_out_link'),- moreInfoLink: enterpriseDocsUrl.website,-inputPlaceholder: this.I18n.t('js.label_search_columns'),inputLabel: this.I18n.t('js.label_add_columns'),inputDragLabel: this.I18n.t('js.label_manage_columns'),@@ -42,7 +39,6 @@ export class WpTableConfigurationColumnsTabComponent implements TabComponent, Onreadonly injector:Injector,readonly I18n:I18nService,readonly wpTableColumns:WorkPackageViewColumnsService,- readonly bannerService:BannersService,) {}@@ -51,7 +47,6 @@ export class WpTableConfigurationColumnsTabComponent implements TabComponent, On}ngOnInit() {- this.eeShowBanners = this.bannerService.showBannerFor('work_package_query_relation_columns');this.selectedColumns.forEach((c:DraggableOption) => {this.selectedColumnMap[c.id] = true;});diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.htmlindex ef785e7df19..cd2a9fc3661 100644--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.html+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.html@@ -1,14 +1,10 @@<div>- <op-enterprise-banner- class="ee-attribute-highlighting-upsale"- *ngIf="eeShowBanners"- [linkMessage]="text.upsaleCheckOutLink"- [textMessage]="text.upsaleAttributeHighlighting"- [moreInfoLink]="text.more_info_link"- opReferrer="wp-attribute-highlighting#attribute-highlighting">- </op-enterprise-banner>+ <op-enterprise-banner-frame+ feature="conditional_highlighting"+ [dismissable]="false"+ ></op-enterprise-banner-frame>- <form *ngIf="!eeShowBanners">+ <form><p [textContent]="text.highlighting_mode.description"></p><div class="form--field"><label class="form--label">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 4027c33ea30..063fb637276 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@@ -404,6 +404,7 @@ import {WorkPackageSplitViewEntryComponent,} from 'core-app/features/work-packages/routing/wp-split-view/wp-split-view-entry.component';import { OpWpDatePickerModalComponent } from 'core-app/shared/components/datepicker/wp-date-picker-modal/wp-date-picker.modal';+import { OpenprojectEnterpriseModule } from 'core-app/features/enterprise/openproject-enterprise.module';@NgModule({imports: [@@ -434,6 +435,7 @@ import { OpWpDatePickerModalComponent } from 'core-app/shared/components/datepicOpenprojectStoragesModule,WorkPackageIsolatedQuerySpaceDirective,+ OpenprojectEnterpriseModule,],providers: [// Notification servicediff --git a/frontend/src/app/shared/components/grids/openproject-grids.module.ts b/frontend/src/app/shared/components/grids/openproject-grids.module.tsindex b462966ea91..aa4072eeb99 100644--- a/frontend/src/app/shared/components/grids/openproject-grids.module.ts+++ b/frontend/src/app/shared/components/grids/openproject-grids.module.ts@@ -85,6 +85,7 @@ import {WidgetProjectFavoritesComponent,} from 'core-app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component';import { IconModule } from 'core-app/shared/components/icon/icon.module';+import { OpenprojectEnterpriseModule } from 'core-app/features/enterprise/openproject-enterprise.module';@NgModule({imports: [@@ -97,6 +98,7 @@ import { IconModule } from 'core-app/shared/components/icon/icon.module';OpenprojectWorkPackageGraphsModule,OpenprojectCalendarModule,OpenprojectTimeEntriesModule,+ OpenprojectEnterpriseModule,OpenprojectAttachmentsModule,diff --git a/frontend/src/app/shared/components/grids/widgets/add/add.modal.html b/frontend/src/app/shared/components/grids/widgets/add/add.modal.htmlindex cfdc1b30433..ac2a64d572a 100644--- a/frontend/src/app/shared/components/grids/widgets/add/add.modal.html+++ b/frontend/src/app/shared/components/grids/widgets/add/add.modal.html@@ -7,16 +7,10 @@<div class="spot-divider"></div><div class="ngdialog-body spot-modal--body spot-container">-- <op-enterprise-banner- *ngIf="eeShowBanners"- [linkMessage]="text.upsale_link"- [textMessage]="text.upsale_text"- [moreInfoLink]="text.more_info_link"- class="grid--add-widget-ee"- opReferrer="grids#add-widget"- ></op-enterprise-banner>-+ <op-enterprise-banner-frame+ feature="grid_widget_wp_graph"+ [dismissable]="true"+ ></op-enterprise-banner-frame><ul class="spot-list"><li*ngFor="let widget of selectable;trackBy: trackWidgetBy"diff --git a/frontend/src/app/shared/components/grids/widgets/add/add.modal.ts b/frontend/src/app/shared/components/grids/widgets/add/add.modal.tsindex 35983ec0747..49eac1e2beb 100644--- a/frontend/src/app/shared/components/grids/widgets/add/add.modal.ts+++ b/frontend/src/app/shared/components/grids/widgets/add/add.modal.ts@@ -23,10 +23,7 @@ export class AddGridWidgetModalComponent extends OpModalComponent implements OnItext = {title: this.i18n.t('js.grid.add_widget'),close_popup: this.i18n.t('js.button_close'),- upsale_link: this.i18n.t('js.grid.upsale.link'),- upsale_text: this.i18n.t('js.grid.upsale.text'),cancel_button: this.i18n.t('js.button_cancel'),- more_info_link: enterpriseDocsUrl.graphWidgets,};public chosenWidget:WidgetRegistration;diff --git a/modules/boards/config/locales/js-en.yml b/modules/boards/config/locales/js-en.ymlindex 3c3ad9fbf2d..91960a988d4 100644--- a/modules/boards/config/locales/js-en.yml+++ b/modules/boards/config/locales/js-en.yml@@ -1,15 +1,15 @@# English strings go hereen:+ ee:+ upsale:+ board_view:+ description: 'Would you like to automate your workflows with Boards? Advanced boards are an Enterprise add-on. Please upgrade to a paid plan.'js:boards:create_new: 'Create new board'label_unnamed_board: 'Unnamed board'label_unnamed_list: 'Unnamed list'label_board_type: 'Board type'-- upsale:- teaser_text: 'Would you like to automate your workflows with Boards? Advanced boards are an Enterprise add-on. Please upgrade to a paid plan.'- upgrade: 'Upgrade now'lists:delete: 'Delete list'diff --git a/modules/grids/config/locales/js-en.yml b/modules/grids/config/locales/js-en.ymlindex dfa0eecf0af..2e4303c605a 100644--- a/modules/grids/config/locales/js-en.yml+++ b/modules/grids/config/locales/js-en.yml@@ -1,12 +1,13 @@en:+ ee:+ upsale:+ grid_widget_wp_graph:+ description: "Some widgets, like the work package graph widget, are only available in the Enterprise edition."js:grid:add_widget: 'Add widget'remove: 'Remove widget'configure: 'Configure widget'- upsale:- text: "Some widgets, like the work package graph widget, are only available in the Enterprise edition."- link: 'Enterprise edition.'widgets:missing_permission: "You don't have the necessary permissions to view this widget."custom_text: