mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Fixed issues with new badges
This commit is contained in:
@@ -2,6 +2,5 @@
|
||||
[viewMode]="viewModes.ListElement"
|
||||
[index]="index"
|
||||
[linkType]="linkType"
|
||||
[listID]="listID"
|
||||
[hideBadges]="true"></ds-themed-listable-object-component-loader>
|
||||
[listID]="listID"></ds-themed-listable-object-component-loader>
|
||||
<ds-item-admin-search-result-actions-element [item]="dso" [small]="false"></ds-item-admin-search-result-actions-element>
|
||||
|
@@ -1,9 +1 @@
|
||||
<div [ngClass]="{'d-none' : hideBadges}" #badges>
|
||||
<div *ngIf="privateBadge" class="private-badge">
|
||||
<span class="badge badge-danger">{{ "item.badge.private" | translate }}</span>
|
||||
</div>
|
||||
<div *ngIf="withdrawnBadge" class="withdrawn-badge">
|
||||
<span class="badge badge-warning">{{ "item.badge.withdrawn" | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template dsListableObject></ng-template>
|
||||
|
@@ -74,22 +74,11 @@ export class ListableObjectComponentLoaderComponent implements OnInit, OnChanges
|
||||
*/
|
||||
@Input() value: string;
|
||||
|
||||
/**
|
||||
* Whether or not informational badges (e.g. Private, Withdrawn) should be hidden
|
||||
*/
|
||||
@Input() hideBadges = false;
|
||||
|
||||
/**
|
||||
* Directive hook used to place the dynamic child component
|
||||
*/
|
||||
@ViewChild(ListableObjectDirective, {static: true}) listableObjectDirective: ListableObjectDirective;
|
||||
|
||||
/**
|
||||
* View on the badges template, to be passed on to the loaded component (which will place the badges in the desired
|
||||
* location, or on top if not specified)
|
||||
*/
|
||||
@ViewChild('badges', { static: true }) badges: ElementRef;
|
||||
|
||||
/**
|
||||
* Emit when the listable object has been reloaded.
|
||||
*/
|
||||
@@ -160,10 +149,7 @@ export class ListableObjectComponentLoaderComponent implements OnInit, OnChanges
|
||||
this.compRef = viewContainerRef.createComponent(
|
||||
componentFactory,
|
||||
0,
|
||||
undefined,
|
||||
[
|
||||
[this.badges.nativeElement],
|
||||
]);
|
||||
undefined);
|
||||
|
||||
this.connectInputsAndOutputs();
|
||||
|
||||
|
@@ -16,7 +16,7 @@ import { CollectionElementLinkType } from '../../collection-element-link.type';
|
||||
})
|
||||
export class ThemedListableObjectComponentLoaderComponent extends ThemedComponent<ListableObjectComponentLoaderComponent> {
|
||||
protected inAndOutputNames: (keyof ListableObjectComponentLoaderComponent & keyof this)[] = [
|
||||
'object', 'index', 'viewMode', 'context', 'linkType', 'listID', 'linkType', 'showLabel', 'value', 'hideBadges', 'contentChange'];
|
||||
'object', 'index', 'viewMode', 'context', 'linkType', 'listID', 'linkType', 'showLabel', 'value', 'contentChange'];
|
||||
|
||||
@Input() object: ListableObject;
|
||||
@Input() index: number;
|
||||
@@ -26,7 +26,6 @@ export class ThemedListableObjectComponentLoaderComponent extends ThemedComponen
|
||||
@Input() listID: string;
|
||||
@Input() showLabel = true;
|
||||
@Input() value: string;
|
||||
@Input() hideBadges = false;
|
||||
@Output() contentChange = new EventEmitter<ListableObject>();
|
||||
|
||||
protected getComponentName(): string {
|
||||
|
Reference in New Issue
Block a user