Revision 60211
Added by Konstantinos Triantafyllou over 3 years ago
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> |
Also available in: Unified diff
[Library | Trunk]: Change admin-tools pages header layout. Add search-input