Project

General

Profile

1 61381 k.triantaf
<div>
2
  <div>
3
    <div class="uk-grid uk-margin-top uk-animation-fade">
4
      <div class="uk-width-expand">
5
6
        <div class="uk-grid uk-flex uk-flex-middle">
7
          <div class="uk-width-1-2">
8
            Select communities to link to
9
          </div>
10
          <div class="uk-width-1-2">
11
            <div class="uk-margin">
12
              <div class="uk-inline">
13
                <span class="uk-form-icon uk-icon"  ><svg width="20" height="20" viewBox="0 0 20 20"
14
                                                          xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg></span>
15
                <input class=" uk-input  uk-width-medium" [(ngModel)]="keyword" name="keyword"
16
                       placeholder="Search communities..."/>
17
                <span *ngIf="keyword.length > 0" class="uk-margin-small-right uk-icon" style="cursor: pointer;"
18
                      (click)="keyword='';">
19
                    <svg width="20" height="20" viewBox="0 0 20 20"
20
                         xmlns="http://www.w3.org/2000/svg" data-svg="close"><path fill="none" stroke="#000"
21
                                                                                   stroke-width="1.06"
22
                                                                                   d="M16,16 L4,4"></path><path
23
                      fill="none"
24
                      stroke="#000"
25
                      stroke-width="1.06"
26
                      d="M16,4 L4,16"></path></svg>
27
                </span>
28
              </div>
29
            </div>
30
31
          </div>
32
33
        </div>
34
        <div class="uk-margin-right uk-padding">
35
        <span *ngFor="let community of communities" [title]="(this.results.length>=basketLimit)?'Basket reached the size limit':''">
