change view path
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
<button *ngIf="!working" mat-raised-button color="primary" [disabled]="form.invalid">
|
||||
<mat-icon>save</mat-icon> {{ (view.id ? 'views.update' : 'views.create') | i18n}}
|
||||
</button>
|
||||
<a mat-button color="primary" routerLink="/p/{{view.name}}" *ngIf="view.id">{{ 'views.goTo' |
|
||||
<a mat-button color="primary" routerLink="/v/{{view.name}}" *ngIf="view.id">{{ 'views.goTo' |
|
||||
i18n}}</a>
|
||||
<span fxFlexOffset="auto" fxFlexOffset.xs="none"></span>
|
||||
<a mat-raised-button color="warn" *ngIf="!working && view.id" (click)="deleteView()">
|
||||
|
||||
@@ -98,7 +98,6 @@ export class PageViewEdit implements OnInit, OnDestroy {
|
||||
this.view.tags = [];
|
||||
this.view.excludedTags = [];
|
||||
this.view.index = 99;
|
||||
this.form.get("name").setValue(this.view.name);
|
||||
this.form.get("entryType").setValue(this.view.entryType);
|
||||
this.form.get("sorting").setValue(this.view.sorting);
|
||||
this.form.get("index").setValue(this.view.index);
|
||||
@@ -128,7 +127,7 @@ export class PageViewEdit implements OnInit, OnDestroy {
|
||||
this.snackBar.open(this.i18n.get('views.success', []), this.i18n.get("close", []), {
|
||||
duration: 3000
|
||||
});
|
||||
this.router.navigateByUrl('/p/' + this.view.name);
|
||||
this.router.navigateByUrl('/v/' + this.view.name);
|
||||
this.viewService.getViews();
|
||||
}, (error) => {
|
||||
this.working = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div fxLayout="column" fxFlexFill>
|
||||
<a mat-mini-fab routerLink="/p/{{name}}/edit" matTooltip="{{'views.edit' | i18n}}" color="primary">
|
||||
<a mat-mini-fab routerLink="/v/{{name}}/edit" matTooltip="{{'views.edit' | i18n}}" color="primary">
|
||||
<mat-icon inline="true">edit</mat-icon>
|
||||
</a>
|
||||
<page-entries #entries [fetch]="boundFetch" fxFlex="grow"></page-entries>
|
||||
|
||||
@@ -36,7 +36,7 @@ export class PageView implements OnInit, OnDestroy {
|
||||
this.entries.refresh();
|
||||
}
|
||||
}, (error) => {
|
||||
this.router.navigate([ '/p' ], { queryParams: { name: this.name }, queryParamsHandling: 'merge' });
|
||||
this.router.navigate([ '/v' ], { queryParams: { name: this.name }, queryParamsHandling: 'merge' });
|
||||
})
|
||||
});
|
||||
this.boundFetch = this.fetch.bind(this);
|
||||
|
||||
Reference in New Issue
Block a user