fix edit view, title link
This commit is contained in:
parent
0cb1d9c47a
commit
5ded8ea0aa
@ -38,7 +38,9 @@ export class PageViewEdit implements OnInit, OnDestroy {
|
|||||||
private i18n: I18nService,
|
private i18n: I18nService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private snackBar: MatSnackBar,
|
private snackBar: MatSnackBar,
|
||||||
public dialog: MatDialog) { }
|
public dialog: MatDialog) {
|
||||||
|
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.form = this.formBuilder.group({
|
this.form = this.formBuilder.group({
|
||||||
@ -52,24 +54,26 @@ export class PageViewEdit implements OnInit, OnDestroy {
|
|||||||
this.settings = settings;
|
this.settings = settings;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.route.snapshot.queryParamMap.get('name')) {
|
this.route.params.subscribe((params) => {
|
||||||
this.form.get('name').setValue(this.route.snapshot.queryParamMap.get('name'));
|
if (params.name) {
|
||||||
}
|
this.form.get('name').setValue(params.name);
|
||||||
|
|
||||||
this.form.get('entryType').setValue(this.entryType);
|
this.form.get('entryType').setValue(this.entryType);
|
||||||
this.form.get('entryType').valueChanges.subscribe((value) => {
|
this.form.get('entryType').valueChanges.subscribe((value) => {
|
||||||
this.entryType = value;
|
this.entryType = value;
|
||||||
});
|
});
|
||||||
this.form.get('sorting').setValue(this.sorting);
|
this.form.get('sorting').setValue(this.sorting);
|
||||||
this.form.get('sorting').valueChanges.subscribe((value) => {
|
this.form.get('sorting').valueChanges.subscribe((value) => {
|
||||||
this.sorting = value;
|
this.sorting = value;
|
||||||
});
|
});
|
||||||
this.form.get('index').valueChanges.subscribe((value) => {
|
this.form.get('index').valueChanges.subscribe((value) => {
|
||||||
this.view.index = value;
|
this.view.index = value;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.name = this.route.snapshot.paramMap.get('name');
|
this.name = params.name;
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
|
@ -3,13 +3,15 @@
|
|||||||
<mat-icon>menu</mat-icon>
|
<mat-icon>menu</mat-icon>
|
||||||
</a>
|
</a>
|
||||||
<mat-icon svgIcon="logo"></mat-icon>
|
<mat-icon svgIcon="logo"></mat-icon>
|
||||||
<span>
|
<a class="main" routerLink="/">
|
||||||
{{'bstlboard' | i18n}}
|
{{'bstlboard' | i18n}}
|
||||||
</span>
|
</a>
|
||||||
<span class="spacer"></span>
|
<span class="spacer"></span>
|
||||||
<ng-container *ngIf="authenticated">
|
<ng-container *ngIf="authenticated">
|
||||||
<a routerLink="/submit" mat-raised-button color="accent"><mat-icon>edit</mat-icon> {{'submission' |
|
<a routerLink="/submit" mat-raised-button color="accent">
|
||||||
i18n}}</a>
|
<mat-icon>edit</mat-icon> {{'submission' |
|
||||||
|
i18n}}
|
||||||
|
</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<button mat-button [matMenuTriggerFor]="menu">
|
<button mat-button [matMenuTriggerFor]="menu">
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
mat-sidenav {
|
mat-sidenav {
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.main {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user