From 392c8a115f136b4aa63ee759cf359595256d153d Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 25 Oct 2016 16:24:49 +0200 Subject: unified way to display remote shares and mail shares Signed-off-by: Bjoern Schiessle --- core/js/sharedialogshareelistview.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'core/js/sharedialogshareelistview.js') diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index 66ed85eda33..cca698905c2 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -24,7 +24,7 @@ '{{#if avatarEnabled}}' + '
' + '{{/if}}' + - '{{shareWithDisplayName}}' + + '{{shareWithDisplayName}}' + '' + '{{#if editPermissionPossible}}' + '' + @@ -141,6 +141,7 @@ getShareeObject: function(shareIndex) { var shareWith = this.model.getShareWith(shareIndex); var shareWithDisplayName = this.model.getShareWithDisplayName(shareIndex); + var shareWithTitle = ''; var shareType = this.model.getShareType(shareIndex); var hasPermissionOverride = {}; @@ -148,6 +149,16 @@ shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'group') + ')'; } else if (shareType === OC.Share.SHARE_TYPE_REMOTE) { shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'remote') + ')'; + } else if (shareType === OC.Share.SHARE_TYPE_EMAIL) { + shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'email') + ')'; + } + + if (shareType === OC.Share.SHARE_TYPE_GROUP) { + shareWithTitle = shareWith + " (" + t('core', 'group') + ')'; + } else if (shareType === OC.Share.SHARE_TYPE_REMOTE) { + shareWithTitle = shareWith + " (" + t('core', 'remote') + ')'; + } else if (shareType === OC.Share.SHARE_TYPE_EMAIL) { + shareWithTitle = shareWith + " (" + t('core', 'email') + ')'; } return _.extend(hasPermissionOverride, { @@ -160,6 +171,7 @@ wasMailSent: this.model.notificationMailWasSent(shareIndex), shareWith: shareWith, shareWithDisplayName: shareWithDisplayName, + shareWithTitle: shareWithTitle, shareType: shareType, shareId: this.model.get('shares')[shareIndex].id, modSeed: shareType !== OC.Share.SHARE_TYPE_USER, -- cgit v1.2.3