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

time entry widget headers non editable & rephrased

ulferts6e2615a02dbf
diff --git a/frontend/src/app/modules/grids/openproject-grids.module.ts b/frontend/src/app/modules/grids/openproject-grids.module.ts
index 5bbef3ae5e3..7abb50a3833 100644
--- a/frontend/src/app/modules/grids/openproject-grids.module.ts
+++ b/frontend/src/app/modules/grids/openproject-grids.module.ts
@@ -257,9 +257,9 @@ export function registerWidgets(injector:Injector) {
{
identifier: 'time_entries_current_user',
component: WidgetTimeEntriesCurrentUserComponent,
- title: i18n.t(`js.grid.widgets.time_entries_list.title`),
+ title: i18n.t(`js.grid.widgets.time_entries_current_user.title`),
properties: {
- name: i18n.t('js.grid.widgets.time_entries_list.title'),
+ name: i18n.t('js.grid.widgets.time_entries_current_user.title'),
}
},
{
diff --git a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.html b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.html
index 92e9bf66ef3..f9b17c61141 100644
--- a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.html
+++ b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.html
@@ -1,6 +1,6 @@
<widget-header
[name]="widgetName"
- (onRenamed)="renameWidget($event)">
+ [editable]="isEditable">
<widget-menu
[resource]="resource">
diff --git a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts
index e2dc33bb5fa..bb0e7c5fed9 100644
--- a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts
+++ b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts
@@ -39,6 +39,10 @@ export class WidgetTimeEntriesCurrentUserComponent extends AbstractWidgetCompone
}
}
+ public get isEditable() {
+ return false;
+ }
+
protected formatNumber(value:number):string {
return this.i18n.toNumber(value, { precision: 2 });
}
diff --git a/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.html b/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.html
index 9f4d3b2fc93..7547c73e022 100644
--- a/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.html
+++ b/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.html
@@ -1,6 +1,6 @@
<widget-header
[name]="widgetName"
- (onRenamed)="renameWidget($event)">
+ [editable]="isEditable">
<widget-menu
[resource]="resource">
diff --git a/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts b/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts
index 5b7bc26edc0..f0d3a78ebd6 100644
--- a/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts
+++ b/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts
@@ -94,6 +94,10 @@ export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetCompo
return this.pathHelper.workPackagePath(entry.workPackage.idFromLink);
}
+ public get isEditable() {
+ return false;
+ }
+
public deleteIfConfirmed(event:Event, entry:TimeEntryResource) {
event.preventDefault();
diff --git a/modules/grids/config/locales/js-en.yml b/modules/grids/config/locales/js-en.yml
index 34e9e64cef9..18d0ce09b83 100644
--- a/modules/grids/config/locales/js-en.yml
+++ b/modules/grids/config/locales/js-en.yml
@@ -37,8 +37,10 @@ en:
subprojects:
title: 'Subprojects'
no_results: 'No subprojects.'
+ time_entries_current_user:
+ title: 'My spent time'
time_entries_list:
- title: 'Spent time'
+ title: 'Spent time (last 7 days)'
no_results: 'No time entries for the last 7 days.'
work_packages_accountable:
title: "Work packages I am accountable for"