simplify share placeholder

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Bjoern Schiessle 2017-04-18 12:08:35 +02:00
parent a3c9dcf82a
commit c6ae57ecee
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
1 changed files with 7 additions and 20 deletions

View File

@ -479,33 +479,20 @@
},
_renderSharePlaceholderPart: function () {
var allowGroupSharing = this.configModel.get('allowGroupSharing');
var allowRemoteSharing = this.configModel.get('isRemoteShareAllowed');
var allowMailSharing = this.configModel.get('isMailShareAllowed');
if (!allowGroupSharing && !allowRemoteSharing && allowMailSharing) {
return t('core', 'Share with users or by mail...');
if (!allowRemoteSharing && allowMailSharing) {
return t('core', 'Name or email address...');
}
if (!allowGroupSharing && allowRemoteSharing && !allowMailSharing) {
return t('core', 'Share with users or remote users...');
if (allowRemoteSharing && !allowMailSharing) {
return t('core', 'Name or federated cloud ID...');
}
if (!allowGroupSharing && allowRemoteSharing && allowMailSharing) {
return t('core', 'Share with users, remote users or by mail...');
}
if (allowGroupSharing && !allowRemoteSharing && !allowMailSharing) {
return t('core', 'Share with users or groups...');
}
if (allowGroupSharing && !allowRemoteSharing && allowMailSharing) {
return t('core', 'Share with users, groups or by mail...');
}
if (allowGroupSharing && allowRemoteSharing && !allowMailSharing) {
return t('core', 'Share with users, groups or remote users...');
}
if (allowGroupSharing && allowRemoteSharing && allowMailSharing) {
return t('core', 'Share with users, groups, remote users or by mail...');
if (allowRemoteSharing && allowMailSharing) {
return t('core', 'Name, federated cloud ID or email address...');
}
return t('core', 'Share with users...');
return t('core', 'Name...');
},
/**