2022-07-13 19:25:19 +02:00
|
|
|
<div page-content>
|
2021-01-11 19:33:24 +01:00
|
|
|
<div header>
|
2022-07-13 19:25:19 +02:00
|
|
|
<admin-tabs tab="portal"></admin-tabs>
|
|
|
|
<ul class="uk-subnav uk-subnav-pill uk-margin-medium-top">
|
|
|
|
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
|
|
|
|
(click)="filterForm.get('type').setValue('all')"><span
|
|
|
|
class="title">All portals</span></a></li>
|
|
|
|
<li *ngFor="let type of portalUtils.portalTypes; let i=index"
|
|
|
|
[class.uk-active]="filterForm.get('type').value === type.value" class="uk-margin-small-bottom"><a
|
|
|
|
(click)="filterForm.get('type').setValue(type.value)"><span
|
|
|
|
class="title">{{type.label}}</span></a></li>
|
|
|
|
</ul>
|
2021-01-11 19:33:24 +01:00
|
|
|
</div>
|
2022-07-13 19:25:19 +02:00
|
|
|
<div actions>
|
|
|
|
<div class="uk-section-xsmall">
|
|
|
|
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
|
|
|
|
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer" placeholder="Search portal"
|
|
|
|
[disabled]="showLoading" colorClass="uk-text-secondary" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
|
|
|
<div>
|
|
|
|
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="newPortal()"
|
|
|
|
[disabled]="showLoading" [class.uk-disabled]="showLoading">
|
|
|
|
<icon name="add" [flex]="true"></icon>
|
|
|
|
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Add portal</span>
|
|
|
|
</button>
|
2022-04-07 20:28:45 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-30 17:22:35 +02:00
|
|
|
</div>
|
2022-07-13 19:25:19 +02:00
|
|
|
</div>
|
|
|
|
<div inner>
|
2022-06-30 17:22:35 +02:00
|
|
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
|
|
|
<div *ngIf="showLoading" class="uk-position-center">
|
|
|
|
<loading></loading>
|
|
|
|
</div>
|
|
|
|
<ng-container *ngIf="!showLoading">
|
|
|
|
<div *ngIf="checkboxes.length == 0"
|
|
|
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
|
|
|
<div>No portals found</div>
|
|
|
|
</div>
|
2022-06-24 17:20:40 +02:00
|
|
|
<table *ngIf="checkboxes.length > 0" class="uk-table uk-table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr class="uk-child-width-1-4">
|
|
|
|
<th>
|
|
|
|
<label>
|
|
|
|
<input id="checkAll" type="checkbox" (click)="toggleCheckBoxes($event)" class="uk-checkbox"
|
|
|
|
[ngModel]="getSelectedPortals().length ==checkboxes.length"/>
|
|
|
|
</label>
|
|
|
|
<span class="uk-margin-left">
|
|
|
|
<button class="uk-button uk-button-link" [class.uk-disabled]="getSelectedPortals().length == 0" [disabled]="getSelectedPortals().length == 0">
|
|
|
|
Bulk Actions ({{getSelectedPortals().length}})
|
|
|
|
</button>
|
|
|
|
<div uk-dropdown="mode: click">
|
2023-01-26 11:35:05 +01:00
|
|
|
<ul class="uk-nav uk-dropdown-nav uk-text-capitalize"
|
2022-06-24 17:20:40 +02:00
|
|
|
[attr.uk-tooltip]="getSelectedPortals().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
|
|
|
title="Select at least one entity">
|
|
|
|
<li>
|
2023-01-26 11:35:05 +01:00
|
|
|
<a (click)="confirmDeleteSelectedPortals()">Delete</a>
|
2022-06-24 17:20:40 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Type</th>
|
2023-01-26 11:35:05 +01:00
|
|
|
<th>Piwik</th>
|
2022-06-24 17:20:40 +02:00
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let check of checkboxes; let i=index">
|
|
|
|
<td><input id="{{check.portal._id}}" class="uk-checkbox" type="checkbox"
|
|
|
|
name="communitiescb[]" value="{{check.portal._id}}" [(ngModel)]="check.checked">
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="name" href="#">{{check.portal.name}}</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="type" href="#">{{check.portal.type}}</div>
|
|
|
|
</td>
|
2023-01-26 11:35:05 +01:00
|
|
|
<td>
|
|
|
|
<div class="name" href="#">{{check.portal.piwik}}</div>
|
|
|
|
</td>
|
2022-06-24 17:20:40 +02:00
|
|
|
<td>
|
2022-06-30 17:22:35 +02:00
|
|
|
<div class="uk-flex uk-flex-middle">
|
|
|
|
<icon class="clickable" [flex]="true" name="edit" [customClass]="'uk-text-primary'" (click)="editPortal(i)"></icon>
|
|
|
|
<icon class="clickable uk-margin-small-left" [flex]="true" [customClass]="'uk-text-danger'" name="delete" (click)="confirmDeletePortal(check.portal._id)"></icon>
|
2022-06-24 17:20:40 +02:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2021-01-11 10:21:42 +01:00
|
|
|
|
2022-06-24 17:20:40 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2022-06-30 17:22:35 +02:00
|
|
|
</ng-container>
|
|
|
|
</div>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
2021-01-11 19:33:24 +01:00
|
|
|
</div>
|
2021-01-28 17:33:16 +01:00
|
|
|
<modal-alert #editModal (alertOutput)="portalSaveConfirmed($event)"
|
2022-06-21 11:22:28 +02:00
|
|
|
[okDisabled]="portalForm && (portalForm.invalid || !portalForm.dirty)" classTitle="uk-background-primary uk-light">
|
2021-01-28 17:33:16 +01:00
|
|
|
<form *ngIf="portalForm" [formGroup]="portalForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
2022-04-11 11:27:10 +02:00
|
|
|
<div input [formInput]="portalForm.get('name')" placeholder="Portal Name"></div>
|
|
|
|
<div input [formInput]="portalForm.get('type')" placeholder="Portal Type"
|
|
|
|
[options]="portalUtils.portalTypes" type="select"></div>
|
|
|
|
<div input [formInput]="portalForm.get('pid')" placeholder="Portal persistent id for portal"></div>
|
|
|
|
<div input [formInput]="portalForm.get('piwik')" placeholder="Piwik ID"></div>
|
|
|
|
<div *ngIf="properties.environment == 'development'" input [formInput]="portalForm.get('twitterAccount')" placeholder="Twitter Account"></div>
|
2021-01-11 19:33:24 +01:00
|
|
|
</form>
|
2019-12-18 16:14:21 +01:00
|
|
|
|
2021-01-11 19:33:24 +01:00
|
|
|
</modal-alert>
|
2022-06-21 11:22:28 +02:00
|
|
|
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="confirmedDeletePortals($event)" classTitle="uk-background-primary uk-light"></modal-alert>
|