Project

General

Profile

1

    
2
<div>
3
<div>
4
  <div   class="uk-grid uk-margin-top uk-animation-fade">
5
    <div class="uk-width-expand">
6

    
7
      <div class="uk-grid">
8
        <div class="uk-width-1-2">
9
          Select the research communities to link to
10
        </div>
11
        <div class="uk-width-1-2">
12
          <input class=" uk-input  uk-width-medium" [(ngModel)]="keyword" name="keyword" placeholder="Locate a community..."/>
13
        </div>
14

    
15
      </div>
16
      <div class="uk-margin-top">
17
        <span *ngFor="let community of communities">
18
          <span  [class]="' uk-margin-small-bottom uk-margin-small-right '+getCommunityClass(community)"
19
          (click)="select(community)" style="cursor:pointer;" >
20
          <a href="#modal-categories" uk-toggle >
21
            {{community.label}}
22
          </a>
23
          </span>
24
        </span>
25
      </div>
26

    
27
<!-- Categories modal-->
28
      <div id="modal-categories" uk-modal="bg-close:false;">
29
        <div class="uk-modal-dialog uk-modal-body uk-height-min-medium">
30
          <a class="uk-modal-close uk-position-right uk-margin-right uk-margin-top" type="button" >
31
            <svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg>
32
          </a>
33

    
34
            <div class="portal-color uk-margin-top"> <span class="uk-text-bold">{{selectedCommunityLabel}}</span> community is in your Links Basket</div>
35
            <div *ngIf="loading" class="uk-alert uk-alert-primary" role="alert">Loading communities information...</div>
36
            <div *ngIf="error" class="uk-alert uk-alert-warning" role="alert">An error occured while loading communities...</div>
37
            <!-- *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length > 0 " -->
38
            <div  class="uk-margin-small-top">
39
              Optionally, you can specify additional Community's paths to link your sources.
40
            </div>
41

    
42
                <div *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length == 0 "  >
43
                  No aditional community paths found for this community
44
                </div>
45
                <ul *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length > 0 "  class=" uk-list uk-margin-top uk-animation-fade" >
46
                <li *ngFor="let category of categories[selectedCommunityId]" >
47
                  <span (click)="browseConcepts(category.id)"  >
48
                   <span *ngIf="!conceptsClassDisplay[category.id]"   class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
49
                  <span *ngIf="conceptsClassDisplay[category.id]"   class="uk-icon">
50
                    <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg>
51
                  </span>
52
                  {{category.label}} - {{category.id}}</span>
53
                  <a *ngIf="!isSelected(category.id)"  (click)="addNewContext(selectedCommunityLabel,category.label,{'id':category.id, 'label':category.label})" class="uk-icon-button icon-button-small" >
54
                    <span class="uk-icon">
55
                    <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
56
                    </span>
57
                  </a>
58

    
59
                  <span *ngIf="isSelected(category.id)" class="uk-icon" >
60
                  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="check" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1" points="4,10 8,15 17,4"></polyline></svg>
61
                  </span>
62
                  <div *ngIf="conceptsCategoryLoading[category.id]" class="uk-alert uk-alert-primary" role="alert">Loading category information...</div>
63
                  <div [class]="(conceptsClassDisplay[category.id] && conceptsClass[category.id] && conceptsClass[category.id].length>5)?'uk-panel-scrollable':''">
64
                    <div *ngIf="conceptsClass[category.id] && conceptsClass[category.id].length == 0 && conceptsClassDisplay[category.id]"  >No more paths found</div>
65
                    <ul *ngIf="conceptsClass[category.id] && conceptsClassDisplay[category.id]" class="uk-list  uk-animation-fade"  id="ul_{{category.id}}"  >
66
                      <li *ngFor="let concept1 of conceptsClass[category.id]" >
67
                        <span   (click)="displaySubcategory(concept1.id)" >
68
                          <span *ngIf="!conceptsClassDisplay[concept1.id] && concept1.concepts"   class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
69

    
70
                          <span *ngIf="conceptsClassDisplay[concept1.id]  && concept1.concepts"   class="uk-icon">
71
    <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
72
                          {{concept1.label}}
73
                         </span>
74
                        <a  *ngIf="!isSelected(concept1.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept1)" class="uk-icon-button icon-button-small"><span class="uk-icon">
75
    <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
76
    </span></a>
77
                        <span *ngIf="isSelected(concept1.id)" class="uk-icon" >
78
                        <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="check" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1" points="4,10 8,15 17,4"></polyline></svg>
79
                        </span>
80
                        <div [class]="(conceptsClassDisplay[concept1.id]  && concept1.concepts && concept1.concepts.length>5)?'uk-panel-scrollable':''">
