<div class="document-meta">
	{{#link-to "folder.index" space.id space.slug class="no-print"}}
		{{ui/ui-button light=true color=constants.Color.Yellow uppercase=false
			icon=constants.Icon.ArrowLeft label=space.name stretch=true truncate=true}}
	{{/link-to}}
	{{ui/ui-spacer size=200}}

	{{#if (eq appMeta.edition constants.Product.EnterpriseEdition)}}
		<div class="title">VERSION</div>
		{{#if (gt versions.length 0)}}
			{{#ui/ui-toolbar dark=false light=true raised=true large=false bordered=true}}
				{{ui/ui-toolbar-label label=document.versionId color=constants.Color.Gray}}
				{{#attach-popover class="ember-attacher-popper" hideOn="clickout" showOn="click" isShown=false}}
					<div class="menu">
						<li class="item header">Select version to view</li>
						{{#each versions as |version|}}
							<a class="item" href="#" {{action "onSelectVersion" version}}>{{version.versionId}}</a>
						{{/each}}
					</div>
				{{/attach-popover}}
			{{/ui/ui-toolbar}}
		{{else}}
			{{#if permissions.spaceManage}}
				{{#ui/ui-toolbar dark=false light=true raised=true large=false bordered=true}}
					{{ui/ui-toolbar-icon icon=constants.Icon.Plus color=constants.Color.Gray linkTo="document.settings"}}
				{{/ui/ui-toolbar}}
			{{else}}
				<div class="empty">Not versioned</div>
			{{/if}}
		{{/if}}

		{{ui/ui-spacer size=200}}
	{{/if}}

	<div class="title {{if permissions.documentEdit "cursor-pointer"}}" {{action "onEditStatus"}}>STATUS</div>
	<div class="{{if (eq document.lifecycle constants.Lifecycle.Draft) "label-draft"}}
		{{if (eq document.lifecycle constants.Lifecycle.Live) "label-live"}}
		{{if (eq document.lifecycle constants.Lifecycle.Archived) "label-archived"}}">
		{{document.lifecycleLabel}}
		{{#attach-tooltip showDelay=1000}}Lifecycle: Draft &middot; Live &middot; Archived{{/attach-tooltip}}
	</div>

	{{#if (eq document.protection constants.ProtectionType.None)}}
		<div class="label-open">
			OPEN
			{{#attach-tooltip showDelay=1000}}Change Control: Open &middot; Protected &middot; Locked{{/attach-tooltip}}
		</div>
	{{/if}}
	{{#if (eq document.protection constants.ProtectionType.Review)}}
		<div class="label-protected">
			PROTECTED
			{{#attach-tooltip showDelay=1000}}Change Control: Open &middot; Protected &middot; Locked{{/attach-tooltip}}
		</div>
	{{/if}}
	{{#if (eq document.protection constants.ProtectionType.Lock)}}
		<div class="label-locked">
			LOCKED
			{{#attach-tooltip showDelay=1000}}Change Control: Open &middot; Protected &middot; Locked{{/attach-tooltip}}
		</div>
	{{/if}}
	{{#if document.template}}
		<div class="label-template">
			Template
			{{#attach-tooltip showDelay=1000}}This is a template{{/attach-tooltip}}
		</div>
	{{/if}}
</div>
