diff --git a/src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.html b/src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.html new file mode 100644 index 0000000..dcd5538 --- /dev/null +++ b/src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.html @@ -0,0 +1,17 @@ +
+
+ +
+ + + +
diff --git a/src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.scss b/src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.scss new file mode 100644 index 0000000..888851d --- /dev/null +++ b/src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.scss @@ -0,0 +1,45 @@ +:host { + --position-left: 24px; +} + +.add-swimlane-container { + position: absolute; + top: calc(-30px / 2); + left: var(--position-left); + width: calc(100% - 2 * var(--position-left)); + z-index: 1000; + display: flex; + align-items: center; + + &.position-bottom { + top: unset; + bottom: calc(-30px / 2); + } + + .container-border { + border-bottom: 2px solid rgba(0, 0, 0, 0.7); + border-radius: 1px; + width: calc(50% - var(--position-left)); + } + + .add-swimlane-btn { + margin-left: 8px; + margin-right: 8px; + padding: 0; + width: 30px; + height: 30px; + border: 2px solid rgba(0, 0, 0, 0.7); + border-radius: 6px; + display: flex; + align-items: center; + justify-content: center; + color: rgba(0, 0, 0, 0.7); + + i.mat-icon, + i.mat-mdc-icon { + font-size: 22px; + width: 22px; + height: 22px; + } + } +} diff --git a/src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.ts b/src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.ts new file mode 100644 index 0000000..bc2ccf9 --- /dev/null +++ b/src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.ts @@ -0,0 +1,26 @@ +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { EduSharingUiCommonModule } from 'ngx-edu-sharing-ui'; +import { SharedModule } from '../../shared/shared.module'; +import { swimlaneTypeOptions } from '../custom-definitions'; +import { SelectOption } from '../swimlane/swimlane-settings-dialog/select-option'; + +@Component({ + selector: 'app-add-swimlane-border-button', + standalone: true, + imports: [EduSharingUiCommonModule, SharedModule], + templateUrl: './add-swimlane-border-button.component.html', + styleUrl: './add-swimlane-border-button.component.scss', +}) +export class AddSwimlaneBorderButtonComponent { + @Input() position: string = 'top'; + @Input() requestInProgress: boolean = false; + @Output() addSwimlaneTriggered: EventEmitter = new EventEmitter(); + + protected readonly swimlaneTypeOptions: SelectOption[] = swimlaneTypeOptions.concat([ + { value: 'spacer', viewValue: 'Trennlinie' }, + ]); + + addSwimlane(type: string): void { + this.addSwimlaneTriggered.emit(type); + } +} diff --git a/src/app/wlo-search/template/template.component.html b/src/app/wlo-search/template/template.component.html index e4c01d7..61ad9b8 100644 --- a/src/app/wlo-search/template/template.component.html +++ b/src/app/wlo-search/template/template.component.html @@ -41,27 +41,6 @@ > edit - - - - @@ -156,7 +135,22 @@

Inhalte von {{ topic() }}

swimlane.backgroundColor ? swimlane.backgroundColor : '#f4f4f4' " > + + + + + +