Files
dspace-angular/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts
2020-08-28 11:34:17 +02:00

32 lines
1.0 KiB
TypeScript

import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { EditComColPageComponent } from '../../shared/comcol-forms/edit-comcol-page/edit-comcol-page.component';
import { Collection } from '../../core/shared/collection.model';
import { getCollectionPageRoute } from '../collection-page-routing-paths';
/**
* Component that represents the page where a user can edit an existing Collection
*/
@Component({
selector: 'ds-edit-collection',
templateUrl: '../../shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.html'
})
export class EditCollectionPageComponent extends EditComColPageComponent<Collection> {
type = 'collection';
public constructor(
protected router: Router,
protected route: ActivatedRoute
) {
super(router, route);
}
/**
* Get the collection page url
* @param collection The collection for which the url is requested
*/
getPageUrl(collection: Collection): string {
return getCollectionPageRoute(collection.id)
}
}