Project

General

Profile

1
<div class="uk-section uk-padding-remove-top uk-padding-remove-bottom ">
2
  <div
3
    [class]="((defaultColors)?'linkingToolbar':'communityPanelBackground')+' uk-padding-small uk-margin-small-top'">
4
    <div class="uk-container  uk-container-large uk-margin-small-top uk-padding-small">
5
      <div class="uk-grid">
6
        <div class="uk-padding-remove-left uk-margin-auto-vertical back uk-link">
7
          <span
8
            (click)="showOptions.showLinkTo()"
9
            style="cursor:pointer">
10
            <span class="uk-icon">
11
            <svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-left"
12
                 ratio="1.5"><polyline fill="none" stroke="#000" stroke-width="1.03"
13
                                       points="13 16 7 10 13 4"></polyline></svg></span>
14
            BACK
15
          </span>
16
        </div>
17
        <div class="uk-width-expand">
18
          <div class="uk-h5 uk-text-bold">
19
            LINKING CONFIRMATION
20
          </div>
21
          Confirm that the links you provided are all correct
22
        </div>
23
        <claim-insert [results]="results" [sources]="sources" [inlineEntity]="inlineEntity"
24
                      [properties]=properties [localStoragePrefix]=localStoragePrefix
25
                      class=" " [errors]="errors" (insertFinished)="runValidation(false); updateLocalStorage();"
26
                      [defaultColors]="defaultColors">
27
        </claim-insert>
28
      </div>
29
    </div>
30
  </div>
31
</div>
32

    
33
<div id="tm-main" class="uk-section  uk-margin-small-top tm-middle uk-padding-remove-top">
34
  <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first ">
35
    <div class="uk-container uk-container-large">
36

    
37

    
38
      <div *ngIf="properties" class="uk-section uk-section-default uk-padding-remove-top">
39

    
40

    
41
        <div class="uk-margin-top">
42
          <div class="uk-grid">
43
            <div class="uk-width-expand">
44
              <div>
45
                <div class=" uk-margin uk-h6 uk-text-primary uk-animation-toggle"
46
                     (click)="showSources=!showSources;  ">
47
                  SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
48
                  <span *ngIf="!showSources" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
49
                                                                  xmlns="http://www.w3.org/2000/svg" icon="chevron-left"
50
                                                                  ratio="1"><polyline fill="none" stroke="#000"
51
                                                                                      stroke-width="1.03"
52
                                                                                      points="13 16 7 10 13 4"></polyline></svg></span>
53
                  <span *ngIf="showSources" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
54
                                                                 xmlns="http://www.w3.org/2000/svg" icon="chevron-down"
55
                                                                 ratio="1"><polyline fill="none" stroke="#000"
56
                                                                                     stroke-width="1.03"
57
                                                                                     points="16 7 10 13 4 7"></polyline></svg></span>
58
                </div>
59
                <ul *ngIf="inlineEntity && showSources" class="uk-list uk-animation-fade">
60
                  <li
61
                    [class]="((inlineEntity.warningMessages.length > 0)?' warningBorder ':'')+
62
                    +((inlineEntity.errorMessages.length > 0)?' dangerBorder ':'') +
63
                    ' uk-alert'" >
64
                    <div class="uk-grid  uk-text-small">
65
                      <div class="uk-text-muted uk-width-1-2">
66
                        {{(!inlineEntity.result) ? inlineEntity.type : ((inlineEntity.result && inlineEntity.result.source == 'openaire') ? inlineEntity.type : (inlineEntity.result && inlineEntity.result.source + ' result'))}}
67
                      </div>
68
                      <div *ngIf="inlineEntity.errorMessages.length > 0"
69
                           class="uk-text-danger  uk-width-1-2"> Link couldn't be saved
70
                      </div>
71
                    </div>
72
                    <!--                    <div class="uk-text-muted">-->
73
                    <!--                      {{(!inlineEntity.result) ? inlineEntity.type : ((inlineEntity.result && inlineEntity.result.source == 'openaire') ? inlineEntity.type : (inlineEntity.result && inlineEntity.result.source + ' result'))}}-->
74
                    <!--                    </div>-->
75
                    <div>
