1
|
<div page-content>
|
2
|
<div header>
|
3
|
<community-info tab="subjects"></community-info>
|
4
|
<div class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
|
5
|
|
6
|
<div #searchInputComponent search-input [control]="filterForm" [showSearch]="false" placeholder="Search subjects"
|
7
|
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="resetInput()"
|
8
|
[bordered]="true" colorClass="uk-text-secondary"
|
9
|
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
10
|
<!-- <a *ngIf="!subjectsEnabled" (click)="enablePage()" class="uk-link-heading uk-text-small uk-text-uppercase"
|
11
|
uk-tooltip="title:<div class='uk-padding-small'>This information will be visible in <b>Subjects page</b> of Research Community Dashboard, which is <b>disabled</b>. <br> Click to enable id.</div>">
|
12
|
<span class="uk-text-secondary"><icon name="check_circle_outlined"></icon></span>
|
13
|
|
14
|
Enable page
|
15
|
</a>-->
|
16
|
<div>
|
17
|
<a (click)="newSubject()"
|
18
|
uk-tooltip="title:<div class='uk-padding-small'><div class='uk-margin-bottom uk-text-bold'>Add new subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>"
|
19
|
class="uk-flex uk-flex-middle uk-text-uppercase">
|
20
|
<button class="large uk-icon-button uk-button-secondary">
|
21
|
<icon name="add"></icon>
|
22
|
</button>
|
23
|
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add new subject</button>
|
24
|
</a>
|
25
|
</div>
|
26
|
</div>
|
27
|
</div>
|
28
|
<div inner>
|
29
|
<div *ngIf="showLoading" class="uk-position-center">
|
30
|
<loading *ngIf="showLoading"></loading>
|
31
|
</div>
|
32
|
<div *ngIf="community && community.subjects && !showLoading">
|
33
|
<div *ngIf="community.subjects.length == 0"
|
34
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
35
|
<div>No subjects found</div>
|
36
|
</div>
|
37
|
<div *ngIf="community.subjects.length > 0">
|
38
|
<no-load-paging *ngIf="community.subjects.length > 0" [type]="'Subjects'"
|
39
|
[page]="page" [pageSize]="size" (pageChange)="page = $event.value"
|
40
|
[totalResults]="community.subjects.length">
|
41
|
</no-load-paging>
|
42
|
<ul class="uk-list">
|
43
|
<li *ngFor='let subject of community.subjects; let i = index;'
|
44
|
class="uk-card uk-card-default uk-margin-bottom" [class.uk-hidden]="i > page * size ||
|
45
|
i < (page - 1) * size">
|
46
|
<div class="uk-grid uk-padding uk-grid-divider uk-flex uk-flex-middle" uk-grid>
|
47
|
<div class="uk-width-expand uk-text-large">
|
48
|
<span
|
49
|
uk-tooltip="title:<div class='uk-padding-small'> All the research results associated to this subjects will be automatically linked to the community dashboard. </div>">
|
50
|
{{subject}}
|
51
|
</span>
|
52
|
</div>
|
53
|
<div class="uk-width-auto">
|
54
|
<div class="uk-flex-center uk-flex">
|
55
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
56
|
<a (click)="editSubject(subject)" class="uk-button action uk-flex uk-flex-middle">
|
57
|
<icon name="edit"></icon>
|
58
|
<span class="uk-margin-small-left">Edit</span>
|
59
|
</a>
|
60
|
<a (click)="removeModalOpen(subject, i)"
|
61
|
class="uk-button action uk-margin-small-top uk-flex uk-flex-middle ">
|
62
|
<icon name="remove" ratio="0.9"></icon>
|
63
|
<span class="uk-margin-small-left">Delete</span>
|
64
|
</a>
|
65
|
</div>
|
66
|
</div>
|
67
|
</div>
|
68
|
</div>
|
69
|
</li>
|
70
|
</ul>
|
71
|
</div>
|
72
|
</div>
|
73
|
</div>
|
74
|
</div>
|
75
|
<modal-alert #editModal (alertOutput)="saveSubjects()"
|
76
|
[okDisabled]="myForm && (myForm.invalid || !myForm.dirty)">
|
77
|
<div class="uk-height-medium uk-overflow-auto" style="margin-right: -30px">
|
78
|
<form *ngIf="myForm" class="uk-grid uk-child-width-1-1 uk-margin-right" uk-grid>
|
79
|
<div *ngFor=" let control of myForm.controls; index as i" class="uk-flex-middle uk-grid uk-grid-small" uk-grid>
|
80
|
<div dashboard-input [formInput]="myForm.controls[i]" type="text"
|
81
|
placeholder="Type subjects as free text keywords" class="uk-width-expand "></div>
|
82
|
<div *ngIf="!isEditModal" class="uk-width-auto">
|
83
|
<a class="uk-link-heading" [class.uk-invisible]="myForm.length === 1"
|
84
|
(click)="removeSubjectInForm(i)">
|
85
|
<icon name="close"></icon>
|
86
|
</a>
|
87
|
</div>
|
88
|
</div>
|
89
|
<div class="uk-margin-top uk-flex-center uk-flex">
|
90
|
<a *ngIf="!isEditModal" (click)="addSubjectInForm()">
|
91
|
<button class="uk-icon-button uk-button-secondary">
|
92
|
<icon name="add"></icon>
|
93
|
</button>
|
94
|
</a>
|
95
|
</div>
|
96
|
</form>
|
97
|
</div>
|
98
|
</modal-alert>
|
99
|
<modal-alert #deleteModal (alertOutput)="saveSubjects()"></modal-alert>
|
100
|
<!--<modal-alert #enablePageModal (alertOutput)="enablePage()">
|
101
|
<div class="uk-padding uk-padding-remove-horizontal">
|
102
|
This information will be visible in <span class="uk-text-bold">Subjects page</span> of Research Community
|
103
|
Dashboard, which is <span class="uk-text-bold">disabled</span>.
|
104
|
Do you want to <span class="uk-text-bold">enable</span> it now?
|
105
|
</div>
|
106
|
</modal-alert>-->
|