summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2016-10-26 11:27:43 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2016-11-01 19:54:41 +0100
commit561dd80d576ab87947e49b080dd5eb5d2c0a0ee9 (patch)
treef68bbecda1c5cde23ae43907c839d4622efb3f1d /core
parent31c8c38bd62af35c1578a8342b05580a9bd67466 (diff)
downloadnextcloud-server-561dd80d576ab87947e49b080dd5eb5d2c0a0ee9.tar.gz
nextcloud-server-561dd80d576ab87947e49b080dd5eb5d2c0a0ee9.zip
don't show 'notify by mail' option or permissions not available for mail shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'core')
-rw-r--r--core/js/sharedialogshareelistview.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index cca698905c2..775eaa554b0 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -27,22 +27,25 @@
'<span class="has-tooltip username" title="{{shareWithTitle}}">{{shareWithDisplayName}}</span>' +
'<span class="sharingOptionsGroup">' +
'{{#if editPermissionPossible}}' +
+ '{{#unless isFileSharedByMail}}' +
'<span class="shareOption">' +
'<input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' +
'<label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' +
'</span>' +
+ '{{/unless}}' +
'{{/if}}' +
+ '{{#unless isMailShare}}' +
'<a href="#"><span class="icon icon-more"></span></a>' +
'<div class="popovermenu bubble hidden menu">' +
'<ul>' +
- '{{#if isResharingAllowed}} {{#if sharePermissionPossible}}' +
+ '{{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isMailShare}}' +
'<li>' +
'<span class="shareOption">' +
'<input id="canShare-{{cid}}-{{shareWith}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />' +
'<label for="canShare-{{cid}}-{{shareWith}}">{{canShareLabel}}</label>' +
'</span>' +
'</li>' +
- '{{/if}} {{/if}}' +
+ '{{/unless}} {{/if}} {{/if}}' +
'{{#if isFolder}}' +
'{{#if createPermissionPossible}}' +
'<li>' +
@@ -74,7 +77,9 @@
'</li>' +
'</ul>' +
'</div>' +
- '</span>' +
+ '{{/unless}}' +
+ '<a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually">{{unshareLabel}}</span></a>' +
+ '</span>' +
'</li>' +
'{{/each}}' +
'{{#each linkReshares}}' +
@@ -175,7 +180,9 @@
shareType: shareType,
shareId: this.model.get('shares')[shareIndex].id,
modSeed: shareType !== OC.Share.SHARE_TYPE_USER,
- isRemoteShare: shareType === OC.Share.SHARE_TYPE_REMOTE
+ isRemoteShare: shareType === OC.Share.SHARE_TYPE_REMOTE,
+ isMailShare: shareType === OC.Share.SHARE_TYPE_EMAIL,
+ isFileSharedByMail: shareType === OC.Share.SHARE_TYPE_EMAIL && !this.model.isFolder()
});
},