2021-01-11 19:33:24 +01:00
|
|
|
<div page-content class="admin-pages">
|
|
|
|
<div header>
|
|
|
|
<admin-tabs tab="portal"></admin-tabs>
|
2021-03-18 15:11:41 +01:00
|
|
|
<div *ngIf="!showLoading" class="uk-grid" uk-grid>
|
2021-01-11 19:33:24 +01:00
|
|
|
<div class="uk-width-1-1">
|
|
|
|
<ul class="uk-subnav uk-subnav-pill">
|
|
|
|
<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>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
2021-01-12 11:23:26 +01:00
|
|
|
<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>
|
2021-03-18 15:11:41 +01:00
|
|
|
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false"
|
|
|
|
placeholder="Search portal"
|
2021-02-02 13:29:18 +01:00
|
|
|
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
2021-03-18 15:11:41 +01:00
|
|
|
[bordered]="true" 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>
|
2021-01-12 11:23:26 +01:00
|
|
|
<div class="show-options">
|
2021-01-11 19:33:24 +01:00
|
|
|
<button class="uk-button uk-button-secondary">Bulk Actions</button>
|
|
|
|
<div uk-dropdown="mode: click">
|
2021-01-12 11:28:09 +01:00
|
|
|
<ul class="uk-nav uk-dropdown-nav"
|
2021-01-26 17:21:55 +01:00
|
|
|
[attr.uk-tooltip]="getSelectedPortals().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
2021-01-11 19:33:24 +01:00
|
|
|
title="Select at least one portal">
|
2021-01-26 17:21:55 +01:00
|
|
|
<li><a [class]="getSelectedPortals().length == 0 ? 'uk-disabled' : ''"
|
|
|
|
(click)="confirmDeleteSelectedPortals()"><i></i> Delete </a></li>
|
2021-01-11 19:33:24 +01:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-12 11:23:26 +01:00
|
|
|
<div>
|
2021-01-26 17:21:55 +01:00
|
|
|
<a (click)="newPortal()"
|
2021-01-11 19:33:24 +01:00
|
|
|
class="uk-flex uk-flex-middle uk-text-uppercase">
|
|
|
|
<button class="large uk-icon-button uk-button-secondary">
|
|
|
|
<icon name="add"></icon>
|
|
|
|
</button>
|
|
|
|
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add portal</button>
|
|
|
|
</a>
|
2021-01-11 10:21:42 +01:00
|
|
|
</div>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
2021-01-11 19:33:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div inner>
|
2021-03-18 15:11:41 +01:00
|
|
|
<div *ngIf="showLoading" class="uk-position-center">
|
|
|
|
<loading></loading>
|
|
|
|
</div>
|
2021-02-01 20:17:55 +01:00
|
|
|
<div *ngIf="!showLoading">
|
2021-03-18 15:11:41 +01:00
|
|
|
<table *ngIf="checkboxes.length > 0" class="uk-table uk-table-striped uk-table-hover">
|
|
|
|
<thead class="uk-card-header">
|
|
|
|
<tr>
|
|
|
|
<th><input id="allCommunityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let check of checkboxes; let i=index">
|
|
|
|
<td><input id="{{check.portal._id}}" class="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>
|
|
|
|
<td>
|
|
|
|
<div class="actions" href="#">
|
2022-01-13 14:46:22 +01:00
|
|
|
<icon class="clickable" name="edit" (click)="editPortal(i)"></icon>
|
|
|
|
<icon class="clickable uk-margin-small-left" [customClass]="'uk-text-danger'" name="remove" (click)="confirmDeletePortal(check.portal._id)"></icon>
|
2021-03-18 15:11:41 +01:00
|
|
|
</div>
|
|
|
|
</td>
|
2021-01-11 10:21:42 +01:00
|
|
|
|
2021-03-18 15:11:41 +01:00
|
|
|
</tr>
|
2021-01-11 10:21:42 +01:00
|
|
|
|
2021-03-18 15:11:41 +01:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<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>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-11 19:33:24 +01:00
|
|
|
</div>
|
2021-01-11 10:21:42 +01:00
|
|
|
|
2021-01-28 17:33:16 +01:00
|
|
|
<modal-alert #editModal (alertOutput)="portalSaveConfirmed($event)"
|
|
|
|
[okDisabled]="portalForm && (portalForm.invalid || !portalForm.dirty)">
|
|
|
|
<form *ngIf="portalForm" [formGroup]="portalForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
2021-03-18 15:11:41 +01:00
|
|
|
<div dashboard-input [formInput]="portalForm.get('name')" type="text" label="Portal Name"
|
|
|
|
placeholder="Write a name">
|
2021-01-11 19:33:24 +01:00
|
|
|
</div>
|
2021-03-18 15:11:41 +01:00
|
|
|
<div dashboard-input type="select" label="Portal Type" placeholder="Choose a type"
|
|
|
|
[formInput]="portalForm.get('type')" [options]="portalUtils.portalTypes"></div>
|
2021-01-28 17:33:16 +01:00
|
|
|
<div dashboard-input [formInput]="portalForm.get('pid')"
|
|
|
|
type="text" placeholder="Write pid of portal"
|
2021-01-11 19:33:24 +01:00
|
|
|
label="Portal persistent id for portal">
|
|
|
|
</div>
|
2021-01-28 17:33:16 +01:00
|
|
|
<div dashboard-input [formInput]="portalForm.get('piwik')"
|
|
|
|
type="text" placeholder="Write piwik id of portal"
|
2021-01-11 19:33:24 +01:00
|
|
|
label="Piwik id">
|
|
|
|
</div>
|
2021-10-21 11:45:49 +02:00
|
|
|
<div *ngIf="properties.environment == 'development'" dashboard-input [formInput]="portalForm.get('twitterAccount')" type="text"
|
2021-10-21 11:39:27 +02:00
|
|
|
placeholder="Write twitter account of portal" label="Twitter Account">
|
2021-10-21 11:45:49 +02:00
|
|
|
</div>
|
2021-01-11 19:33:24 +01:00
|
|
|
<input type="hidden" formControlName="_id">
|
|
|
|
</form>
|
2019-12-18 16:14:21 +01:00
|
|
|
|
2021-01-11 19:33:24 +01:00
|
|
|
</modal-alert>
|
2021-01-26 17:21:55 +01:00
|
|
|
<modal-alert #deleteModal (alertOutput)="confirmedDeletePortals($event)"></modal-alert>
|