Merge pull request #7997 from opf/fix/misc_time_entry_stylings

Fix/misc time entry stylings

[ci skip]
pull/8001/head
Oliver Günther 5 years ago committed by GitHub
commit be7a4ff384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/assets/stylesheets/content/_attributes_key_value.sass
  2. 4
      app/assets/stylesheets/content/work_packages/inplace_editing/_edit_fields.sass
  3. 3
      config/locales/js-en.yml
  4. 4
      frontend/src/app/modules/grids/openproject-grids.module.ts
  5. 2
      frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.html
  6. 4
      frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts
  7. 2
      frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.html
  8. 4
      frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts
  9. 2
      frontend/src/app/modules/time_entries/create/create.modal.html
  10. 2
      frontend/src/app/modules/time_entries/create/create.modal.ts
  11. 2
      frontend/src/app/modules/time_entries/edit/edit.modal.html
  12. 6
      frontend/src/app/modules/time_entries/edit/edit.modal.sass
  13. 3
      frontend/src/app/modules/time_entries/edit/edit.modal.ts
  14. 2
      frontend/src/app/modules/time_entries/form/form.component.html
  15. 2
      modules/dashboards/spec/features/time_entries_spec.rb
  16. 4
      modules/grids/config/locales/js-en.yml
  17. 4
      modules/my_page/spec/features/my/time_entries_current_user_spec.rb

@ -92,6 +92,5 @@
max-width: 200px
.attributes-map--value
// empty for now but it makes sense to also have it present in the style declaration IMO
zoom: 1
@include text-shortener(false)

@ -27,6 +27,10 @@
border-radius: 2px
border-color: darkblue
&.-tiny
input:not([type='checkbox'])
max-width: 100px
.inline-label
.form-label,
.icon-context:before

@ -511,8 +511,7 @@ en:
duration: 'Duration'
spent_on: 'Date'
hours: 'Hours'
edit: 'Edit time entry'
create: 'Create time entry'
label: 'Time entry'
two_factor_authentication:
label_two_factor_authentication: 'Two-factor authentication'

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

@ -10,7 +10,7 @@
[attr.title]="text.close">
</i>
</a>
<h3 class="icon-context icon-attention" [textContent]="text.title"></h3>
<h3 class="icon-context icon-log_time" [textContent]="text.title"></h3>
</div>
<div class="ngdialog-body op-modal--modal-body">

@ -21,7 +21,7 @@ export class TimeEntryCreateModal extends OpModalComponent {
@ViewChild('editForm', { static: true }) editForm:TimeEntryFormComponent;
text = {
title: this.i18n.t('js.time_entry.create'),
title: this.i18n.t('js.button_log_time'),
create: this.i18n.t('js.label_create'),
close: this.i18n.t('js.button_close'),
cancel: this.i18n.t('js.button_cancel')

@ -10,7 +10,7 @@
[attr.title]="text.close">
</i>
</a>
<h3 class="icon-context icon-attention" [textContent]="text.title"></h3>
<h3 class="icon-context icon-log_time" [textContent]="text.title"></h3>
</div>
<div class="ngdialog-body op-modal--modal-body">

@ -6,4 +6,8 @@
margin-top: 2em
.button
margin-bottom: 0
margin-bottom: 0
.icon-log_time
&:before
padding-right: 6px

@ -6,7 +6,6 @@ import {I18nService} from "core-app/modules/common/i18n/i18n.service";
import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service";
import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource";
import {HalResource} from "core-app/modules/hal/resources/hal-resource";
import {SchemaResource} from "core-app/modules/hal/resources/schema-resource";
@Component({
templateUrl: './edit.modal.html',
@ -19,7 +18,7 @@ import {SchemaResource} from "core-app/modules/hal/resources/schema-resource";
export class TimeEntryEditModal extends OpModalComponent {
text = {
title: this.i18n.t('js.time_entry.edit'),
title: this.i18n.t('js.time_entry.label'),
close: this.i18n.t('js.button_close'),
delete: this.i18n.t('js.button_delete')
};

@ -8,6 +8,7 @@
<div class="attributes-map--key" [textContent]="text.attributes.spentOn"></div>
<div class="attributes-map--value">
<editable-attribute-field [resource]="entry"
[wrapperClasses]="'-tiny'"
[fieldName]="'spentOn'">
</editable-attribute-field>
</div>
@ -15,6 +16,7 @@
<div class="attributes-map--key" [textContent]="text.attributes.hours"></div>
<div class="attributes-map--value">
<editable-attribute-field [resource]="entry"
[wrapperClasses]="'-tiny'"
[fieldName]="'hours'">
</editable-attribute-field>
</div>

@ -93,7 +93,7 @@ describe 'Time entries widget on dashboard', type: :feature, js: true, with_mail
it 'adds the widget and checks the displayed entries' do
# within top-right area, add an additional widget
dashboard.add_widget(1, 1, :within, 'Spent time')
dashboard.add_widget(1, 1, :within, 'Spent time \(last 7 days\)')
spent_time_widget = Components::Grids::GridArea.new('.grid--area.-widgeted:nth-of-type(1)')

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

@ -114,7 +114,7 @@ describe 'My page time entries current user widget spec', type: :feature, js: tr
it 'adds the widget which then displays time entries and allows manipulating them' do
# within top-right area, add an additional widget
my_page.add_widget(1, 1, :within, 'Spent time')
my_page.add_widget(1, 1, :within, 'My spent time')
entries_area = Components::Grids::GridArea.new('.grid--area.-widgeted:nth-of-type(1)')
@ -215,7 +215,7 @@ describe 'My page time entries current user widget spec', type: :feature, js: tr
end
expect(page)
.to have_content(I18n.t('js.time_entry.edit'))
.to have_content(I18n.t('js.time_entry.label'))
activity_field.activate!
activity_field.set_value(other_activity.name)

Loading…
Cancel
Save