36
          <span [class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-margin-small-bottom uk-margin-small-right '+getCommunityClass(community)"
37
                (click)="select(community)" style="cursor:pointer;">
38
          <a href="#modal-categories" uk-toggle>
39
            {{community.label}}
40
          </a>
41
          </span>
42
        </span>
43
        </div>
44
45
        <!-- Categories modal-->
46
        <div id="modal-categories" uk-modal="bg-close:false;">
47
          <div class="uk-modal-dialog uk-modal-body uk-height-min-medium">
48
            <a class="uk-modal-close uk-position-right uk-margin-right uk-margin-top" type="button">
49
              <svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon">
50
                <line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line>
51
                <line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line>
52
              </svg>
53
            </a>
54
55
            <div class="portal-color uk-margin-top">
56
              <span class="uk-icon-button icon-button-small portal-icon-button uk-icon">
57
                  <svg height="20" icon="check" ratio="1" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" points="4,10 8,15 17,4" stroke="#000" stroke-width="1.1"></polyline></svg>
58
                  </span>
59
              <span
60
              class="uk-text-bold">{{selectedCommunityLabel}}</span> community is now in your Links Basket
61
            </div>
62
            <div *ngIf="loading" class="uk-alert uk-alert-primary" role="alert">Loading communities information...</div>
63
            <div *ngIf="error" class="uk-alert uk-alert-warning"
64
                 role="alert">An error occured while loading communities...
65
            </div>
66
            <!-- *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length > 0 " -->
67
            <div class="uk-margin-small-top uk-text-small" *ngIf="categories[selectedCommunityId] &&
68
            categories[selectedCommunityId].length > 0 ">
69
              Optionally, you can specify additional Community's paths to link your sources.
70
            </div>
71
72
            <div *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length == 0 "
73
                 class=" uk-margin-small-top uk-text-small uk-text-muted">
74
              No aditional community paths found for this community.
75
            </div>
76
            <ul *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length > 0 "
77
                class=" uk-list uk-margin-top uk-animation-fade uk-overflow-auto uk-height-medium">
78
              <li *ngFor="let category of categories[selectedCommunityId]">
79
                  <span (click)="browseConcepts(category.id)">
80
                   <span *ngIf="!conceptsClassDisplay[category.id]" class="uk-icon"><svg width="20" height="20"
81
                                                                                         viewBox="0 0 20 20"
82
                                                                                         xmlns="http://www.w3.org/2000/svg"
83
                                                                                         ratio="1"> <polygon
84
                     points="8 5 13 10 8 15"></polygon></svg></span>
85
                  <span *ngIf="conceptsClassDisplay[category.id]" class="uk-icon">
86
                    <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
87
                      points="5 7 15 7 10 12"></polygon></svg>
88
                  </span>
89
                    {{category.label}} - {{category.id}}</span>
90
                <a *ngIf="!isSelected(category.id)"
91
                   (click)="addNewContext(selectedCommunityLabel,category.label,{'id':category.id, 'label':category.label})"
92
                   [class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-icon-button icon-button-small'">
93
                    <span class="uk-icon" [title]="(this.results.length>=basketLimit)?'Basket reached the size limit':''">
94
                    <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus"
95
                         ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17"
96
                                                                                          height="1"></rect></svg>
97
                    </span>
98
                </a>
99
100
                <span *ngIf="isSelected(category.id)"
101
                      class="uk-icon-button icon-button-small portal-icon-button uk-icon">
102
                  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="check"
103
                       ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1"
104
                                           points="4,10 8,15 17,4"></polyline></svg>
105
                  </span>
106
                <div *ngIf="conceptsCategoryLoading[category.id]" class="uk-alert uk-alert-primary"
107
                     role="alert">Loading category information...
108
                </div>
109
                <div
110
                  [class]="(conceptsClassDisplay[category.id] && conceptsClass[category.id] && conceptsClass[category.id].length>5)?'uk-panel-scrollable':''">
111
                  <div
112
                    *ngIf="conceptsClass[category.id] && conceptsClass[category.id].length == 0 && conceptsClassDisplay[category.id]">No more paths found
113
                  </div>
114
                  <ul *ngIf="conceptsClass[category.id] && conceptsClassDisplay[category.id]"
115
                      class="uk-list  uk-animation-fade" id="ul_{{category.id}}">
116
                    <li *ngFor="let concept1 of conceptsClass[category.id]">
117
                        <span (click)="displaySubcategory(concept1.id)">
118
                          <span *ngIf="!conceptsClassDisplay[concept1.id] && concept1.concepts" class="uk-icon"><svg
119
                            width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
120
                            points="8 5 13 10 8 15"></polygon></svg></span>
121
122
                          <span *ngIf="conceptsClassDisplay[concept1.id]  && concept1.concepts" class="uk-icon">
123
    <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
124
      points="5 7 15 7 10 12"></polygon></svg></span>
125
                          {{concept1.label}}
126
                         </span>
127
                      <a *ngIf="!isSelected(concept1.id)"
128
                         (click)="addNewContext(selectedCommunityLabel,category.label,concept1)"
129
                         [class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-icon-button icon-button-small'"><span class="uk-icon">
130
    <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect
131
      x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
132
    </span></a>
133
                      <span *ngIf="isSelected(concept1.id)"
134
                            class="uk-icon-button icon-button-small portal-icon-button uk-icon">
135
                        <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="check"
136
                             ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1"
137
                                                 points="4,10 8,15 17,4"></polyline></svg>
138
                        </span>
139
                      <div
140
                        [class]="(conceptsClassDisplay[concept1.id]  && concept1.concepts && concept1.concepts.length>5)?'uk-panel-scrollable':''">
141
                        <div
142
                          *ngIf="concept1.concepts && concept1.concepts.length==0 &&  conceptsClassDisplay[concept1.id]">No more paths found
143
                        </div>
144
                        <ul *ngIf="concept1.concepts &&  conceptsClassDisplay[concept1.id] " class="uk-animation-fade">
145
                          <li *ngFor="let concept2 of concept1.concepts"><span
146
                            (click)="displaySubcategory(concept2.id)">
147
                            <span *ngIf="!conceptsClassDisplay[concept2.id]  && concept2.concepts" class="uk-icon"><svg
148
                              width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
149
                              points="8 5 13 10 8 15"></polygon></svg></span>
150
151
                            <span *ngIf="conceptsClassDisplay[concept2.id]  && concept2.concepts" class="uk-icon">
152
    <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
153
      points="5 7 15 7 10 12"></polygon></svg></span>
154
                            {{concept2.label}}</span>
155
                            <a *ngIf="!isSelected(concept2.id)"
156
                               (click)="addNewContext(selectedCommunityLabel,category.label,concept2)"
157
                               [class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-icon-button icon-button-small'"><span class="uk-icon">
158
    <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect
159
      x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
160
    </span></a>
161
                            <span *ngIf="isSelected(concept2.id)"
162
                                  class="uk-icon-button icon-button-small portal-icon-button uk-icon">
163
                              <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
164
                                   icon="check" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1"
165
                                                                    points="4,10 8,15 17,4"></polyline></svg>
166
                              </span>
167
                            <ul *ngIf="concept2.concepts &&  conceptsClassDisplay[concept2.id] "
168
                                class="uk-animation-fade">
169
                              <li *ngFor="let concept3 of concept2.concepts">{{concept3.label}} [title]="(this.results.length>=basketLimit)?'Basket reached the size limit':''"
170
                                <a *ngIf="!isSelected(concept3.id)"
171
                                   (click)="addNewContext(selectedCommunityLabel,category.label,concept3)"
172
                                   [class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-icon-button icon-button-small'"><span class="uk-icon">
173
    <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect
174
      x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
175
    </span></a>
176
                                <span *ngIf="isSelected(concept3.id)"
177
                                      class="uk-icon-button icon-button-small portal-icon-button uk-icon">
178
                                  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
179
                                       icon="check" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1"
180
                                                                        points="4,10 8,15 17,4"></polyline></svg>
181
                                  </span>
182
                              </li>
183
                            </ul>
184
                          </li>
185
                        </ul>
186
                      </div>
187
                    </li>
188
                  </ul>
189
                </div>
190
              </li>
191
192
            </ul>
193
            <!-- </li>
194
          </ul> -->
195
            <p class="">
196
              <button class="uk-button uk-button-default uk-modal-close uk-margin-right uk-margin-top uk-align-right"
197
                      type="button">Close
198
              </button>
199
            </p>
200
          </div>
201
        </div>
202
203
204
        <!-- <div class="uk-text-large">Select a community <helper  div="link-context-form"   tooltip=true></helper> </div>
205
        <select [(ngModel)]="selectedCommunityId"    (ngModelChange)="communityChanged()"  class="uk-margin-large-bottom uk-select uk-width-medium "  name="select_funder"  >
206
          <option  value="0"  >Select community</option>
207
          <option *ngFor="let community of communities"     [value]="community.id" >{{community.label}}</option>
208
        </select> -->
209
        <!--div class="uk-text-large">and then</div>
210
         <div class=" uk-margin-left uk-margin-left">
211
            <div class=" uk-text-bold">search for community concepts</div>
212
            <table class="uk-margin-remove  uk-width-1-1 uk-table uk-table-responsive" ><tr>
213
            <tr>
214
              <td *ngIf="selectedCommunityId != '0' && categories.length > 0" class="uk-width-medium">
215
              <select  [(ngModel)]="selectedCategoryId"    (ngModelChange)="categoryChanged()" class="uk-select uk-width-medium  "   name="select_funder"  >
216
                <option  value="0"  >Select category</option>
217
                <option  *ngFor="let category of categories"    [value]="category.id" >{{category.label}}</option>
218
              </select>
219
              </td><td  >
220
            <static-autocomplete [(properties)]=properties [(list)] = concepts  [allowDuplicates]=true [showSelected]=false [placeHolderMessage] = "'Concept name'" title = "Concepts"  [multipleSelections]=true  (addItem) = "select($event)" > </static-autocomplete>
221
              </td></tr>
222
223
            </table>
224
          </div-->
225
        <!-- <div *ngIf="loading" class="uk-alert uk-alert-primary" role="alert">Loading communities information...</div>
226
        <div *ngIf="error" class="uk-alert uk-alert-warning" role="alert">An error occured while loading communities...</div>
227
        <div class="uk-text-large  ">or</div>
228
        <div class=" uk-text-bold uk-margin-bottom uk-margin-left">browse through community categories:
229
          <button  uk-toggle="target: #browse; animation:  uk-animation-fade" class="uk-button  portal-button"> Browse </button>
230
        </div> -->
231
        <div class="uk-margin-left">
232
233
          <!-- <div id="browse" class="  uk-margin-small">
234
235
              <div *ngIf="selectedCommunityId =='0'"  class="uk-alert uk-alert-warning" >Please select community first...</div>
236
              <div *ngIf="selectedCommunityId !='0'" class="uk-panel uk-panel-scrollable">
237
                <ul   class="uk-list ">
238
                  <li>
239
                   <span (click)="displaySubcategory(selectedCommunityId)"  >
240
                      <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>
241
242
                      <span *ngIf="conceptsClassDisplay[selectedCommunityId]"   class="uk-icon">
243
    <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}}
244
                    </span>
245
                    <a *ngIf="!isSelected(selectedCommunityId)"  (click)="addNewContext(selectedCommunityLabel,null,{'id':selectedCommunityId, 'label':selectedCommunityLabel})" class="uk-icon-button icon-button-small uk-icon">
246
    <span class="uk-icon">
247
    <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>
248
    </span> </a>
249
                    <span *ngIf="isSelected(selectedCommunityId)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
250
                    <ul *ngIf="conceptsClassDisplay[selectedCommunityId]" class="uk-animation-fade" >
251
                    <li *ngFor="let category of categories" >
252
                      <span (click)="browseConcepts(category.id)"  >
253
                      <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>
254
255
                      <span *ngIf="conceptsClassDisplay[category.id]"   class="uk-icon">
256
    <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>
257
                      {{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" >
258
                      <span class="uk-icon">
259
    <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>
260
    </span></a>
261
                      <span *ngIf="isSelected(category.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
262
                      <div *ngIf="conceptsCategoryLoading[category.id]" class="uk-alert uk-alert-primary" role="alert">Loading category information...</div>
263
264
                      <ul *ngIf="conceptsClass[category.id] && conceptsClassDisplay[category.id]" class="uk-list  uk-animation-fade"  id="ul_{{category.id}}"  >
265
                        <li *ngFor="let concept1 of conceptsClass[category.id]" >
266
                          <span   (click)="displaySubcategory(concept1.id)" >
267
                            <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>
268
269
                            <span *ngIf="conceptsClassDisplay[concept1.id]  && concept1.concepts"   class="uk-icon">
270
    <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>
271
                            {{concept1.label}}
272
                           </span>
273
                          <a  *ngIf="!isSelected(concept1.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept1)" class="uk-icon-button icon-button-small"><span class="uk-icon">
274
    <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>
275
    </span></a>
276
                          <span *ngIf="isSelected(concept1.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
277
                            <ul  *ngIf="concept1.concepts &&  conceptsClassDisplay[concept1.id] "  class="uk-animation-fade" >
278
                              <li *ngFor="let concept2 of concept1.concepts"><span   (click)="displaySubcategory(concept2.id)" >
279
                              <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>
280
281
                              <span *ngIf="conceptsClassDisplay[concept2.id]  && concept2.concepts"   class="uk-icon">
282
    <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>
283
                              {{concept2.label}}</span>
284
                                <a  *ngIf="!isSelected(concept2.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept2)" class="uk-icon-button icon-button-small"><span class="uk-icon">
285
    <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>
286
    </span></a>
287
                                <span *ngIf="isSelected(concept2.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
288
                                <ul  *ngIf="concept2.concepts &&  conceptsClassDisplay[concept2.id] " class="uk-animation-fade" >
289
                                  <li *ngFor="let concept3 of concept2.concepts">{{concept3.label}}
290
                                    <a  *ngIf="!isSelected(concept3.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept3)" class="uk-icon-button icon-button-small"><span class="uk-icon">
291
    <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>
292
    </span></a>
293
                                    <span *ngIf="isSelected(concept3.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
294
                                  </li>
295
                                </ul>
296
                              </li>
297
                            </ul>
298
                        </li>
299
                      </ul>
300
                  </li>
301
                </ul>
302
              </ul>
303
            </div>
304
           </div> -->
305
        </div>
306
        <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
307
        <div *ngIf="infoMessage.length > 0" class="uk-alert uk-alert-primary" role="alert">{{infoMessage}}</div>
308
      </div>
309
310
    </div>
311
312
313
  </div>