2017-11-21 14:47:49 +00:00
|
|
|
<div class="view-space">
|
|
|
|
<ul class="documents">
|
2017-09-26 16:30:16 +01:00
|
|
|
{{#each documents key="id" as |document|}}
|
2017-11-21 14:47:49 +00:00
|
|
|
<li class="document {{if document.selected "selected"}}" id="document-{{document.id}}">
|
2017-11-22 16:28:17 +00:00
|
|
|
|
2017-11-22 13:39:46 +00:00
|
|
|
{{#link-to 'document.index' space.id space.slug document.id document.slug}}
|
2017-11-21 14:47:49 +00:00
|
|
|
<div class="title">{{ document.name }}</div>
|
|
|
|
<div class="snippet">{{ document.excerpt }}</div>
|
|
|
|
{{folder/document-tags documentTags=document.tags}}
|
|
|
|
{{/link-to}}
|
2017-11-22 16:28:17 +00:00
|
|
|
|
2017-11-22 13:39:46 +00:00
|
|
|
{{#if hasDocumentActions}}
|
2017-11-21 14:47:49 +00:00
|
|
|
<div class="checkbox" {{action 'selectDocument' document.id}}>
|
|
|
|
{{#if document.selected}}
|
|
|
|
<i class="material-icons">check_box</i>
|
|
|
|
{{else}}
|
|
|
|
<i class="material-icons">check_box_outline_blank</i>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2017-11-22 13:39:46 +00:00
|
|
|
{{#if document.selected}}
|
|
|
|
<div class="actions">
|
|
|
|
{{#if permissions.documentMove}}
|
2017-11-22 16:28:17 +00:00
|
|
|
<div class="move-documents-button button-icon-green button-icon-small align-middle" {{action 'onShowMoveDocuments'}}>
|
2017-11-22 13:39:46 +00:00
|
|
|
<i class="material-icons">compare_arrows</i>
|
|
|
|
</div>
|
|
|
|
<div class="button-icon-gap" />
|
|
|
|
{{/if}}
|
|
|
|
{{#if permissions.documentDelete}}
|
2017-11-22 16:28:17 +00:00
|
|
|
<div class="delete-documents-button button-icon-red button-icon-small align-middle" {{action 'onShowDeleteDocuments'}}>
|
2017-11-22 13:39:46 +00:00
|
|
|
<i class="material-icons">delete</i>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2017-11-21 14:47:49 +00:00
|
|
|
{{/if}}
|
2017-11-22 16:28:17 +00:00
|
|
|
|
2017-11-21 14:47:49 +00:00
|
|
|
</li>
|
2017-09-26 16:30:16 +01:00
|
|
|
{{/each}}
|
2017-11-21 14:47:49 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
2017-10-10 16:02:46 -04:00
|
|
|
|
2017-11-22 16:28:17 +00:00
|
|
|
{{#ui/ui-confirm-dialog title="Delete Documents" confirmCaption="Delete" buttonType="btn-danger" show=showDeleteDialog onAction=(action 'onDeleteDocuments')}}
|
|
|
|
<p>Are you sure you want to delete {{selectedDocuments.length}} {{selectedCaption}}?</p>
|
|
|
|
{{/ui/ui-confirm-dialog}}
|
|
|
|
|
|
|
|
{{#ui/ui-confirm-dialog title="Move Documents" confirmCaption="Move" buttonType="btn-success" show=showMoveDialog onAction=(action 'onMoveDocuments')}}
|
|
|
|
<p>Select space for {{selectedDocuments.length}} {{selectedCaption}}</p>
|
|
|
|
{{ui/ui-list-picker items=moveOptions nameField='name' singleSelect=true}}
|
2017-11-22 13:39:46 +00:00
|
|
|
{{/ui/ui-confirm-dialog}}
|
|
|
|
|
2017-10-10 16:02:46 -04:00
|
|
|
{{#if showAdd}}
|
2017-10-10 16:39:39 -04:00
|
|
|
{{empty-state icon="direct" message="You can create new documents via the green + button"}}
|
2017-10-10 16:02:46 -04:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#if showLockout}}
|
2017-10-10 16:39:39 -04:00
|
|
|
{{empty-state icon="visibility" message="It looks like space permissions are preventing you from viewing and creating documents"}}
|
2017-09-26 16:30:16 +01:00
|
|
|
{{/if}}
|