mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
move documents new UX
This commit is contained in:
parent
bae1245d47
commit
aee9345886
14 changed files with 141 additions and 207 deletions
|
@ -2,11 +2,13 @@
|
|||
<ul class="documents">
|
||||
{{#each documents key="id" as |document|}}
|
||||
<li class="document {{if document.selected "selected"}}" id="document-{{document.id}}">
|
||||
|
||||
{{#link-to 'document.index' space.id space.slug document.id document.slug}}
|
||||
<div class="title">{{ document.name }}</div>
|
||||
<div class="snippet">{{ document.excerpt }}</div>
|
||||
{{folder/document-tags documentTags=document.tags}}
|
||||
{{/link-to}}
|
||||
|
||||
{{#if hasDocumentActions}}
|
||||
<div class="checkbox" {{action 'selectDocument' document.id}}>
|
||||
{{#if document.selected}}
|
||||
|
@ -15,30 +17,35 @@
|
|||
<i class="material-icons">check_box_outline_blank</i>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{#if document.selected}}
|
||||
<div class="actions">
|
||||
{{#if permissions.documentMove}}
|
||||
<div class="move-documents-button button-icon-blue button-icon-small align-middle">
|
||||
<div class="move-documents-button button-icon-green button-icon-small align-middle" {{action 'onShowMoveDocuments'}}>
|
||||
<i class="material-icons">compare_arrows</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
{{/if}}
|
||||
{{#if permissions.documentDelete}}
|
||||
<div class="delete-documents-button button-icon-red button-icon-small align-middle" {{action 'onConfirmDeleteDocuments'}}>
|
||||
<div class="delete-documents-button button-icon-red button-icon-small align-middle" {{action 'onShowDeleteDocuments'}}>
|
||||
<i class="material-icons">delete</i>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{#ui/ui-confirm-dialog title="Delete Documents" confirmCaption="Delete" show=showDeleteDialog onAction=(action 'onDeleteDocuments')}}
|
||||
<p>Are you sure you want to delete the {{selectedDocuments.length}} selected documents?</p>
|
||||
{{#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}}
|
||||
{{/ui/ui-confirm-dialog}}
|
||||
|
||||
{{#if showAdd}}
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
<div class="pull-right hidden-xs hidden-sm">
|
||||
{{#if hasSelectedDocuments}}
|
||||
|
||||
{{#if xxx}}
|
||||
{{#dropdown-dialog target="move-documents-button" position="bottom right" button="Move" color="flat-blue" onAction=(action 'moveDocuments')}}
|
||||
<p class="heading">Select destination space</p>
|
||||
<ul class="move-document-options">
|
||||
{{#each movedFolderOptions as |folder|}}
|
||||
<li class="option {{if folder.selected "selected"}}" {{action 'setMoveFolder' folder.id}}>
|
||||
{{#if folder.selected}}
|
||||
<i class="material-icons">radio_button_checked</i>
|
||||
{{else}}
|
||||
<i class="material-icons">radio_button_unchecked</i>
|
||||
{{/if}}
|
||||
{{ folder.name }}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/dropdown-dialog}}
|
||||
{{/if}}
|
||||
|
||||
{{#if xxx}}
|
||||
{{#dropdown-dialog target="delete-documents-button" position="bottom right" button="Delete" color="flat-red" onAction=(action 'deleteDocuments')}}
|
||||
<p>Are you sure you want to delete selected documents?</p>
|
||||
<p>There is no undo!</p>
|
||||
{{/dropdown-dialog}}
|
||||
{{/if}}
|
||||
|
||||
{{else}}
|
||||
|
||||
{{#if permissions.documentAdd}}
|
||||
<div class="round-button button-green" id="document-add-button" data-tooltip="Create document" data-tooltip-position="top center" {{action 'onStartDocument'}}>
|
||||
<i class="material-icons">add</i>
|
||||
</div>
|
||||
<div class="button-gap"></div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
@ -24,19 +24,15 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="view-space">
|
||||
<div class="filter-caption">{{documents.length}} documents</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{folder/documents-list documents=filteredDocs spaces=spaces space=space
|
||||
templates=templates permissions=permissions
|
||||
onDeleteDocument=(action 'onDeleteDocument')}}
|
||||
|
||||
{{#if showStartDocument}}
|
||||
{{folder/start-document folder=folder templates=templates permissions=permissions
|
||||
onImport=(action 'onImport') onHideStartDocument=(action 'onHideStartDocument')}}
|
||||
{{/if}}
|
||||
|
||||
{{folder/space-toolbar folders=folders folder=folder
|
||||
permissions=permissions
|
||||
onMoveDocument=(action 'onMoveDocument')
|
||||
onStartDocument=(action 'onStartDocument')}}
|
||||
onDeleteDocument=(action 'onDeleteDocument') onMoveDocument=(action 'onMoveDocument')}}
|
||||
|
||||
{{folder/start-document folder=space templates=templates permissions=permissions
|
||||
onImport=(action 'onImport') onHideStartDocument=(action 'onHideStartDocument')}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue