2018-01-04 16:56:22 +01:00
<!-- <div id="pages">
2017-09-22 12:26:08 +02:00
< div id = "content" >
< div class = "menubar fixed" >
< div class = "sidebar-toggler visible-xs" >
< i class = "ion-navicon" > < / i >
< / div >
< div class = "page-title" > Pages< / div >
< form target = "BSFormPanel_Admin_1" class = "search" >
< input # inputstring ( keyup . enter ) = " filterBySearch ( inputstring . value ) " placeholder = "Search pages (route, name)..." type = "text" / >
< input class = "btn" type = "submit" >
< / form >
< a ( click ) = " showModal ( ) " class = "btn btn-success pull-right" > < i > < / i > New Page < / a >
< / div >
< div class = "content-wrapper" id = "contentWrapper" >
< div >
< div class = "contentPanel" >
< div class = "alert alert-danger" style = "display: none;" aria-hidden = "true" >
< span > < / span > < span > < / span > < span > < / span > < / div >
< div class = "alert alert-success" style = "display: none;" aria-hidden = "true" >
< span > < / span > < span > < / span > < span > < / span > < / div >
< div class = "alert" style = "display: none;" aria-hidden = "true" > < span > < / span > < span > < / span > < span > < / span > < / div >
< div class = "row page-controls" >
< div class = "col-md-12 filters" >
< div class = "show-options" >
< div class = "btn-group" > < a href = "javascript:;" class = "btn dropdown-toggle"
data-toggle="dropdown">< i > < / i > Bulk Actions < span
class="caret">< / span > < / a >
< ul class = "dropdown-menu" >
< li > < a ( click ) = " confirmDeleteSelectedPages ( ) " > < i > < / i > Delete < / a > < / li >
< / ul >
< / div >
< / div >
< / div >
< / div >
< div >
< div class = "gwt-HTML" >
< div class = "row users-list" >
< div class = "col-md-12" >
2017-12-13 12:15:19 +01:00
< div class = "filters marginBottom20" >
< div class = "links form-group form-inline" >
< div class = "gwt-Label filterLabel" > Filter by community:< / div >
< select class = "input-xxlarge form-control" ( change ) = " filterByCommunity ( $ event ) " >
< option * ngFor = "let community of communities" value = "{{community._id}}" > {{community.name}}< / option >
< / select >
< / div >
< / div >
2017-09-22 12:26:08 +02:00
< div class = "row headers" >
< div class = "col-sm-1 header select-users" > < input id = "allPageCheckbox" type = "checkbox" ( change ) = " toggleCheckBoxes ( $ event ) " >
< / div >
2017-12-20 15:26:30 +01:00
< div class = "col-sm-2 header hidden-xs" > < label > < a href = "#" > Route< / a > < / label > < / div >
2017-12-13 12:15:19 +01:00
< div class = "col-sm-2 header hidden-xs" > < label > < a href = "#" > Name< / a > < / label > < / div >
2017-12-20 15:26:30 +01:00
< div class = "col-sm-1 header hidden-xs" > < label > < a href = "#" > State< / a > < / label > < / div >
< div class = "col-sm-1 header hidden-xs" > < label > < a href = "#" > Type< / a > < / label > < / div >
2017-12-13 12:15:19 +01:00
< div class = "col-sm-3 header hidden-xs" > < label > < a href = "#" > Related Entities< / a > < / label > < / div >
2017-09-22 12:26:08 +02:00
< div class = "col-sm-1 header hidden-xs" > < label > < a href = "#" > Actions< / a > < / label > < / div >
2017-12-20 15:26:30 +01:00
< div class = "col-sm-1 header hidden-xs" > < label > < a href = "#" > Help Contents< / a > < / label > < / div >
2017-09-22 12:26:08 +02:00
< / div >
2018-02-06 12:35:16 +01:00
< ng-template [ ngIf ] = " pagesCheckboxes & & pagesCheckboxes . length > 0">
2017-09-22 12:26:08 +02:00
< div * ngFor = "let check of pagesCheckboxes; let i=index" class = "row user" >
< div class = "col-sm-1 avatar" > < input id = "{{check.page._id}}" class = "checkBox" type = "checkbox"
name="pagescb[]" value="{{check.page._id}}" [(ngModel)]="check.checked">
< / div >
2017-12-20 15:26:30 +01:00
< div class = "col-sm-2" >
2017-09-22 12:26:08 +02:00
< div class = "route" href = "#" > {{check.page.route}}< / div >
< / div >
2017-12-13 12:15:19 +01:00
< div class = "col-sm-2" >
2017-09-22 12:26:08 +02:00
< div class = "name" href = "#" > {{check.page.name}}< / div >
< / div >
2017-12-20 15:26:30 +01:00
< div class = "col-sm-1" >
2017-12-13 12:15:19 +01:00
< div * ngIf = "check.page.isEnabled" class = "activated" >
< input ( click ) = " togglePage ( false , [ check . page . _id ] ) " class = "deactivate" src = "imgs/check-icon.png" title = "Disable" width = "20" type = "image" height = "20" >
< / div >
< div * ngIf = "!check.page.isEnabled" class = "deactivated" >
< input ( click ) = " togglePage ( true , [ check . page . _id ] ) " class = "deactivate" src = "imgs/x-icon.png" title = "Enable" width = "20" type = "image" height = "20" >
< / div >
< / div >
2017-12-20 15:26:30 +01:00
< div class = "col-sm-1" >
< div class = "type" href = "#" > {{check.page.type}}< / div >
< / div >
2017-12-13 12:15:19 +01:00
< div class = "col-sm-3" >
< div class = "entities" href = "#" >
< span * ngFor = "let entity of check.page.entities let i=index" > {{entity.name}}< span * ngIf = "i<(check.page.entities.length-1)" > , < / span > < / span >
< / div >
< / div >
2017-09-22 12:26:08 +02:00
< div class = "col-sm-1" >
< div class = "actions" href = "#" >
< input title = "Edit" src = "imgs/icn_edit.png" class = "edit" type = "image" ( click ) = " editPage ( i ) " >
< input title = "Delete" src = "imgs/icn_trash.png" class = "delete" type = "image" ( click ) = " confirmDeletePage ( check . page . _id ) " >
< / div >
< / div >
2017-12-20 15:26:30 +01:00
< div class = col-sm-1 >
< a class = "helpContents" [ queryParams ] = " { community: selectedCommunityId , page: check . page . _id } " routerLink = "/pageContents" > edit< / a >
< / div >
2017-09-22 12:26:08 +02:00
< / div >
2018-02-06 12:35:16 +01:00
< / ng-template >
2017-09-22 12:26:08 +02:00
< div * ngIf = "pagesCheckboxes.length==0" class = "col-md-12" >
< div class = "alert alert-warning" > No pages found< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< modal-form # saveModal [ saveText ] = " ' Save ' " [ titleText ] = " ' Add a new Page ' " [ formGroup ] = " formGroup " [ type ] = " ' page ' "
2017-12-13 12:15:19 +01:00
[isModalShown]="isModalShown" (emmitObject)="pageSavedSuccessfully($event)" (emmitError)="handleError($event)"
[selectedCommunityId]="selectedCommunityId">
2017-12-20 15:26:30 +01:00
< page-form [ group ] = " formGroup " [ selectedCommunityId ] = " selectedCommunityId " [ type ] = " pagesType " > < / page-form >
2017-09-22 12:26:08 +02:00
< / modal-form >
2017-12-13 12:15:19 +01:00
< modal-form # updateModal [ saveText ] = " ' Update ' " [ titleText ] = " ' Update Page ' " [ formGroup ] = " formGroup " [ type ] = " ' page ' "
[isModalShown]="isModalShown" (emmitObject)="pageUpdatedSuccessfully($event)" (emmitError)="handleError($event)"
[selectedCommunityId]="selectedCommunityId">
2017-12-20 15:26:30 +01:00
< page-form [ group ] = " formGroup " [ selectedCommunityId ] = " selectedCommunityId " [ type ] = " pagesType " > < / page-form >
2017-09-22 12:26:08 +02:00
< / modal-form >
2018-01-04 16:56:22 +01:00
< delete-confirmation-dialog # deleteConfirmationModal [ isModalShown ] = " isModalShown " ( emmitObject ) = " confirmedDeletePages ( $ event ) " >
Are you sure you want to delete the selected page(s)?
< / delete-confirmation-dialog > -->
< div id = "pages" class = "uk-container" >
< div class = "menubar " >
< div class = "page-title uk-article-title " > Pages< / div >
< form target = "BSFormPanel_Admin_1" class = "search" >
< input # inputstring ( keyup . enter ) = " filterBySearch ( inputstring . value ) " placeholder = "Page name..." type = "text" class = "uk-input uk-width-medium" / >
2018-02-06 12:06:43 +01:00
< button class = "uk-button" type = "submit" > Search< / button >
2018-01-04 16:56:22 +01:00
< / form >
< a ( click ) = " showModal ( ) " class = "uk-button uk-button-primary uk-float-right" > < i > < / i > New Page < / a >
< / div >
< div class = "content-wrapper" id = "contentWrapper" >
< div >
< div class = "contentPanel" >
< div class = "uk-alert-danger" uk-alert style = "display: none;" aria-hidden = "true" >
< span > < / span > < span > < / span > < span > < / span > < / div >
< div class = "uk-alert-success" uk-alert style = "display: none;" aria-hidden = "true" >
< span > < / span > < span > < / span > < span > < / span > < / div >
< div class = "uk-alert" uk-alert style = "display: none;" aria-hidden = "true" > < span > < / span > < span > < / span > < span > < / span > < / div >
< div class = "page-controls" >
< div class = " filters " >
< div class = "show-options uk-float-right" >
2018-02-06 12:06:43 +01:00
< button class = "uk-button" type = "button" > Bulk Actions< / button >
2018-01-04 16:56:22 +01:00
< div uk-dropdown = "mode: click" >
< ul class = "uk-nav uk-dropdown-nav" >
2018-01-08 10:29:40 +01:00
< li > < a ( click ) = " togglePages ( true , getSelectedPages ( ) ) " > < i > < / i > Activate < / a > < / li >
< li > < a ( click ) = " togglePages ( false , getSelectedPages ( ) ) " > < i > < / i > Deactivate < / a > < / li >
2018-01-04 16:56:22 +01:00
< li > < a ( click ) = " confirmDeleteSelectedPages ( ) " > < i > < / i > Delete < / a > < / li >
< / ul >
< / div >
< / div >
< / div >
< / div >
< div >
< div class = "gwt-HTML" >
< div class = "row users-list" >
< div class = "col-md-12" >
< div class = "filters marginBottom20" >
< div class = "links form-group form-inline" >
< span > Filter by community:< / span >
< select class = "uk-select uk-width-medium" ( change ) = " filterByCommunity ( $ event ) " >
<!-- option value=""> - - none selected - - </option -->
2018-01-29 23:45:42 +01:00
< option * ngFor = "let community of communities" value = "{{community.pid}}" > {{community.name}}< / option >
2018-01-04 16:56:22 +01:00
< / select >
< / div >
< / div >
< table class = "uk-table uk-table-striped" >
< thead >
< tr >
< th > < input id = "allPageCheckbox" type = "checkbox" ( change ) = " toggleCheckBoxes ( $ event ) " > < / th >
< th > Name< / th >
< th > State< / th >
< th * ngIf = "!pagesType" > Type< / th >
< th > Related Entities< / th >
< th > Route< / th >
< th > Actions< / th >
2018-02-06 12:06:43 +01:00
< th > Page Help Contents< / th >
< th * ngIf = "pageWithDivIds && pageWithDivIds.length > 0" > Class Help Contents< / th >
2018-01-04 16:56:22 +01:00
< / tr >
< / thead >
< tbody >
< tr * ngFor = "let check of checkboxes; let i=index" >
< td > < input id = "{{check.page._id}}" class = "checkBox" type = "checkbox"
name="pagescb[]" value="{{check.page._id}}" [(ngModel)]="check.checked">
< / td >
< td >
< div class = "name" href = "#" > {{check.page.name}}< / div >
< / td >
< td >
< div * ngIf = "check.page.isEnabled" class = "activated" >
2018-01-08 10:29:40 +01:00
< input ( click ) = " togglePages ( false , [ check . page . _id ] ) " class = "deactivate" src = "imgs/check-icon.png" title = "Disable" width = "20" type = "image" height = "20" >
2018-01-04 16:56:22 +01:00
< / div >
< div * ngIf = "!check.page.isEnabled" class = "deactivated" >
2018-01-08 10:29:40 +01:00
< input ( click ) = " togglePages ( true , [ check . page . _id ] ) " class = "deactivate" src = "imgs/x-icon.png" title = "Enable" width = "20" type = "image" height = "20" >
2018-01-04 16:56:22 +01:00
< / div >
< / td >
< td * ngIf = "!pagesType" >
< div class = "type" href = "#" > {{check.page.type}}< / div >
< / td >
< td >
< div class = "entities" href = "#" >
< span * ngFor = "let entity of check.page.entities let i=index" > {{entity.name}}< span * ngIf = "i<(check.page.entities.length-1)" > , < / span > < / span >
< / div >
< / td >
< td >
< div class = "route" href = "#" > {{check.page.route}}< / div >
< / td >
< td >
< div class = "actions" href = "#" >
< input title = "Edit" src = "imgs/icn_edit.png" class = "edit" type = "image" ( click ) = " editPage ( i ) " >
< input title = "Delete" src = "imgs/icn_trash.png" class = "delete" type = "image" ( click ) = " confirmDeletePage ( check . page . _id ) " >
< / div >
< / td >
< td >
2018-02-06 12:06:43 +01:00
< a class = "helpContents" [ queryParams ] = " { community: selectedCommunityPid , page: check . page . _id } " routerLink = "/pageContents" > add page contents< / a >
< / td >
< td * ngIf = "pageWithDivIds && pageWithDivIds.length > 0" class = "uk-text-center" >
< a * ngIf = "pageWithDivIds.includes(check.page._id)" class = "classHelpContents" [ queryParams ] = " { community: selectedCommunityPid , page: check . page . _id } " routerLink = "/classContents" > add class contents< / a >
< span * ngIf = "!pageWithDivIds.includes(check.page._id)" > -< / span >
2018-01-04 16:56:22 +01:00
< / td >
< / tr >
< / tbody >
< / table >
< div * ngIf = "checkboxes.length==0" class = "col-md-12" >
< div class = "uk-alert-warning" uk-alert > No pages found< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< modal-form # saveModal [ saveText ] = " ' Save ' " [ titleText ] = " ' Add a new Page ' " [ formGroup ] = " formGroup " [ type ] = " ' page ' "
2018-01-29 23:45:42 +01:00
[isModalShown]="isModalShown" (emmitObject)="pageSavedSuccessfully($event)" (emmitError)="handleError($event)">
2018-01-04 16:56:22 +01:00
< page-form [ group ] = " formGroup " > < / page-form >
< / modal-form >
< modal-form # updateModal [ saveText ] = " ' Update ' " [ titleText ] = " ' Update Page ' " [ formGroup ] = " formGroup " [ type ] = " ' page ' "
2018-01-29 23:45:42 +01:00
[isModalShown]="isModalShown" (emmitObject)="pageUpdatedSuccessfully($event)" (emmitError)="handleError($event)">
2018-01-04 16:56:22 +01:00
< page-form [ group ] = " formGroup " > < / page-form >
< / modal-form >
2017-09-22 12:26:08 +02:00
< delete-confirmation-dialog # deleteConfirmationModal [ isModalShown ] = " isModalShown " ( emmitObject ) = " confirmedDeletePages ( $ event ) " >
Are you sure you want to delete the selected page(s)?
< / delete-confirmation-dialog >