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

Show normal cursor when hovering over spent time display field with a value. Empty fields still have the "not-allowed" cursor to prevent that users click on the link to log time.

Henriette Darge10caeb57ad78
diff --git a/frontend/src/app/shared/components/fields/display/field-types/wp-spent-time-display-field.module.ts b/frontend/src/app/shared/components/fields/display/field-types/wp-spent-time-display-field.module.ts
index 8e8d2c7307c..f2995f53b09 100644
--- a/frontend/src/app/shared/components/fields/display/field-types/wp-spent-time-display-field.module.ts
+++ b/frontend/src/app/shared/components/fields/display/field-types/wp-spent-time-display-field.module.ts
@@ -55,7 +55,12 @@ export class WorkPackageSpentTimeDisplayField extends DurationDisplayField {
const link = document.createElement('a');
link.textContent = displayText;
link.setAttribute('title', this.text.linkTitle);
- link.setAttribute('class', 'time-logging--value');
+
+ if (displayText === this.placeholder) {
+ link.setAttribute('class', 'time-logging--value time-logging--value_empty');
+ } else {
+ link.setAttribute('class', 'time-logging--value');
+ }
if (this.resource.project) {
const wpID = this.resource.id.toString();
diff --git a/frontend/src/global_styles/content/work_packages/inplace_editing/_display_fields.sass b/frontend/src/global_styles/content/work_packages/inplace_editing/_display_fields.sass
index fa734268b55..6bec05e7047 100644
--- a/frontend/src/global_styles/content/work_packages/inplace_editing/_display_fields.sass
+++ b/frontend/src/global_styles/content/work_packages/inplace_editing/_display_fields.sass
@@ -140,7 +140,7 @@
// Mark focused, non-editable read-values
// Special handling for spent time field, as the logTime link should not be highlighted
.inline-edit--display-field:not(.id):not(.spentTime).-read-only,
-.inline-edit--display-field.spentTime.-read-only .time-logging--value
+.inline-edit--display-field.spentTime.-read-only .time-logging--value_empty
cursor: not-allowed
&:focus, &:hover