81
                          <div *ngIf="concept1.concepts && concept1.concepts.length==0 &&  conceptsClassDisplay[concept1.id]"  >No more paths found</div>
82
                          <ul  *ngIf="concept1.concepts &&  conceptsClassDisplay[concept1.id] "  class="uk-animation-fade" >
83
                            <li *ngFor="let concept2 of concept1.concepts"><span   (click)="displaySubcategory(concept2.id)" >
84
                            <span *ngIf="!conceptsClassDisplay[concept2.id]  && concept2.concepts"   class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
85

    
86
                            <span *ngIf="conceptsClassDisplay[concept2.id]  && concept2.concepts"   class="uk-icon">
87
    <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
88
                            {{concept2.label}}</span>
89
                              <a  *ngIf="!isSelected(concept2.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept2)" class="uk-icon-button icon-button-small"><span class="uk-icon">
90
    <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
91
    </span></a>
92
                              <span *ngIf="isSelected(concept2.id)" class="uk-icon" >
93
                              <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="check" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1" points="4,10 8,15 17,4"></polyline></svg>
94
                              </span>
95
                              <ul  *ngIf="concept2.concepts &&  conceptsClassDisplay[concept2.id] " class="uk-animation-fade" >
96
                                <li *ngFor="let concept3 of concept2.concepts">{{concept3.label}}
97
                                  <a  *ngIf="!isSelected(concept3.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept3)" class="uk-icon-button icon-button-small"><span class="uk-icon">
98
    <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
99
    </span></a>
100
                                  <span *ngIf="isSelected(concept3.id)" class="uk-icon" >
101
                                  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="check" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1" points="4,10 8,15 17,4"></polyline></svg>
102
                                  </span>
103
                                </li>
104
                              </ul>
105
                            </li>
106
                          </ul>
107
                        </div>
108
                      </li>
109
                    </ul>
110
                </div>
111
              </li>
112

    
113
            </ul>
114
            <!-- </li>
115
          </ul> -->
116
          <p class="">
117
            <button class="uk-button uk-button-default uk-modal-close uk-margin-right uk-margin-top uk-align-right" type="button">Close</button>
118
          </p>
119
        </div>
120
      </div>
121

    
122

    
123

    
124
      <!-- <div class="uk-text-large">Select a community <helper  div="link-context-form"   tooltip=true></helper> </div>
125
      <select [(ngModel)]="selectedCommunityId"    (ngModelChange)="communityChanged()"  class="uk-margin-large-bottom uk-select uk-width-medium "  name="select_funder"  >
126
        <option  value="0"  >Select community</option>
127
        <option *ngFor="let community of communities"     [value]="community.id" >{{community.label}}</option>
128
      </select> -->
129
      <!--div class="uk-text-large">and then</div>
130
       <div class=" uk-margin-left uk-margin-left">
131
          <div class=" uk-text-bold">search for community concepts</div>
132
          <table class="uk-margin-remove  uk-width-1-1 uk-table uk-table-responsive" ><tr>
133
          <tr>
134
            <td *ngIf="selectedCommunityId != '0' && categories.length > 0" class="uk-width-medium">
135
            <select  [(ngModel)]="selectedCategoryId"    (ngModelChange)="categoryChanged()" class="uk-select uk-width-medium  "   name="select_funder"  >
136
              <option  value="0"  >Select category</option>
137
              <option  *ngFor="let category of categories"    [value]="category.id" >{{category.label}}</option>
138
            </select>
139
            </td><td  >
140
          <static-autocomplete [(properties)]=properties [(list)] = concepts  [allowDuplicates]=true [showSelected]=false [placeHolderMessage] = "'Concept name'" title = "Concepts"  [multipleSelections]=true  (addItem) = "select($event)" > </static-autocomplete>
141
            </td></tr>
142

    
143
          </table>
144
        </div-->
145
        <!-- <div *ngIf="loading" class="uk-alert uk-alert-primary" role="alert">Loading communities information...</div>
146
        <div *ngIf="error" class="uk-alert uk-alert-warning" role="alert">An error occured while loading communities...</div>
147
        <div class="uk-text-large  ">or</div>
148
        <div class=" uk-text-bold uk-margin-bottom uk-margin-left">browse through community categories:
149
          <button  uk-toggle="target: #browse; animation:  uk-animation-fade" class="uk-button  portal-button"> Browse </button>
150
        </div> -->
151
        <div class="uk-margin-left">
152

    
153
        <!-- <div id="browse" class="  uk-margin-small">
