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 titles to the baseline icon cells

Oliver Günther90e3bf5eb19a
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index 4d467539207..1cc8078e594 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -990,6 +990,10 @@ en:
message_work_package_read_only: "Work package is locked in this status. No attribute other than status can be altered."
message_work_package_status_blocked: "Work package status is not writable due to closed status and closed version being assigned."
placeholder_filter_by_text: "Subject, description, comments, ..."
+ baseline:
+ addition_label: 'Added to view within the comparison time period'
+ removal_label: 'Removed from view within the comparison time period'
+ modification_label: 'Modified within the comparison time period'
filters:
title: 'Filter work packages'
inline_create:
diff --git a/frontend/src/app/features/work-packages/components/wp-fast-table/builders/baseline/baseline-column-builder.ts b/frontend/src/app/features/work-packages/components/wp-fast-table/builders/baseline/baseline-column-builder.ts
index 7266787390f..9b50d1effd4 100644
--- a/frontend/src/app/features/work-packages/components/wp-fast-table/builders/baseline/baseline-column-builder.ts
+++ b/frontend/src/app/features/work-packages/components/wp-fast-table/builders/baseline/baseline-column-builder.ts
@@ -12,6 +12,7 @@ import { opIconElement } from 'core-app/shared/helpers/op-icon-builder';
import { WorkPackageViewColumnsService } from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-columns.service';
import { SchemaCacheService } from 'core-app/core/schemas/schema-cache.service';
import { ISchemaProxy } from 'core-app/features/hal/schemas/schema-proxy';
+import { I18nService } from 'core-app/core/i18n/i18n.service';
export const baselineCellName = 'wp-table--baseline-cell-td';
@@ -24,6 +25,8 @@ export class BaselineColumnBuilder {
@InjectField() schemaCache:SchemaCacheService;
+ @InjectField() I18n:I18nService;
+
constructor(public readonly injector:Injector) {
}
@@ -58,15 +61,21 @@ export class BaselineColumnBuilder {
schema:ISchemaProxy,
):HTMLElement|null {
if ((!base._meta.exists && compare._meta.exists) || (!base._meta.matchesFilters && compare._meta.matchesFilters)) {
- return opIconElement('icon-add', 'op-table-baseline--icon-added');
+ const icon = opIconElement('icon-add', 'op-table-baseline--icon-added');
+ icon.title = this.I18n.t('js.work_packages.baseline.addition_label');
+ return icon;
}
if ((base._meta.exists && !compare._meta.exists) || (base._meta.matchesFilters && !compare._meta.matchesFilters)) {
- return opIconElement('icon-minus1', 'op-table-baseline--icon-removed');
+ const icon = opIconElement('icon-minus1', 'op-table-baseline--icon-removed');
+ icon.title = this.I18n.t('js.work_packages.baseline.removal_label');
+ return icon;
}
if (this.visibleAttributeChanged(base, schema)) {
- return opIconElement('icon-arrow-left-right', 'op-table-baseline--icon-changed');
+ const icon = opIconElement('icon-arrow-left-right', 'op-table-baseline--icon-changed');
+ icon.title = this.I18n.t('js.work_packages.baseline.modification_label');
+ return icon;
}
return null;