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

Extract links to varibles

Henriette Darge969e7cc31d32
diff --git a/app/views/admin/settings/projects_settings/show.html.erb b/app/views/admin/settings/projects_settings/show.html.erb
index 6936f2aa733..31abb2e900f 100644
--- a/app/views/admin/settings/projects_settings/show.html.erb
+++ b/app/views/admin/settings/projects_settings/show.html.erb
@@ -52,7 +52,7 @@ See COPYRIGHT and LICENSE files for more details.
inputs: {
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/',
+ moreInfoLink: OpenProject::Static::Links.links[:enterprise_docs][:custom_field_projects][:href],
}
%>
<% end %>
diff --git a/app/views/admin/settings/work_packages_settings/_enterprise_feature_hint.html.erb b/app/views/admin/settings/work_packages_settings/_enterprise_feature_hint.html.erb
index 6a30f336f9d..4054a7624ff 100644
--- a/app/views/admin/settings/work_packages_settings/_enterprise_feature_hint.html.erb
+++ b/app/views/admin/settings/work_packages_settings/_enterprise_feature_hint.html.erb
@@ -5,7 +5,7 @@
inputs: {
moreInfoText: t('js.work_packages.table_configuration.upsale.more-info-text'),
textMessage: explanation,
- moreInfoLink: 'https://www.openproject.org/docs/user-guide/work-packages/work-package-table-configuration/#attribute-highlighting-premium-feature',
+ moreInfoLink: OpenProject::Static::Links.links[:enterprise_docs][:attribute_highlighting][:href],
}
%>
</span>
diff --git a/app/views/custom_fields/_tab.html.erb b/app/views/custom_fields/_tab.html.erb
index 9387198f355..d54484e3bf8 100644
--- a/app/views/custom_fields/_tab.html.erb
+++ b/app/views/custom_fields/_tab.html.erb
@@ -175,7 +175,7 @@ See COPYRIGHT and LICENSE files for more details.
inputs: {
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/',
+ moreInfoLink: OpenProject::Static::Links.links[:enterprise_docs][:custom_field_projects][:href],
}
%>
<% end %>
@@ -188,7 +188,7 @@ See COPYRIGHT and LICENSE files for more details.
inputs: {
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',
+ moreInfoLink: OpenProject::Static::Links.links[:enterprise_docs][:custom_field_multiselect][:href],
}
%>
<% end %>
diff --git a/app/views/projects/filters/_form.html.erb b/app/views/projects/filters/_form.html.erb
index c8f92a80fb2..f76e9f8e07d 100644
--- a/app/views/projects/filters/_form.html.erb
+++ b/app/views/projects/filters/_form.html.erb
@@ -89,7 +89,7 @@
inputs: {
moreInfoText: t('text_custom_field_upsale_more_info'),
textMessage: t('ee.upsale.project_filters.description_html'),
- moreInfoLink: 'https://www.openproject.org/docs/system-admin-guide/custom-fields/custom-fields-projects/',
+ moreInfoLink: OpenProject::Static::Links.links[:enterprise_docs][:custom_field_projects][:href],
}
%>
<% end %>
diff --git a/app/views/types/form/_form_configuration.html.erb b/app/views/types/form/_form_configuration.html.erb
index d66fdad3649..97df03e190c 100644
--- a/app/views/types/form/_form_configuration.html.erb
+++ b/app/views/types/form/_form_configuration.html.erb
@@ -46,7 +46,7 @@ See COPYRIGHT and LICENSE files for more details.
opReferrer: 'form-configuration',
moreInfoText: t('admin.enterprise.buttons.more_info'),
textMessage: t('types.edit.more_info_text_html'),
- moreInfoLink: 'https://www.openproject.org/docs/system-admin-guide/manage-work-packages/work-package-types/#work-package-form-configuration-premium-feature',
+ moreInfoLink: OpenProject::Static::Links.links[:enterprise_docs][:form_configuration][:href],
}
%>
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 0e580ecba4e..b2a008785e5 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2698,12 +2698,12 @@ en:
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}">
+ <ul>
<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}">
+ <ul>
<li><b>Add custom fields for projects to your Project list to create a project portfolio view</b></li>
</ul>
text_custom_logo_instructions: >
diff --git a/frontend/src/app/core/setup/globals/constants.const.ts b/frontend/src/app/core/setup/globals/constants.const.ts
index f2c3f908c65..bed87cb0e99 100644
--- a/frontend/src/app/core/setup/globals/constants.const.ts
+++ b/frontend/src/app/core/setup/globals/constants.const.ts
@@ -6,3 +6,10 @@ export const contactUrl:{ [locale:string]:string } = {
};
export const pricingUrl = 'https://www.openproject.org/pricing';
+
+export const enterpriseDocsUrl:{ [key:string]:string } = {
+ website: 'https://www.openproject.org/enterprise-edition/',
+ boards: 'https://www.openproject.org/docs/user-guide/agile-boards/#action-boards-premium-feature',
+ tableHighlighting: 'https://www.openproject.org/docs/user-guide/work-packages/work-package-table-configuration/#attribute-highlighting-premium-feature',
+ graphWidgets: 'https://www.openproject.org/docs/user-guide/project-overview/#work-package-graph-widgets-premium-feature',
+};
diff --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.ts
index 973a8bbcb09..de5a917fcc7 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
@@ -23,6 +23,7 @@ import { filter, tap } from 'rxjs/operators';
import { BoardActionsRegistryService } from 'core-app/features/boards/board/board-actions/board-actions-registry.service';
import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';
import { WorkPackageStatesInitializationService } from 'core-app/features/work-packages/components/wp-list/wp-states-initialization.service';
+import { enterpriseDocsUrl } from 'core-app/core/setup/globals/constants.const';
@Component({
templateUrl: './board-list-container.component.html',
@@ -44,7 +45,7 @@ export class BoardListContainerComponent extends UntilDestroyedMixin implements
teaser_text: this.I18n.t('js.boards.upsale.teaser_text'),
upgrade_to_ee_text: this.I18n.t('js.boards.upsale.upgrade'),
more_info_text: this.I18n.t('js.boards.upsale.more_info'),
- more_info_link: 'https://www.openproject.org/docs/user-guide/agile-boards/#action-boards-premium-feature',
+ more_info_link: enterpriseDocsUrl.boards,
};
/** Container reference */
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 c9d8d9280c2..ebb2bb1d62f 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
@@ -48,6 +48,7 @@ import { imagePath } from 'core-app/shared/helpers/images/path-helper';
import { ITileViewEntry } from '../tile-view/tile-view.component';
import { BannersService } from 'core-app/core/enterprise/banners.service';
import { ToastService } from 'core-app/shared/components/toaster/toast.service';
+import { enterpriseDocsUrl } from 'core-app/core/setup/globals/constants.const';
@Component({
templateUrl: './new-board-modal.html',
@@ -82,7 +83,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'),
- more_info_ee_link: 'https://www.openproject.org/docs/user-guide/agile-boards/#action-boards-premium-feature',
+ more_info_ee_link: enterpriseDocsUrl.boards,
};
constructor(
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 946da4e3e24..4d63d8fff79 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
@@ -40,6 +40,7 @@ import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destr
import { componentDestroyed } from '@w11k/ngx-componentdestroyed';
import { QueryFilterInstanceResource } from 'core-app/features/hal/resources/query-filter-instance-resource';
import { QueryFilterResource } from 'core-app/features/hal/resources/query-filter-resource';
+import { enterpriseDocsUrl } from 'core-app/core/setup/globals/constants.const';
const ADD_FILTER_SELECT_INDEX = -1;
@@ -72,7 +73,7 @@ export class QueryFiltersComponent extends UntilDestroyedMixin implements OnInit
upsale_for_more: this.I18n.t('js.filter.upsale_for_more'),
upsale_link: this.I18n.t('js.filter.upsale_link'),
more_info_text: this.I18n.t('js.filter.more_info'),
- more_info_link: 'https://www.openproject.org/enterprise-edition/',
+ more_info_link: enterpriseDocsUrl.website,
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.ts b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/columns-tab.component.ts
index 506b27bc354..e318ff9e4c5 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
@@ -6,6 +6,7 @@ import { WorkPackageViewColumnsService } from 'core-app/features/work-packages/r
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';
@Component({
templateUrl: './columns-tab.component.html',
@@ -24,7 +25,6 @@ export class WpTableConfigurationColumnsTabComponent implements TabComponent, On
public eeShowBanners = false;
public text = {
-
columnsHelp: this.I18n.t('js.work_packages.table_configuration.columns_help_text'),
columnsLabel: this.I18n.t('js.label_columns'),
selectedColumns: this.I18n.t('js.description_selected_columns'),
@@ -33,7 +33,7 @@ export class WpTableConfigurationColumnsTabComponent implements TabComponent, On
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'),
moreInfoText: this.I18n.t('js.work_packages.table_configuration.upsale.more-info-text'),
- moreInfoLink: 'https://www.openproject.org/enterprise-edition/',
+ moreInfoLink: enterpriseDocsUrl.website,
};
constructor(readonly injector:Injector,
diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts
index 535619a014c..5027e3f92bc 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts
+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts
@@ -13,6 +13,7 @@ import { BannersService } from 'core-app/core/enterprise/banners.service';
import { IsolatedQuerySpace } from 'core-app/features/work-packages/directives/query-space/isolated-query-space';
import { NgSelectComponent } from '@ng-select/ng-select';
import { States } from 'core-app/core/states/states.service';
+import { enterpriseDocsUrl } from 'core-app/core/setup/globals/constants.const';
@Component({
templateUrl: './highlighting-tab.component.html',
@@ -53,7 +54,7 @@ export class WpTableConfigurationHighlightingTabComponent implements TabComponen
upsaleAttributeHighlighting: this.I18n.t('js.work_packages.table_configuration.upsale.attribute_highlighting'),
upsaleCheckOutLink: this.I18n.t('js.work_packages.table_configuration.upsale.check_out_link'),
more_info_text: this.I18n.t('js.filter.more_info'),
- more_info_link: 'https://www.openproject.org/docs/user-guide/work-packages/work-package-table-configuration/#attribute-highlighting-premium-feature',
+ more_info_link: enterpriseDocsUrl.tableHighlighting,
};
constructor(readonly injector:Injector,
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.ts
index e2fdf3fae08..d81890aa35b 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
@@ -8,6 +8,7 @@ import { WidgetRegistration } from 'core-app/shared/components/grids/grid/grid.c
import { GridWidgetsService } from 'core-app/shared/components/grids/widgets/widgets.service';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { BannersService } from 'core-app/core/enterprise/banners.service';
+import { enterpriseDocsUrl } from 'core-app/core/setup/globals/constants.const';
@Component({
templateUrl: './add.modal.html',
@@ -19,7 +20,7 @@ export class AddGridWidgetModalComponent extends OpModalComponent {
upsale_link: this.i18n.t('js.grid.upsale.link'),
upsale_text: this.i18n.t('js.grid.upsale.text'),
more_info_text: this.i18n.t('js.filter.more_info'),
- more_info_link: 'https://www.openproject.org/docs/user-guide/project-overview/#work-package-graph-widgets-premium-feature',
+ more_info_link: enterpriseDocsUrl.graphWidget,
};
public chosenWidget:WidgetRegistration;
diff --git a/lib/open_project/static/links.rb b/lib/open_project/static/links.rb
index f5faa45db19..f4a72036090 100644
--- a/lib/open_project/static/links.rb
+++ b/lib/open_project/static/links.rb
@@ -214,6 +214,20 @@ module OpenProject
},
pricing: {
href: 'https://www.openproject.org/pricing/'
+ },
+ enterprise_docs: {
+ form_configuration: {
+ href: 'https://www.openproject.org/docs/system-admin-guide/manage-work-packages/work-package-types/#work-package-form-configuration-premium-feature'
+ },
+ attribute_highlighting: {
+ href: 'https://www.openproject.org/docs/user-guide/work-packages/work-package-table-configuration/#attribute-highlighting-premium-feature'
+ },
+ custom_field_projects: {
+ href: 'https://www.openproject.org/docs/system-admin-guide/custom-fields/custom-fields-projects/'
+ },
+ custom_field_multiselect: {
+ href: 'https://www.openproject.org/docs/system-admin-guide/custom-fields/#create-a-multi-select-custom-field-premium-feature'
+ }
}
}
end
diff --git a/modules/grids/config/locales/js-en.yml b/modules/grids/config/locales/js-en.yml
index a02232785f2..df1b3909258 100644
--- a/modules/grids/config/locales/js-en.yml
+++ b/modules/grids/config/locales/js-en.yml
@@ -5,7 +5,7 @@ en:
remove: 'Remove widget'
configure: 'Configure widget'
upsale:
- text: "Some widgets, like the work package graph widget, are only available in Enterprise Edition."
+ text: "Some widgets, like the work package graph widget, are only available in the Enterprise Edition."
link: 'Enterprise Edition.'
widgets:
custom_text: