Project

General

Profile

1 51316 konstantin
<div id="pages">
2 50611 konstantin
        <div class="menubar ">
3
4 51639 konstantin
            <div class="page-title uk-text-large">{{capitalizeFirstLetter(pagesType)}} Pages</div>
5 51417 konstantin
            <div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
6
              <a class="uk-alert-close" uk-close></a>
7
              {{updateErrorMessage}}
8
            </div>
9 51527 argiro.kok
            <div *ngIf="!errorMessage && !showLoading" class="page-controls">
10
                <div class="  filters ">
11
                    <div class="show-options uk-float-right">
12 51624 konstantin
                      <button class="uk-button" type="button">Bulk Actions</button>
13 51527 argiro.kok
                      <div uk-dropdown="mode: click">
14 51624 konstantin
                          <ul class="uk-nav uk-nav-dropdown"
15
                              [attr.uk-tooltip]="getSelectedPages().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
16
                              title="Select at least one page">
17
                            <li><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''" (click)="togglePages(true, getSelectedPages())"><i></i> Activate </a></li>
18
                            <li><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''" (click)="togglePages(false, getSelectedPages())"><i></i> Deactivate </a></li>
19 51527 argiro.kok
                            <li  *ngIf="isPortalAdministrator"><a (click)="confirmDeleteSelectedPages()"><i></i> Delete </a></li>
20 51624 konstantin
                          </ul>
21 51527 argiro.kok
                      </div>
22
                    </div>
23
                </div>
24
            </div>
25 51657 konstantin
            <!-- <a  *ngIf="isPortalAdministrator" (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Page </a> -->
26 50611 konstantin
            <form target="BSFormPanel_Admin_1" class="search">
27
                <input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Page name..." type="text" class="uk-input uk-width-medium"/>
28
                <button class="uk-button" type="submit">Search</button>
29
            </form>
30
        </div>
31
32
        <div class="content-wrapper" id="contentWrapper">
33
            <div>
34 51527 argiro.kok
                <div class="contentPanel uk-margin-top">
35 50611 konstantin
36 51527 argiro.kok
37 51635 argiro.kok
                    <div class="uk-alert uk-alert-primary uk-margin-top-large">
38 51454 argiro.kok
                      <div>
39
                        <span class="uk-margin-small-right uk-icon" uk-icon="warning"></span>
40
                        Disable a page to hide it from community dashboard portal. </div>
41
                        <div 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.  </div>
42 50611 konstantin
43 51454 argiro.kok
                    </div>
44 51527 argiro.kok
                    <div *ngIf="errorMessage" class="uk-alert uk-alert-danger  uk-margin-large-top" role="alert">{{errorMessage}}</div>
45 52014 argiro.kok
                    <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>
46 51417 konstantin
                    <div *ngIf="!errorMessage && !showLoading">
47 50611 konstantin
                        <div class="gwt-HTML">
48 51343 konstantin
                            <div class="users-list"> <!--"row" class removed"-->
49 50611 konstantin
                                <div class="col-md-12">
50
51 51417 konstantin
                                  <!-- <div class="filters marginBottom20">
52 50611 konstantin
                                      <div class="links form-group form-inline">
53
                                          <span>Filter by community:</span>
54
                                          <select class="uk-select uk-width-medium" (change)="filterByCommunity($event)">
55
                                              <option *ngFor="let community of communities" value="{{community.pid}}">{{community.name}}</option>
56
                                          </select>
57
                                      </div>
58 51417 konstantin
                                  </div> -->
59 50611 konstantin
                                  <table class="uk-table uk-table-striped">
60
                                    <thead>
61
                                        <tr>
62
                                            <th><input id="allPageCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
63
                                            <th>Name</th>
64 52307 argiro.kok
                                            <th>Change status</th>
65 50611 konstantin
                                            <th *ngIf="!pagesType">Type</th>
66
                                            <th>Related Entities</th>
67
                                            <th>Route</th>
68 52361 konstantin
                                            <th *ngIf="isPortalAdministrator" >Actions</th>
69
                                            <th *ngIf="!pagesType || (pagesType!='other' && pagesType!='html')" class="uk-text-center">Page help texts</th>
70
                                            <th *ngIf="pageWithDivIds && pageWithDivIds.length > 0" class="uk-text-center">Class help texts</th>
71
                                            <th *ngIf="!pagesType || pagesType=='html'" class="uk-text-center">Html Content</th>
72 50611 konstantin
                                        </tr>
73
                                    </thead>
74
                                    <tbody >
75
                                        <tr *ngFor="let check of checkboxes; let i=index">
76
                                            <td><input id="{{check.page._id}}" class="checkBox" type="checkbox"
77
                                                                                name="pagescb[]" value="{{check.page._id}}" [(ngModel)]="check.checked">
78
                                            </td>
79
                                            <td>
80
                                                <div class="name" href="#">{{check.page.name}}</div>
81
                                            </td>
82
                                            <td>
83
                                              <div *ngIf="check.page.isEnabled" class="activated" >
84 51074 argiro.kok
                                                  <input (click)="togglePages(false,[check.page._id])" class="deactivate" src="assets/imgs/check-icon.png" title="Disable" width="20" type="image" height="20">
85 50611 konstantin
                                              </div>
86
                                              <div *ngIf="!check.page.isEnabled" class="deactivated" >
87 51074 argiro.kok
                                                  <input (click)="togglePages(true,[check.page._id])" class="deactivate" src="assets/imgs/x-icon.png" title="Enable" width="20" type="image" height="20">
88 50611 konstantin
                                              </div>
89
                                            </td>
90
                                            <td *ngIf="!pagesType">
91
                                                <div class="type" href="#">{{check.page.type}}</div>
92
                                            </td>
93
                                            <td>
94
                                                <div class="entities" href="#">
95
                                                  <span *ngFor="let entity of check.page.entities let i=index">{{entity.name}}<span *ngIf="i<(check.page.entities.length-1)">, </span></span>
96
                                                </div>
97
                                            </td>
98
                                            <td>
99
                                                <div class="route" href="#">{{check.page.route}}</div>
100
                                            </td>
101
102 51527 argiro.kok
                                            <td  *ngIf="isPortalAdministrator" >
103 50611 konstantin
                                                <div class="actions" href="#">
104 51074 argiro.kok
                                                    <input title="Edit" src="assets/imgs/icn_edit.png" class="edit" type="image" (click)="editPage(i)">
105
                                                    <input title="Delete" src="assets/imgs/icn_trash.png" class="delete" type="image" (click)="confirmDeletePage(check.page._id)">
106 50611 konstantin
                                                </div>
107
                                            </td>
108 52361 konstantin
                                            <td *ngIf="!pagesType || (pagesType!='other' && pagesType!='html')" class="uk-text-center">
109
                                              <a *ngIf="check.page.type != 'html' && check.page.type != 'other'" class="helpContents" [queryParams]="{communityId: selectedCommunityPid, pageId: check.page._id}" routerLink="/pageContents">add page contents</a>
110
                                              <span *ngIf="check.page.type == 'html' || check.page.type == 'other'">-</span>
111 50611 konstantin
                                            </td>
112
                                            <td *ngIf="pageWithDivIds && pageWithDivIds.length > 0" class="uk-text-center">
113 51343 konstantin
                                              <a *ngIf="pageWithDivIds.includes(check.page._id)" class="classHelpContents" [queryParams]="{communityId: selectedCommunityPid, pageId: check.page._id}" routerLink="/classContents">add class contents</a>
114 50611 konstantin
                                              <span *ngIf="!pageWithDivIds.includes(check.page._id)">-</span>
115
                                            </td>
116 52361 konstantin
                                            <td *ngIf="!pagesType || pagesType=='html'" class="uk-text-center">
117
                                              <a *ngIf="check.page.type == 'html'" class="htmlContents" [queryParams]="{communityId: selectedCommunityPid, pageId: check.page._id}" routerLink="/htmlPageContent/edit">edit html contents</a>
118
                                              <span *ngIf="check.page.type != 'html'">-</span>
119
                                            </td>
120 50611 konstantin
                                        </tr>
121
                                    </tbody>
122
                                </table>
123
124
                                    <div *ngIf="checkboxes.length==0" class="col-md-12">
125
                                        <div class="uk-alert-warning" uk-alert>No pages found</div>
126
                                    </div>
127
                                </div>
128
                            </div>
129
                        </div>
130
                    </div>
131
                </div>
132
            </div>
133
        </div>
134 52064 konstantin
        <!-- <fab *ngIf="isPortalAdministrator" (clicked)="showModal()"></fab> -->
135
        <fab *ngIf="isPortalAdministrator" (clicked)="newPage()"></fab>
136 50611 konstantin
</div>
137
<modal-form #saveModal [saveText]="'Save'" [titleText]="'Add a new Page'" [formGroup]="formGroup" [type]="'page'"
138 51417 konstantin
            [isModalShown]="isModalShown" (emmitObject)="pageSavedSuccessfully($event)" (emmitError)="handleUpdateError($event)">
139 50611 konstantin
    <page-form [group]="formGroup"></page-form>
140
</modal-form>
141
142 52064 konstantin
<!--<modal-form #updateModal [saveText]="'Update'" [titleText]="'Update Page'" [formGroup]="formGroup" [type]="'page'"
143 51417 konstantin
            [isModalShown]="isModalShown" (emmitObject)="pageUpdatedSuccessfully($event)" (emmitError)="handleUpdateError($event)">
144 50611 konstantin
    <page-form [group]="formGroup"></page-form>
145 52064 konstantin
</modal-form> -->
146 50611 konstantin
147 52064 konstantin
<modal-alert #AlertModalSavePage (alertOutput)="pageSaveConfirmed($event)">
148
  <div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
149
  <page-form [group]="formGroup"></page-form>
150
</modal-alert>
151
152
<modal-alert #AlertModalUpdatePage (alertOutput)="pageUpdateConfirmed($event)">
153
  <div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
154
  <page-form [group]="formGroup"></page-form>
155
</modal-alert>
156
157 51638 konstantin
<!-- <delete-confirmation-dialog #deleteConfirmationModal [isModalShown]="isModalShown" (emmitObject)="confirmedDeletePages($event)">
158 50611 konstantin
    Are you sure you want to delete the selected page(s)?
159 51638 konstantin
</delete-confirmation-dialog> -->
160
<modal-alert #AlertModalDeletePages (alertOutput)="confirmedDeletePages($event)"></modal-alert>