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

add ee banner for custom fields

bsatarnejad9690b3884bc6
diff --git a/app/views/admin/settings/projects_settings/show.html.erb b/app/views/admin/settings/projects_settings/show.html.erb
index 54debdcd150..218d3ae010c 100644
--- a/app/views/admin/settings/projects_settings/show.html.erb
+++ b/app/views/admin/settings/projects_settings/show.html.erb
@@ -46,6 +46,17 @@ See COPYRIGHT and LICENSE files for more details.
<section class="form--section">
<fieldset class="form--fieldset">
+ <% unless EnterpriseToken.allows_to?(:custom_fields_in_projects_list) %>
+ <%=
+ angular_component_tag 'op-enterprise-banner',
+ inputs: {
+ messageIsHtml: 'true',
+ moreInfoText: t('text_custom_field_upsale_more_info'),
+ textMessage: t('text_project_custom_field_html'),
+ moreInfoLink: 'https://www.openproject.org/docs/system-admin-guide/custom-fields/custom-fields-projects/',
+ }
+ %>
+ <% end %>
<legend class="form--fieldset-legend"><%= t('settings.projects.section_project_overview') %></legend>
<%
column_choices = ::Projects::TableCell
diff --git a/app/views/custom_fields/_tab.html.erb b/app/views/custom_fields/_tab.html.erb
index c009ee6875d..c88b2a3794e 100644
--- a/app/views/custom_fields/_tab.html.erb
+++ b/app/views/custom_fields/_tab.html.erb
@@ -167,3 +167,31 @@ See COPYRIGHT and LICENSE files for more details.
<% else %>
<%= no_results_box(action_url: new_custom_field_path(type: tab[:name]), display_action: true) %>
<% end %>
+
+<% if tab[:name] == 'ProjectCustomField' %>
+ <% unless EnterpriseToken.allows_to?(:custom_fields_in_projects_list) %>
+ <%=
+ angular_component_tag 'op-enterprise-banner',
+ inputs: {
+ messageIsHtml: 'true',
+ moreInfoText: t('text_custom_field_upsale_more_info'),
+ textMessage: t('text_project_custom_field_html'),
+ moreInfoLink: 'https://www.openproject.org/docs/system-admin-guide/custom-fields/custom-fields-projects/',
+ }
+ %>
+ <% end %>
+<% end %>
+
+<% if tab[:name] == 'WorkPackageCustomField' %>
+ <% unless EnterpriseToken.allows_to?(:multiselect_custom_fields) %>
+ <%=
+ angular_component_tag 'op-enterprise-banner',
+ inputs: {
+ messageIsHtml: 'true',
+ moreInfoText: t('text_custom_field_upsale_more_info'),
+ textMessage: t('text_wp_custom_field_html'),
+ moreInfoLink: 'https://www.openproject.org/docs/system-admin-guide/custom-fields/#create-a-multi-select-custom-field-premium-feature',
+ }
+ %>
+ <% end %>
+<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 004b32791e7..0e580ecba4e 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -353,6 +353,7 @@ en:
<ul class="%{list_styling_class}">
<li><b>Add new attribute groups</b></li>
<li><b>Rename attribute groups</b></li>
+ <li><b>Add a table of related work packages</b></li>
</ul>
projects: "Projects"
enabled_projects: "Enabled projects"
@@ -2694,6 +2695,17 @@ en:
text_custom_field_hint_activate_per_project_and_type: >
Custom fields need to be activated per work
package type and per project.
+ text_custom_field_upsale_more_info: "More information"
+ text_wp_custom_field_html: >
+ The Enterprise Edition will add these additional features for work packages' custom fields: <br>
+ <ul class="%{list_styling_class}">
+ <li><b>Allow multi-select for custom fields of type List or User</b></li>
+ </ul>
+ text_project_custom_field_html: >
+ The Enterprise Edition will add these additional features for projects' custom fields: <br>
+ <ul class="%{list_styling_class}">
+ <li><b>Add custom fields for projects to your Project list to create a project portfolio view</b></li>
+ </ul>
text_custom_logo_instructions: >
A white logo on transparent background is recommended.
For best results on both, conventional and retina displays,
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 1c6caa808c2..4f6bd4010ae 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
@@ -17,6 +17,7 @@ export const enterpriseBannerrBootstrapSelector = 'enterprise-banner-bootstrap';
[textMessage]="textMessage"
[linkMessage]="linkMessage"
[moreInfoText]="moreInfoText"
+ [messageIsHtml]="messageIsHtml"
[moreInfoLink]="moreInfoLink"
[opReferrer]="referrer">
</op-enterprise-banner>
@@ -31,6 +32,8 @@ export class EnterpriseBannerBootstrapComponent implements OnInit {
public moreInfoLink:string;
+ public messageIsHtml:string;
+
public referrer:string;
constructor(protected elementRef:ElementRef,
@@ -43,6 +46,7 @@ export class EnterpriseBannerBootstrapComponent implements OnInit {
this.textMessage = $element.attr('text-message')!;
this.moreInfoText = $element.attr('more-info-text')!;
this.moreInfoLink = $element.attr('more-info-link')!;
+ this.messageIsHtml = $element.attr('more-info-link')!;
this.linkMessage = $element.attr('link-message') || this.i18n.t('js.work_packages.table_configuration.upsale.check_out_link');
this.referrer = $element.attr('referrer')!;
}
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 913d569d170..fa2e2349286 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
@@ -22,7 +22,6 @@
&--buttons
display: flex
- margin-top: 10px
justify-content: end
&--info-button