Added the badge to some components for coherence

This commit is contained in:
nibou230
2022-04-21 12:32:11 -04:00
parent 550eb6c7ab
commit a2a241b906
7 changed files with 36 additions and 9 deletions

View File

@@ -18,6 +18,7 @@
</span>
<div class="card-body">
<ds-type-badge *ngIf="showLabel" [object]="dso"></ds-type-badge>
<ds-access-status-badge *ngIf="showAccessStatus" [uuid]="dso.uuid"></ds-access-status-badge>
<ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4">
<h4 class="card-title" [innerHTML]="firstMetadataValue('dc.title')"></h4>
</ds-truncatable-part>

View File

@@ -6,6 +6,7 @@ import { SearchResultGridElementComponent } from '../../search-result-grid-eleme
import { Item } from '../../../../../core/shared/item.model';
import { ItemSearchResult } from '../../../../object-collection/shared/item-search-result.model';
import { getItemPageRoute } from '../../../../../item-page/item-page-routing-paths';
import { environment } from 'src/environments/environment';
@listableObjectComponent('PublicationSearchResult', ViewMode.GridElement)
@listableObjectComponent(ItemSearchResult, ViewMode.GridElement)
@@ -23,9 +24,14 @@ export class ItemSearchResultGridElementComponent extends SearchResultGridElemen
* Route to the item's page
*/
itemPageRoute: string;
/**
* Whether to show the access status badge or not
*/
showAccessStatus: boolean;
ngOnInit(): void {
super.ngOnInit();
this.itemPageRoute = getItemPageRoute(this.dso);
this.showAccessStatus = environment.ui.showAccessStatuses;
}
}