Merge pull request #4385 from GabrielInTheWorld/opening-tab-motion-list

Added anchor column
This commit is contained in:
Emanuel Schütze 2019-02-22 12:10:48 +01:00 committed by GitHub
commit 6d28374c9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 5 deletions

View File

@ -121,6 +121,14 @@
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<!-- Anchor column to open separate tab -->
<ng-container matColumnDef="anchor">
<mat-header-cell *matHeaderCellDef></mat-header-cell>
<mat-cell *matCellDef="let motion">
<a [routerLink]="motion.id"></a>
</mat-cell>
</ng-container>
<!-- Speakers column --> <!-- Speakers column -->
<ng-container matColumnDef="speakers"> <ng-container matColumnDef="speakers">
<mat-header-cell *matHeaderCellDef mat-sort-header>Speakers</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Speakers</mat-header-cell>
@ -139,7 +147,6 @@
<mat-header-row *matHeaderRowDef="getColumnDefinition()"></mat-header-row> <mat-header-row *matHeaderRowDef="getColumnDefinition()"></mat-header-row>
<mat-row <mat-row
[ngClass]="selectedRows.indexOf(row) >= 0 ? 'selected' : ''" [ngClass]="selectedRows.indexOf(row) >= 0 ? 'selected' : ''"
(click)="selectItem(row, $event)"
*matRowDef="let row; columns: getColumnDefinition()" *matRowDef="let row; columns: getColumnDefinition()"
class="lg" class="lg"
> >

View File

@ -41,12 +41,12 @@ export class MotionListComponent extends ListViewBaseComponent<ViewMotion, Motio
/** /**
* Columns to display in table when desktop view is available * Columns to display in table when desktop view is available
*/ */
public displayedColumnsDesktop: string[] = ['identifier', 'title', 'state']; public displayedColumnsDesktop: string[] = ['identifier', 'title', 'state', 'anchor'];
/** /**
* Columns to display in table when mobile view is available * Columns to display in table when mobile view is available
*/ */
public displayedColumnsMobile = ['identifier', 'title']; public displayedColumnsMobile = ['identifier', 'title', 'anchor'];
/** /**
* Value of the configuration variable `motions_statutes_enabled` - are statutes enabled? * Value of the configuration variable `motions_statutes_enabled` - are statutes enabled?

View File

@ -64,6 +64,14 @@
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<!-- Anchor column to open separate tab -->
<ng-container matColumnDef="anchor">
<mat-header-cell *matHeaderCellDef></mat-header-cell>
<mat-cell *matCellDef="let user">
<a [routerLink]="user.id"></a>
</mat-cell>
</ng-container>
<!-- Presence column --> <!-- Presence column -->
<ng-container matColumnDef="presence"> <ng-container matColumnDef="presence">
<mat-header-cell *matHeaderCellDef mat-sort-header>Presence</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Presence</mat-header-cell>

View File

@ -80,12 +80,12 @@ export class UserListComponent extends ListViewBaseComponent<ViewUser, User> imp
/** /**
* Columns to display in table when desktop view is available * Columns to display in table when desktop view is available
*/ */
public displayedColumnsDesktop: string[] = ['name', 'group']; public displayedColumnsDesktop: string[] = ['name', 'group', 'anchor'];
/** /**
* Columns to display in table when mobile view is available * Columns to display in table when mobile view is available
*/ */
public displayedColumnsMobile = ['name']; public displayedColumnsMobile = ['name', 'anchor'];
/** /**
* Stores the observed configuration if the presence view is available to administrators * Stores the observed configuration if the presence view is available to administrators

View File

@ -193,6 +193,7 @@ mat-card {
/** size of the mat row */ /** size of the mat row */
mat-row { mat-row {
position: relative;
min-height: 60px; min-height: 60px;
} }
mat-row.lg { mat-row.lg {
@ -653,3 +654,25 @@ button.mat-menu-item.selected {
.white { .white {
color: white; color: white;
} }
/** Style for the anchor column */
.mat-column-anchor {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.1;
z-index: 1;
a {
display: block;
height: 100%;
width: 100%;
}
}
/** functional items should lay over the anchor column */
.mat-cell > * {
z-index: 2;
}