2017-12-08 17:24:39 +00:00
|
|
|
<div id="section-editor-{{pageId}}">
|
2017-12-07 19:43:46 +00:00
|
|
|
<div class="row">
|
2017-12-08 17:24:39 +00:00
|
|
|
<div class="col-8 section-editor">
|
2017-12-07 19:43:46 +00:00
|
|
|
{{#if blockMode}}
|
|
|
|
<div class="form-group">
|
2018-12-08 20:54:19 +00:00
|
|
|
{{focus-input id="page-id-{{pageId}}" value=pageTitle class=(if hasNameError "form-control mousetrap form-control-lg edit-title is-invalid" "form-control form-control-lg edit-title mousetrap") placeholder="Enter name"}}
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2018-12-08 20:54:19 +00:00
|
|
|
{{textarea id="page-excerpt-{{pageId}}" value=page.excerpt rows="2" class=(if hasDescError "form-control mousetrap form-control-lg edit-title is-invalid" "form-control form-control-lg edit-title mousetrap") placeholder="Enter description"}}
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="form-group">
|
2018-12-08 20:54:19 +00:00
|
|
|
{{focus-input type="text" id=pageId value=pageTitle class=(if hasNameError "form-control mousetrap form-control-lg edit-title is-invalid" "form-control form-control-lg edit-title mousetrap") placeholder="Enter name"}}
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2017-12-08 17:24:39 +00:00
|
|
|
<div class="col-4">
|
2017-12-07 19:43:46 +00:00
|
|
|
<div class="float-right">
|
|
|
|
{{#if busy}}
|
2018-12-08 20:54:19 +00:00
|
|
|
<img src="/assets/img/busy-gray.gif" class="busy-indicator">
|
2017-12-07 19:43:46 +00:00
|
|
|
{{/if}}
|
2017-03-05 19:11:01 +00:00
|
|
|
|
2017-12-07 19:43:46 +00:00
|
|
|
{{#if contentLinkerButton}}
|
2018-12-08 20:54:19 +00:00
|
|
|
<div class="btn btn-primary" id="section-editor-link-button-{{pageId}}" {{action "onShowLinkModal"}}>
|
2018-12-06 14:10:00 +00:00
|
|
|
Link
|
|
|
|
{{#attach-tooltip showDelay=1000}}Insert Link{{/attach-tooltip}}
|
|
|
|
</div>
|
2017-12-07 19:43:46 +00:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#if previewButton}}
|
2018-12-08 20:54:19 +00:00
|
|
|
<div class="btn btn-primary" id="section-editor-preview-button-{{pageId}}" {{action "onPreview"}}>{{previewText}}</div>
|
2017-12-07 19:43:46 +00:00
|
|
|
{{/if}}
|
|
|
|
|
2018-12-08 20:54:19 +00:00
|
|
|
<div class="btn btn-success" {{action "onAction"}}>Save</div>
|
|
|
|
<div class="btn btn-outline-secondary" id="section-editor-cancel-button-{{pageId}}" {{action "onCancel"}}>Cancel</div>
|
2017-03-05 19:11:01 +00:00
|
|
|
</div>
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col section-editor">
|
2018-02-08 12:12:27 +00:00
|
|
|
<div class="canvas rounded mt-5">
|
2017-12-07 19:43:46 +00:00
|
|
|
{{yield}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id={{concat "discard-modal-" page.id}} class="modal" tabindex="-1" role="dialog">
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">Discard Changes</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<p>You have made changes to the section - continue editing or discard changes?</p>
|
2017-02-28 03:25:06 +00:00
|
|
|
</div>
|
2017-12-07 19:43:46 +00:00
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Continue editing</button>
|
2018-12-08 20:54:19 +00:00
|
|
|
<button type="button" class="btn btn-danger" onclick={{action "onDiscard"}}>Discard changes</button>
|
2017-02-28 03:25:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-07 19:43:46 +00:00
|
|
|
|
2018-12-08 20:54:19 +00:00
|
|
|
{{document/content-linker document=document folder=folder page=page showModal=showLinkModal onInsertLink=(action "onInsertLink")}}
|