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

update view to make it like figma design

Klaus Zanders7c681df0ee62
diff --git a/modules/costs/app/components/time_tracking/time_entry_event_component.html.erb b/modules/costs/app/components/time_tracking/time_entry_event_component.html.erb
index 3ce7cb483bc..fc78640574a 100644
--- a/modules/costs/app/components/time_tracking/time_entry_event_component.html.erb
+++ b/modules/costs/app/components/time_tracking/time_entry_event_component.html.erb
@@ -1,4 +1,10 @@
<div class="calendar-time-entry-event--highlighting __hl_background_status_<%= time_entry.work_package.status_id %>"></div>
+
<div class="calendar-time-entry-event--content">
- <div class="calendar-time-entry-event--content-subject"><%= time_entry.work_package.subject %></div>
+ <div class="calendar-time-entry-event-content-dates">
+ <%= time_entry.start_timestamp.strftime("%H:%M") %>-<%= time_entry.end_timestamp.strftime("%H:%M") %>
+ (<%= time_entry.hours %>)
+ </div>
+ <div class="calendar-time-entry-event--content-subject-line"><%= time_entry.work_package.subject %></div>
+ <div class="calendar-time-entry-event--content-project-name"><%= time_entry.project.name %></div>
</div>
diff --git a/modules/costs/app/components/time_tracking/time_entry_event_component.sass b/modules/costs/app/components/time_tracking/time_entry_event_component.sass
index 49fdc819676..1cd1bb38bd4 100644
--- a/modules/costs/app/components/time_tracking/time_entry_event_component.sass
+++ b/modules/costs/app/components/time_tracking/time_entry_event_component.sass
@@ -5,9 +5,9 @@
display: flex
user-select: none
// Leave space for the shadow to be displayed
- width: calc(100% - 2px)
+ width: calc(100% - 4px)
border: 1px solid var(--borderColor-default)
- border-radius: 2px
+ border-radius: 5px
padding: 10px
position: relative
box-shadow: 1px 1px 3px 0px var(--borderColor-default)
@@ -21,67 +21,17 @@
z-index: 2
box-shadow: -4px -4px 10px 4px var(--body-background)
- &_new
- padding-right: 25px
-
- &_ghosted
- opacity: 0.5
-
- &_selected
- background-color: var(--selection-bgColor)
- .op-icon--wrapper
- background: var(--selection-bgColor)
- &:hover
- .calendar-time-entry-event--inline-buttons
- box-shadow: none
-
- &_closed:not(&_selected)
- background-color: var(--display-gray-bgColor-muted)
- .op-icon--wrapper
- background: var(--display-gray-bgColor-muted)
- &:hover
- .calendar-time-entry-event--inline-buttons
- box-shadow: -4px -4px 10px 4px var(--display-gray-bgColor-muted)
-
- &_horizontal
- height: 100%
-
- &_vertical
- margin-top: 10px
- // Take care that the shadow of the last element is still visible
- &:last-of-type
- margin-bottom: 5px
-
- &_inline &--content
- grid-template-columns: max-content max-content auto auto 1fr
- grid-template-rows: auto max-content
- grid-template-areas: "status id project project project" "subject subject subject subject subject"
-
- &-assignee
- display: none
- &-subject-line
- display: flex
- &-subject
- flex-grow: 1
- @include text-shortener
-
- // Style shadow element while dragging
- wp-single-card:host.gu-transit &
- @include modifying--placeholder
-
&--content
-
- &:not(.-new)
- display: grid
- grid-template-columns: max-content max-content auto auto 1fr
- grid-template-rows: auto 1fr max-content auto
- grid-row-gap: 5px
- grid-column-gap: 5px
- grid-template-areas: "status id project project project" "subject subject subject subject subject" "image image image image image" "avatar avatar avatar dates dates"
- overflow: hidden
- flex-grow: 1
- font-size: var(--body-font-size)
- line-height: 16px
+ display: grid
+ grid-template-columns: max-content max-content auto auto 1fr
+ grid-template-rows: auto 1fr max-content auto
+ grid-row-gap: 5px
+ grid-column-gap: 5px
+ grid-template-areas: "dates" "subject" "project"
+ overflow: hidden
+ flex-grow: 1
+ font-size: var(--body-font-size)
+ line-height: 16px
&-project-name
grid-area: project
@@ -89,18 +39,22 @@
color: var(--fgColor-muted)
font-size: 12px
@include text-shortener
+
&-type
grid-area: type
margin-right: 4px
+
&-subject-line
grid-area: subject
@include text-shortener(false)
+
&-assignee
margin-right: auto
grid-area: avatar
max-width: 140px
color: var(--fgColor-muted)
font-size: 12px
+
&-id
grid-area: id
color: var(--fgColor-muted)
@@ -110,22 +64,16 @@
margin-right: 5px
max-width: 6.5rem
display: flex
+
&-status
overflow: hidden
+
&-baseline
margin-left: $spot-spacing-0_5
&-tooltip
width: 6.5rem
- &-cover-image
- grid-area: image
- max-height: 350px
- justify-self: center
-
- @media screen and (max-width: $breakpoint-sm)
- max-height: 250px
-
&-dates
grid-area: dates
place-self: center end
@@ -141,45 +89,8 @@
&--highlighting
width: 100%
- height: 2px
+ height: 4px
position: absolute
top: 0
left: 0
- border-radius: 2px 2px 0 0
-
- &--card-actions
- display: flex
- position: absolute
- top: 9px
- right: 0
-
- &--card-action
- z-index: 2
-
- &_closed
- color: $spot-color-basic-gray-2
-
- &--inline-buttons
- opacity: 0
- padding-right: 4px
- white-space: nowrap
-
- // For selected cards the padding needs to be smaller
- // Otherwise the left-side color shading can overflow the card (e.g. in small cards in the team planner)
- .calendar-time-entry-event_selected &
- padding-left: 15px
-
- .op-icon--wrapper:not(&_selected)
- background: var(--body-background)
-
- &.-show
- opacity: 1
-
- &--inline-cancel-button
- color: var(--warn)
-
- @media only screen and (max-width: $breakpoint-sm)
- &_shrink
- border: none
- box-shadow: none
- padding: 15px
+ border-radius: 5px 5px 0 0