76
                      <claim-title [entity]="inlineEntity"></claim-title>
77
                    </div>
78
                    <claim-result-metadata [entity]="inlineEntity"></claim-result-metadata>
79
                    <claim-project-metadata [entity]="inlineEntity"></claim-project-metadata>
80
                  </li>
81
                </ul>
82
                <div *ngIf="!inlineEntity && sources.length == 0 && showSources">
83

    
84
                  <div class="uk-alert dangerBorder no-selected-message uk-text-center">
85
                    <span class="uk-text-bold uk-text-danger"> SOURCES cannot be empty.</span>
86
                    Start by adding your linking sources first, go to  <a (click)="showOptions.showSource() " class="uk-link">
87
                    sources
88
                    page</a>.
89
                  </div>
90
                </div>
91
                <ul *ngIf="!inlineEntity && sources.length > 0 && showSources" class="uk-list uk-animation-fade">
92
                  <li *ngFor=" let entity of sources "
93
                      [class]="((entity.warningMessages.length > 0)?' warningBorder ':'')+
94
                    +((entity.errorMessages.length > 0)?' dangerBorder ':'') +
95
                    ' uk-alert'">
96
                    <!--                    <div class="uk-text-muted">-->
97
                    <!--                      {{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}-->
98
                    <!--                    </div>-->
99
                    <div class="uk-grid  uk-text-small">
100
                      <div class="uk-text-muted uk-width-1-2">
101
                        {{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
102
                      </div>
103
                      <div *ngIf="entity.errorMessages.length > 0"
104
                           class="uk-text-danger  uk-width-1-2"> Link couldn't be saved
105
                      </div>
106
                    </div>
107
                    <div class="uk-grid uk-margin-remove-top">
108
                      <div class="uk-width-expand">
109
                        <claim-title [entity]="entity"></claim-title>
110
                        <claim-result-metadata [entity]="entity"></claim-result-metadata>
111
                        <claim-project-metadata [entity]="entity"></claim-project-metadata>
112
                        <div *ngIf="entity.result && entity.result.source && entity.result.source!='openaire' "
113
                             class="uk-grid uk-margin-remove-top uk-text-small">
114
                          <div class="uk-width-1-2">
115
                            <span class="uk-text-muted">Type </span>
116
                            <select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"
117
                                    class="uk-select uk-width-small">
118
                              <option [value]="'publication'"
119
                                      (click)="onTypeChanged('publication',entity, false)">Publication
120
                              </option>
121
                              <option [value]="'dataset'"
122
                                      (click)="onTypeChanged('dataset',entity, false)">Research data
123
                              </option>
124
                              <option [value]="'software'" (click)="onTypeChanged('software',entity, false)">Software
125
                              </option>
126
                              <option [value]="'other'"
127
                                      (click)="onTypeChanged('other',entity, false)">Other research product
128
                              </option>
129
                            </select>
130
                          </div>
131
                          <div class="uk-width-1-2 uk-padding-remove-left ">
132
                            <div class="uk-grid">
133
                              <span class="uk-text-muted uk-margin-small-top uk-padding-remove-left">Access mode</span>
134
                              <select [(ngModel)]="entity.result.accessRights" name="{{'select_rights_'+entity.id}}"
135
                                      class="uk-select uk-width-small uk-padding-remove-left uk-margin-left">
136
                                <option *ngFor="let type of accessTypes" [value]="type"
137
                                        (click)="accessRightsTypeChanged(type,entity, false)">{{type}}</option>
138
                              </select>
139
                              <mat-form-field *ngIf="entity.result.accessRights== 'EMBARGO'">
140
                                <input matInput [matDatepicker]="picker" placeholder="Choose embargo end date"
141
                                       (click)="picker.open()" [ngModel]="embargoEndDates[entity.id+'_source']"
142
                                       (dateInput)="onDateChanged($event, entity, false)" (dateChange)="onDateChanged($event, entity, false)">
143
                                <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
144
                                <mat-datepicker #picker [startAt]="embargoEndDates[entity.id+'_source']" ng-model-options="{ timezone: 'utc' }"></mat-datepicker>
145
                              </mat-form-field>
146
                            </div>
147
                            <div *ngIf="entity.result.accessRights== 'EMBARGO' && getEmbargoEndDateMessage(entity)"
148
                                 [class]="(getEmbargoEndDateMessage(entity)?'uk-text-warning':'')">{{getEmbargoEndDateMessage(entity)}}
149
                            </div>
150
                          </div>
151
                        </div>
152
                      </div>
153
                      <div class=" uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left">
154
                        <a class=" uk-icon-button  "
155
                           (click)="remove(entity, false)">
156
               <span class="uk-icon">
157
                  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus"
158
                       ratio="1"><rect height="1" width="18" y="9" x="1"></rect></svg>
159
               </span>
160
                        </a>
161
                      </div>
162
                    </div>
163

    
164

    
165
                  </li>
166
                </ul>
167
              </div>
168
              <!--     Results-->
169
              <div>
170
                <div class=" uk-margin uk-h6 uk-text-primary "
171
                     (click)="showLinksTo=!showLinksTo;  ">
172
                  LINK TO ({{results.length | number}})
173

    
174
                  <span *ngIf="!showLinksTo" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
175
                                                                  xmlns="http://www.w3.org/2000/svg"
176
                                                                  icon="chevron-left" ratio="1"><polyline
177
                    fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
178
                  <span *ngIf="showLinksTo" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
179
                                                                 xmlns="http://www.w3.org/2000/svg"
180
                                                                 icon="chevron-down" ratio="1"><polyline
181
                    fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
182

    
183
                </div>
184
                <div *ngIf="results.length == 0 && showLinksTo">
185
                  <div class="uk-alert dangerBorder no-selected-message uk-text-center">
186
                    <span class="uk-text-bold uk-text-danger"> LINK TO list cannot be empty.</span>
187
                    Select an entity type to link to:
188
                    <div class="uk-grid uk-text-center uk-margin-expand uk-padding-small uk-child-width-1-3 uk-width-large uk-margin-auto ">
189

    
190
                      <div *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "
191
                           (click)="goTo('project')"
192
                           style="cursor:pointer;">
193
                        <button class="uk-icon-button portal-button">
194
        <span class="uk-icon">
195
                        <svg height="20" icon="album" ratio="1" viewBox="0 0 20 20" width="20"
196
                             xmlns="http://www.w3.org/2000/svg"><rect height="1" width="10" x="5" y="2"></rect><rect
197
                          height="1" width="14" x="3" y="4"></rect><rect fill="none" height="11" stroke="#000"
198
                                                                         width="17" x="1.5" y="6.5"></rect></svg></span>
199
                        </button>
200
                        <div>Projects</div>
201
                      </div>
202
                      <div *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " (click)="goTo('result')"
203
                           style="cursor:pointer;">
204
                        <button class="uk-icon-button portal-button">
205
         <span class="uk-icon">
206
                           <svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
207
                                xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
208
                                                                         width="12" x="3.5" y="2.5"></rect><polyline
209
                             fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
210
                        </button>
211
                        <div>Research results</div>
212
                      </div>
213
                      <div *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 "
214
                           (click)="goTo('context')"
215
                           style="cursor:pointer;">
216
                        <button class="uk-icon-button portal-button">
217
        <span class="uk-icon">
218
                           <svg height="20" icon="users" ratio="1" viewBox="0 0 20 20" width="20"
219
                                xmlns="http://www.w3.org/2000/svg"><circle cx="7.7" cy="8.6" fill="none" r="3.5"
220
                                                                           stroke="#000" stroke-width="1.1"></circle><path
221
                             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" fill="none"
222
                             stroke="#000" stroke-width="1.1"></path><path
223
                             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"
224
                             fill="none" stroke="#000" stroke-width="1.1"></path></svg></span>
225
                        </button>
226
                        <div>Communities</div>
227
                      </div>
228

    
229
                    </div>
230
                  </div>
231
                </div>
232
                <ul *ngIf="results.length > 0  && showLinksTo" class="uk-list uk-animation-fade">
233
                  <li *ngFor=" let entity of results "
234
                      [class]="((entity.warningMessages.length > 0)?' warningBorder ':'')+
235
                    +((entity.errorMessages.length > 0)?' dangerBorder ':'') +
236
                    ' uk-alert'" style="z-index: 0 !important;">
237
                    <div class="uk-grid  uk-text-small">
238
                      <div class="uk-text-muted uk-width-1-2">
239
                        {{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
240
                      </div>
241
                      <div *ngIf="entity.errorMessages.length > 0"
242
                           class="uk-text-danger  uk-width-1-2"> Link couldn't be saved
243
                      </div>
244
                    </div>
245

    
246
                    <div class="uk-grid uk-margin-remove-top">
247
                      <div class="uk-width-expand">
248

    
249
                        <claim-title [entity]="entity"></claim-title>
250
                        <claim-result-metadata [entity]="entity"></claim-result-metadata>
251
                        <claim-project-metadata [entity]="entity"></claim-project-metadata>
252
                        <div *ngIf="entity.result && entity.result.source && entity.result.source!='openaire' "
253
                             class="uk-grid uk-text-small uk-margin-remove-top">
254
                          <div class="uk-width-1-2">
255
                            <span class="uk-text-muted">Type </span>
256
                            <select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"
257
                                    class="uk-select uk-width-small">
258
                              <option [value]="'publication'"
259
                                      (click)="onTypeChanged('publication',entity, false)">Publication
260
                              </option>
261
                              <option [value]="'dataset'"
262
                                      (click)="onTypeChanged('dataset',entity, false)">Research data
263
                              </option>
264
                              <option [value]="'software'" (click)="onTypeChanged('software',entity, false)">Software
265
                              </option>
266
                              <option [value]="'other'"
267
                                      (click)="onTypeChanged('other',entity, false)">Other research product
268
                              </option>
269
                            </select>
270
                          </div>
271
                          <div class="uk-width-1-2 uk-padding-remove-left ">
272
                            <div class="uk-grid">
273
                              <span class="uk-text-muted uk-margin-small-top uk-padding-remove-left">Access mode</span>
274
                              <select [(ngModel)]="entity.result.accessRights" name="{{'select_rights_'+entity.id}}"
275
                                      class="uk-select uk-width-small uk-padding-remove-left uk-margin-left">
276
                                <option *ngFor="let type of accessTypes" [value]="type"
277
                                        (click)="accessRightsTypeChanged(type,entity, true)">{{type}}</option>
278
                              </select>
279
                              <mat-form-field *ngIf="entity.result.accessRights== 'EMBARGO'">
280
                                <input matInput [matDatepicker]="picker" placeholder="Choose embargo end date"
281
                                       (click)="picker.open()" [ngModel]="embargoEndDates[entity.id+'_result']"
282
                                       (dateInput)="onDateChanged($event, entity, true)"
283
                                       (dateChange)="onDateChanged($event, entity, true)">
284
                                <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
285
                                <mat-datepicker #picker [startAt]="embargoEndDates[entity.id+'_result']" ng-model-options="{ timezone: 'utc' }"></mat-datepicker>
286
                              </mat-form-field>
287
                            </div>
288
                            <div *ngIf="entity.result.accessRights== 'EMBARGO' && getEmbargoEndDateMessage(entity)"
289
                                 [class]="(getEmbargoEndDateMessage(entity)?'uk-text-warning':'')">{{getEmbargoEndDateMessage(entity)}}
290
                            </div>
291
                          </div>
292
                        </div>
293
                      </div>
294
                      <div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left">
295
                        <a class="uk-icon-button "
296
                           (click)="remove(entity, true)">
297
                   <span class="uk-icon">
298
                      <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus"
299
                           ratio="1"><rect height="1" width="18" y="9" x="1"></rect></svg>
300
                   </span>
301
                        </a>
302
                      </div>
303
                    </div>
304

    
305

    
306
                  </li>
307
                </ul>
308
              </div>
309
            </div>
310
            <div class="uk-width-1-3" *ngIf="errors.length > 0 || warnings.length > 0">
311
              <!-- Errors and Warning -->
312
              <div *ngIf="errors.length > 0" class=" uk-margin uk-h6 uk-text-primary uk-animation-toggle"
313
                   (click)="showErrors=!showErrors ">
314
                ERRORS ({{errors.length | number}})
315
                <span *ngIf="!showErrors" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
316
                                                               xmlns="http://www.w3.org/2000/svg"
317
                                                               icon="chevron-left" ratio="1"><polyline
318
                  fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
319
                <span *ngIf="showErrors" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
320
                                                              xmlns="http://www.w3.org/2000/svg"
321
                                                              icon="chevron-down" ratio="1"><polyline
322
                  fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
323
              </div>
324
              <div *ngIf="errors.length > 0 && showErrors" class=" uk-animation-fade">
325
                <div *ngFor=" let message of errors " class="uk-alert dangerBorder">
326
                  <div *ngIf="message.type == 'claimServiceFail2Insert'">
327
                    <div class="">
328

    
329
                      <span class="uk-text-danger uk-text-bold"> Fail to save {{message.failed|number}}
330
                        {{message.failed > 1 ? 'links.' : 'link.'}}</span>
331
                      <br>
332
                      <div
333
                        *ngIf="message.inserted>0">But {{message.inserted|number}} link{{message.inserted > 1 ? 's' : ''}} was
334
                        successfully inserted.
335
                        <div>
336
                          <a routerLinkActive="router-link-active" routerLink="/myclaims">Manage your links here</a>
337
                        </div>
338
                      </div>
339
                    </div>
340
                  </div>
341

    
342
                  <div *ngIf="message.type == 'claimServiceFail'">
343

    
344
                    <div class="">
345
                      <span class="uk-text-danger uk-text-bold"> An error occured while saving your links.</span>
346
                      <br>
347
                      None of the links saved.
348
                    </div>
349
                  </div>
350
                </div>
351
              </div>
352
              <div *ngIf="warnings.length > 0"
353
                   class=" uk-margin uk-h6 uk-text-primary uk-animation-toggle"
354
                   (click)="showWarnings=!showWarnings "> WARNINGS
355
                ({{warnings.length
356
                      | number}})
357
                <span *ngIf="!showWarnings" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
358
                                                                 xmlns="http://www.w3.org/2000/svg"
359
                                                                 icon="chevron-left" ratio="1"><polyline
360
                  fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
361
                <span *ngIf="showWarnings" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
362
                                                                xmlns="http://www.w3.org/2000/svg"
363
                                                                icon="chevron-down" ratio="1"><polyline
364
                  fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
365
              </div>
366

    
367
              <div *ngIf="warnings.length > 0 && showWarnings " class=" uk-animation-fade">
368
                <div *ngFor=" let message of warnings " class="uk-alert warningBorder">
369
                  <div *ngIf="message.type == 'embargoEndDate'">
370
                    <div class="uk-text-warning uk-text-bold">
371
                      Embargo date must be later than published date in
372
                    </div>
373
                    <div class="">
374
                      {{message.resultTitle}}
375
                    </div>
376
                  </div>
377
                  <div *ngIf="message.type == 'projectDuration'">
378
                    <div class="uk-text-warning uk-text-bold">
379
                      Published date must be in the project's date boundaries
380
                      (from {{message.projectInfo.startDate}}{{(message.projectInfo.endDate) ? (' to ' + (addStringToNumber(message.projectInfo.endDate, 5))) : ''}}) in
381
                    </div>
382
                    <div class="">
383
                      {{message.resultTitle}}
384
                    </div>
385
                    <div class="uk-text-muted uk-text-small">
386
                      with link to
387
                    </div>
388
                    <div class="">
389
                      {{message.projectInfo.title}}
390
                    </div>
391
                    <div><span class="uk-text-muted uk-text-small">
392
           Project boundaries: </span>({{message.projectInfo.startDate}}{{(message.projectInfo.endDate) ? (' - ' + (message.projectInfo.endDate) + ') +5 years') : ')'}}
393
                    </div>
394
                  </div>
395

    
396
                </div>
397
              </div>
398
            </div>
399

    
400
            <modal-alert (alertOutput)="confirmClose()">
401
            </modal-alert>
402
          </div>
403

    
404

    
405
        </div>
406

    
407

    
408
      </div>
409
      <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
410
    </div>
411
  </div>
412
</div>
413

    
414

    
415

    
(5-5/14)