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
change the design of enterprise banner
bsatarnejade4a60a60c0e9
diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex 80703c48c0d..6e38e244818 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -296,7 +296,8 @@ en:one: "First sorting criteria"two: "Second sorting criteria"three: "Third sorting criteria"- upsale_for_more: "For more advanced filters, check out the"+ upsale_for_more: "Advanced filters allow you to use almost any work package attribute as a filter. Please upgrade to a paid pain to use this feature."+ more_info: "More information"upsale_link: 'Enterprise Edition.'general_text_no: "no"general_text_yes: "yes"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 1fbc16ec0b4..3173faaf12e 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@@ -40,12 +40,12 @@</div></div></div>- <enterprise-banner+ <op-enterprise-banner*ngIf="eeShowBanners"[leftMargin]="true"[linkMessage]="text.upgrade_to_ee_text"[textMessage]="text.teaser_text"opReferrer="boards#board-show">- </enterprise-banner>+ </op-enterprise-banner></ng-container>\ No newline at end of filediff --git a/frontend/src/app/features/boards/new-board-modal/new-board-modal.component.ts b/frontend/src/app/features/boards/new-board-modal/new-board-modal.component.tsindex ee181c425fb..0d9320a55bb 100644--- a/frontend/src/app/features/boards/new-board-modal/new-board-modal.component.ts+++ b/frontend/src/app/features/boards/new-board-modal/new-board-modal.component.ts@@ -81,6 +81,7 @@ export class NewBoardModalComponent extends OpModalComponent implements OnInit {teaser_text: this.I18n.t('js.boards.upsale.teaser_text'),upgrade_to_ee_text: this.I18n.t('js.boards.upsale.upgrade'),+ more_info_ee_text: this.I18n.t('js.boards.upsale.more_info'),};constructor(diff --git a/frontend/src/app/features/boards/new-board-modal/new-board-modal.html b/frontend/src/app/features/boards/new-board-modal/new-board-modal.htmlindex af8a8d76e98..cab82331f12 100644--- a/frontend/src/app/features/boards/new-board-modal/new-board-modal.html+++ b/frontend/src/app/features/boards/new-board-modal/new-board-modal.html@@ -5,12 +5,13 @@<op-modal-header (close)="closeMe($event)">{{text.board_type}}</op-modal-header><div class="op-modal--body">- <enterprise-banner+ <op-enterprise-banner*ngIf="eeShowBanners"[linkMessage]="text.upgrade_to_ee_text"[textMessage]="text.teaser_text"+ [moreInfoText]="text.more_info_ee_text"opReferrer="boards"- ></enterprise-banner>+ ></op-enterprise-banner><p*ngIf="!eeShowBanners"diff --git a/frontend/src/app/features/enterprise/enterprise-trial.service.ts b/frontend/src/app/features/enterprise/enterprise-trial.service.tsindex 964e20df71b..7c9b5145d00 100644--- a/frontend/src/app/features/enterprise/enterprise-trial.service.ts+++ b/frontend/src/app/features/enterprise/enterprise-trial.service.ts@@ -53,10 +53,12 @@ export class EnterpriseTrialService {readonly pathHelper:PathHelperService,protected toastService:ToastService) {const { gon } = window as any;- this.baseUrlAugur = gon.augur_url;- this.tokenVersion = gon.token_version;+ if (gon) {+ this.baseUrlAugur = gon.augur_url;+ this.tokenVersion = gon.token_version;+ }- if ((window as any).gon.ee_trial_key) {+ if ((window as any).gon?.ee_trial_key) {this.setMailSubmittedStatus();}}diff --git a/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.html b/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.htmlindex 65f953cc6e9..5f333c2404a 100644--- a/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.html+++ b/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.html@@ -70,10 +70,11 @@</div></li></ul>- <enterprise-banner class="advanced-filters--add-filter-info"+ <op-enterprise-banner class="advanced-filters--add-filter-info"*ngIf="eeShowBanners"[linkMessage]="text.upsale_link"[textMessage]="text.upsale_for_more"+ [moreInfoText]="text.more_info"opReferrer="wp-filter#filters">- </enterprise-banner>+ </op-enterprise-banner></fieldset>diff --git a/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.ts b/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.tsindex 73e95ae817a..d7e94e8b8ba 100644--- a/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.ts+++ b/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.ts@@ -71,6 +71,7 @@ export class QueryFiltersComponent extends UntilDestroyedMixin implements OnInitclose_filter: this.I18n.t('js.filter.description.text_close_filter'),upsale_for_more: this.I18n.t('js.filter.upsale_for_more'),upsale_link: this.I18n.t('js.filter.upsale_link'),+ more_info: this.I18n.t('js.filter.more_info'),close_form: this.I18n.t('js.close_form_title'),selected_filter_list: this.I18n.t('js.label_selected_filter_list'),button_delete: this.I18n.t('js.button_delete'),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 2cd84803670..10eff526343 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@@ -12,9 +12,9 @@<p class="form--inline-instructions" [textContent]="text.columnsHelp"></p></div>-<enterprise-banner class="ee-relation-columns-upsale"+<op-enterprise-banner class="ee-relation-columns-upsale"*ngIf="eeShowBanners"[linkMessage]="text.upsaleCheckOutLink"[textMessage]="text.upsaleRelationColumns"opReferrer="wp-list-columns#relations">-</enterprise-banner>+</op-enterprise-banner>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 89a6630c987..68feead0739 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,10 +1,10 @@<div>- <enterprise-banner class="ee-attribute-highlighting-upsale"+ <op-enterprise-banner class="ee-attribute-highlighting-upsale"*ngIf="eeShowBanners"[linkMessage]="text.upsaleCheckOutLink"[textMessage]="text.upsaleAttributeHighlighting"opReferrer="wp-attribute-highlighting#attribute-highlighting">- </enterprise-banner>+ </op-enterprise-banner><form><p [textContent]="text.highlighting_mode.description"></p><div class="form--field">diff --git a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner-bootstrap.component.ts b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner-bootstrap.component.tsindex 1044ad94f6d..af0d8f8ae84 100644--- a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner-bootstrap.component.ts+++ b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner-bootstrap.component.ts@@ -6,11 +6,11 @@ export const enterpriseBannerSelector = 'enterprise-banner-bootstrap';@Component({selector: enterpriseBannerSelector,template: `- <enterprise-banner+ <op-enterprise-banner[textMessage]="textMessage"[linkMessage]="linkMessage"[opReferrer]="referrer">- </enterprise-banner>+ </op-enterprise-banner>`,})export class EnterpriseBannerBootstrapComponent implements OnInit {diff --git a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.html b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.htmlindex 24f36b4ca11..2e3f40b6709 100644--- a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.html+++ b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.html@@ -4,12 +4,46 @@><div class="op-toast -ee-upsale"[ngClass]="{'-left-margin': leftMargin }">++ <img [src]="image.enterprise_edition" class="hidden-for-mobile op-enterprise-banner--image"><div class="op-toast--content">- <p class="-bold" [textContent]="text.enterpriseFeature"></p>- <p [textContent]="textMessage"></p>- <a [href]="link"- target='blank'- [textContent]="linkMessage"></a>+ <div class="op-enterprise-banner--title">+ <op-icon icon-classes="button--icon icon-medal"></op-icon> + <span [textContent]="text.enterpriseFeature"></span>+ </div>+ <br>++ <span class="op-enterprise-banner--description" [textContent]="textMessage"></span>++ <strong [textContent]="text.become_hero"></strong> ++ <span [textContent]="text.you_contribute"></span>++ <div class="op-enterprise-banner--buttons">+ <a+ *ngIf="moreInfoText"+ class="button--link op-enterprise-banner--info-button"+ target=”_blank”>+ <op-icon icon-classes="icon icon-external-link"></op-icon>+ {{ moreInfoText }}+ </a>++ <a+ href="https://www.openproject.org/pricing/"+ target=”_blank”+ class="button -highlight">+ <op-icon icon-classes="button--icon icon-medal"></op-icon>+ {{ text.upgrade }}+ </a>++ <button+ target=”_blank”+ (click)="openTrialModal()"+ class="button -alt-highlight">+ {{ text.button_trial }}+ </button>++ </div></div></div></div>\ No newline at end of filediff --git a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.sass b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.sassindex a286ae243f2..1c0e0d151d9 100644--- a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.sass+++ b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.sass@@ -1,8 +1,28 @@.op-enterprise-banner- .op-toast- &.-left-margin- margin-left: 1.25rem+ &--title+ font-weight: 400+ font-size: 20px+ line-height: 24px+ display: flex+ margin-top: 10px++ &--description+ margin-bottom: 10px+ display: flex++ &--image+ width: 115px+ height: 75px+ padding-right: 20px+ margin: auto++ &--buttons+ display: flex+ margin-top: 10px+ justify-content: end++ &--info-button+ padding-top: 20px+ padding-right: 25px- .op-toast--content p- margin-bottom: 10pxdiff --git a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.ts b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.tsindex c8e13dd7819..27074ebe99a 100644--- a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.ts+++ b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.ts@@ -1,14 +1,19 @@import {ChangeDetectionStrategy,Component,+ Injector,Input,OnInit,} from '@angular/core';import { BannersService } from 'core-app/core/enterprise/banners.service';import { I18nService } from 'core-app/core/i18n/i18n.service';+import { EnterpriseTrialModalComponent } from 'core-app/features/enterprise/enterprise-modal/enterprise-trial.modal';+import { EnterpriseTrialService } from 'core-app/features/enterprise/enterprise-trial.service';+import { imagePath } from 'core-app/shared/helpers/images/path-helper';+import { OpModalService } from '../modal/modal.service';@Component({- selector: 'enterprise-banner',+ selector: 'op-enterprise-banner',styleUrls: ['./enterprise-banner.component.sass'],templateUrl: './enterprise-banner.component.html',changeDetection: ChangeDetectionStrategy.OnPush,@@ -22,18 +27,39 @@ export class EnterpriseBannerComponent implements OnInit {@Input() public opReferrer:string;+ @Input() public moreInfoText:string;++ @Input() public moreInfoLink:string;+public link:string;- public text:any = {+ public text = {enterpriseFeature: this.I18n.t('js.upsale.ee_only'),+ become_hero: this.I18n.t('js.admin.enterprise.upsale.become_hero'),+ you_contribute: this.I18n.t('js.admin.enterprise.upsale.you_contribute'),+ button_trial: this.I18n.t('js.admin.enterprise.upsale.button_start_trial'),+ upgrade: this.I18n.t('js.admin.enterprise.upsale.button_upgrade'),+ };++ image = {+ enterprise_edition: imagePath('enterprise_edition.png'),};constructor(protected I18n:I18nService,protected bannersService:BannersService,+ readonly eeTrialService:EnterpriseTrialService,+ protected opModalService:OpModalService,+ readonly injector:Injector,) {}ngOnInit():void {this.link = this.bannersService.getEnterPriseEditionUrl({ referrer: this.opReferrer });}++ public openTrialModal():void {+ this.eeTrialService.cancelled = true;+ this.eeTrialService.modalOpen = true;+ this.opModalService.show(EnterpriseTrialModalComponent, this.injector);+ }}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 c1991ad45d4..35fa24a9fa0 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@@ -13,12 +13,12 @@class="grid--addable-widget"></div>- <enterprise-banner+ <op-enterprise-banner*ngIf="eeShowBanners"[linkMessage]="text.upsale_link"[textMessage]="text.upsale_text"class="grid--add-widget-ee"opReferrer="grids#add-widget"- ></enterprise-banner>+ ></op-enterprise-banner></div></div>diff --git a/frontend/src/assets/images/enterprise_edition.png b/frontend/src/assets/images/enterprise_edition.pngnew file mode 100644index 00000000000..abc36e1ee7aBinary files /dev/null and b/frontend/src/assets/images/enterprise_edition.png differdiff --git a/frontend/src/global_styles/content/_toast.sass b/frontend/src/global_styles/content/_toast.sassindex 7520ae04485..1454414613f 100644--- a/frontend/src/global_styles/content/_toast.sass+++ b/frontend/src/global_styles/content/_toast.sass@@ -78,10 +78,6 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)@include icon-mixin-info1color: $nm-color-info-icon-%nm-icon-enterprise- @include icon-mixin-enterprise- color: $nm-color-info-icon-%error-placeholderbackground-color: $nm-color-error-backgroundborder-color: var(--content-form-danger-zone-bg-color)@@ -166,7 +162,6 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)&.-ee-upsale::before@extend %info-placeholder@include messages-icon- @extend %nm-icon-enterprise&.-uploadpadding: $nm-upload-box-paddingdiff --git a/frontend/src/global_styles/fonts/_openproject_icon_definitions.sass b/frontend/src/global_styles/fonts/_openproject_icon_definitions.sassindex 57b0ee1c178..ae914651e7d 100644--- a/frontend/src/global_styles/fonts/_openproject_icon_definitions.sass+++ b/frontend/src/global_styles/fonts/_openproject_icon_definitions.sass@@ -544,14 +544,6 @@.icon-email-alert:beforecontent: "\f14e"--@mixin icon-mixin-enterprise- content: "\f14f"--.icon-enterprise:before- content: "\f14f"--@mixin icon-mixin-enumerationscontent: "\f150"diff --git a/modules/boards/config/locales/js-en.yml b/modules/boards/config/locales/js-en.ymlindex ac7063407c5..00b0fc25ba6 100644--- a/modules/boards/config/locales/js-en.yml+++ b/modules/boards/config/locales/js-en.yml@@ -10,6 +10,7 @@ en:upsale:teaser_text: 'Would you like ready-to-use board templates? Advanced boards are an Enterprise feature. Please upgrade to a paid plan.'upgrade: 'Upgrade now'+ more_info: 'About advanced boards'lists:delete: 'Delete list'