1
|
<div id="page_content" click-outside-or-esc targetId="page_content">
|
2
|
<div class="uk-padding-small md-bg-white" uk-grid>
|
3
|
|
4
|
<div class="uk-width-expand@m uk-width-1-1 uk-flex uk-flex-middle uk-flex-right">
|
5
|
<div class="uk-inline uk-width-medium">
|
6
|
<span class="uk-position-center-right"><i class="material-icons">search</i></span>
|
7
|
<div dashboard-input [formInput]="filterForm" label="Find class"></div>
|
8
|
</div>
|
9
|
|
10
|
</div>
|
11
|
</div>
|
12
|
|
13
|
|
14
|
<div id="page_content_inner">
|
15
|
<div class="menubar ">
|
16
|
<h4 class="uk-text-bold">Predefined classes for contents</h4>
|
17
|
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
18
|
<a class="uk-alert-close" uk-close></a>
|
19
|
{{updateErrorMessage}}
|
20
|
</div>
|
21
|
|
22
|
</div>
|
23
|
|
24
|
<div class="content-wrapper" id="contentWrapper">
|
25
|
<div>
|
26
|
<div class="contentPanel">
|
27
|
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
28
|
role="alert">{{errorMessage}}</div>
|
29
|
<div [style.display]="showLoading ? 'inline' : 'none'"
|
30
|
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img
|
31
|
class="uk-align-center loading-gif"></div>
|
32
|
|
33
|
<div *ngIf="!errorMessage && !showLoading" class="page-controls">
|
34
|
<div class=" filters ">
|
35
|
<div class="show-options uk-float-right">
|
36
|
<button class="uk-button" type="button">Bulk Actions</button>
|
37
|
<div uk-dropdown="mode: click">
|
38
|
<ul class="uk-nav uk-navbar-dropdown-nav"
|
39
|
[attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
40
|
title="Select at least one class">
|
41
|
<li><a [class]="getSelectedDivIds().length == 0 ? 'uk-disabled' : ''"
|
42
|
(click)="confirmDeleteSelectedDivIds()"><i></i> Delete </a></li>
|
43
|
</ul>
|
44
|
</div>
|
45
|
</div>
|
46
|
</div>
|
47
|
</div>
|
48
|
|
49
|
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading">
|
50
|
<div class="md-card-content">
|
51
|
<div class="uk-overflow-container">
|
52
|
|
53
|
<table class="uk-table uk-table-striped">
|
54
|
<thead>
|
55
|
<tr>
|
56
|
<th><input id="allDivIdCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
|
57
|
<th>Name</th>
|
58
|
<th>Page</th>
|
59
|
<th>Actions</th>
|
60
|
</tr>
|
61
|
</thead>
|
62
|
<tbody>
|
63
|
<tr *ngFor="let check of checkboxes; let i=index">
|
64
|
<td><input id="{{check.divId._id}}" class="checkBox" type="checkbox"
|
65
|
name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked">
|
66
|
</td>
|
67
|
<td>
|
68
|
<div class="name" href="#">{{check.divId.name}}</div>
|
69
|
</td>
|
70
|
|
71
|
<td>
|
72
|
<div class="pages" href="#">
|
73
|
<span *ngFor="let page of check.divId.pages let i=index">{{page.name}}<span
|
74
|
*ngIf="i<(check.divId.pages.length-1)">, </span></span>
|
75
|
</div>
|
76
|
</td>
|
77
|
<td>
|
78
|
|
79
|
<div class="actions" href="#">
|
80
|
<i class="md-icon material-icons" (click)="editDivId(i)"></i>
|
81
|
<i class="material-icons md-icon"
|
82
|
(click)="confirmDeleteDivId(check.divId._id)">delete</i>
|
83
|
</div>
|
84
|
</td>
|
85
|
</tr>
|
86
|
</tbody>
|
87
|
</table>
|
88
|
|
89
|
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
90
|
<div class="uk-alert-warning uk-alert" >No classes found</div>
|
91
|
</div>
|
92
|
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
93
|
<div class="uk-width-small uk-flex uk-flex-center uk-button" (click)="newDivId()">
|
94
|
<i class="material-icons md-48">add</i>
|
95
|
</div>
|
96
|
</div>
|
97
|
</div>
|
98
|
</div>
|
99
|
</div>
|
100
|
</div>
|
101
|
</div>
|
102
|
</div>
|
103
|
</div>
|
104
|
</div>
|
105
|
|
106
|
|
107
|
<modal-alert #AlertModalSaveDivId (alertOutput)="divIdSaveConfirmed($event)"
|
108
|
[okDisabled]="myForm && (myForm.invalid || !myForm.dirty)">
|
109
|
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
110
|
<form [formGroup]="myForm">
|
111
|
|
112
|
<div dashboard-input class="uk-margin-small-left" [formInput]="myForm.get('name')"
|
113
|
type="text"
|
114
|
label="Class Name">
|
115
|
</div>
|
116
|
<mat-form-field class="example-chip-list uk-width-1-1 uk-margin-small-left">
|
117
|
<mat-chip-list #chipList aria-label="Page selection">
|
118
|
<mat-chip
|
119
|
*ngFor="let page of selectedPages"
|
120
|
[selectable]="true"
|
121
|
[removable]="true">
|
122
|
{{page.name}}
|
123
|
<span (click)="remove(page)"
|
124
|
class="mat-icon notranslate mat-chip-remove mat-chip-trailing-icon material-icons mat-icon-no-color ng-star-inserted">cancel</span>
|
125
|
</mat-chip>
|
126
|
<input placeholder="Add in pages..." #PageInput
|
127
|
[formControl]="pageSearchCtrl" [matAutocomplete]="auto" [matChipInputFor]="chipList">
|
128
|
</mat-chip-list>
|
129
|
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)">
|
130
|
<mat-option *ngFor="let page of filteredPages| async" [value]="page">
|
131
|
{{page.name}}
|
132
|
</mat-option>
|
133
|
</mat-autocomplete>
|
134
|
</mat-form-field>
|
135
|
|
136
|
<div class="form-group uk-margin-small-left">
|
137
|
<div class="uk-text-muted"> Select if this class exists in:</div>
|
138
|
<span dashboard-input class="" [formInput]="myForm.get('openaire')"
|
139
|
type="checkbox"
|
140
|
label="Explore Portal">
|
141
|
</span>
|
142
|
<span dashboard-input class="uk-margin-small-left" [formInput]="myForm.get('connect')"
|
143
|
type="checkbox"
|
144
|
label="Connect Portal">
|
145
|
</span>
|
146
|
<span dashboard-input class="uk-margin-small-left" [formInput]="myForm.get('communities')"
|
147
|
type="checkbox"
|
148
|
label="Communities Dashboards">
|
149
|
</span>
|
150
|
<!-- <mat-checkbox [formControl]="myForm.get('openaire')" >Explore Portal</mat-checkbox>-->
|
151
|
<!-- <input type="checkbox" id="openaire" formControlName="openaire"/> Explore Portal-->
|
152
|
<!-- <input type="checkbox" [formControl]="myForm.get('connect')" formControlName="connect"/> Connect Portal-->
|
153
|
<!-- <input type="checkbox" [formControl]="myForm.controls.communities"-->
|
154
|
<!-- formControlName="communities"/>Communities Dashboards-->
|
155
|
</div>
|
156
|
|
157
|
|
158
|
<input type="hidden" formControlName="_id">
|
159
|
</form>
|
160
|
|
161
|
</modal-alert>
|
162
|
|
163
|
|
164
|
<modal-alert #AlertModalDeleteDivIds (alertOutput)="confirmedDeleteDivIds($event)"></modal-alert>
|