1 |
60211
|
k.triantaf
|
<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 |
60215
|
k.triantaf
|
<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>
|
17 |
60211
|
k.triantaf
|
<div search-input [control]="filterForm.controls.keyword" [showSearch]="false" placeholder="Search entity"
|
18 |
|
|
[bordered]="true" colorClass="uk-text-secondary"></div>
|
19 |
60215
|
k.triantaf
|
<div class="show-options">
|
20 |
60211
|
k.triantaf
|
<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>
|
37 |
57916
|
argiro.kok
|
</div>
|
38 |
60215
|
k.triantaf
|
<div *ngIf="isPortalAdministrator">
|
39 |
60211
|
k.triantaf
|
<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>
|
47 |
57916
|
argiro.kok
|
</div>
|
48 |
|
|
</div>
|
49 |
60211
|
k.triantaf
|
</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.
|
56 |
60202
|
argiro.kok
|
</div>
|
57 |
60211
|
k.triantaf
|
<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>
|
62 |
57916
|
argiro.kok
|
|
63 |
60211
|
k.triantaf
|
</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>
|
73 |
57916
|
argiro.kok
|
|
74 |
|
|
|
75 |
60211
|
k.triantaf
|
<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>
|
105 |
57916
|
argiro.kok
|
|
106 |
60211
|
k.triantaf
|
<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>
|
111 |
57916
|
argiro.kok
|
</div>
|
112 |
60211
|
k.triantaf
|
</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>
|
119 |
57916
|
argiro.kok
|
</div>
|
120 |
|
|
</div>
|
121 |
60211
|
k.triantaf
|
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
122 |
|
|
<div class="uk-alert-warning" uk-alert>No entities found</div>
|
123 |
|
|
</div>
|
124 |
57916
|
argiro.kok
|
</div>
|
125 |
|
|
</div>
|
126 |
60211
|
k.triantaf
|
|
127 |
|
|
</div>
|
128 |
57916
|
argiro.kok
|
</div>
|
129 |
|
|
</div>
|
130 |
|
|
</div>
|
131 |
|
|
|
132 |
|
|
<modal-alert #AlertModalSaveEntity (alertOutput)="entitySaveConfirmed($event)"
|
133 |
|
|
[okDisabled]="myForm && (myForm.invalid || !myForm.dirty)">
|
134 |
|
|
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
135 |
|
|
<form [formGroup]="myForm">
|
136 |
|
|
|
137 |
|
|
<div dashboard-input class="uk-margin-small-left" [formInput]="myForm.controls.name"
|
138 |
|
|
type="text"
|
139 |
|
|
label="Entity Name">
|
140 |
|
|
</div>
|
141 |
|
|
|
142 |
|
|
<div dashboard-input class="uk-margin-small-left" [formInput]="myForm.controls.pid"
|
143 |
|
|
type="text"
|
144 |
|
|
label="Entity Pid">
|
145 |
|
|
</div>
|
146 |
|
|
<input type="hidden" formControlName="_id">
|
147 |
|
|
</form>
|
148 |
|
|
</modal-alert>
|
149 |
|
|
|
150 |
|
|
<modal-alert #AlertModalRelatedPages (alertOutput)="continueToggling($event)"></modal-alert>
|
151 |
|
|
|
152 |
|
|
<modal-alert #AlertModalDeleteEntities (alertOutput)="confirmedDeleteEntities($event)"></modal-alert>
|