1
|
<div page-content>
|
2
|
<admin-tabs tab = "portal" header></admin-tabs>
|
3
|
<div inner class="admin-pages">
|
4
|
<div *ngIf="!errorMessage && !showLoading" class="filters" uk-sticky="offset:150">
|
5
|
<div class="show-options uk-float-right">
|
6
|
<button class="uk-button uk-button-primary " type="button">Bulk Actions</button>
|
7
|
<div uk-dropdown="mode: click">
|
8
|
<ul class="uk-nav uk-margin-left"
|
9
|
[attr.uk-tooltip]="getSelectedCommunities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
10
|
title="Select at least one portal">
|
11
|
<li><a [class]="getSelectedCommunities().length == 0 ? 'uk-disabled' : ''"
|
12
|
(click)="confirmDeleteSelectedCommunities()"><i></i> Delete </a></li>
|
13
|
</ul>
|
14
|
</div>
|
15
|
</div>
|
16
|
<div class="uk-inline uk-width-medium uk-float-right uk-margin-right" >
|
17
|
<span class="uk-position-center-right"><i class="material-icons">search</i></span>
|
18
|
<div dashboard-input [formInput]="filterForm.controls.keyword"
|
19
|
placeholder="Search"></div>
|
20
|
</div>
|
21
|
<ul class="uk-subnav uk-subnav-pill subCategoriesTabs ignore admin " >
|
22
|
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
|
23
|
(click)="filterForm.get('type').setValue('all')"><span
|
24
|
class="title">All portals</span></a></li>
|
25
|
<li *ngFor="let type of portalUtils.portalTypes; let i=index"
|
26
|
[class.uk-active]="filterForm.get('type').value === type.value" class="uk-margin-small-bottom"><a
|
27
|
(click)="filterForm.get('type').setValue(type.value)"><span
|
28
|
class="title">{{type.label}}</span></a></li>
|
29
|
</ul>
|
30
|
</div>
|
31
|
|
32
|
<div class="uk-margin-top">
|
33
|
<a *ngIf="!showLoading && !errorMessage" (click)="newCommunity()"
|
34
|
class="uk-flex uk-flex-right uk-flex-middle uk-margin-small-bottom">
|
35
|
<div class="uk-button-default large uk-icon-button uk-margin-small-right" uk-icon="plus">
|
36
|
</div>
|
37
|
Add portal
|
38
|
</a>
|
39
|
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
40
|
<a class="uk-alert-close" uk-close></a>
|
41
|
{{updateErrorMessage}}
|
42
|
</div>
|
43
|
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
44
|
role="alert">{{errorMessage}}</div>
|
45
|
<div [style.display]="showLoading ? 'inline' : 'none'"
|
46
|
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img
|
47
|
class="uk-align-center loading-gif"></div>
|
48
|
|
49
|
|
50
|
|
51
|
<div class=" uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading">
|
52
|
|
53
|
<div class="">
|
54
|
<div class="uk-overflow-container">
|
55
|
<table class="uk-table uk-table-striped uk-table-hover">
|
56
|
<thead class="form-header">
|
57
|
<tr>
|
58
|
<th><input id="allCommunityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
|
59
|
<th>Name</th>
|
60
|
<th>Type</th>
|
61
|
<th>Actions</th>
|
62
|
</tr>
|
63
|
</thead>
|
64
|
<tbody>
|
65
|
<tr *ngFor="let check of checkboxes; let i=index">
|
66
|
<td><input id="{{check.community._id}}" class="checkBox" type="checkbox"
|
67
|
name="communitiescb[]" value="{{check.community._id}}" [(ngModel)]="check.checked">
|
68
|
</td>
|
69
|
<td>
|
70
|
<div class="name" href="#">{{check.community.name}}</div>
|
71
|
</td>
|
72
|
<td>
|
73
|
<div class="type" href="#">{{check.community.type}}</div>
|
74
|
</td>
|
75
|
<td>
|
76
|
<div class="actions" href="#">
|
77
|
<i class="clickable" uk-icon="pencil" (click)="editCommunity(i)"></i>
|
78
|
<i class="clickable uk-text-danger" uk-icon="trash"
|
79
|
(click)="confirmDeleteCommunity(check.community._id)"></i>
|
80
|
</div>
|
81
|
</td>
|
82
|
|
83
|
</tr>
|
84
|
|
85
|
</tbody>
|
86
|
</table>
|
87
|
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
88
|
<div class="uk-alert-warning" uk-alert>No portals found</div>
|
89
|
</div>
|
90
|
<!--<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
91
|
<div class="uk-width-small uk-button-default uk-button" (click)="newCommunity()">
|
92
|
<i class="" uk-icon="plus"></i>
|
93
|
</div>
|
94
|
</div>-->
|
95
|
</div>
|
96
|
</div>
|
97
|
</div>
|
98
|
</div>
|
99
|
</div>
|
100
|
</div>
|
101
|
|
102
|
<modal-alert #AlertModalSaveCommunity (alertOutput)="communitySaveConfirmed($event)"
|
103
|
[okDisabled]="portalFG && (portalFG.invalid || !portalFG.dirty)">
|
104
|
|
105
|
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
106
|
<form [formGroup]="portalFG">
|
107
|
<div dashboard-input class="uk-margin-small-left" [formInput]="portalFG.controls.name"
|
108
|
type="text"
|
109
|
label="Portal Name">
|
110
|
</div>
|
111
|
<div [ngClass]="{'has-error':!portalFG.controls.type.valid && portalFG.controls.type.dirty}">
|
112
|
<label for="portalTypeTag">*Portal Type</label>
|
113
|
<select formControlName="type" id="portalTypeTag" class="form-control uk-select">
|
114
|
<option *ngFor="let option of portalUtils.portalTypes" [value]="option.value">{{option.label}}</option>
|
115
|
</select>
|
116
|
</div>
|
117
|
<div dashboard-input class="uk-margin-small-left " [formInput]="portalFG.controls.pid"
|
118
|
type="text"
|
119
|
label="Portal persistent id for portal">
|
120
|
</div>
|
121
|
<div dashboard-input class="uk-margin-small-left" [formInput]="portalFG.controls.piwik"
|
122
|
type="text"
|
123
|
label="Piwik id">
|
124
|
</div>
|
125
|
<input type="hidden" formControlName="_id">
|
126
|
</form>
|
127
|
|
128
|
</modal-alert>
|
129
|
<modal-alert #AlertModalDeleteCommunities (alertOutput)="confirmedDeleteCommunities($event)"></modal-alert>
|