lemmatized-entity-relation.component.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <div class="relation pb-2" [ngClass]="{
  2. 'p-3': !inEntity,
  3. 'border-bottom': !inEntity
  4. }" [evtHtmlAttributes]="data?.attributes">
  5. <small class="relation-type" *ngIf="data.relationType">{{ data.relationType | lowercase }}</small>
  6. <div>
  7. <evt-icon [iconInfo]="{icon: 'network-wired', additionalClasses: 'mr-2'}"></evt-icon>
  8. <ng-template ngFor let-part let-last="last" [ngForOf]="activeParts$ | async">
  9. <ng-template [ngTemplateOutlet]="relationParticipant"
  10. [ngTemplateOutletContext]="{ part: part, last: last }">
  11. </ng-template>
  12. </ng-template>
  13. <ng-template ngFor let-part let-last="last" [ngForOf]="mutualParts$ | async">
  14. <ng-template [ngTemplateOutlet]="relationParticipant"
  15. [ngTemplateOutletContext]="{ part: part, last: last }">
  16. </ng-template>
  17. </ng-template>
  18. {{ data.name | humanize | lowercase }}
  19. <ng-template ngFor let-part let-last="last" [ngForOf]="passiveParts$ | async">
  20. <ng-template [ngTemplateOutlet]="relationParticipant"
  21. [ngTemplateOutletContext]="{ part: part, last: last }">
  22. </ng-template>
  23. </ng-template>
  24. <evt-lemmatized-entity *ngIf="selectedEntity" [data]="selectedEntity" [inList]="false"></evt-lemmatized-entity>
  25. </div>
  26. <div class="relation-description text-secondary" *ngIf="data.description.length > 0">
  27. <evt-content-viewer *ngFor="let el of data.description" [content]="el"></evt-content-viewer>
  28. </div>
  29. </div>
  30. <ng-template #relationParticipant let-part="part" let-last="last">
  31. <span class="relation-entity {{ part.entity?.lemmatizedEntityType }}" [class.disabled]="!part.entity"
  32. (click)="toggleEntity(part.entity)">{{ part.label + (!last ? ', ' : '')}}</span>
  33. </ng-template>