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

change the design of enterprise banner

bsatarnejade4a60a60c0e9
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index 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.html
index 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 file
diff --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.ts
index 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.html
index 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.ts
index 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.html
index 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.ts
index 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 OnInit
close_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.html
index 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.html
index 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.ts
index 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.html
index 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> &nbsp;
+ <span [textContent]="text.enterpriseFeature"></span>
+ </div>
+ <br>
+
+ <span class="op-enterprise-banner--description" [textContent]="textMessage"></span>
+
+ <strong [textContent]="text.become_hero"></strong> &nbsp;
+
+ <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 file
diff --git a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.sass b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.sass
index 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: 10px
diff --git a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.ts b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.ts
index 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.html
index 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.png
new file mode 100644
index 00000000000..abc36e1ee7a
Binary files /dev/null and b/frontend/src/assets/images/enterprise_edition.png differ
diff --git a/frontend/src/global_styles/content/_toast.sass b/frontend/src/global_styles/content/_toast.sass
index 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-info1
color: $nm-color-info-icon
-%nm-icon-enterprise
- @include icon-mixin-enterprise
- color: $nm-color-info-icon
-
%error-placeholder
background-color: $nm-color-error-background
border-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
&.-upload
padding: $nm-upload-box-padding
diff --git a/frontend/src/global_styles/fonts/_openproject_icon_definitions.sass b/frontend/src/global_styles/fonts/_openproject_icon_definitions.sass
index 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:before
content: "\f14e"
-
-@mixin icon-mixin-enterprise
- content: "\f14f"
-
-.icon-enterprise:before
- content: "\f14f"
-
-
@mixin icon-mixin-enumerations
content: "\f150"
diff --git a/modules/boards/config/locales/js-en.yml b/modules/boards/config/locales/js-en.yml
index 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'