mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
63669: Hide return button for metadata edit on com/col
This commit is contained in:
@@ -28,7 +28,10 @@ import { CollectionCurateComponent } from './collection-curate/collection-curate
|
||||
{
|
||||
path: 'metadata',
|
||||
component: CollectionMetadataComponent,
|
||||
data: { title: 'collection.edit.tabs.metadata.title' }
|
||||
data: {
|
||||
title: 'collection.edit.tabs.metadata.title',
|
||||
hideReturnButton: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'roles',
|
||||
|
@@ -16,7 +16,7 @@
|
||||
<div class="mb-4">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
<a [routerLink]="getPageUrl((dsoRD$ | async)?.payload)" class="btn btn-outline-secondary">{{ type + '.edit.return' | translate }}</a>
|
||||
<a *ngIf="!hideReturnButton" [routerLink]="getPageUrl((dsoRD$ | async)?.payload)" class="btn btn-outline-secondary">{{ type + '.edit.return' | translate }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -36,12 +36,19 @@ export class EditComColPageComponent<TDomain extends DSpaceObject> implements On
|
||||
*/
|
||||
public dsoRD$: Observable<RemoteData<TDomain>>;
|
||||
|
||||
/**
|
||||
* Hide the default return button?
|
||||
*/
|
||||
public hideReturnButton: boolean;
|
||||
|
||||
public constructor(
|
||||
protected router: Router,
|
||||
protected route: ActivatedRoute
|
||||
) {
|
||||
this.router.events.subscribe(() => {
|
||||
this.currentPage = this.route.snapshot.firstChild.routeConfig.path;
|
||||
this.hideReturnButton = this.route.routeConfig.children
|
||||
.find((child: any) => child.path === this.currentPage).data.hideReturnButton;
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user