Skip to content

Commit

Permalink
Align Multiselect Text centered (#2976)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elblinator authored Dec 1, 2023
1 parent 068bf13 commit 9f8522c
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
<h2>{{ 'Agenda' | translate }}</h2>
</div>
<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button type="button" mat-icon-button [matMenuTriggerFor]="agendaMenu"><mat-icon>more_vert</mat-icon></button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<os-projectable-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@
<h2>{{ 'Elections' | translate }}</h2>
</div>
<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button type="button" mat-icon-button [matMenuTriggerFor]="assignmentMenu">
<mat-icon>more_vert</mat-icon>
</button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<os-projectable-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2>{{ 'Files' | translate }}</h2>
</div>

<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button
type="button"
mat-icon-button
Expand All @@ -23,14 +23,13 @@ <h2>{{ 'Files' | translate }}</h2>
<button type="button" mat-icon-button [matMenuTriggerFor]="mediafilesMenu">
<mat-icon>more_vert</mat-icon>
</button>
</div>
</ng-container>

<!-- Multiselect info -->
<div *ngIf="isMultiSelect" class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<!-- the actual file manager -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@ <h2>
</div>

<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button type="button" mat-icon-button [matMenuTriggerFor]="amendmentListMenu">
<mat-icon>more_vert</mat-icon>
</button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<os-projectable-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ <h2>{{ 'Motions' | translate }}</h2>
</div>

<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button type="button" mat-icon-button [matMenuTriggerFor]="motionListMenu">
<mat-icon>more_vert</mat-icon>
</button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>

<div class="extra-controls-slot">
<div *ngIf="hasCategories && !isMultiSelect">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@
<h2>{{ 'Workflows' | translate }}</h2>
</div>
<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button type="button" mat-icon-button [matMenuTriggerFor]="workflowListMenu">
<mat-icon>more_vert</mat-icon>
</button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<os-projectable-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ <h2>{{ 'Participants' | translate }}</h2>
</div>

<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button type="button" mat-icon-button [matMenuTriggerFor]="userMenu"><mat-icon>more_vert</mat-icon></button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<os-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ <h2>{{ 'Accounts' | translate }}</h2>
</div>

<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button type="button" mat-icon-button [matMenuTriggerFor]="memberMenu"><mat-icon>more_vert</mat-icon></button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<os-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@ <h2>{{ 'Committees' | translate }}</h2>

<!-- Menu -->
<!-- Only organization managers can do something -->
<div class="menu-slot" *osOmlPerms="OML.can_manage_organization">
<ng-container class="menu-slot" *osOmlPerms="OML.can_manage_organization">
<button type="button" mat-icon-button [matMenuTriggerFor]="committeeMenu">
<mat-icon>more_vert</mat-icon>
</button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<os-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2>{{ 'Files' | translate }}</h2>
</div>

<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button
type="button"
mat-icon-button
Expand All @@ -23,14 +23,13 @@ <h2>{{ 'Files' | translate }}</h2>
<button type="button" mat-icon-button [matMenuTriggerFor]="mediafilesMenu">
<mat-icon>more_vert</mat-icon>
</button>
</div>
</ng-container>

<!-- Multiselect info -->
<div *ngIf="isMultiSelect" class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<!-- the actual file manager -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ <h2>{{ 'Meetings' | translate }}</h2>

<!-- Menu -->
<!-- Only organization managers can do something -->
<div class="menu-slot" *osOmlPerms="OML.superadmin">
<ng-container class="menu-slot" *osOmlPerms="OML.superadmin">
<button type="button" mat-icon-button [matMenuTriggerFor]="meetingMenu">
<mat-icon>more_vert</mat-icon>
</button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<os-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ <h2>{{ 'Tags' | translate }}</h2>
</div>

<!-- Menu -->
<div class="menu-slot">
<ng-container class="menu-slot">
<button type="button" mat-icon-button [matMenuTriggerFor]="orgaTagMenu"><mat-icon>more_vert</mat-icon></button>
</div>
</ng-container>

<!-- Multiselect info -->
<div class="central-info-slot">
<ng-container class="central-info-slot">
<button mat-icon-button (click)="toggleMultiSelect()"><mat-icon>arrow_back</mat-icon></button>
<span>{{ selectedRows.length }}&nbsp;</span>
<span>{{ 'selected' | translate }}</span>
</div>
<span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
</ng-container>
</os-head-bar>

<os-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@

<!-- centered information slot -->
<div *ngIf="!multiSelectMode" class="spacer"></div>
<div class="toolbar-centered" *ngIf="multiSelectMode">
<ng-content select=".central-info-slot"></ng-content>
</div>

<ng-content *ngIf="multiSelectMode" select=".central-info-slot"></ng-content>
<div class="spacer"></div>

<div class="toolbar-right">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@
}
}

.toolbar-centered {
margin: auto;
vertical-align: baseline;
}

.toolbar-right {
display: flex;
.extra-controls-slot {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ export const HEAD_BAR_HEIGHT = 50; // height of the head-bar in px.
* </div>
*
* <!-- Menu -->
* <div class="menu-slot">
* <ng-container class="menu-slot">
* <button type="button" mat-icon-button [matMenuTriggerFor]="myComponentMenu">
* <mat-icon>more_vert</mat-icon>
* </button>
* </div>
* <!-- MultiSelect info -->
* <div class="central-info-slot">
* <button mat-icon-button (click)="toggleMultiSelect()">
* <mat-icon>arrow_back</mat-icon>
* </button>
* <span>{{ selectedRows.length }}&nbsp;</span><span>selected</span>
* </div>
* </ng-container>
* <!-- Multiselect info -->
* <ng-container class="central-info-slot">
* <button mat-icon-button (click)="toggleMultiSelect()">
* <mat-icon>arrow_back</mat-icon>
* </button>
* <span>{{ selectedRows.length }}&nbsp;{{ 'selected' | translate }}</span>
* </ng-container>
* </os-head-bar>
* ```
*/
Expand Down
2 changes: 1 addition & 1 deletion client/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -383,4 +383,4 @@ button.mat-menu-item.selected {
.error {
font-size: 75%;
display: block;
}
}

0 comments on commit 9f8522c

Please sign in to comment.