154

    
155
            <div *ngIf="selectedCommunityId =='0'"  class="uk-alert uk-alert-warning" >Please select community first...</div>
156
            <div *ngIf="selectedCommunityId !='0'" class="uk-panel uk-panel-scrollable">
157
              <ul   class="uk-list ">
158
                <li>
159
                 <span (click)="displaySubcategory(selectedCommunityId)"  >
160
                    <span *ngIf="!conceptsClassDisplay[selectedCommunityId]"   class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
161

    
162
                    <span *ngIf="conceptsClassDisplay[selectedCommunityId]"   class="uk-icon">
163
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>{{selectedCommunityLabel}}
164
                  </span>
165
                  <a *ngIf="!isSelected(selectedCommunityId)"  (click)="addNewContext(selectedCommunityLabel,null,{'id':selectedCommunityId, 'label':selectedCommunityLabel})" class="uk-icon-button icon-button-small uk-icon">
166
  <span class="uk-icon">
167
  <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
168
  </span> </a>
169
                  <span *ngIf="isSelected(selectedCommunityId)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
170
                  <ul *ngIf="conceptsClassDisplay[selectedCommunityId]" class="uk-animation-fade" >
171
                  <li *ngFor="let category of categories" >
172
                    <span (click)="browseConcepts(category.id)"  >
173
                    <span *ngIf="!conceptsClassDisplay[category.id]"   class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
174

    
175
                    <span *ngIf="conceptsClassDisplay[category.id]"   class="uk-icon">
176
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
177
                    {{category.label}}</span><a *ngIf="!isSelected(category.id)"  (click)="addNewContext(selectedCommunityLabel,category.label,{'id':category.id, 'label':category.label})" class="uk-icon-button icon-button-small" >
178
                    <span class="uk-icon">
179
  <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
180
  </span></a>
181
                    <span *ngIf="isSelected(category.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
182
                    <div *ngIf="conceptsCategoryLoading[category.id]" class="uk-alert uk-alert-primary" role="alert">Loading category information...</div>
183

    
184
                    <ul *ngIf="conceptsClass[category.id] && conceptsClassDisplay[category.id]" class="uk-list  uk-animation-fade"  id="ul_{{category.id}}"  >
185
                      <li *ngFor="let concept1 of conceptsClass[category.id]" >
186
                        <span   (click)="displaySubcategory(concept1.id)" >
187
                          <span *ngIf="!conceptsClassDisplay[concept1.id] && concept1.concepts"   class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
188

    
189
                          <span *ngIf="conceptsClassDisplay[concept1.id]  && concept1.concepts"   class="uk-icon">
190
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
191
                          {{concept1.label}}
192
                         </span>
193
                        <a  *ngIf="!isSelected(concept1.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept1)" class="uk-icon-button icon-button-small"><span class="uk-icon">
194
  <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
195
  </span></a>
196
                        <span *ngIf="isSelected(concept1.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
197
                          <ul  *ngIf="concept1.concepts &&  conceptsClassDisplay[concept1.id] "  class="uk-animation-fade" >
198
                            <li *ngFor="let concept2 of concept1.concepts"><span   (click)="displaySubcategory(concept2.id)" >
199
                            <span *ngIf="!conceptsClassDisplay[concept2.id]  && concept2.concepts"   class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
200

    
201
                            <span *ngIf="conceptsClassDisplay[concept2.id]  && concept2.concepts"   class="uk-icon">
202
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
203
                            {{concept2.label}}</span>
204
                              <a  *ngIf="!isSelected(concept2.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept2)" class="uk-icon-button icon-button-small"><span class="uk-icon">
205
  <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
206
  </span></a>
207
                              <span *ngIf="isSelected(concept2.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
208
                              <ul  *ngIf="concept2.concepts &&  conceptsClassDisplay[concept2.id] " class="uk-animation-fade" >
209
                                <li *ngFor="let concept3 of concept2.concepts">{{concept3.label}}
210
                                  <a  *ngIf="!isSelected(concept3.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept3)" class="uk-icon-button icon-button-small"><span class="uk-icon">
211
  <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
212
  </span></a>
213
                                  <span *ngIf="isSelected(concept3.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
214
                                </li>
215
                              </ul>
216
                            </li>
217
                          </ul>
218
                      </li>
219
                    </ul>
220
                </li>
221
              </ul>
222
            </ul>
223
          </div>
224
         </div> -->
225
        </div>
226
      <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
227
      <div *ngIf="infoMessage.length > 0" class="uk-alert uk-alert-primary" role="alert">{{infoMessage}}</div>
228
  </div>
229

    
230
  </div>
231

    
232

    
233
</div>
(2-2/15)