Revision 60211
Added by Konstantinos Triantafyllou over 3 years ago
entities.component.html | ||
---|---|---|
1 |
<div page-content> |
|
2 |
<admin-tabs tab = "entity" [portal]="selectedCommunityPid" 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]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
10 |
title="Select at least one entity"> |
|
11 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
12 |
(click)="toggleEntities(true, getSelectedEntities())"><i></i> Activate |
|
13 |
</a></li> |
|
14 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
15 |
(click)="toggleEntities(false, getSelectedEntities())"><i></i> Deactivate |
|
16 |
</a></li> |
|
17 |
<li *ngIf="isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
18 |
(click)="confirmDeleteSelectedEntities()"><i></i> Delete </a></li> |
|
19 |
</ul> |
|
1 |
<div page-content class="admin-pages"> |
|
2 |
<div header> |
|
3 |
<admin-tabs tab="entity" [portal]="selectedCommunityPid"></admin-tabs> |
|
4 |
<div *ngIf="!errorMessage && !showLoading" class="uk-grid filters" uk-grid> |
|
5 |
<div class="uk-width-1-1"> |
|
6 |
<ul *ngIf="!isPortalAdministrator" class="uk-subnav uk-subnav-pill"> |
|
7 |
<li [class.uk-active]="filterForm.get('status').value === 'all'"><a |
|
8 |
(click)="filterForm.get('status').setValue('all')"><span |
|
9 |
class="title">All entities</span></a></li> |
|
10 |
<li [class.uk-active]="filterForm.get('status').value === 'enabled'"><a |
|
11 |
(click)="filterForm.get('status').setValue('enabled')"><span class="title">Enabled</span></a></li> |
|
12 |
<li [class.uk-active]="filterForm.get('status').value === 'disabled'"><a |
|
13 |
(click)="filterForm.get('status').setValue('disabled')"><span class="title">Disabled</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 entity" |
|
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]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
24 |
title="Select at least one entity"> |
|
25 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
26 |
(click)="toggleEntities(true, getSelectedEntities())"><i></i> |
|
27 |
Activate |
|
28 |
</a></li> |
|
29 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
30 |
(click)="toggleEntities(false, getSelectedEntities())"><i></i> |
|
31 |
Deactivate |
|
32 |
</a></li> |
|
33 |
<li *ngIf="isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
34 |
(click)="confirmDeleteSelectedEntities()"><i></i> Delete </a></li> |
|
35 |
</ul> |
|
36 |
</div> |
|
20 | 37 |
</div> |
38 |
<div *ngIf="isPortalAdministrator" class="uk-margin-left"> |
|
39 |
<a (click)="newEntity()" |
|
40 |
class="uk-flex uk-flex-middle uk-text-uppercase"> |
|
41 |
<button class="large uk-icon-button uk-button-secondary"> |
|
42 |
<icon name="add"></icon> |
|
43 |
</button> |
|
44 |
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add entity</button> |
|
45 |
</a> |
|
46 |
</div> |
|
21 | 47 |
</div> |
22 |
<div class="uk-float-right uk-margin-right uk-width-medium"> |
|
23 |
<div dashboard-input [formInput]="filterForm.controls.keyword" placeholder="search entity"></div> |
|
24 |
</div> |
|
25 |
<ul *ngIf="!isPortalAdministrator" class="uk-subnav uk-subnav-pill subCategoriesTabs ignore admin " > |
|
26 |
<li [class.uk-active]="filterForm.get('status').value === 'all'"><a |
|
27 |
(click)="filterForm.get('status').setValue('all')"><span |
|
28 |
class="title">All entities</span></a></li> |
|
29 |
<li [class.uk-active]="filterForm.get('status').value === 'enabled'"><a (click)="filterForm.get('status').setValue('enabled')"><span class="title">Enabled</span></a></li> |
|
30 |
<li [class.uk-active]="filterForm.get('status').value === 'disabled'"><a (click)="filterForm.get('status').setValue('disabled')"><span class="title">Disabled</span></a></li> |
|
31 |
</ul> |
|
32 |
|
|
33 | 48 |
</div> |
34 |
|
|
35 |
<div class="content-wrapper" id="contentWrapper"> |
|
36 |
<a *ngIf="!showLoading && isPortalAdministrator && !errorMessage" (click)="newEntity()" |
|
37 |
class="uk-flex uk-flex-right uk-flex-middle uk-margin-small-bottom"> |
|
38 |
<div class="uk-button-default large uk-icon-button uk-margin-small-right" uk-icon="plus"> |
|
49 |
</div> |
|
50 |
<div inner> |
|
51 |
<div class="contentPanel "> |
|
52 |
<div *ngIf="!isPortalAdministrator" class="uk-alert uk-alert-primary uk-margin-top-large"> |
|
53 |
<div> |
|
54 |
<span class="uk-margin-small-right uk-icon" uk-icon="warning"></span> |
|
55 |
Disable an entity to hide it from community dashboard portal. |
|
39 | 56 |
</div> |
40 |
Add entity |
|
41 |
</a> |
|
42 |
<div class="contentPanel "> |
|
43 |
<div *ngIf="!isPortalAdministrator" class="uk-alert uk-alert-primary uk-margin-top-large"> |
|
44 |
<div> |
|
45 |
<span class="uk-margin-small-right uk-icon" uk-icon="warning"></span> |
|
46 |
Disable an entity to hide it from community dashboard portal. |
|
47 |
</div> |
|
48 |
<div |
|
49 |
class="uk-text-small">If an entity is disabled, all related search and advanced search pages will be hidden from the community dashborad and a message "Can't find that page" will appear in case the url of that page is loaded. If the related page belongs to the menu the link will be removed from menu, too. |
|
50 |
</div> |
|
57 |
<div |
|
58 |
class="uk-text-small">If an entity is disabled, all related search and advanced search pages will be |
|
59 |
hidden from the community dashborad and a message "Can't find that page" will appear in case the url of that |
|
60 |
page is loaded. If the related page belongs to the menu the link will be removed from menu, too. |
|
61 |
</div> |
|
51 | 62 |
|
52 |
</div>
|
|
53 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
|
54 |
<a class="uk-alert-close" uk-close></a>
|
|
55 |
{{updateErrorMessage}}
|
|
56 |
</div>
|
|
57 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
|
58 |
role="alert">{{errorMessage}}</div>
|
|
59 |
<div [style.display]="showLoading ? 'inline' : 'none'"
|
|
60 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img
|
|
61 |
class="uk-align-center loading-gif"></div>
|
|
63 |
</div> |
|
64 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert> |
|
65 |
<a class="uk-alert-close" uk-close></a> |
|
66 |
{{updateErrorMessage}} |
|
67 |
</div> |
|
68 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top" |
|
69 |
role="alert">{{errorMessage}}</div> |
|
70 |
<div [style.display]="showLoading ? 'inline' : 'none'" |
|
71 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img |
|
72 |
class="uk-align-center loading-gif"></div> |
|
62 | 73 |
|
63 | 74 |
|
64 |
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading">
|
|
65 |
<div class="md-card-content">
|
|
66 |
<div class="uk-overflow-container">
|
|
67 |
<table class="uk-table uk-table-striped uk-table-hover uk-table-large">
|
|
68 |
<thead class="form-header">
|
|
69 |
<tr>
|
|
70 |
<th
|
|
71 |
class="uk-width-small"><input id="allEntityCheckbox" type="checkbox"
|
|
72 |
(change)="toggleCheckBoxes($event)"></th> |
|
73 |
<th>Name</th>
|
|
74 |
<th *ngIf="!isPortalAdministrator">Status</th>
|
|
75 |
<th *ngIf="!isPortalAdministrator">Enable/Disable</th>
|
|
76 |
<th *ngIf="isPortalAdministrator">Actions</th>
|
|
77 |
</tr>
|
|
78 |
</thead>
|
|
79 |
<tbody>
|
|
80 |
<tr *ngFor="let check of checkboxes; let i=index">
|
|
81 |
<td><input id="{{check.entity._id}}" class="checkBox" type="checkbox"
|
|
82 |
name="entitiescb[]" value="{{check.entity._id}}" [(ngModel)]="check.checked">
|
|
83 |
</td>
|
|
84 |
<td>
|
|
85 |
<div class="name" href="#">{{check.entity.name}}</div>
|
|
86 |
</td>
|
|
87 |
<td *ngIf="!isPortalAdministrator">
|
|
88 |
<div class="name" href="#">{{check.entity.isEnabled?"Enabled":"Disabled"}}</div>
|
|
89 |
</td>
|
|
90 |
<td *ngIf="!isPortalAdministrator">
|
|
91 |
<mat-slide-toggle [checked]="check.entity.isEnabled"
|
|
92 |
(change)="($event.source.checked = check.entity.isEnabled);toggleEntities(!check.entity.isEnabled,[check.entity._id])"></mat-slide-toggle>
|
|
93 |
</td>
|
|
75 |
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading"> |
|
76 |
<div class="md-card-content"> |
|
77 |
<div class="uk-overflow-container"> |
|
78 |
<table class="uk-table uk-table-striped uk-table-hover uk-table-large"> |
|
79 |
<thead class="form-header"> |
|
80 |
<tr> |
|
81 |
<th |
|
82 |
class="uk-width-small"><input id="allEntityCheckbox" type="checkbox" |
|
83 |
(change)="toggleCheckBoxes($event)"></th>
|
|
84 |
<th>Name</th> |
|
85 |
<th *ngIf="!isPortalAdministrator">Status</th> |
|
86 |
<th *ngIf="!isPortalAdministrator">Enable/Disable</th> |
|
87 |
<th *ngIf="isPortalAdministrator">Actions</th> |
|
88 |
</tr> |
|
89 |
</thead> |
|
90 |
<tbody> |
|
91 |
<tr *ngFor="let check of checkboxes; let i=index"> |
|
92 |
<td><input id="{{check.entity._id}}" class="checkBox" type="checkbox" |
|
93 |
name="entitiescb[]" value="{{check.entity._id}}" [(ngModel)]="check.checked"> |
|
94 |
</td> |
|
95 |
<td> |
|
96 |
<div class="name" href="#">{{check.entity.name}}</div> |
|
97 |
</td> |
|
98 |
<td *ngIf="!isPortalAdministrator"> |
|
99 |
<div class="name" href="#">{{check.entity.isEnabled ? "Enabled" : "Disabled"}}</div>
|
|
100 |
</td> |
|
101 |
<td *ngIf="!isPortalAdministrator"> |
|
102 |
<mat-slide-toggle [checked]="check.entity.isEnabled" |
|
103 |
(change)="($event.source.checked = check.entity.isEnabled);toggleEntities(!check.entity.isEnabled,[check.entity._id])"></mat-slide-toggle> |
|
104 |
</td> |
|
94 | 105 |
|
95 |
<td *ngIf="isPortalAdministrator"> |
|
96 |
<div class="actions" href="#"> |
|
97 |
<i class="clickable " uk-icon="pencil" (click)="editEntity(i)"></i> |
|
98 |
<i class="clickable uk-text-danger" uk-icon="trash" |
|
99 |
(click)="confirmDeleteEntity(check.entity._id)"></i> |
|
100 |
</div> |
|
101 |
</td> |
|
102 |
</tr> |
|
103 |
</tbody> |
|
104 |
</table> |
|
105 |
<div class="uk-width-1-1 uk-flex uk-flex-center " *ngIf="isPortalAdministrator"> |
|
106 |
<div class="uk-width-small uk-button uk-button-default" (click)="newEntity()"> |
|
107 |
<i class="" uk-icon="plus"></i> |
|
106 |
<td *ngIf="isPortalAdministrator"> |
|
107 |
<div class="actions" href="#"> |
|
108 |
<i class="clickable " uk-icon="pencil" (click)="editEntity(i)"></i> |
|
109 |
<i class="clickable uk-text-danger" uk-icon="trash" |
|
110 |
(click)="confirmDeleteEntity(check.entity._id)"></i> |
|
108 | 111 |
</div> |
109 |
</div> |
|
110 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
111 |
<div class="uk-alert-warning" uk-alert>No entities found</div> |
|
112 |
</div> |
|
112 |
</td> |
|
113 |
</tr> |
|
114 |
</tbody> |
|
115 |
</table> |
|
116 |
<div class="uk-width-1-1 uk-flex uk-flex-center " *ngIf="isPortalAdministrator"> |
|
117 |
<div class="uk-width-small uk-button uk-button-default" (click)="newEntity()"> |
|
118 |
<i class="" uk-icon="plus"></i> |
|
113 | 119 |
</div> |
114 | 120 |
</div> |
115 |
|
|
121 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
122 |
<div class="uk-alert-warning" uk-alert>No entities found</div> |
|
123 |
</div> |
|
116 | 124 |
</div> |
117 | 125 |
</div> |
126 |
|
|
127 |
</div> |
|
118 | 128 |
</div> |
119 | 129 |
</div> |
120 | 130 |
</div> |
Also available in: Unified diff
[Library | Trunk]: Change admin-tools pages header layout. Add search-input