mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
Restrict pin sequence changing
Only all documents filter enables the up/down pin sequence change clickers.
This commit is contained in:
parent
d1774b42bd
commit
c689379f92
3 changed files with 5 additions and 4 deletions
|
@ -31,8 +31,8 @@ export default Component.extend({
|
|||
hasDocumentActions: computed('permissions.{documentDelete,documentMove}', function() {
|
||||
return this.get('permissions.documentDelete') || this.get('permissions.documentMove');
|
||||
}),
|
||||
hasCategoryFilter: computed('categoryFilter', function() {
|
||||
return !_.isEmpty(this.get('categoryFilter'));
|
||||
showingAllDocs: computed('categoryFilter', 'numDocuments', 'documents', function() {
|
||||
return _.isEmpty(this.get('categoryFilter')) && this.get('documents').length == this.get("numDocuments");
|
||||
}),
|
||||
|
||||
didReceiveAttrs() {
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
meta=model.folder.icon}}
|
||||
|
||||
{{folder/documents-list
|
||||
numDocuments=model.documents.length
|
||||
documents=filteredDocs
|
||||
spaces=model.folders
|
||||
space=model.folder
|
||||
|
|
|
@ -94,14 +94,14 @@
|
|||
{{#if hasDocumentActions}}
|
||||
<div class="sequence">
|
||||
{{#if document.isSequenced}}
|
||||
{{#unless hasCategoryFilter}}
|
||||
{{#if showingAllDocs}}
|
||||
<i class="dicon {{constants.Icon.ArrowSmallUp}}" {{action "onPinSequence" document.id "u"}}>
|
||||
{{#attach-tooltip showDelay=250}}Move up{{/attach-tooltip}}
|
||||
</i>
|
||||
<i class="dicon {{constants.Icon.ArrowSmallDown}}" {{action "onPinSequence" document.id "d"}}>
|
||||
{{#attach-tooltip showDelay=250}}Move down{{/attach-tooltip}}
|
||||
</i>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
<i class="dicon {{constants.Icon.Cross}}" {{action "onUnpin" document.id}}>
|
||||
{{#attach-tooltip showDelay=250}}Unpin{{/attach-tooltip}}
|
||||
</i>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue