Revision 43109
Added by Argiro Kokogiannaki almost 8 years ago
claimContext.component.ts | ||
---|---|---|
8 | 8 |
@Component({ |
9 | 9 |
selector: 'claim-contexts', |
10 | 10 |
template: ` |
11 |
<div class="panel" > |
|
12 |
<div class="input-group"> |
|
11 |
<div class="panel-body" > |
|
12 |
|
|
13 |
<div class="input-group" *ngIf="inline === 'false'"> |
|
13 | 14 |
<div class=" input-group-btn"> |
14 | 15 |
<button class="btn btn-success dropdown-toggle" type="button" id="communityDropDown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
15 | 16 |
{{selectedCommunityLabel}} |
... | ... | |
35 | 36 |
|
36 | 37 |
<input id="community" type="text" class="validate filter-input form-control" placeholder="Search for contexts" [(ngModel)]=query (keyup)=filter() > |
37 | 38 |
</div> |
39 |
<div class=" form-horizontal" *ngIf="inline === 'true' && showComponent=='true'"> |
|
40 |
<div class=" form-group "> |
|
41 |
<button class="btn btn-xs btn-success dropdown-toggle" type="button" id="communityDropDown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
42 |
{{selectedCommunityLabel}} |
|
43 |
|
|
44 |
</button> |
|
45 |
<ul class="dropdown-menu" aria-labelledby="communityDropDown"> |
|
46 |
<li (click)="communityChanged('0','Community:')"><a >Community:</a></li> |
|
47 |
<li *ngIf="communities" (click)="communityChanged(communities.id, communities.label)" ><a >{{communities.label}}</a></li> |
|
48 |
|
|
49 |
</ul> |
|
50 |
</div> |
|
51 |
<div class="form-group "> |
|
52 |
<button class="btn btn-xs btn-success dropdown-toggle" type="button" id="categoryDropDown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
53 |
{{selectedCategoryLabel}} |
|
54 |
|
|
55 |
</button> |
|
56 |
<ul class="dropdown-menu" aria-labelledby="categoryDropDown"> |
|
57 |
<li (click)="categoryChanged('0','Category:')"><a >Category:</a></li> |
|
58 |
<li *ngFor="let category of categories" (click)="categoryChanged(category.id, category.label)" ><a >{{category.label}}</a></li> |
|
59 |
|
|
60 |
</ul> |
|
61 |
</div> |
|
62 |
<div class="form-group"> |
|
63 |
<input id="community" type="text" class="validate filter-input input-sm form-control" placeholder="Search for contexts" [(ngModel)]=query (keyup)=filter() > |
|
64 |
</div> |
|
65 |
</div> |
|
66 |
|
|
67 |
|
|
68 |
<!--<div class="input-group"> |
|
69 |
<div class=" input-group-btn"> |
|
70 |
<button class="btn btn-success dropdown-toggle" type="button" id="communityDropDown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
71 |
{{selectedCommunityLabel}} |
|
72 |
|
|
73 |
</button> |
|
74 |
<ul class="dropdown-menu" aria-labelledby="communityDropDown"> |
|
75 |
<li (click)="communityChanged('0','Community:')"><a >Community:</a></li> |
|
76 |
<li *ngIf="communities" (click)="communityChanged(communities.id, communities.label)" ><a >{{communities.label}}</a></li> |
|
77 |
|
|
78 |
</ul> |
|
79 |
</div> |
|
80 |
<div class="input-group-btn "> |
|
81 |
<button class="btn btn-success dropdown-toggle" type="button" id="categoryDropDown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
82 |
{{selectedCategoryLabel}} |
|
83 |
|
|
84 |
</button> |
|
85 |
<ul class="dropdown-menu" aria-labelledby="categoryDropDown"> |
|
86 |
<li (click)="categoryChanged('0','Category:')"><a >Category:</a></li> |
|
87 |
<li *ngFor="let category of categories" (click)="categoryChanged(category.id, category.label)" ><a >{{category.label}}</a></li> |
|
88 |
|
|
89 |
</ul> |
|
90 |
</div> |
|
91 |
|
|
92 |
<input id="community" type="text" class="validate filter-input form-control" placeholder="Search for contexts" [(ngModel)]=query (keyup)=filter() > |
|
93 |
</div>--> |
|
94 |
|
|
95 |
|
|
96 |
|
|
38 | 97 |
<div class="suggestions" *ngIf="filteredList.length > 0"> |
39 | 98 |
<ul class="list-group" > |
40 | 99 |
<li class="list-group-item" *ngFor=" let item of filteredList"> |
... | ... | |
54 | 113 |
this.getCommunities(); |
55 | 114 |
|
56 | 115 |
} |
116 |
@Input() public inline= 'false' ; // for claimed started from landing pages |
|
117 |
@Input() public showComponent= 'true' ; // for claimed started from landing pages |
|
118 |
|
|
57 | 119 |
public query = ''; |
58 | 120 |
public filteredList = []; |
59 | 121 |
@Input() public selectedList ; |
Also available in: Unified diff
more for inline linking in publication landing page