1
|
<div page-content>
|
2
|
<div header>
|
3
|
<ul *ngIf="isCurator()" class="uk-tab customTabs admin uk-flex uk-flex-center uk-flex-left@m" uk-tab>
|
4
|
<li [class.uk-active]="tab === 'all'"><a routerLink="./"><span class="title">All</span></a></li>
|
5
|
<li [class.uk-active]="tab === 'templates'"><a routerLink="./" fragment="templates"><span class="title">Profile templates</span></a>
|
6
|
</li>
|
7
|
<li [class.uk-active]="tab === 'profiles'"><a routerLink="./" fragment="profiles"><span
|
8
|
class="title">Profiles</span></a></li>
|
9
|
</ul>
|
10
|
<!--<div class="uk-grid uk-margin-medium" uk-grid>
|
11
|
<div *ngIf="filters" class="uk-width-2-3@m uk-width-1-1 uk-child-width-1-3@m uk-child-width-1-1" uk-grid>
|
12
|
<div>
|
13
|
<div dashboard-input [formInput]="filters.get('status')"
|
14
|
type="select" [options]="[all].concat(stakeholderUtils.visibility)"
|
15
|
label="Visibility"></div>
|
16
|
</div>
|
17
|
</div>
|
18
|
<div class="uk-width-expand@m uk-width-1-1 uk-flex uk-flex-middle uk-flex-right">
|
19
|
<div class="uk-inline uk-width-medium">
|
20
|
<div dashboard-input [formInput]="filters.get('keyword')" label="Locate profile" icon="search"></div>
|
21
|
</div>
|
22
|
</div>
|
23
|
</div>-->
|
24
|
</div>
|
25
|
<div inner>
|
26
|
<div *ngIf="loading" class="uk-margin-medium-top uk-padding-large">
|
27
|
<loading></loading>
|
28
|
</div>
|
29
|
<div *ngIf="!loading">
|
30
|
<div *ngIf="tab != 'profiles' && isCurator()" class="uk-margin-medium-top">
|
31
|
<h6 class="uk-text-bold">Profile Templates</h6>
|
32
|
<div class="uk-grid uk-child-width-1-4@xl uk-child-width-1-3@l uk-child-width-1-2@m uk-grid-match" uk-grid
|
33
|
uk-height-match="target: .name;">
|
34
|
<ng-template ngFor [ngForOf]="displayDefaultStakeholders" let-stakeholder let-i="index">
|
35
|
<ng-container *ngTemplateOutlet="stakeholderBox; context: {stakeholder:stakeholder}"></ng-container>
|
36
|
</ng-template>
|
37
|
<div *ngIf="!loading && isCurator()">
|
38
|
<ng-container *ngTemplateOutlet="newBox; context: {text:'Create a new default profile.', isDefault:true}"></ng-container>
|
39
|
</div>
|
40
|
</div>
|
41
|
</div>
|
42
|
<div *ngIf="!isManager()" class="message">
|
43
|
<h4 class="uk-text-center">
|
44
|
No profiles to manage yet
|
45
|
</h4>
|
46
|
</div>
|
47
|
<div *ngIf="tab != 'templates' && isManager()" class="uk-margin-large-top">
|
48
|
<h6 class="uk-text-bold">Profiles</h6>
|
49
|
<div class="uk-grid uk-grid-match uk-child-width-1-4@xl uk-child-width-1-3@l uk-child-width-1-2@m" uk-grid
|
50
|
uk-height-match="target: .name;">
|
51
|
<ng-template ngFor [ngForOf]="displayStakeholders" let-stakeholder let-i="index">
|
52
|
<ng-container *ngTemplateOutlet="stakeholderBox; context: {stakeholder:stakeholder}"></ng-container>
|
53
|
</ng-template>
|
54
|
<div *ngIf="!loading && isCurator()">
|
55
|
<ng-container *ngTemplateOutlet="newBox; context: {text:'Create a new profile by selecting the type (Funder, Organization, Research Initiative or Project) and ' +
|
56
|
'select indicators based on a default or a blank profile.', isDefault:false}"></ng-container>
|
57
|
</div>
|
58
|
</div>
|
59
|
</div>
|
60
|
</div>
|
61
|
</div>
|
62
|
</div>
|
63
|
|
64
|
<ng-template #stakeholderBox let-stakeholder="stakeholder">
|
65
|
<div *ngIf="stakeholder">
|
66
|
<div class="uk-card uk-card-default uk-card-body uk-position-relative">
|
67
|
<div class="uk-position-top-right uk-margin-small-right uk-margin-small-top clickable">
|
68
|
<i uk-icon="more-vertical"
|
69
|
(click)="$event.stopPropagation();$event.preventDefault()"></i>
|
70
|
<div #element uk-dropdown="mode: click; pos: bottom-right; delay-hide: 0; flip: false">
|
71
|
<ul class="uk-nav uk-dropdown-nav">
|
72
|
<li><a
|
73
|
(click)="$event.stopPropagation();editStakeholder(stakeholder, !stakeholder.defaultId);hide(element);$event.preventDefault()">Edit</a>
|
74
|
</li>
|
75
|
<ng-template ngFor [ngForOf]="stakeholderUtils.visibility" let-v>
|
76
|
<li *ngIf="stakeholder.visibility != v.value"><a (click)="changeStakeholderStatus(stakeholder, v.value);
|
77
|
hide(element)">
|
78
|
{{'Make ' + v.label.toLowerCase()}}</a>
|
79
|
</li>
|
80
|
</ng-template>
|
81
|
<hr *ngIf="isProfileManager(stakeholder)" class="uk-nav-divider">
|
82
|
<li *ngIf="isProfileManager(stakeholder)"><a
|
83
|
(click)="$event.stopPropagation();deleteStakeholderOpen(stakeholder);hide(element);$event.preventDefault()">Delete</a>
|
84
|
</li>
|
85
|
</ul>
|
86
|
</div>
|
87
|
</div>
|
88
|
<div class="uk-position-top-left uk-margin-small-left uk-margin-small-top clickable visibility">
|
89
|
<span class="clickable color">
|
90
|
<icon [name]="stakeholderUtils.visibilityIcon.get(stakeholder.visibility)"></icon>
|
91
|
</span>
|
92
|
<div #element uk-dropdown="mode: click; pos: bottom-left; delay-hide: 0; flip: false">
|
93
|
<ul class="uk-nav uk-dropdown-nav">
|
94
|
<li *ngFor="let v of stakeholderUtils.visibility" class="uk-position-relative">
|
95
|
<a *ngIf="stakeholder.visibility != v.value"
|
96
|
(click)="$event.stopPropagation();changeStakeholderStatus(stakeholder,v.value);hide(element);$event.preventDefault()">
|
97
|
<icon [name]="stakeholderUtils.visibilityIcon.get(v.value)" ratio="0.8"></icon>
|
98
|
<span> {{v.label}}</span>
|
99
|
</a>
|
100
|
<a *ngIf="stakeholder.visibility == v.value">
|
101
|
<icon [name]="stakeholderUtils.visibilityIcon.get(v.value)" [ratio]="0.8"></icon>
|
102
|
<span> {{v.label}}</span>
|
103
|
<span class="uk-position-center-right">
|
104
|
<icon customClass="uk-text-secondary" [ratio]="0.5" name="bullet"></icon>
|
105
|
</span>
|
106
|
</a>
|
107
|
</li>
|
108
|
</ul>
|
109
|
</div>
|
110
|
</div>
|
111
|
<a class="uk-display-block uk-text-center uk-card-title" [routerLink]="stakeholder.alias">
|
112
|
<div class="name uk-width-2-3@l">
|
113
|
{{stakeholder.name}}
|
114
|
</div>
|
115
|
<div *ngIf="stakeholder.logoUrl" class="logo uk-margin-top uk-margin-bottom">
|
116
|
<img *ngIf="stakeholder.isUpload" [src]="properties.utilsService + '/download/' + stakeholder.logoUrl">
|
117
|
<img *ngIf="!stakeholder.isUpload" [src]="stakeholder.logoUrl">
|
118
|
</div>
|
119
|
</a>
|
120
|
</div>
|
121
|
</div>
|
122
|
</ng-template>
|
123
|
|
124
|
<ng-template #newBox let-text="text" let-isDefault="isDefault">
|
125
|
<div *ngIf="!loading">
|
126
|
<div class="uk-card uk-card-default uk-text-center uk-card-body clickable" (click)="editStakeholder(null, isDefault)">
|
127
|
<div class="uk-text-small uk-text-muted">
|
128
|
{{text}}
|
129
|
</div>
|
130
|
<div class="uk-margin-medium-top uk-margin-small-bottom">
|
131
|
<span class="uk-text-secondary">
|
132
|
<icon name="add" [ratio]="3"></icon>
|
133
|
</span>
|
134
|
</div>
|
135
|
</div>
|
136
|
</div>
|
137
|
</ng-template>
|
138
|
<modal-alert #editStakeholderModal
|
139
|
id="edit_modal" [large]="true"
|
140
|
(alertOutput)="editStakeholderComponent.save(callback)"
|
141
|
[okDisabled]="editStakeholderComponent.disabled">
|
142
|
<edit-stakeholder #editStakeholderComponent></edit-stakeholder>
|
143
|
</modal-alert>
|
144
|
<modal-alert #deleteStakeholderModal (alertOutput)="deleteStakeholder()"></modal-alert>
|