Project

General

Profile

1
import {Component, Input} from '@angular/core';
2

    
3
//Usage Example "<claim-entity [entity]="" [type]="" > </claim-entity>"
4

    
5
//externalUrl
6
@Component({
7
  selector: 'claim-entity',
8
  template: `
9
  <div *ngIf="type == 'publication'" title="Publication">
10
      <span class="uk-margin-small-right uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span>
11
      <publication-title [title]="entity.title" [url]="entity.externalUrl" ></publication-title>
12
  </div>
13
  <div *ngIf="type == 'dataset'" title="Dataset">
14
      <span class="uk-margin-small-right uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><ellipse fill="none" stroke="#000" cx="10" cy="4.64" rx="7.5" ry="3.14"></ellipse><path fill="none" stroke="#000" d="M17.5,8.11 C17.5,9.85 14.14,11.25 10,11.25 C5.86,11.25 2.5,9.84 2.5,8.11"></path><path fill="none" stroke="#000" d="M17.5,11.25 C17.5,12.99 14.14,14.39 10,14.39 C5.86,14.39 2.5,12.98 2.5,11.25"></path><path fill="none" stroke="#000" d="M17.49,4.64 L17.5,14.36 C17.5,16.1 14.14,17.5 10,17.5 C5.86,17.5 2.5,16.09 2.5,14.36 L2.5,4.64"></path></svg></span>
15
      <publication-title [title]="entity.title" [url]="entity.externalUrl" ></publication-title>
16
  </div>
17
  <div *ngIf="type == 'project'  " title="Project">
18
    <span class="uk-margin-small-right uk-icon"  ><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14" height="1"></rect><rect fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span>
19
    <project-title [project]="entity"></project-title>
20
  </div>
21
  <div *ngIf="type == 'context'  " title="Concept">
22
    <span class="uk-margin-small-right uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7" cy="8.6" r="3.5"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path fill="none" stroke="#000" stroke-width="1.1" d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg></span>
23
    <span>{{entity.title}}</span>
24
  </div>
25
  `
26
})
27

    
28
export class ClaimEntityFormatter {
29
  @Input() entity: string[];
30
  @Input() type: string;
31

    
32
  constructor () {}
33

    
34
  ngOnInit() {
35

    
36
  }
37

    
38

    
39
}
(1-1/4)