Merge pull request #2394 from nextcloud/use-displayname-for-sharee-view

Use displayname instead of username for sharee view
This commit is contained in:
Joas Schilling 2016-11-29 14:30:30 +01:00 committed by GitHub
commit f9271ebbd6
2 changed files with 5 additions and 3 deletions

View File

@ -22,7 +22,7 @@
'{{#each sharees}}' +
'<li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' +
'{{#if avatarEnabled}}' +
'<div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
'<div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" data-displayname="{{shareWithDisplayName}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
'{{/if}}' +
'<span class="has-tooltip username" title="{{shareWithTitle}}">{{shareWithDisplayName}}</span>' +
'<span class="sharingOptionsGroup">' +
@ -269,7 +269,8 @@
$this.css({width: 32, height: 32});
$this.imageplaceholder($this.data('seed'));
} else {
$this.avatar($this.data('username'), 32);
// user, size, ie8fix, hidedefault, callback, displayname
$this.avatar($this.data('username'), 32, undefined, undefined, undefined, $this.data('displayname'));
}
});
}

View File

@ -464,8 +464,9 @@ describe('OC.Share.ShareDialogView', function() {
it('test avatar user', function() {
var args = avatarStub.getCall(1).args;
expect(args.length).toEqual(2);
expect(args.length).toEqual(6);
expect(args[0]).toEqual('user1');
expect(args[5]).toEqual('User One');
});
it('test avatar for groups', function() {