2019-12-18 16:14:21 +01:00
|
|
|
<div id="page_content" click-outside-or-esc targetId="page_content">
|
|
|
|
<!-- [escClose]="false"-->
|
|
|
|
<!-- (clickOutside)="toggleOpen($event)">-->
|
|
|
|
<div class="uk-padding-small md-bg-white" uk-grid>
|
|
|
|
|
|
|
|
<div class="uk-width-expand@m uk-width-1-1 uk-flex uk-flex-middle uk-flex-right">
|
|
|
|
<div class="uk-inline uk-width-medium">
|
|
|
|
<span class="uk-position-center-right"><i class="material-icons">search</i></span>
|
|
|
|
<div dashboard-input label="Locate indicator" [formInput]="formControl" label="Locate portal"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="page_content_inner">
|
|
|
|
|
|
|
|
<div class="menubar ">
|
|
|
|
<h4 class="uk-text-bold">Portals</h4>
|
|
|
|
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
|
|
|
<a class="uk-alert-close" uk-close></a>
|
|
|
|
{{updateErrorMessage}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content-wrapper" id="contentWrapper">
|
|
|
|
|
|
|
|
<div class="contentPanel">
|
|
|
|
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
|
|
|
role="alert">{{errorMessage}}</div>
|
|
|
|
<div [style.display]="showLoading ? 'inline' : 'none'"
|
|
|
|
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img
|
|
|
|
class="uk-align-center loading-gif"></div>
|
|
|
|
|
|
|
|
<div *ngIf="!errorMessage && !showLoading" class="page-controls">
|
|
|
|
<div class=" filters ">
|
|
|
|
<div class="show-options uk-float-right">
|
|
|
|
<button class="uk-button" type="button">Bulk Actions</button>
|
|
|
|
<div uk-dropdown="mode: click">
|
2020-10-30 15:01:44 +01:00
|
|
|
<ul class="uk-nav uk-margin-left"
|
2019-12-18 16:14:21 +01:00
|
|
|
[attr.uk-tooltip]="getSelectedCommunities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
2020-09-24 13:18:24 +02:00
|
|
|
title="Select at least one portal">
|
2019-12-18 16:14:21 +01:00
|
|
|
<li><a [class]="getSelectedCommunities().length == 0 ? 'uk-disabled' : ''"
|
|
|
|
(click)="confirmDeleteSelectedCommunities()"><i></i> Delete </a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading">
|
|
|
|
<div class="md-card-content">
|
|
|
|
<div class="uk-overflow-container">
|
|
|
|
<table class="uk-table uk-table-striped uk-table-hover">
|
|
|
|
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th><input id="allCommunityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
|
|
|
|
<th>Name</th>
|
2020-09-24 13:18:24 +02:00
|
|
|
<th>Type</th>
|
2019-12-18 16:14:21 +01:00
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let check of checkboxes; let i=index">
|
|
|
|
<td><input id="{{check.community._id}}" class="checkBox" type="checkbox"
|
|
|
|
name="communitiescb[]" value="{{check.community._id}}" [(ngModel)]="check.checked">
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="name" href="#">{{check.community.name}}</div>
|
|
|
|
</td>
|
2020-09-24 13:18:24 +02:00
|
|
|
<td>
|
|
|
|
<div class="type" href="#">{{check.community.type}}</div>
|
|
|
|
</td>
|
2019-12-18 16:14:21 +01:00
|
|
|
<td>
|
|
|
|
<div class="actions" href="#">
|
2020-10-30 15:01:44 +01:00
|
|
|
<i class="clickable" uk-icon="pencil" (click)="editCommunity(i)"></i>
|
|
|
|
<i class="clickable uk-text-danger" uk-icon="trash"
|
|
|
|
(click)="confirmDeleteCommunity(check.community._id)"></i>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
2020-10-30 15:01:44 +01:00
|
|
|
<div class="uk-width-small uk-button-default uk-button" (click)="newCommunity()">
|
|
|
|
<i class="" uk-icon="plus"></i>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
2020-09-24 13:18:24 +02:00
|
|
|
<div class="uk-alert-warning" uk-alert>No portals found</div>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<modal-alert #AlertModalSaveCommunity (alertOutput)="communitySaveConfirmed($event)"
|
|
|
|
[okDisabled]="portalFG && (portalFG.invalid || !portalFG.dirty)">
|
|
|
|
|
|
|
|
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
|
|
|
<form [formGroup]="portalFG">
|
|
|
|
<div dashboard-input class="uk-margin-small-left" [formInput]="portalFG.controls.name"
|
|
|
|
type="text"
|
2020-09-24 13:18:24 +02:00
|
|
|
label="Portal Name">
|
|
|
|
</div>
|
|
|
|
<div [ngClass]="{'has-error':!portalFG.controls.type.valid && portalFG.controls.type.dirty}">
|
|
|
|
<label for="portalTypeTag">*Portal Type</label>
|
|
|
|
<select formControlName="type" id="portalTypeTag" class="form-control uk-select">
|
2020-10-30 15:01:44 +01:00
|
|
|
<option *ngFor="let option of portalUtils.portalTypes" [value]="option.value">{{option.label}}</option>
|
2020-09-24 13:18:24 +02:00
|
|
|
</select>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
|
|
|
<div dashboard-input class="uk-margin-small-left " [formInput]="portalFG.controls.pid"
|
|
|
|
type="text"
|
2020-09-24 13:18:24 +02:00
|
|
|
label="Portal persistent id for portal">
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
2020-10-30 15:01:44 +01:00
|
|
|
<div dashboard-input class="uk-margin-small-left" [formInput]="portalFG.controls.piwik"
|
|
|
|
type="text"
|
|
|
|
label="Piwik id">
|
|
|
|
</div>
|
2019-12-18 16:14:21 +01:00
|
|
|
<input type="hidden" formControlName="_id">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</modal-alert>
|
|
|
|
|
|
|
|
|
|
|
|
<modal-alert #AlertModalDeleteCommunities (alertOutput)="confirmedDeleteCommunities($event)"></modal-alert>
|
|
|
|
</div>
|