Added anchor column
Added an anchor column, so the user can open a separate tab. prettified Changed name of variable Resolves answer from pull-request - Moved the style for the anchor columns to `styles.scss` - Set the anchor column to the last place in the array
This commit is contained in:
parent
46e9c83423
commit
1694daaa9c
@ -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"
|
||||||
>
|
>
|
||||||
|
@ -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?
|
||||||
|
@ -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>
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user