{{#layout/zone-container}}
	{{#layout/zone-sidebar}}
		{{document/sidebar-zone folders=model.folders folder=model.folder document=model.document
			pages=model.pages sections=model.section links=model.links isEditor=model.isEditor tab=tab
			onDocumentDelete=(action 'onDocumentDelete') onSaveTemplate=(action 'onSaveTemplate')
			onPageSequenceChange=(action 'onPageSequenceChange') onPageLevelChange=(action 'onPageLevelChange') onGotoPage=(action 'onGotoPage')}}
	{{/layout/zone-sidebar}}
	{{#layout/zone-content}}
		<div id="zone-document-content" class="zone-document-content">
			<div class="back-to-space">
				{{#link-to 'folder' model.folder.id model.folder.slug}}
					<div class="regular-button button-gray">
						<i class="material-icons">arrow_back</i>
						<div class="name">{{model.folder.name}}</div>
					</div>
				{{/link-to}}
			</div>
			{{document/document-heading document=model.document isEditor=model.isEditor onSaveDocument=(action 'onSaveDocument')}}
			{{document/document-view document=model.document links=model.links pages=model.pages
				folder=model.folder folders=model.folders sections=model.sections isEditor=model.isEditor pageId=pageId
				onSavePage=(action 'onSavePage') onInsertSection=(action 'onInsertSection') 
				onSavePageAsBlock=(action 'onSavePageAsBlock') onDeleteBlock=(action 'onDeleteBlock') onGotoPage=(action 'onGotoPage')
				onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onPageDeleted')}}
		</div>
	{{/layout/zone-content}}
{{/layout/zone-container}}
