187 lines
8.2 KiB
HTML
187 lines
8.2 KiB
HTML
<div id="page_content">
|
|
<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 [formInput]="filterForm" label="Find class"></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="page_content_inner">
|
|
<div class="menubar ">
|
|
<h4 class="uk-text-bold">Predefined classes for contents</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>
|
|
<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">
|
|
<ul class="uk-nav uk-margin-left"
|
|
[attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
|
title="Select at least one class">
|
|
<li><a [class]="getSelectedDivIds().length == 0 ? 'uk-disabled' : ''"
|
|
(click)="confirmDeleteSelectedDivIds()"><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">
|
|
<thead>
|
|
<tr>
|
|
<th><input id="allDivIdCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
|
|
<th>Name</th>
|
|
<th>Page</th>
|
|
<th *ngIf="selectedCommunityPid">Portal Type</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr *ngFor="let check of checkboxes; let i=index">
|
|
<td><input id="{{check.divId._id}}" class="checkBox" type="checkbox"
|
|
name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked">
|
|
</td>
|
|
<td>
|
|
<div class="name" href="#">{{check.divId.name}}</div>
|
|
</td>
|
|
<td *ngIf="!selectedCommunityPid">
|
|
<div class="portalType" href="#">{{check.divId.portalType}}</div>
|
|
</td>
|
|
<td>
|
|
<div class="pages" href="#">
|
|
<span *ngFor="let page of check.divId.pages let i=index">{{page.name}}<span
|
|
*ngIf="i<(check.divId.pages.length-1)">, </span></span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
<div class="actions" href="#">
|
|
<i class="clickable" uk-icon= "pencil" (click)="editDivId(i)"></i>
|
|
<i class="clickable uk-text-danger" uk-icon= "trash"
|
|
(click)="confirmDeleteDivId(check.divId._id)"></i>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
|
<div class="uk-alert-warning uk-alert" >No classes found</div>
|
|
</div>
|
|
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
|
<div class="uk-width-small uk-button uk-button-default" (click)="newDivId()">
|
|
<i class="" uk-icon= "plus"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<modal-alert #AlertModalSaveDivId (alertOutput)="divIdSaveConfirmed($event)"
|
|
[okDisabled]="myForm && (myForm.invalid || !myForm.dirty)">
|
|
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
|
<form [formGroup]="myForm">
|
|
|
|
<div dashboard-input class="uk-margin-small-left" [formInput]="myForm.get('name')"
|
|
type="text"
|
|
label="Class Name">
|
|
</div>
|
|
<mat-form-field class="example-chip-list uk-width-1-1 uk-margin-small-left">
|
|
<mat-chip-list #chipList aria-label="Page selection">
|
|
<mat-chip
|
|
*ngFor="let page of selectedPages"
|
|
[selectable]="true"
|
|
[removable]="true">
|
|
{{page.name}}
|
|
<span (click)="remove(page)"
|
|
class="mat-icon notranslate mat-chip-remove mat-chip-trailing-icon material-icons mat-icon-no-color ng-star-inserted">cancel</span>
|
|
</mat-chip>
|
|
<input placeholder="Add in pages..." #PageInput
|
|
[formControl]="pageSearchCtrl" [matAutocomplete]="auto" [matChipInputFor]="chipList">
|
|
</mat-chip-list>
|
|
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)">
|
|
<mat-option *ngFor="let page of filteredPages| async" [value]="page">
|
|
{{page.name}}
|
|
</mat-option>
|
|
</mat-autocomplete>
|
|
</mat-form-field>
|
|
|
|
<div [ngClass]="{'has-error':!myForm.controls.portalType.valid && myForm.controls.portalType.dirty}" class="form-group" uk-grid>
|
|
<label class="uk-width-1-1 uk-margin-small-bottom">
|
|
Class exists in:
|
|
</label>
|
|
<label class="uk-width-1-1 radio uk-margin-large-left">
|
|
<span class="uk-margin-small-right" style="font-weight: normal;">OpenAIRE portal</span>
|
|
<input type="radio" value="explore" formControlName="portalType">
|
|
</label>
|
|
<label class="uk-width-1-1 radio uk-margin-large-left">
|
|
<span class="uk-margin-small-right" style="font-weight: normal;">OpenAIRE Connect portal</span>
|
|
<input type="radio" value="connect" formControlName="portalType">
|
|
</label>
|
|
<label class="uk-width-1-1 radio uk-margin-large-left">
|
|
<span class="uk-margin-small-right" style="font-weight: normal;">Communities' Gateway</span>
|
|
<input type="radio" value="community" formControlName="portalType">
|
|
</label>
|
|
</div>
|
|
|
|
|
|
<!-- <div class="form-group uk-margin-small-left">-->
|
|
<!-- <div class="uk-text-muted"> Select if this class exists in:</div>-->
|
|
<!-- <span dashboard-input class="" [formInput]="myForm.get('openaire')"-->
|
|
<!-- type="checkbox"-->
|
|
<!-- label="Explore Portal">-->
|
|
<!-- </span>-->
|
|
<!-- <span dashboard-input class="uk-margin-small-left" [formInput]="myForm.get('connect')"-->
|
|
<!-- type="checkbox"-->
|
|
<!-- label="Connect Portal">-->
|
|
<!-- </span>-->
|
|
<!-- <span dashboard-input class="uk-margin-small-left" [formInput]="myForm.get('communities')"-->
|
|
<!-- type="checkbox"-->
|
|
<!-- label="Communities Dashboards">-->
|
|
<!-- </span>-->
|
|
<!--<!– <mat-checkbox [formControl]="myForm.get('openaire')" >Explore Portal</mat-checkbox>–>-->
|
|
<!--<!– <input type="checkbox" id="openaire" formControlName="openaire"/> Explore Portal–>-->
|
|
<!--<!– <input type="checkbox" [formControl]="myForm.get('connect')" formControlName="connect"/> Connect Portal–>-->
|
|
<!--<!– <input type="checkbox" [formControl]="myForm.controls.communities"–>-->
|
|
<!--<!– formControlName="communities"/>Communities Dashboards–>-->
|
|
<!-- </div>-->
|
|
|
|
|
|
<input type="hidden" formControlName="_id">
|
|
</form>
|
|
|
|
</modal-alert>
|
|
|
|
|
|
<modal-alert #AlertModalDeleteDivIds (alertOutput)="confirmedDeleteDivIds($event)"></modal-alert>
|