Fix layout of search value selector

This commit is contained in:
Sean Engelhardt 2019-04-26 12:41:55 +02:00
parent ab6a53c2de
commit afc6bb629e
3 changed files with 29 additions and 16 deletions

View File

@ -38,7 +38,7 @@ export class ProjectorButtonComponent implements OnInit {
if (isProjectable(obj) || isProjectorElementBuildDeskriptor(obj)) { if (isProjectable(obj) || isProjectorElementBuildDeskriptor(obj)) {
this._object = obj; this._object = obj;
} else { } else {
this.object = null; this._object = null;
} }
} }

View File

@ -36,11 +36,7 @@
</div> </div>
</div> </div>
<!-- Project --> <!-- Project -->
<os-projector-button <os-projector-button [object]="assignment" [menuItem]="true"></os-projector-button>
[object]="assignment"
[menuItem]="true"
*osPerms="'core.can_manage_projector'"
></os-projector-button>
<!-- Delete --> <!-- Delete -->
<div *ngIf="assignment && hasPerms('manage')"> <div *ngIf="assignment && hasPerms('manage')">
@ -51,7 +47,6 @@
<span translate>Delete</span> <span translate>Delete</span>
</button> </button>
</div> </div>
</mat-menu> </mat-menu>
</os-head-bar> </os-head-bar>
@ -134,7 +129,10 @@
<ng-template #candidatesTemplate> <ng-template #candidatesTemplate>
<!-- candidates --> <!-- candidates -->
<div class="candidates-list" *ngIf="assignment && assignment.assignmentRelatedUsers && assignment.assignmentRelatedUsers.length > 0"> <div
class="candidates-list"
*ngIf="assignment && assignment.assignmentRelatedUsers && assignment.assignmentRelatedUsers.length > 0"
>
<os-sorting-list <os-sorting-list
[input]="assignment.assignmentRelatedUsers" [input]="assignment.assignmentRelatedUsers"
[live]="true" [live]="true"
@ -156,21 +154,25 @@
</ng-template> </ng-template>
</os-sorting-list> </os-sorting-list>
</div> </div>
<!-- Search for candidates --> <!-- Search for candidates -->
<div *ngIf="hasPerms('addOthers')" class="os-form-card"> <div class="search-field" *ngIf="hasPerms('addOthers')">
<form *ngIf="hasPerms('addOthers') && filteredCandidates && filteredCandidates.value.length > 0" [formGroup]="candidatesForm"> <form
*ngIf="hasPerms('addOthers') && filteredCandidates && filteredCandidates.value.length > 0"
[formGroup]="candidatesForm"
>
<os-search-value-selector <os-search-value-selector
*ngIf="hasPerms('addOthers')" class="search-bar"
ngDefaultControl ngDefaultControl
listname="{{ 'Select a new candidate' | translate }}"
[formControl]="candidatesForm.get('userId')"
[InputListValues]="filteredCandidates"
[form]="candidatesForm" [form]="candidatesForm"
[formControl]="candidatesForm.get('userId')"
[multiple]="false" [multiple]="false"
> listname="{{ 'Select a new candidate' | translate }}"
</os-search-value-selector> [InputListValues]="filteredCandidates"
></os-search-value-selector>
</form> </form>
</div> </div>
<!-- Add me and remove me if OP has correct permission --> <!-- Add me and remove me if OP has correct permission -->
<div *ngIf="assignment && hasPerms('addSelf') && assignment.candidates" class="add-self-buttons"> <div *ngIf="assignment && hasPerms('addSelf') && assignment.candidates" class="add-self-buttons">
<div> <div>

View File

@ -31,3 +31,14 @@
.add-self-buttons { .add-self-buttons {
padding: 15px 0 20px 25px; padding: 15px 0 20px 25px;
} }
.search-field {
margin: 20px 0;
.search-bar {
display: grid;
.mat-form-field {
width: 100%;
}
}
}