time entry widget headers non editable & rephrased

pull/7997/head
ulferts 5 years ago
parent 70559bded2
commit 6e2615a02d
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 4
      frontend/src/app/modules/grids/openproject-grids.module.ts
  2. 2
      frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.html
  3. 4
      frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts
  4. 2
      frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.html
  5. 4
      frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts
  6. 4
      modules/grids/config/locales/js-en.yml

@ -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'),
}
},
{

@ -1,6 +1,6 @@
<widget-header
[name]="widgetName"
(onRenamed)="renameWidget($event)">
[editable]="isEditable">
<widget-menu
[resource]="resource">

@ -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 });
}

@ -1,6 +1,6 @@
<widget-header
[name]="widgetName"
(onRenamed)="renameWidget($event)">
[editable]="isEditable">
<widget-menu
[resource]="resource">

@ -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();

@ -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"

Loading…
Cancel
Save