81 lines
2.6 KiB
Handlebars
81 lines
2.6 KiB
Handlebars
<header>
|
|
{{breadcrumb-nav currentDirPath=currentDirPath}}
|
|
<nav class="actions">
|
|
{{#if metadataHidden}}
|
|
<button {{action "toggleMetadata"}}
|
|
title="Show metadata">
|
|
{{partial "icons/arrow-from-right"}}
|
|
</button>
|
|
{{else}}
|
|
<button {{action "toggleMetadata"}}
|
|
title="Hide metadata">
|
|
{{partial "icons/arrow-to-right"}}
|
|
</button>
|
|
{{/if}}
|
|
{{#if publicItemURL}}
|
|
<a class="button" href={{publicItemURL}} target="_blank"
|
|
title="Open document in new tab">
|
|
{{partial "icons/share"}}
|
|
</a>
|
|
{{/if}}
|
|
{{#if documentIsJSON}}
|
|
<div class="button-group json-view">
|
|
<button disabled={{jsonShowTree}}
|
|
class="{{if jsonShowTree "active"}}"
|
|
title="Tree view"
|
|
{{action "showJsonTree"}}>
|
|
{{partial "icons/list"}}
|
|
</button>
|
|
<button disabled={{jsonShowSource}}
|
|
class="{{if jsonShowSource "active"}}"
|
|
title="Show source"
|
|
{{action "showJsonSource"}}>
|
|
{{partial "icons/code"}}
|
|
</button>
|
|
</div>
|
|
{{/if}}
|
|
{{#if documentIsEditable}}
|
|
<div class="button-group editable">
|
|
<button disabled={{documentHideEditor}}
|
|
class="{{if documentHideEditor "active"}}"
|
|
title="{{if documentHideEditor "Cancel editing"}}"
|
|
{{action "cancelEditor"}}>
|
|
{{partial "icons/eye"}}
|
|
</button>
|
|
<button disabled={{documentShowEditor}}
|
|
class="{{if documentShowEditor "active"}}"
|
|
{{action "showEditor"}}>
|
|
{{partial "icons/edit"}}
|
|
</button>
|
|
</div>
|
|
{{/if}}
|
|
<button class="delete" title="Delete"
|
|
{{action "deleteItem"}}>{{partial "icons/trash"}}</button>
|
|
</nav>
|
|
</header>
|
|
|
|
<div class="inspect-details {{if metadataHidden "hide-metadata"}}">
|
|
<section class="content">
|
|
{{file-preview metaData=model.documentMetaData
|
|
isJSON=documentIsJSON
|
|
isEditable=documentIsEditableHide
|
|
showEditor=documentShowEditor
|
|
jsonShowTree=jsonShowTree
|
|
jsonShowSource=jsonShowSource}}
|
|
</section>
|
|
|
|
{{#unless metadataHidden}}
|
|
<section class="meta">
|
|
<dl>
|
|
<dt>Name</dt>
|
|
<dd>{{model.documentMetaData.name}}</dd>
|
|
<dt>Content type</dt>
|
|
<dd>{{model.documentMetaData.type}}</dd>
|
|
<dt>Size</dt>
|
|
<dd>{{human-file-size model.documentMetaData.size}}</dd>
|
|
<dt>Revision (ETag)</dt>
|
|
<dd>{{model.documentMetaData.etag}}</dd>
|
|
</dl>
|
|
</section>
|
|
{{/unless}}
|
|
</div> |