2017-12-05 19:03:38 +00:00
|
|
|
{{#if hasPages}}
|
2018-01-22 10:31:03 +00:00
|
|
|
{{#each pages key="id" as |item index|}}
|
|
|
|
{{#if canEdit}}
|
|
|
|
<div class="start-section" data-index={{index}} data-before-id={{item.page.id}} id="add-section-button-{{item.page.id}}" {{action 'onShowSectionWizard' item.page}}>
|
2017-06-23 14:07:06 -04:00
|
|
|
<div class="start-button">
|
2017-12-15 16:47:44 +00:00
|
|
|
<div class="btn btn-success font-weight-bold">+ SECTION</div>
|
2017-03-04 16:54:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-05 19:03:38 +00:00
|
|
|
{{else}}
|
|
|
|
<div class="section-divider" />
|
2017-06-23 14:07:06 -04:00
|
|
|
{{/if}}
|
2017-12-05 19:03:38 +00:00
|
|
|
|
2018-01-22 10:31:03 +00:00
|
|
|
{{document/document-page document=document folder=folder page=item.page meta=item.meta pending=item.pending
|
|
|
|
permissions=permissions toEdit=toEdit roles=roles blocks=blocks
|
2017-12-09 12:21:14 +00:00
|
|
|
onSavePage=(action 'onSavePage') onSavePageAsBlock=(action 'onSavePageAsBlock')
|
2018-01-22 10:31:03 +00:00
|
|
|
onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onDeletePage') refresh=(action refresh)}}
|
2017-12-05 19:03:38 +00:00
|
|
|
{{/each}}
|
|
|
|
|
2018-01-22 10:31:03 +00:00
|
|
|
{{#if canEdit}}
|
2017-12-05 19:03:38 +00:00
|
|
|
<div class="start-section" data-index="0" data-before-id="0" id="add-section-button-0" {{action 'onShowSectionWizard'}}>
|
|
|
|
<div class="start-button">
|
2017-12-15 16:47:44 +00:00
|
|
|
<div class="btn btn-success font-weight-bold">+ SECTION</div>
|
2017-03-01 18:46:25 +00:00
|
|
|
</div>
|
2017-12-05 19:03:38 +00:00
|
|
|
</div>
|
2017-03-04 16:54:04 +00:00
|
|
|
{{/if}}
|
2017-12-05 19:03:38 +00:00
|
|
|
{{/if}}
|
2016-07-07 18:54:16 -07:00
|
|
|
|
2017-12-05 19:03:38 +00:00
|
|
|
{{#unless hasPages}}
|
2018-01-22 10:31:03 +00:00
|
|
|
{{#if canEdit}}
|
2017-12-05 19:03:38 +00:00
|
|
|
<div class="start-section start-section-empty-state" data-index="-1" data-before-id="0" id="add-section-button-0" {{action 'onShowSectionWizard'}}>
|
|
|
|
<div class="start-button">
|
2017-12-15 16:47:44 +00:00
|
|
|
<div class="btn btn-success font-weight-bold">+ SECTION</div>
|
2017-12-05 19:03:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{/unless}}
|
2017-03-22 09:40:34 +00:00
|
|
|
|
2018-01-22 10:31:03 +00:00
|
|
|
{{#if canEdit}}
|
|
|
|
<div id="wizard-placeholder" class="hide margin-top-50" />
|
|
|
|
<div id="new-section-wizard" class="new-section-wizard">
|
|
|
|
<div class="container box">
|
|
|
|
<div class="row clearfix">
|
|
|
|
<div class="col-12 clearfix">
|
|
|
|
<div class="float-right mb-5">
|
|
|
|
<button type="button" class="btn btn-secondary" {{action 'onHideSectionWizard'}}>Cancel</button>
|
|
|
|
</div>
|
2017-12-15 16:14:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-22 10:31:03 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="form-group">
|
|
|
|
{{input type="text" id="new-section-name" value=newSectionName class=(if newSectionNameMissing 'form-control form-control-lg is-invalid' 'form-control form-control-lg') placeholder="Enter section name" autocomplete="off"}}
|
|
|
|
</div>
|
2017-12-15 16:14:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-01 18:46:25 +00:00
|
|
|
|
2018-01-22 10:31:03 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="new-section-caption">Insert section type</div>
|
|
|
|
<ul class="preset-list">
|
|
|
|
{{#each sections as |section|}}
|
|
|
|
<li class="item" {{action 'onInsertSection' section}}>
|
|
|
|
<div class="icon">
|
|
|
|
<img class="img" src="/sections/{{section.contentType}}.png" srcset="/sections/{{section.contentType}}@2x.png" />
|
|
|
|
</div>
|
|
|
|
<div class='title'>{{section.title}}</div>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-12-15 16:14:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-01 18:46:25 +00:00
|
|
|
|
2018-01-22 10:31:03 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
{{#if hasBlocks}}
|
|
|
|
<div class="new-section-caption">Insert re-usable content</div>
|
|
|
|
<ul class="block-list">
|
|
|
|
{{#each blocks as |block|}}
|
|
|
|
<li class="item" title="{{block.firstname}} {{block.lastname}}, {{time-ago block.created}}, used: {{ block.used }}" data-toggle="tooltip" data-placement="top">
|
|
|
|
<div class="actions">
|
|
|
|
{{#if permissions.documentTemplate}}
|
|
|
|
{{#link-to 'document.block' folder.id folder.slug document.id document.slug block.id class="button-icon-green button-icon-small align-middle"}}
|
|
|
|
<i class="material-icons">edit</i>
|
|
|
|
{{/link-to}}
|
|
|
|
<div class="button-icon-gap" />
|
|
|
|
<div id={{concat 'delete-block-button-' block.id}} class="button-icon-red button-icon-small align-middle" {{action 'onShowDeleteBlockModal' block.id}}>
|
|
|
|
<i class="material-icons">delete</i>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="details" {{action 'onInsertBlock' block}}>
|
|
|
|
<div class="title text-truncate">{{block.title}}</div>
|
|
|
|
<div class="desc text-truncate">{{block.excerpt}}</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
|
|
|
<div class="template-caption">You have no reusable content — publish any section as a template</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2017-12-15 16:14:44 +00:00
|
|
|
</div>
|
2017-03-01 18:46:25 +00:00
|
|
|
</div>
|
2016-10-23 18:33:07 -07:00
|
|
|
</div>
|
2018-01-22 10:31:03 +00:00
|
|
|
{{/if}}
|
2017-12-15 18:43:22 +00:00
|
|
|
|
2018-01-22 10:31:03 +00:00
|
|
|
{{#if permissions.documentTemplate}}
|
|
|
|
{{#ui/ui-dialog title="Delete Content Block" confirmCaption="Delete" buttonType="btn-danger" show=showDeleteBlockDialog onAction=(action 'onDeleteBlock')}}
|
|
|
|
<p>Are you sure you want to delete this re-usable content block?</p>
|
|
|
|
{{/ui/ui-dialog}}
|
|
|
|
{{/if}}
|