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

Show EE icon in share button only when there is no license active

Henriette Darge9bdab0d364d4
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.component.ts b/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.component.ts
index a145725494b..bfb996e4934 100644
--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.component.ts
+++ b/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.component.ts
@@ -37,6 +37,7 @@ import { I18nService } from 'core-app/core/i18n/i18n.service';
import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';
import { OpModalService } from 'core-app/shared/components/modal/modal.service';
import { WorkPackageShareModalComponent } from 'core-app/features/work-packages/components/wp-share-modal/wp-share.modal';
+import { BannersService } from 'core-app/core/enterprise/banners.service';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
@@ -47,6 +48,8 @@ import { WorkPackageShareModalComponent } from 'core-app/features/work-packages/
export class WorkPackageShareButtonComponent extends UntilDestroyedMixin {
@Input() public workPackage:WorkPackageResource;
+ showEnterpriseIcon = this.bannersService.eeShowBanners;
+
public text = {
share: this.I18n.t('js.work_packages.sharing.share'),
};
@@ -55,6 +58,7 @@ export class WorkPackageShareButtonComponent extends UntilDestroyedMixin {
readonly I18n:I18nService,
readonly opModalService:OpModalService,
readonly cdRef:ChangeDetectorRef,
+ readonly bannersService:BannersService,
) {
super();
}
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.html b/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.html
index b2d5c647b6f..6a56660e431 100644
--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.html
+++ b/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.html
@@ -10,6 +10,7 @@
<span class="button--text" [textContent]="text.share"></span>
<svg
+ *ngIf="showEnterpriseIcon"
op-enterprise-addons-icon
class="button--icon upsale-colored"
size="small"