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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
copy entire style from wp-single-card and fill complete html of calendar event
Klaus Zanders9d1a11ca730a
diff --git a/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts b/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.tsindex 2b2c8baaff5..0bf362785f7 100644--- a/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts@@ -30,12 +30,16 @@ export default class MyTimeTrackingController extends Controller {events: this.timeEntriesValue,headerToolbar: false,initialDate: this.initialDateValue,- eventClassNames: ['calendar-time-entry-event'],- eventContent: (arg) => {- if (arg.event.extendedProps.hasOwnProperty('customEventView')) {- return { html: arg.event.extendedProps.customEventView };- }- return null;+ height: 800,+ contentHeight: 780,+ aspectRatio: 3,+ eventClassNames: [+ 'calendar-time-entry-event',+ 'calendar-time-entry-event_inline ',+ ],+ eventDidMount(info) {+ //eslint-disable-next-line+ info.el.innerHTML = info.event.extendedProps.customEventView;},});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.erbindex 38d0d65701f..3ce7cb483bc 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,3 +1,4 @@<div class="calendar-time-entry-event--highlighting __hl_background_status_<%= time_entry.work_package.status_id %>"></div>--<h6><%= time_entry.work_package.subject %></h6>+<div class="calendar-time-entry-event--content">+ <div class="calendar-time-entry-event--content-subject"><%= time_entry.work_package.subject %></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.sassindex 0b5d4f3682d..49fdc819676 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@@ -15,6 +15,130 @@color: var(--body-font-color)font-size: var(--body-font-size)+ &:hover+ .calendar-time-entry-event--inline-buttons+ opacity: 1+ 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++ &-project-name+ grid-area: project+ font-style: italic+ 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)+ font-size: 12px+ &-status-baseline+ grid-area: status+ 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+ white-space: nowrap+ color: var(--fgColor-muted)+ font-size: 12px++ &-inline-date+ font-size: 12px+ color: var(--fgColor-muted)+ margin: 0 8px+ white-space: nowrap+&--highlightingwidth: 100%height: 2px@@ -22,3 +146,40 @@top: 0left: 0border-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