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
Add button to toggle the quick add pane
Henriette Dargedabdc6dbee9a
diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.htmlindex e76d31c1175..59ec8e51bd9 100644--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html@@ -1,6 +1,10 @@<ng-container*ngIf="(calendarOptions$ | async) as calendarOptions">+ <op-quick-add-pane+ *ngIf="(showQuickAddPane | async)">+ </op-quick-add-pane>+<full-calendar#ucCalendar*ngIf="calendarOptions"diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.tsindex bae970d8e2e..883e3a5a56d 100644--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts@@ -15,6 +15,7 @@ import {EventInput,} from '@fullcalendar/core';import {+ BehaviorSubject,combineLatest,Subject,} from 'rxjs';@@ -75,6 +76,8 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,projectIdentifier:string|undefined = undefined;+ showQuickAddPane = new BehaviorSubject<boolean>(false);+showAddAssignee$ = new Subject<boolean>();private principalIds$ = this.wpTableFilters@@ -99,6 +102,7 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,assignees:HalResource[] = [];text = {+ add_existing: this.I18n.t('js.team_planner.add_existing'),assignees: this.I18n.t('js.team_planner.label_assignee_plural'),add_assignee: this.I18n.t('js.team_planner.add_assignee'),remove_assignee: this.I18n.t('js.team_planner.remove_assignee'),@@ -217,8 +221,14 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,day: 'numeric',},initialView: this.calendar.initialView || 'resourceTimelineWeek',+ customButtons: {+ showQuickAddPane: {+ text: this.text.add_existing,+ click: this.toggleQuickAddPane.bind(this),+ },+ },headerToolbar: {- left: 'prev,next today',+ left: 'prev,next today showQuickAddPane',center: 'title',right: 'resourceTimelineWeek,resourceTimelineTwoWeeks',},@@ -457,4 +467,8 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,private wpAssignee(wp:WorkPackageResource):string {return (wp.assignee as HalResource).href as string;}++ private toggleQuickAddPane():void {+ this.showQuickAddPane.next(!this.showQuickAddPane.getValue());+ }}diff --git a/frontend/src/global_styles/content/_calendars.sass b/frontend/src/global_styles/content/_calendars.sassindex b9d4892df2c..62eb972afa3 100644--- a/frontend/src/global_styles/content/_calendars.sass+++ b/frontend/src/global_styles/content/_calendars.sass@@ -9,7 +9,6 @@ full-calendarheight: 34px&.fc-today-button- margin-right: 0margin-bottom: 0margin-left: 0.5rem@@ -64,7 +63,6 @@ full-calendar&-startjustify-content: flex-end-+&-endjustify-content: flex-start-diff --git a/frontend/src/global_styles/vendor/_full_calendar.sass b/frontend/src/global_styles/vendor/_full_calendar.sassindex f4bb3c08064..ae7c2548479 100644--- a/frontend/src/global_styles/vendor/_full_calendar.sass+++ b/frontend/src/global_styles/vendor/_full_calendar.sass@@ -53,7 +53,15 @@.fc-header-toolbar .fc-toolbar-chunk.fc-buttonbackground: transparent+ margin-bottom: 0+ &:focus+ box-shadow: none++ > .fc-button+ border-radius: 2rem++ .fc-button-group .fc-button&:first-of-typeborder-bottom-left-radius: 2remborder-top-left-radius: 2rem@@ -62,9 +70,6 @@border-bottom-right-radius: 2remborder-top-right-radius: 2rem- &:focus- box-shadow: none-.fc-prev-button,.fc-next-buttonborder-radius: 2rem@@ -82,6 +87,16 @@@include icon-font-common@extend .icon-arrow-right3+ .fc-showQuickAddPane-button+ @extend .button, .-highlight+ margin-bottom: 0 !important++ &:before+ @include icon-font-common+ @extend .icon-add+ margin-right: 10px++thead .fc-scroller@include no-visible-scroll-bardiff --git a/modules/team_planner/config/locales/js-en.yml b/modules/team_planner/config/locales/js-en.ymlindex daee17a5182..2b4e7ea09a2 100644--- a/modules/team_planner/config/locales/js-en.yml+++ b/modules/team_planner/config/locales/js-en.yml@@ -2,6 +2,7 @@en:js:team_planner:+ add_existing: 'Add existing'create_new: 'Create new planner'title: 'Team planner'unsaved_title: 'Unnamed team planner'