Revision 60211
Added by Konstantinos Triantafyllou over 3 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/dashboard/divId/divIds.component.html | ||
---|---|---|
1 |
<div page-content> |
|
2 |
<admin-tabs tab = "class" header></admin-tabs> |
|
3 |
<div inner class="admin-pages"> |
|
4 |
<div *ngIf="!errorMessage && !showLoading" class="filters" uk-sticky="offset:150"> |
|
5 |
<div class="show-options uk-float-right"> |
|
6 |
<button class="uk-button uk-button-primary " type="button">Bulk Actions</button> |
|
7 |
<div uk-dropdown="mode: click"> |
|
8 |
<ul class="uk-nav uk-margin-left" |
|
9 |
[attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
10 |
title="Select at least one class"> |
|
11 |
<li><a [class]="getSelectedDivIds().length == 0 ? 'uk-disabled' : ''" |
|
12 |
(click)="confirmDeleteSelectedDivIds()"><i></i> Delete </a></li> |
|
1 |
<div page-content class="admin-pages"> |
|
2 |
<div header> |
|
3 |
<admin-tabs tab="class" header></admin-tabs> |
|
4 |
<div *ngIf="!errorMessage && !showLoading" class="uk-grid filters" uk-grid> |
|
5 |
<div class="uk-width-1-1"> |
|
6 |
<ul class="uk-subnav uk-subnav-pill"> |
|
7 |
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a |
|
8 |
(click)="filterForm.get('type').setValue('all')"><span |
|
9 |
class="title">All portals</span></a></li> |
|
10 |
<li *ngFor="let type of portalUtils.portalTypes; let i=index" |
|
11 |
[class.uk-active]="filterForm.get('type').value === type.value" class="uk-margin-small-bottom"><a |
|
12 |
(click)="filterForm.get('type').setValue(type.value)"><span |
|
13 |
class="title">{{type.label}}</span></a></li> |
|
13 | 14 |
</ul> |
14 | 15 |
</div> |
16 |
<div class="uk-width-1-1 uk-flex uk-flex-right uk-flex-middle"> |
|
17 |
<div search-input [control]="filterForm.controls.keyword" [showSearch]="false" placeholder="Search" |
|
18 |
[bordered]="true" colorClass="uk-text-secondary"></div> |
|
19 |
<div class="uk-margin-left show-options"> |
|
20 |
<button class="uk-button uk-button-secondary">Bulk Actions</button> |
|
21 |
<div uk-dropdown="mode: click"> |
|
22 |
<ul class="uk-nav uk-margin-left" |
|
23 |
[attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
24 |
title="Select at least one class"> |
|
25 |
<li><a [class]="getSelectedDivIds().length == 0 ? 'uk-disabled' : ''" |
|
26 |
(click)="confirmDeleteSelectedDivIds()"><i></i> Delete </a></li> |
|
27 |
</ul> |
|
28 |
</div> |
|
29 |
</div> |
|
30 |
<div class="uk-margin-left"> |
|
31 |
<a (click)="newDivId()" |
|
32 |
class="uk-flex uk-flex-middle uk-text-uppercase"> |
|
33 |
<button class="large uk-icon-button uk-button-secondary"> |
|
34 |
<icon name="add"></icon> |
|
35 |
</button> |
|
36 |
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add class</button> |
|
37 |
</a> |
|
38 |
</div> |
|
39 |
</div> |
|
15 | 40 |
</div> |
16 |
<div class="uk-inline uk-width-medium uk-float-right uk-margin-right" > |
|
17 |
<span class="uk-position-center-right"><i class="material-icons">search</i></span> |
|
18 |
<div dashboard-input [formInput]="filterForm.controls.keyword" |
|
19 |
placeholder="Search"></div> |
|
20 |
</div> |
|
21 |
<ul class="uk-subnav uk-subnav-pill subCategoriesTabs ignore admin " > |
|
22 |
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a |
|
23 |
(click)="filterForm.get('type').setValue('all')"><span |
|
24 |
class="title">All portals</span></a></li> |
|
25 |
<li *ngFor="let type of portalUtils.portalTypes; let i=index" |
|
26 |
[class.uk-active]="filterForm.get('type').value === type.value" class="uk-margin-small-bottom"><a |
|
27 |
(click)="filterForm.get('type').setValue(type.value)"><span |
|
28 |
class="title">{{type.label}}</span></a></li> |
|
29 |
</ul> |
|
30 | 41 |
</div> |
31 |
|
|
32 |
|
|
33 |
<div class="content-wrapper" id="contentWrapper">
|
|
34 |
<a *ngIf="!showLoading && !errorMessage" (click)="newDivId()"
|
|
35 |
class="uk-flex uk-flex-right uk-flex-middle uk-margin-small-bottom uk-width-1-1">
|
|
36 |
<div class="uk-button-default large uk-icon-button uk-margin-small-right" uk-icon="plus">
|
|
42 |
<div inner> |
|
43 |
<div> |
|
44 |
<div class="contentPanel">
|
|
45 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
|
46 |
<a class="uk-alert-close" uk-close></a>
|
|
47 |
{{updateErrorMessage}}
|
|
37 | 48 |
</div> |
38 |
Add class |
|
39 |
</a> |
|
40 |
<div> |
|
41 |
<div class="contentPanel"> |
|
42 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert> |
|
43 |
<a class="uk-alert-close" uk-close></a> |
|
44 |
{{updateErrorMessage}} |
|
45 |
</div> |
|
46 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top" |
|
47 |
role="alert">{{errorMessage}}</div> |
|
48 |
<div [style.display]="showLoading ? 'inline' : 'none'" |
|
49 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img |
|
49 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top" |
|
50 |
role="alert">{{errorMessage}}</div> |
|
51 |
<div [style.display]="showLoading ? 'inline' : 'none'" |
|
52 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img |
|
50 | 53 |
class="uk-align-center loading-gif"></div> |
51 | 54 |
|
52 |
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading">
|
|
53 |
<div class="md-card-content">
|
|
54 |
<div class="uk-overflow-container">
|
|
55 |
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading"> |
|
56 |
<div class="md-card-content"> |
|
57 |
<div class="uk-overflow-container"> |
|
55 | 58 |
|
56 |
<table class="uk-table uk-table-striped uk-table-large"> |
|
57 |
<thead class="form-header"> |
|
58 |
<tr> |
|
59 |
<th |
|
60 |
class="uk-width-small"><input id="allDivIdCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th> |
|
61 |
<th>Name</th> |
|
62 |
<th *ngIf="!selectedCommunityPid">Portal Type</th> |
|
63 |
<th>Page</th> |
|
64 |
<th>Actions</th> |
|
65 |
</tr> |
|
66 |
</thead> |
|
67 |
<tbody> |
|
68 |
<tr *ngFor="let check of checkboxes; let i=index"> |
|
69 |
<td><input id="{{check.divId._id}}" class="checkBox" type="checkbox" |
|
70 |
name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked"> |
|
71 |
</td> |
|
72 |
<td> |
|
73 |
<div class="name" href="#">{{check.divId.name}}</div> |
|
74 |
</td> |
|
75 |
<td *ngIf="!selectedCommunityPid"> |
|
76 |
<div class="portalType" href="#">{{check.divId.portalType}}</div> |
|
77 |
</td> |
|
78 |
<td> |
|
79 |
<div class="pages" href="#"> |
|
59 |
<table class="uk-table uk-table-striped uk-table-large"> |
|
60 |
<thead class="form-header"> |
|
61 |
<tr> |
|
62 |
<th |
|
63 |
class="uk-width-small"><input id="allDivIdCheckbox" type="checkbox" |
|
64 |
(change)="toggleCheckBoxes($event)"></th> |
|
65 |
<th>Name</th> |
|
66 |
<th *ngIf="!selectedCommunityPid">Portal Type</th> |
|
67 |
<th>Page</th> |
|
68 |
<th>Actions</th> |
|
69 |
</tr> |
|
70 |
</thead> |
|
71 |
<tbody> |
|
72 |
<tr *ngFor="let check of checkboxes; let i=index"> |
|
73 |
<td><input id="{{check.divId._id}}" class="checkBox" type="checkbox" |
|
74 |
name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked"> |
|
75 |
</td> |
|
76 |
<td> |
|
77 |
<div class="name" href="#">{{check.divId.name}}</div> |
|
78 |
</td> |
|
79 |
<td *ngIf="!selectedCommunityPid"> |
|
80 |
<div class="portalType" href="#">{{check.divId.portalType}}</div> |
|
81 |
</td> |
|
82 |
<td> |
|
83 |
<div class="pages" href="#"> |
|
80 | 84 |
<span *ngFor="let page of check.divId.pages let i=index">{{page.name}}<span |
81 |
*ngIf="i<(check.divId.pages.length-1)">, </span></span> |
|
82 |
</div>
|
|
83 |
</td>
|
|
84 |
<td>
|
|
85 |
*ngIf="i<(check.divId.pages.length-1)">, </span></span>
|
|
86 |
</div> |
|
87 |
</td> |
|
88 |
<td> |
|
85 | 89 |
|
86 |
<div class="actions" href="#">
|
|
87 |
<i class="clickable" uk-icon= "pencil" (click)="editDivId(i)"></i>
|
|
88 |
<i class="clickable uk-text-danger" uk-icon= "trash"
|
|
89 |
(click)="confirmDeleteDivId(check.divId._id)"></i>
|
|
90 |
</div>
|
|
91 |
</td>
|
|
92 |
</tr>
|
|
93 |
</tbody>
|
|
94 |
</table>
|
|
90 |
<div class="actions" href="#"> |
|
91 |
<i class="clickable" uk-icon="pencil" (click)="editDivId(i)"></i>
|
|
92 |
<i class="clickable uk-text-danger" uk-icon="trash"
|
|
93 |
(click)="confirmDeleteDivId(check.divId._id)"></i> |
|
94 |
</div> |
|
95 |
</td> |
|
96 |
</tr> |
|
97 |
</tbody> |
|
98 |
</table> |
|
95 | 99 |
|
96 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
97 |
<div class="uk-alert-warning uk-alert" >No classes found</div> |
|
100 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
101 |
<div class="uk-alert-warning uk-alert">No classes found</div> |
|
102 |
</div> |
|
103 |
<div class="uk-width-1-1 uk-flex uk-flex-center "> |
|
104 |
<div class="uk-width-small uk-button uk-button-default" (click)="newDivId()"> |
|
105 |
<i class="" uk-icon="plus"></i> |
|
98 | 106 |
</div> |
99 |
<div class="uk-width-1-1 uk-flex uk-flex-center "> |
|
100 |
<div class="uk-width-small uk-button uk-button-default" (click)="newDivId()"> |
|
101 |
<i class="" uk-icon= "plus"></i> |
|
102 |
</div> |
|
103 |
</div> |
|
104 | 107 |
</div> |
105 | 108 |
</div> |
106 | 109 |
</div> |
... | ... | |
108 | 111 |
</div> |
109 | 112 |
</div> |
110 | 113 |
</div> |
114 |
</div> |
|
111 | 115 |
|
112 | 116 |
<modal-alert #AlertModalSaveDivId (alertOutput)="divIdSaveConfirmed($event)" |
113 | 117 |
[okDisabled]="myForm && (myForm.invalid || !myForm.dirty)"> |
... | ... | |
121 | 125 |
<mat-form-field class="example-chip-list uk-width-1-1 uk-margin-small-left"> |
122 | 126 |
<mat-chip-list #chipList aria-label="Page selection"> |
123 | 127 |
<mat-chip |
124 |
*ngFor="let page of selectedPages" |
|
125 |
[selectable]="true" |
|
126 |
[removable]="true"> |
|
128 |
*ngFor="let page of selectedPages"
|
|
129 |
[selectable]="true"
|
|
130 |
[removable]="true">
|
|
127 | 131 |
{{page.name}} |
128 | 132 |
<span (click)="remove(page)" |
129 | 133 |
class=" notranslate mat-chip-remove mat-chip-trailing-icon " uk-icon="trash"></span> |
... | ... | |
138 | 142 |
</mat-autocomplete> |
139 | 143 |
</mat-form-field> |
140 | 144 |
|
141 |
<div [ngClass]="{'has-error':!myForm.controls.portalType.valid && myForm.controls.portalType.dirty}" class="form-group" uk-grid> |
|
145 |
<div [ngClass]="{'has-error':!myForm.controls.portalType.valid && myForm.controls.portalType.dirty}" |
|
146 |
class="form-group" uk-grid> |
|
142 | 147 |
<div class="uk-width-1-1 uk-margin-small-bottom uk-text-bold uk-form-label"> |
143 | 148 |
Class exists in: |
144 | 149 |
</div> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/dashboard/divId/divIds.module.ts | ||
---|---|---|
16 | 16 |
import {AdminTabsModule} from "../sharedComponents/admin-tabs/admin-tabs.module"; |
17 | 17 |
import {PageContentModule} from "../sharedComponents/page-content/page-content.module"; |
18 | 18 |
import {ClassesRoutingModule} from "./classes-routing.module"; |
19 |
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module"; |
|
20 |
import {IconsModule} from "../../utils/icons/icons.module"; |
|
21 |
import {IconsService} from "../../utils/icons/icons.service"; |
|
22 |
import {add} from "../../utils/icons/icons"; |
|
19 | 23 |
|
20 | 24 |
@NgModule({ |
21 | 25 |
imports: [ |
22 | 26 |
CommonModule, RouterModule, FormsModule, |
23 | 27 |
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, MatAutocompleteModule, MatFormFieldModule, MatChipsModule, |
24 |
MatCheckboxModule, AdminTabsModule, PageContentModule, ClassesRoutingModule |
|
28 |
MatCheckboxModule, AdminTabsModule, PageContentModule, ClassesRoutingModule, SearchInputModule, IconsModule
|
|
25 | 29 |
], |
26 | 30 |
declarations: [DivIdsComponent], |
27 | 31 |
exports: [DivIdsComponent] |
28 | 32 |
}) |
29 |
export class DivIdsModule { } |
|
33 |
export class DivIdsModule { |
|
34 |
constructor(private iconsService: IconsService) { |
|
35 |
this.iconsService.registerIcons([add]); |
|
36 |
} |
|
37 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/dashboard/portal/portals.component.html | ||
---|---|---|
1 |
<div page-content> |
|
2 |
<admin-tabs tab = "portal" header></admin-tabs> |
|
3 |
<div inner class="admin-pages"> |
|
4 |
<div *ngIf="!errorMessage && !showLoading" class="filters" uk-sticky="offset:150"> |
|
5 |
<div class="show-options uk-float-right"> |
|
6 |
<button class="uk-button uk-button-primary " type="button">Bulk Actions</button> |
|
7 |
<div uk-dropdown="mode: click"> |
|
8 |
<ul class="uk-nav uk-margin-left" |
|
9 |
[attr.uk-tooltip]="getSelectedCommunities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
10 |
title="Select at least one portal"> |
|
11 |
<li><a [class]="getSelectedCommunities().length == 0 ? 'uk-disabled' : ''" |
|
12 |
(click)="confirmDeleteSelectedCommunities()"><i></i> Delete </a></li> |
|
13 |
</ul> |
|
1 |
<div page-content class="admin-pages"> |
|
2 |
<div header> |
|
3 |
<admin-tabs tab="portal"></admin-tabs> |
|
4 |
<div *ngIf="!errorMessage && !showLoading" class="uk-grid filters" uk-grid> |
|
5 |
<div class="uk-width-1-1"> |
|
6 |
<ul class="uk-subnav uk-subnav-pill"> |
|
7 |
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a |
|
8 |
(click)="filterForm.get('type').setValue('all')"><span |
|
9 |
class="title">All portals</span></a></li> |
|
10 |
<li *ngFor="let type of portalUtils.portalTypes; let i=index" |
|
11 |
[class.uk-active]="filterForm.get('type').value === type.value" class="uk-margin-small-bottom"><a |
|
12 |
(click)="filterForm.get('type').setValue(type.value)"><span |
|
13 |
class="title">{{type.label}}</span></a></li> |
|
14 |
</ul> |
|
15 |
</div> |
|
16 |
<div class="uk-width-1-1 uk-flex uk-flex-right uk-flex-middle"> |
|
17 |
<div search-input [control]="filterForm.controls.keyword" [showSearch]="false" placeholder="Search page" |
|
18 |
[bordered]="true" colorClass="uk-text-secondary"></div> |
|
19 |
<div class="uk-margin-left show-options"> |
|
20 |
<button class="uk-button uk-button-secondary">Bulk Actions</button> |
|
21 |
<div uk-dropdown="mode: click"> |
|
22 |
<ul class="uk-nav uk-margin-left" |
|
23 |
[attr.uk-tooltip]="getSelectedCommunities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
24 |
title="Select at least one portal"> |
|
25 |
<li><a [class]="getSelectedCommunities().length == 0 ? 'uk-disabled' : ''" |
|
26 |
(click)="confirmDeleteSelectedCommunities()"><i></i> Delete </a></li> |
|
27 |
</ul> |
|
28 |
</div> |
|
14 | 29 |
</div> |
30 |
<div class="uk-margin-left"> |
|
31 |
<a (click)="newCommunity()" |
|
32 |
class="uk-flex uk-flex-middle uk-text-uppercase"> |
|
33 |
<button class="large uk-icon-button uk-button-secondary"> |
|
34 |
<icon name="add"></icon> |
|
35 |
</button> |
|
36 |
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add portal</button> |
|
37 |
</a> |
|
38 |
</div> |
|
15 | 39 |
</div> |
16 |
<div class="uk-inline uk-width-medium uk-float-right uk-margin-right" > |
|
17 |
<span class="uk-position-center-right"><i class="material-icons">search</i></span> |
|
18 |
<div dashboard-input [formInput]="filterForm.controls.keyword" |
|
19 |
placeholder="Search"></div> |
|
20 |
</div> |
|
21 |
<ul class="uk-subnav uk-subnav-pill subCategoriesTabs ignore admin " > |
|
22 |
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a |
|
23 |
(click)="filterForm.get('type').setValue('all')"><span |
|
24 |
class="title">All portals</span></a></li> |
|
25 |
<li *ngFor="let type of portalUtils.portalTypes; let i=index" |
|
26 |
[class.uk-active]="filterForm.get('type').value === type.value" class="uk-margin-small-bottom"><a |
|
27 |
(click)="filterForm.get('type').setValue(type.value)"><span |
|
28 |
class="title">{{type.label}}</span></a></li> |
|
29 |
</ul> |
|
30 | 40 |
</div> |
31 |
|
|
32 |
<div class="uk-margin-top"> |
|
33 |
<a *ngIf="!showLoading && !errorMessage" (click)="newCommunity()" |
|
34 |
class="uk-flex uk-flex-right uk-flex-middle uk-margin-small-bottom"> |
|
35 |
<div class="uk-button-default large uk-icon-button uk-margin-small-right" uk-icon="plus"> |
|
36 |
</div> |
|
37 |
Add portal |
|
38 |
</a> |
|
39 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert> |
|
40 |
<a class="uk-alert-close" uk-close></a> |
|
41 |
{{updateErrorMessage}} |
|
42 |
</div> |
|
43 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top" |
|
44 |
role="alert">{{errorMessage}}</div> |
|
45 |
<div [style.display]="showLoading ? 'inline' : 'none'" |
|
46 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img |
|
41 |
</div> |
|
42 |
<div inner> |
|
43 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert> |
|
44 |
<a class="uk-alert-close" uk-close></a> |
|
45 |
{{updateErrorMessage}} |
|
46 |
</div> |
|
47 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top" |
|
48 |
role="alert">{{errorMessage}}</div> |
|
49 |
<div [style.display]="showLoading ? 'inline' : 'none'" |
|
50 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img |
|
47 | 51 |
class="uk-align-center loading-gif"></div> |
48 | 52 |
|
49 | 53 |
|
54 |
<div class=" uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading"> |
|
50 | 55 |
|
51 |
<div class=" uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading"> |
|
56 |
<div class=""> |
|
57 |
<div class="uk-overflow-container"> |
|
58 |
<table class="uk-table uk-table-striped uk-table-hover"> |
|
59 |
<thead class="form-header"> |
|
60 |
<tr> |
|
61 |
<th><input id="allCommunityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th> |
|
62 |
<th>Name</th> |
|
63 |
<th>Type</th> |
|
64 |
<th>Actions</th> |
|
65 |
</tr> |
|
66 |
</thead> |
|
67 |
<tbody> |
|
68 |
<tr *ngFor="let check of checkboxes; let i=index"> |
|
69 |
<td><input id="{{check.community._id}}" class="checkBox" type="checkbox" |
|
70 |
name="communitiescb[]" value="{{check.community._id}}" [(ngModel)]="check.checked"> |
|
71 |
</td> |
|
72 |
<td> |
|
73 |
<div class="name" href="#">{{check.community.name}}</div> |
|
74 |
</td> |
|
75 |
<td> |
|
76 |
<div class="type" href="#">{{check.community.type}}</div> |
|
77 |
</td> |
|
78 |
<td> |
|
79 |
<div class="actions" href="#"> |
|
80 |
<i class="clickable" uk-icon="pencil" (click)="editCommunity(i)"></i> |
|
81 |
<i class="clickable uk-text-danger" uk-icon="trash" |
|
82 |
(click)="confirmDeleteCommunity(check.community._id)"></i> |
|
83 |
</div> |
|
84 |
</td> |
|
52 | 85 |
|
53 |
<div class=""> |
|
54 |
<div class="uk-overflow-container"> |
|
55 |
<table class="uk-table uk-table-striped uk-table-hover"> |
|
56 |
<thead class="form-header"> |
|
57 |
<tr> |
|
58 |
<th><input id="allCommunityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th> |
|
59 |
<th>Name</th> |
|
60 |
<th>Type</th> |
|
61 |
<th>Actions</th> |
|
62 |
</tr> |
|
63 |
</thead> |
|
64 |
<tbody> |
|
65 |
<tr *ngFor="let check of checkboxes; let i=index"> |
|
66 |
<td><input id="{{check.community._id}}" class="checkBox" type="checkbox" |
|
67 |
name="communitiescb[]" value="{{check.community._id}}" [(ngModel)]="check.checked"> |
|
68 |
</td> |
|
69 |
<td> |
|
70 |
<div class="name" href="#">{{check.community.name}}</div> |
|
71 |
</td> |
|
72 |
<td> |
|
73 |
<div class="type" href="#">{{check.community.type}}</div> |
|
74 |
</td> |
|
75 |
<td> |
|
76 |
<div class="actions" href="#"> |
|
77 |
<i class="clickable" uk-icon="pencil" (click)="editCommunity(i)"></i> |
|
78 |
<i class="clickable uk-text-danger" uk-icon="trash" |
|
79 |
(click)="confirmDeleteCommunity(check.community._id)"></i> |
|
80 |
</div> |
|
81 |
</td> |
|
86 |
</tr> |
|
82 | 87 |
|
83 |
</tr> |
|
84 |
|
|
85 |
</tbody> |
|
86 |
</table> |
|
87 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
88 |
<div class="uk-alert-warning" uk-alert>No portals found</div> |
|
88 |
</tbody> |
|
89 |
</table> |
|
90 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
91 |
<div class="uk-alert-warning" uk-alert>No portals found</div> |
|
92 |
</div> |
|
93 |
<!--<div class="uk-width-1-1 uk-flex uk-flex-center "> |
|
94 |
<div class="uk-width-small uk-button-default uk-button" (click)="newCommunity()"> |
|
95 |
<i class="" uk-icon="plus"></i> |
|
89 | 96 |
</div> |
90 |
<!--<div class="uk-width-1-1 uk-flex uk-flex-center "> |
|
91 |
<div class="uk-width-small uk-button-default uk-button" (click)="newCommunity()"> |
|
92 |
<i class="" uk-icon="plus"></i> |
|
93 |
</div> |
|
94 |
</div>--> |
|
95 |
</div> |
|
97 |
</div>--> |
|
96 | 98 |
</div> |
97 | 99 |
</div> |
98 | 100 |
</div> |
99 | 101 |
</div> |
100 |
</div>
|
|
102 |
</div> |
|
101 | 103 |
|
102 |
<modal-alert #AlertModalSaveCommunity (alertOutput)="communitySaveConfirmed($event)"
|
|
103 |
[okDisabled]="portalFG && (portalFG.invalid || !portalFG.dirty)">
|
|
104 |
<modal-alert #AlertModalSaveCommunity (alertOutput)="communitySaveConfirmed($event)" |
|
105 |
[okDisabled]="portalFG && (portalFG.invalid || !portalFG.dirty)"> |
|
104 | 106 |
|
105 |
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
|
106 |
<form [formGroup]="portalFG">
|
|
107 |
<div dashboard-input class="uk-margin-small-left" [formInput]="portalFG.controls.name"
|
|
108 |
type="text"
|
|
109 |
label="Portal Name">
|
|
110 |
</div>
|
|
111 |
<div [ngClass]="{'has-error':!portalFG.controls.type.valid && portalFG.controls.type.dirty}">
|
|
112 |
<label for="portalTypeTag">*Portal Type</label>
|
|
113 |
<select formControlName="type" id="portalTypeTag" class="form-control uk-select">
|
|
114 |
<option *ngFor="let option of portalUtils.portalTypes" [value]="option.value">{{option.label}}</option>
|
|
115 |
</select>
|
|
116 |
</div>
|
|
117 |
<div dashboard-input class="uk-margin-small-left " [formInput]="portalFG.controls.pid"
|
|
118 |
type="text"
|
|
119 |
label="Portal persistent id for portal">
|
|
120 |
</div>
|
|
121 |
<div dashboard-input class="uk-margin-small-left" [formInput]="portalFG.controls.piwik"
|
|
122 |
type="text"
|
|
123 |
label="Piwik id">
|
|
124 |
</div>
|
|
125 |
<input type="hidden" formControlName="_id">
|
|
126 |
</form>
|
|
107 |
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div> |
|
108 |
<form [formGroup]="portalFG"> |
|
109 |
<div dashboard-input class="uk-margin-small-left" [formInput]="portalFG.controls.name" |
|
110 |
type="text" |
|
111 |
label="Portal Name"> |
|
112 |
</div> |
|
113 |
<div [ngClass]="{'has-error':!portalFG.controls.type.valid && portalFG.controls.type.dirty}"> |
|
114 |
<label for="portalTypeTag">*Portal Type</label> |
|
115 |
<select formControlName="type" id="portalTypeTag" class="form-control uk-select"> |
|
116 |
<option *ngFor="let option of portalUtils.portalTypes" [value]="option.value">{{option.label}}</option> |
|
117 |
</select> |
|
118 |
</div> |
|
119 |
<div dashboard-input class="uk-margin-small-left " [formInput]="portalFG.controls.pid" |
|
120 |
type="text" |
|
121 |
label="Portal persistent id for portal"> |
|
122 |
</div> |
|
123 |
<div dashboard-input class="uk-margin-small-left" [formInput]="portalFG.controls.piwik" |
|
124 |
type="text" |
|
125 |
label="Piwik id"> |
|
126 |
</div> |
|
127 |
<input type="hidden" formControlName="_id"> |
|
128 |
</form> |
|
127 | 129 |
|
128 |
</modal-alert> |
|
129 |
<modal-alert #AlertModalDeleteCommunities (alertOutput)="confirmedDeleteCommunities($event)"></modal-alert> |
|
130 |
</modal-alert> |
|
131 |
<modal-alert #AlertModalDeleteCommunities (alertOutput)="confirmedDeleteCommunities($event)"></modal-alert> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/dashboard/portal/portals.module.ts | ||
---|---|---|
9 | 9 |
import {AdminTabsModule} from "../sharedComponents/admin-tabs/admin-tabs.module"; |
10 | 10 |
import {PageContentModule} from "../sharedComponents/page-content/page-content.module"; |
11 | 11 |
import {PortalsRoutingModule} from "./portals-routing.module"; |
12 |
import {IconsService} from "../../utils/icons/icons.service"; |
|
13 |
import {add} from "../../utils/icons/icons"; |
|
14 |
import {IconsModule} from "../../utils/icons/icons.module"; |
|
15 |
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module"; |
|
12 | 16 |
|
13 | 17 |
@NgModule({ |
14 | 18 |
imports: [ |
15 | 19 |
CommonModule, FormsModule, AlertModalModule, |
16 | 20 |
ReactiveFormsModule, |
17 |
RouterModule, AdminToolServiceModule, InputModule, AdminTabsModule, PageContentModule, PortalsRoutingModule |
|
21 |
RouterModule, AdminToolServiceModule, InputModule, AdminTabsModule, PageContentModule, PortalsRoutingModule, IconsModule, SearchInputModule
|
|
18 | 22 |
], |
19 | 23 |
declarations: [PortalsComponent], |
20 | 24 |
exports: [PortalsComponent] |
21 | 25 |
}) |
22 |
export class PortalsModule { } |
|
26 |
export class PortalsModule { |
|
27 |
constructor(private iconsService: IconsService) { |
|
28 |
this.iconsService.registerIcons([add]); |
|
29 |
} |
|
30 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/dashboard/entity/entities.component.html | ||
---|---|---|
1 |
<div page-content> |
|
2 |
<admin-tabs tab = "entity" [portal]="selectedCommunityPid" header></admin-tabs> |
|
3 |
<div inner class="admin-pages"> |
|
4 |
<div *ngIf="!errorMessage && !showLoading" class="filters" uk-sticky="offset:150"> |
|
5 |
<div class="show-options uk-float-right"> |
|
6 |
<button class="uk-button uk-button-primary " type="button">Bulk Actions</button> |
|
7 |
<div uk-dropdown="mode: click"> |
|
8 |
<ul class="uk-nav uk-margin-left" |
|
9 |
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
10 |
title="Select at least one entity"> |
|
11 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
12 |
(click)="toggleEntities(true, getSelectedEntities())"><i></i> Activate |
|
13 |
</a></li> |
|
14 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
15 |
(click)="toggleEntities(false, getSelectedEntities())"><i></i> Deactivate |
|
16 |
</a></li> |
|
17 |
<li *ngIf="isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
18 |
(click)="confirmDeleteSelectedEntities()"><i></i> Delete </a></li> |
|
19 |
</ul> |
|
1 |
<div page-content class="admin-pages"> |
|
2 |
<div header> |
|
3 |
<admin-tabs tab="entity" [portal]="selectedCommunityPid"></admin-tabs> |
|
4 |
<div *ngIf="!errorMessage && !showLoading" class="uk-grid filters" uk-grid> |
|
5 |
<div class="uk-width-1-1"> |
|
6 |
<ul *ngIf="!isPortalAdministrator" class="uk-subnav uk-subnav-pill"> |
|
7 |
<li [class.uk-active]="filterForm.get('status').value === 'all'"><a |
|
8 |
(click)="filterForm.get('status').setValue('all')"><span |
|
9 |
class="title">All entities</span></a></li> |
|
10 |
<li [class.uk-active]="filterForm.get('status').value === 'enabled'"><a |
|
11 |
(click)="filterForm.get('status').setValue('enabled')"><span class="title">Enabled</span></a></li> |
|
12 |
<li [class.uk-active]="filterForm.get('status').value === 'disabled'"><a |
|
13 |
(click)="filterForm.get('status').setValue('disabled')"><span class="title">Disabled</span></a></li> |
|
14 |
</ul> |
|
15 |
</div> |
|
16 |
<div class="uk-width-1-1 uk-flex uk-flex-right uk-flex-middle"> |
|
17 |
<div search-input [control]="filterForm.controls.keyword" [showSearch]="false" placeholder="Search entity" |
|
18 |
[bordered]="true" colorClass="uk-text-secondary"></div> |
|
19 |
<div class="uk-margin-left show-options"> |
|
20 |
<button class="uk-button uk-button-secondary">Bulk Actions</button> |
|
21 |
<div uk-dropdown="mode: click"> |
|
22 |
<ul class="uk-nav uk-margin-left" |
|
23 |
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
24 |
title="Select at least one entity"> |
|
25 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
26 |
(click)="toggleEntities(true, getSelectedEntities())"><i></i> |
|
27 |
Activate |
|
28 |
</a></li> |
|
29 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
30 |
(click)="toggleEntities(false, getSelectedEntities())"><i></i> |
|
31 |
Deactivate |
|
32 |
</a></li> |
|
33 |
<li *ngIf="isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''" |
|
34 |
(click)="confirmDeleteSelectedEntities()"><i></i> Delete </a></li> |
|
35 |
</ul> |
|
36 |
</div> |
|
20 | 37 |
</div> |
38 |
<div *ngIf="isPortalAdministrator" class="uk-margin-left"> |
|
39 |
<a (click)="newEntity()" |
|
40 |
class="uk-flex uk-flex-middle uk-text-uppercase"> |
|
41 |
<button class="large uk-icon-button uk-button-secondary"> |
|
42 |
<icon name="add"></icon> |
|
43 |
</button> |
|
44 |
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add entity</button> |
|
45 |
</a> |
|
46 |
</div> |
|
21 | 47 |
</div> |
22 |
<div class="uk-float-right uk-margin-right uk-width-medium"> |
|
23 |
<div dashboard-input [formInput]="filterForm.controls.keyword" placeholder="search entity"></div> |
|
24 |
</div> |
|
25 |
<ul *ngIf="!isPortalAdministrator" class="uk-subnav uk-subnav-pill subCategoriesTabs ignore admin " > |
|
26 |
<li [class.uk-active]="filterForm.get('status').value === 'all'"><a |
|
27 |
(click)="filterForm.get('status').setValue('all')"><span |
|
28 |
class="title">All entities</span></a></li> |
|
29 |
<li [class.uk-active]="filterForm.get('status').value === 'enabled'"><a (click)="filterForm.get('status').setValue('enabled')"><span class="title">Enabled</span></a></li> |
|
30 |
<li [class.uk-active]="filterForm.get('status').value === 'disabled'"><a (click)="filterForm.get('status').setValue('disabled')"><span class="title">Disabled</span></a></li> |
|
31 |
</ul> |
|
32 |
|
|
33 | 48 |
</div> |
34 |
|
|
35 |
<div class="content-wrapper" id="contentWrapper"> |
|
36 |
<a *ngIf="!showLoading && isPortalAdministrator && !errorMessage" (click)="newEntity()" |
|
37 |
class="uk-flex uk-flex-right uk-flex-middle uk-margin-small-bottom"> |
|
38 |
<div class="uk-button-default large uk-icon-button uk-margin-small-right" uk-icon="plus"> |
|
49 |
</div> |
|
50 |
<div inner> |
|
51 |
<div class="contentPanel "> |
|
52 |
<div *ngIf="!isPortalAdministrator" class="uk-alert uk-alert-primary uk-margin-top-large"> |
|
53 |
<div> |
|
54 |
<span class="uk-margin-small-right uk-icon" uk-icon="warning"></span> |
|
55 |
Disable an entity to hide it from community dashboard portal. |
|
39 | 56 |
</div> |
40 |
Add entity |
|
41 |
</a> |
|
42 |
<div class="contentPanel "> |
|
43 |
<div *ngIf="!isPortalAdministrator" class="uk-alert uk-alert-primary uk-margin-top-large"> |
|
44 |
<div> |
|
45 |
<span class="uk-margin-small-right uk-icon" uk-icon="warning"></span> |
|
46 |
Disable an entity to hide it from community dashboard portal. |
|
47 |
</div> |
|
48 |
<div |
|
49 |
class="uk-text-small">If an entity is disabled, all related search and advanced search pages will be hidden from the community dashborad and a message "Can't find that page" will appear in case the url of that page is loaded. If the related page belongs to the menu the link will be removed from menu, too. |
|
50 |
</div> |
|
57 |
<div |
|
58 |
class="uk-text-small">If an entity is disabled, all related search and advanced search pages will be |
|
59 |
hidden from the community dashborad and a message "Can't find that page" will appear in case the url of that |
|
60 |
page is loaded. If the related page belongs to the menu the link will be removed from menu, too. |
|
61 |
</div> |
|
51 | 62 |
|
52 |
</div>
|
|
53 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
|
54 |
<a class="uk-alert-close" uk-close></a>
|
|
55 |
{{updateErrorMessage}}
|
|
56 |
</div>
|
|
57 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
|
58 |
role="alert">{{errorMessage}}</div>
|
|
59 |
<div [style.display]="showLoading ? 'inline' : 'none'"
|
|
60 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img
|
|
61 |
class="uk-align-center loading-gif"></div>
|
|
63 |
</div> |
|
64 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert> |
|
65 |
<a class="uk-alert-close" uk-close></a> |
|
66 |
{{updateErrorMessage}} |
|
67 |
</div> |
|
68 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top" |
|
69 |
role="alert">{{errorMessage}}</div> |
|
70 |
<div [style.display]="showLoading ? 'inline' : 'none'" |
|
71 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img |
|
72 |
class="uk-align-center loading-gif"></div> |
|
62 | 73 |
|
63 | 74 |
|
64 |
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading">
|
|
65 |
<div class="md-card-content">
|
|
66 |
<div class="uk-overflow-container">
|
|
67 |
<table class="uk-table uk-table-striped uk-table-hover uk-table-large">
|
|
68 |
<thead class="form-header">
|
|
69 |
<tr>
|
|
70 |
<th
|
|
71 |
class="uk-width-small"><input id="allEntityCheckbox" type="checkbox"
|
|
72 |
(change)="toggleCheckBoxes($event)"></th> |
|
73 |
<th>Name</th>
|
|
74 |
<th *ngIf="!isPortalAdministrator">Status</th>
|
|
75 |
<th *ngIf="!isPortalAdministrator">Enable/Disable</th>
|
|
76 |
<th *ngIf="isPortalAdministrator">Actions</th>
|
|
77 |
</tr>
|
|
78 |
</thead>
|
|
79 |
<tbody>
|
|
80 |
<tr *ngFor="let check of checkboxes; let i=index">
|
|
81 |
<td><input id="{{check.entity._id}}" class="checkBox" type="checkbox"
|
|
82 |
name="entitiescb[]" value="{{check.entity._id}}" [(ngModel)]="check.checked">
|
|
83 |
</td>
|
|
84 |
<td>
|
|
85 |
<div class="name" href="#">{{check.entity.name}}</div>
|
|
86 |
</td>
|
|
87 |
<td *ngIf="!isPortalAdministrator">
|
|
88 |
<div class="name" href="#">{{check.entity.isEnabled?"Enabled":"Disabled"}}</div>
|
|
89 |
</td>
|
|
90 |
<td *ngIf="!isPortalAdministrator">
|
|
91 |
<mat-slide-toggle [checked]="check.entity.isEnabled"
|
|
92 |
(change)="($event.source.checked = check.entity.isEnabled);toggleEntities(!check.entity.isEnabled,[check.entity._id])"></mat-slide-toggle>
|
|
93 |
</td>
|
|
75 |
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading"> |
|
76 |
<div class="md-card-content"> |
|
77 |
<div class="uk-overflow-container"> |
|
78 |
<table class="uk-table uk-table-striped uk-table-hover uk-table-large"> |
|
79 |
<thead class="form-header"> |
|
80 |
<tr> |
|
81 |
<th |
|
82 |
class="uk-width-small"><input id="allEntityCheckbox" type="checkbox" |
|
83 |
(change)="toggleCheckBoxes($event)"></th>
|
|
84 |
<th>Name</th> |
|
85 |
<th *ngIf="!isPortalAdministrator">Status</th> |
|
86 |
<th *ngIf="!isPortalAdministrator">Enable/Disable</th> |
|
87 |
<th *ngIf="isPortalAdministrator">Actions</th> |
|
88 |
</tr> |
|
89 |
</thead> |
|
90 |
<tbody> |
|
91 |
<tr *ngFor="let check of checkboxes; let i=index"> |
|
92 |
<td><input id="{{check.entity._id}}" class="checkBox" type="checkbox" |
|
93 |
name="entitiescb[]" value="{{check.entity._id}}" [(ngModel)]="check.checked"> |
|
94 |
</td> |
|
95 |
<td> |
|
96 |
<div class="name" href="#">{{check.entity.name}}</div> |
|
97 |
</td> |
|
98 |
<td *ngIf="!isPortalAdministrator"> |
|
99 |
<div class="name" href="#">{{check.entity.isEnabled ? "Enabled" : "Disabled"}}</div>
|
|
100 |
</td> |
|
101 |
<td *ngIf="!isPortalAdministrator"> |
|
102 |
<mat-slide-toggle [checked]="check.entity.isEnabled" |
|
103 |
(change)="($event.source.checked = check.entity.isEnabled);toggleEntities(!check.entity.isEnabled,[check.entity._id])"></mat-slide-toggle> |
|
104 |
</td> |
|
94 | 105 |
|
95 |
<td *ngIf="isPortalAdministrator"> |
|
96 |
<div class="actions" href="#"> |
|
97 |
<i class="clickable " uk-icon="pencil" (click)="editEntity(i)"></i> |
|
98 |
<i class="clickable uk-text-danger" uk-icon="trash" |
|
99 |
(click)="confirmDeleteEntity(check.entity._id)"></i> |
|
100 |
</div> |
|
101 |
</td> |
|
102 |
</tr> |
|
103 |
</tbody> |
|
104 |
</table> |
|
105 |
<div class="uk-width-1-1 uk-flex uk-flex-center " *ngIf="isPortalAdministrator"> |
|
106 |
<div class="uk-width-small uk-button uk-button-default" (click)="newEntity()"> |
|
107 |
<i class="" uk-icon="plus"></i> |
|
106 |
<td *ngIf="isPortalAdministrator"> |
|
107 |
<div class="actions" href="#"> |
|
108 |
<i class="clickable " uk-icon="pencil" (click)="editEntity(i)"></i> |
|
109 |
<i class="clickable uk-text-danger" uk-icon="trash" |
|
110 |
(click)="confirmDeleteEntity(check.entity._id)"></i> |
|
108 | 111 |
</div> |
109 |
</div> |
|
110 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
111 |
<div class="uk-alert-warning" uk-alert>No entities found</div> |
|
112 |
</div> |
|
112 |
</td> |
|
113 |
</tr> |
|
114 |
</tbody> |
|
115 |
</table> |
|
116 |
<div class="uk-width-1-1 uk-flex uk-flex-center " *ngIf="isPortalAdministrator"> |
|
117 |
<div class="uk-width-small uk-button uk-button-default" (click)="newEntity()"> |
|
118 |
<i class="" uk-icon="plus"></i> |
|
113 | 119 |
</div> |
114 | 120 |
</div> |
115 |
|
|
121 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
122 |
<div class="uk-alert-warning" uk-alert>No entities found</div> |
|
123 |
</div> |
|
116 | 124 |
</div> |
117 | 125 |
</div> |
126 |
|
|
127 |
</div> |
|
118 | 128 |
</div> |
119 | 129 |
</div> |
120 | 130 |
</div> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/dashboard/entity/entities.module.ts | ||
---|---|---|
10 | 10 |
import {PageContentModule} from "../sharedComponents/page-content/page-content.module"; |
11 | 11 |
import {AdminTabsModule} from "../sharedComponents/admin-tabs/admin-tabs.module"; |
12 | 12 |
import {EntitiesRoutingModule} from "./entities-routing.module"; |
13 |
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module"; |
|
14 |
import {IconsModule} from "../../utils/icons/icons.module"; |
|
15 |
import {IconsService} from "../../utils/icons/icons.service"; |
|
16 |
import {add} from "../../utils/icons/icons"; |
|
13 | 17 |
|
14 | 18 |
@NgModule({ |
15 | 19 |
imports: [ |
16 | 20 |
CommonModule, RouterModule, FormsModule, AdminToolServiceModule, |
17 |
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, EntitiesRoutingModule |
|
21 |
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, EntitiesRoutingModule, SearchInputModule, IconsModule
|
|
18 | 22 |
], |
19 | 23 |
declarations: [EntitiesComponent], |
20 | 24 |
exports: [EntitiesComponent] |
21 | 25 |
}) |
22 |
export class EntitiesModule { } |
|
26 |
export class EntitiesModule { |
|
27 |
constructor(private iconsService: IconsService) { |
|
28 |
this.iconsService.registerIcons([add]); |
|
29 |
} |
|
30 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/dashboard/page/pages.component.html | ||
---|---|---|
1 |
<div page-content> |
|
2 |
<admin-tabs tab = "page" [portal]="selectedCommunityPid" header></admin-tabs> |
|
3 |
<div inner class="admin-pages"> |
|
4 |
<div *ngIf="!errorMessage && !showLoading" class="filters" uk-sticky="offset:150"> |
|
5 |
<div class="show-options uk-float-right"> |
|
6 |
<button class="uk-button uk-button-primary " type="button">Bulk Actions</button> |
|
7 |
<div uk-dropdown="mode: click"> |
|
8 |
<ul class="uk-nav uk-margin-left" |
|
9 |
[attr.uk-tooltip]="getSelectedPages().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
10 |
title="Select at least one page"> |
|
11 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''" |
|
12 |
(click)="togglePages(true, getSelectedPages())"> Activate |
|
13 |
</a></li> |
|
14 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''" |
|
15 |
(click)="togglePages(false, getSelectedPages())"> Deactivate |
|
16 |
</a></li> |
|
17 |
<li *ngIf="isPortalAdministrator"><a (click)="confirmDeleteSelectedPages()"> Delete </a></li> |
|
18 |
</ul> |
|
1 |
<div page-content class="admin-pages"> |
|
2 |
<div header> |
|
3 |
<admin-tabs tab="page" [portal]="selectedCommunityPid"></admin-tabs> |
|
4 |
<div *ngIf="!errorMessage && !showLoading" class="uk-grid filters" uk-grid> |
|
5 |
<div class="uk-width-1-1"> |
|
6 |
<ul class="uk-subnav uk-subnav-pill"> |
|
7 |
<li [class.uk-active]="filterForm.get('type').value === 'all'"><a |
|
8 |
(click)="filterForm.get('type').setValue('all')"><span |
|
9 |
class="title">All pages</span></a></li> |
|
10 |
<li *ngFor="let type of typeOptions; let i=index" |
|
11 |
[class.uk-active]="filterForm.get('type').value === type.value"><a |
|
12 |
(click)="filterForm.get('type').setValue(type.value)"><span |
|
13 |
class="title">{{type.label}}</span></a></li> |
|
14 |
</ul> |
|
15 |
</div> |
|
16 |
<div class="uk-width-1-1 uk-flex uk-flex-right uk-flex-middle"> |
|
17 |
<div search-input [control]="filterForm.controls.keyword" [showSearch]="false" placeholder="Search page" |
|
18 |
[bordered]="true" colorClass="uk-text-secondary"></div> |
|
19 |
<div class="uk-margin-left show-options"> |
|
20 |
<button class="uk-button uk-button-secondary">Bulk Actions</button> |
|
21 |
<div uk-dropdown="mode: click"> |
|
22 |
<ul class="uk-nav uk-margin-left" |
|
23 |
[attr.uk-tooltip]="getSelectedPages().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" |
|
24 |
title="Select at least one page"> |
|
25 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''" |
|
26 |
(click)="togglePages(true, getSelectedPages())"> Activate |
|
27 |
</a></li> |
|
28 |
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''" |
|
29 |
(click)="togglePages(false, getSelectedPages())"> Deactivate |
|
30 |
</a></li> |
|
31 |
<li *ngIf="isPortalAdministrator"><a (click)="confirmDeleteSelectedPages()"> Delete </a></li> |
|
32 |
</ul> |
|
33 |
</div> |
|
19 | 34 |
</div> |
35 |
<div *ngIf="isPortalAdministrator" class="uk-margin-left"> |
|
36 |
<a (click)="newPage()" |
|
37 |
class="uk-flex uk-flex-middle uk-text-uppercase"> |
|
38 |
<button class="large uk-icon-button uk-button-secondary"> |
|
39 |
<icon name="add"></icon> |
|
40 |
</button> |
|
41 |
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add page</button> |
|
42 |
</a> |
|
43 |
</div> |
|
20 | 44 |
</div> |
21 |
<div class="uk-inline uk-width-medium uk-float-right uk-margin-right"> |
|
22 |
<div dashboard-input [formInput]="filterForm.controls.keyword" placeholder="search page" ></div> |
|
23 |
</div> |
|
24 |
<ul class="uk-subnav uk-subnav-pill subCategoriesTabs ignore admin " > |
|
25 |
<li [class.uk-active]="filterForm.get('type').value === 'all'"><a |
|
26 |
(click)="filterForm.get('type').setValue('all')"><span |
|
27 |
class="title">All pages</span></a></li> |
|
28 |
<li *ngFor="let type of typeOptions; let i=index" |
|
29 |
[class.uk-active]="filterForm.get('type').value === type.value"><a |
|
30 |
(click)="filterForm.get('type').setValue(type.value)"><span |
|
31 |
class="title">{{type.label}}</span></a></li> |
|
32 |
</ul> |
|
33 |
<!-- <input class="uk-width-1-1 "--> |
|
34 |
<!-- placeholder="SEARCH FOR A COUNTRY" type="text" autocomplete="off" role="combobox" aria-autocomplete="list" aria-expanded="false" aria-haspopup="true">--> |
|
35 | 45 |
</div> |
36 |
|
|
37 |
<div class="content-wrapper uk-margin-top" id="contentWrapper"> |
|
38 |
<a *ngIf="!showLoading && isPortalAdministrator && !errorMessage" (click)="newPage()" |
|
39 |
class="uk-flex uk-flex-right uk-flex-middle uk-margin-small-bottom uk-width-1-1"> |
|
40 |
<div class="uk-button-default large uk-icon-button uk-margin-small-right" uk-icon="plus"> |
|
46 |
</div> |
|
47 |
<div inner> |
|
48 |
<div class="contentPanel "> |
|
49 |
<div *ngIf="!isPortalAdministrator" class="uk-alert uk-alert-primary uk-margin-top-large"> |
|
50 |
<div> |
|
51 |
<span class="uk-margin-small-right uk-icon" uk-icon="warning"></span> |
|
52 |
Disable a page to hide it from community dashboard portal. |
|
41 | 53 |
</div> |
42 |
Add page |
|
43 |
</a> |
|
44 |
<div class="contentPanel "> |
|
45 |
<div *ngIf="!isPortalAdministrator" class="uk-alert uk-alert-primary uk-margin-top-large"> |
|
46 |
<div> |
|
47 |
<span class="uk-margin-small-right uk-icon" uk-icon="warning"></span> |
|
48 |
Disable a page to hide it from community dashboard portal. |
|
49 |
</div> |
|
50 |
<div |
|
51 |
class="uk-text-small">If the page is disabled, a message "Can't find that page" will appear in case the url of that page is loaded. If the disabled page belongs to the menu, the link will be removed from menu, too. |
|
52 |
</div> |
|
54 |
<div |
|
55 |
class="uk-text-small">If the page is disabled, a message "Can't find that page" will appear in case the url |
|
56 |
of that page is loaded. If the disabled page belongs to the menu, the link will be removed from menu, too. |
|
57 |
</div> |
|
53 | 58 |
|
54 |
</div>
|
|
55 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
|
56 |
<a class="uk-alert-close" uk-close></a>
|
|
57 |
{{updateErrorMessage}}
|
|
58 |
</div>
|
|
59 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
|
60 |
role="alert">{{errorMessage}}</div>
|
|
61 |
<div [style.display]="showLoading ? 'inline' : 'none'"
|
|
62 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img
|
|
59 |
</div> |
|
60 |
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert> |
|
61 |
<a class="uk-alert-close" uk-close></a> |
|
62 |
{{updateErrorMessage}} |
|
63 |
</div> |
|
64 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top" |
|
65 |
role="alert">{{errorMessage}}</div> |
|
66 |
<div [style.display]="showLoading ? 'inline' : 'none'" |
|
67 |
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img |
|
63 | 68 |
class="uk-align-center loading-gif"></div> |
64 |
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading">
|
|
65 |
<div class="md-card-content">
|
|
66 |
<div class="uk-overflow-container">
|
|
67 |
<ul class="uk-list pages">
|
|
68 |
<li *ngFor="let check of checkboxes; let i=index" class="uk-card uk-card-default uk-margin-bottom">
|
|
69 |
<div class="uk-grid uk-padding">
|
|
69 |
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading"> |
|
70 |
<div class="md-card-content"> |
|
71 |
<div class="uk-overflow-container"> |
|
72 |
<ul class="uk-list pages"> |
|
73 |
<li *ngFor="let check of checkboxes; let i=index" class="uk-card uk-card-default uk-margin-bottom"> |
|
74 |
<div class="uk-grid uk-padding"> |
|
70 | 75 |
<div class=""><input id="{{check.page._id}}" class="checkBox" type="checkbox" |
71 |
name="pagescb[]" value="{{check.page._id}}" [(ngModel)]="check.checked"> |
|
76 |
name="pagescb[]" value="{{check.page._id}}" [(ngModel)]="check.checked">
|
|
72 | 77 |
</div> |
73 |
<div class="uk-width-expand">
|
|
78 |
<div class="uk-width-expand"> |
|
74 | 79 |
<div class="title uk-margin-medium-bottom">Name</div> |
75 | 80 |
<div class="name uk-margin-medium-bottom" href="#">{{check.page.name}}</div> |
76 | 81 |
<div *ngIf="check.page.entities && check.page.entities.length > 0"><span |
77 |
class="title">Entities: </span> |
|
82 |
class="title">Entities: </span>
|
|
78 | 83 |
{{check.page.entities.join(", ")}}</div> |
79 | 84 |
<div class=" uk-margin-small-bottom"><span class="title">Route: </span> {{check.page.route}}</div> |
80 |
<div *ngIf="!pagesType" class=" uk-margin-small-bottom"><span class="title">Type: </span> {{check.page.type}}</div> |
|
85 |
<div *ngIf="!pagesType" class=" uk-margin-small-bottom"><span |
|
86 |
class="title">Type: </span> {{check.page.type}}</div> |
|
81 | 87 |
<div *ngIf="!selectedCommunityPid" class=" uk-margin-small-bottom"> |
82 |
<span class="title" >Portal type: </span>{{check.page.portalType}}
|
|
88 |
<span class="title">Portal type: </span>{{check.page.portalType}} |
|
83 | 89 |
</div> |
84 | 90 |
</div> |
85 | 91 |
<div *ngIf="isPortalAdministrator" class="uk-width-1-4"> |
... | ... | |
102 | 108 |
</div> |
103 | 109 |
<div> |
104 | 110 |
<a *ngIf="pageWithDivIds.includes(check.page._id)" class="classHelpContents" |
105 |
[queryParams]="{communityId: selectedCommunityPid, pageId: check.page._id}" |
|
106 |
routerLink="../../classContents">manage class contents</a> |
|
111 |
[queryParams]="{communityId: selectedCommunityPid, pageId: check.page._id}"
|
|
112 |
routerLink="../../classContents">manage class contents</a>
|
|
107 | 113 |
</div> |
108 | 114 |
</div> |
109 | 115 |
<div *ngIf="!isPortalAdministrator" class="uk-width-1-4"> |
... | ... | |
111 | 117 |
<mat-slide-toggle [checked]="check.page.isEnabled" |
112 | 118 |
(change)="($event.source.checked = check.page.isEnabled);togglePages(!check.page.isEnabled,[check.page._id])"></mat-slide-toggle> |
113 | 119 |
</div> |
114 |
</div> |
|
115 |
</li> |
|
116 |
|
|
117 |
</ul> |
|
120 |
</div> |
|
121 |
</li> |
|
118 | 122 |
|
119 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
120 |
<div class="uk-alert-warning" uk-alert>No pages found</div> |
|
123 |
</ul> |
|
124 |
|
|
125 |
<div *ngIf="checkboxes.length==0" class="col-md-12"> |
|
126 |
<div class="uk-alert-warning" uk-alert>No pages found</div> |
|
127 |
</div> |
|
128 |
<div *ngIf="isPortalAdministrator" class="uk-width-1-1 uk-flex uk-flex-center "> |
|
129 |
<div class="uk-width-small uk-button uk-button-default" (click)="newPage()"> |
|
130 |
<i class="" uk-icon="plus"></i> |
|
121 | 131 |
</div> |
122 |
<div *ngIf="isPortalAdministrator" class="uk-width-1-1 uk-flex uk-flex-center "> |
|
123 |
<div class="uk-width-small uk-button uk-button-default" (click)="newPage()"> |
|
124 |
<i class="" uk-icon="plus"></i> |
|
125 |
</div> |
|
126 |
</div> |
|
127 | 132 |
</div> |
128 | 133 |
</div> |
129 | 134 |
</div> |
... | ... | |
132 | 137 |
</div> |
133 | 138 |
</div> |
134 | 139 |
|
135 |
<modal-alert #AlertModalSavePage (alertOutput)="pageSaveConfirmed($event)" [okDisabled]="myForm && (myForm.invalid || !myForm.dirty)"> |
|
140 |
<modal-alert #AlertModalSavePage (alertOutput)="pageSaveConfirmed($event)" |
|
141 |
[okDisabled]="myForm && (myForm.invalid || !myForm.dirty)"> |
|
136 | 142 |
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div> |
137 | 143 |
<form [formGroup]="myForm"> |
138 | 144 |
|
... | ... | |
153 | 159 |
<mat-form-field class="example-chip-list uk-width-1-1 uk-margin-small-left"> |
154 | 160 |
<mat-chip-list #chipList aria-label="Page selection"> |
155 | 161 |
<mat-chip |
156 |
*ngFor="let entity of selectedEntities" |
|
157 |
[selectable]="true" |
|
158 |
[removable]="true"> |
|
162 |
*ngFor="let entity of selectedEntities"
|
|
163 |
[selectable]="true"
|
|
164 |
[removable]="true">
|
|
159 | 165 |
{{entity.name}} |
160 | 166 |
<span (click)="remove(entity)" |
161 | 167 |
class=" notranslate mat-chip-remove mat-chip-trailing-icon " uk-icon="trash"></span> |
... | ... | |
170 | 176 |
</mat-autocomplete> |
171 | 177 |
</mat-form-field> |
172 | 178 |
|
173 |
<div class="form-group" >
|
|
179 |
<div class="form-group"> |
|
174 | 180 |
<label class="uk-text-danger uk-margin-small-bottom"> |
175 | 181 |
By disabling a position, all contents in this position will be deleted. |
176 | 182 |
</label> |
... | ... | |
178 | 184 |
<div class=" uk-grid"> |
179 | 185 |
<span dashboard-input class="" [formInput]="myForm.get('top')" |
180 | 186 |
type="checkbox" |
181 |
label="Top" >
|
|
187 |
label="Top"> |
|
182 | 188 |
</span> |
183 | 189 |
<span dashboard-input class="uk-margin-small-left" [formInput]="myForm.get('right')" |
184 | 190 |
type="checkbox" |
... | ... | |
194 | 200 |
</span> |
195 | 201 |
</div> |
196 | 202 |
</div> |
197 |
<div [ngClass]="{'has-error':!myForm.controls.portalType.valid && myForm.controls.portalType.dirty}" class="form-group" > |
|
203 |
<div [ngClass]="{'has-error':!myForm.controls.portalType.valid && myForm.controls.portalType.dirty}" |
|
204 |
class="form-group"> |
|
198 | 205 |
<div class="uk-width-1-1 uk-margin-small-bottom uk-text-bold uk-form-label"> |
199 | 206 |
Page exists in: |
200 | 207 |
</div> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/dashboard/page/pages.module.ts | ||
---|---|---|
10 | 10 |
import {AdminTabsModule} from "../sharedComponents/admin-tabs/admin-tabs.module"; |
11 | 11 |
import {PageContentModule} from "../sharedComponents/page-content/page-content.module"; |
12 | 12 |
import {PagesRoutingModule} from "./pages-routing.module"; |
13 |
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module"; |
|
14 |
import {IconsModule} from "../../utils/icons/icons.module"; |
|
15 |
import {IconsService} from "../../utils/icons/icons.service"; |
|
16 |
import {add} from "../../utils/icons/icons"; |
|
13 | 17 |
|
14 | 18 |
@NgModule({ |
15 | 19 |
imports: [ |
16 | 20 |
CommonModule, RouterModule, FormsModule, AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule, |
17 |
MatAutocompleteModule, MatFormFieldModule, MatChipsModule, AdminTabsModule, PageContentModule, PagesRoutingModule |
|
21 |
MatAutocompleteModule, MatFormFieldModule, MatChipsModule, AdminTabsModule, PageContentModule, PagesRoutingModule, SearchInputModule, IconsModule
|
|
18 | 22 |
], |
19 | 23 |
declarations: [PagesComponent], |
20 | 24 |
exports: [PagesComponent] |
21 | 25 |
}) |
22 |
export class PagesModule { } |
|
26 |
export class PagesModule { |
|
27 |
constructor(private iconsService: IconsService) { |
|
28 |
this.iconsService.registerIcons([add]); |
|
29 |
} |
|
30 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/sharedComponents/search-input/search-input.component.ts | ||
---|---|---|
6 | 6 |
selector: '[search-input]', |
7 | 7 |
styleUrls: ['search-input.component.css'], |
8 | 8 |
template: ` |
9 |
<div class="uk-flex uk-flex-middle uk-flex-center uk-align-center uk-margin-medium-bottom search-mobile" [ngClass]="colorClass">
|
|
10 |
<div *ngIf="control" class="uk-width-expand"> |
|
9 |
<div class="uk-flex uk-flex-middle uk-flex-center search-mobile" [ngClass]="colorClass"> |
|
10 |
<div *ngIf="control" class="uk-width-expand" [class.bordered]="bordered">
|
|
11 | 11 |
<form (ngSubmit)="search()"> |
12 | 12 |
<input #input type="text" class="uk-width-1-1" |
13 |
[class.uk-animation-slide-right-medium]="showSearch && !control.value"
|
|
13 |
[class.uk-animation-slide-right-medium]="showSearch" |
|
14 | 14 |
[class.uk-hidden@m]="!showSearch" |
15 | 15 |
[class.uk-hidden]="selected" |
16 | 16 |
[placeholder]="placeholder" |
... | ... | |
40 | 40 |
<span [ngClass]="colorClass" class="icon-bg"> |
41 | 41 |
<icon class="uk-position-center" name="search"></icon> |
42 | 42 |
</span> |
43 |
<span class="uk-text-uppercase space">search</span>
|
|
43 |
<span class="uk-text-uppercase overlay">search</span>
|
|
44 | 44 |
</button> |
45 | 45 |
<button [disabled]="loading" class="search uk-flex uk-flex-middle uk-hidden@m" |
46 | 46 |
(mousedown)="$event.preventDefault()" (click)="search()"> |
47 | 47 |
<span [ngClass]="colorClass" class="icon-bg"> |
48 | 48 |
<icon class="uk-position-center" name="search"></icon> |
49 | 49 |
</span> |
50 |
<span class="uk-text-uppercase space">search</span>
|
|
50 |
<span class="uk-text-uppercase overlay">search</span>
|
|
51 | 51 |
</button> |
52 | 52 |
</div>` |
53 | 53 |
}) |
... | ... | |
66 | 66 |
list: any = null; |
67 | 67 |
@Input() |
68 | 68 |
colorClass: string = 'portal-color'; |
69 |
@Input() |
|
70 |
bordered: boolean = false; |
|
69 | 71 |
@ViewChild('input') input: ElementRef; |
70 | 72 |
@ViewChild(MatAutocompleteTrigger) trigger: MatAutocompleteTrigger; |
71 | 73 |
@Output() |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/sharedComponents/search-input/search-input.component.css | ||
---|---|---|
11 | 11 |
font-weight: 600; |
12 | 12 |
} |
13 | 13 |
|
14 |
@media only screen and (max-width: 980px) { |
|
14 |
@media only screen and (min-width: 960px) { |
|
15 |
.bordered { |
|
16 |
border-bottom: 1px solid currentColor !important; |
|
17 |
} |
|
18 |
} |
|
19 |
|
|
20 |
@media only screen and (max-width: 959px) { |
|
15 | 21 |
input { |
16 | 22 |
font-size: 14px; |
17 | 23 |
} |
... | ... | |
47 | 53 |
.selected { |
48 | 54 |
color: #1a1a1a; |
49 | 55 |
} |
56 |
|
|
57 |
.overlay { |
|
58 |
margin-left: -13px; |
|
59 |
z-index: 1; |
|
60 |
} |
Also available in: Unified diff
[Library | Trunk]: Change admin-tools pages header layout. Add search-input