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