From 73ffb16d8518395c4911e387e7792b061598727c Mon Sep 17 00:00:00 2001 From: Kurt Junghanns Date: Tue, 10 Jul 2018 17:00:46 +0200 Subject: [PATCH 01/14] [SWIK-2275_users_display_name] Used new user attribute in the components and services (step 1). --- .../ContentDiscussionPanel/Comment.js | 2 +- .../ContentUsagePanel/ContentUsageItem.js | 2 +- .../ContributorsPanel/ContributorItem.js | 2 +- .../DeckEditPanel/DeckPropertiesEditor.js | 3 +- .../DeckEditPanel/GroupDetailsModal.js | 4 +-- .../SearchResultsPanel/SearchResultsItem.js | 34 +++++++++---------- .../User/UserProfile/ChangePersonalData.js | 11 ++++++ components/User/UserProfile/PublicUserData.js | 6 ++-- components/User/UserProfile/UserGroupEdit.js | 7 ++-- components/User/UserProfile/UserProfile.js | 2 +- services/usage.js | 1 + services/userProfile.js | 31 +++++++++-------- stores/UserProfileStore.js | 6 ++-- 13 files changed, 65 insertions(+), 46 deletions(-) diff --git a/components/Deck/ContentModulesPanel/ContentDiscussionPanel/Comment.js b/components/Deck/ContentModulesPanel/ContentDiscussionPanel/Comment.js index 5b40c5eef..3a19eed6d 100644 --- a/components/Deck/ContentModulesPanel/ContentDiscussionPanel/Comment.js +++ b/components/Deck/ContentModulesPanel/ContentDiscussionPanel/Comment.js @@ -62,7 +62,7 @@ class Comment extends React.Component {
- {comment.author.username} + {comment.author.displayName || comment.author.username}
{ActivityFeedUtil.formatDate(comment.timestamp)} {nodeRef} diff --git a/components/Deck/ContentModulesPanel/ContentUsagePanel/ContentUsageItem.js b/components/Deck/ContentModulesPanel/ContentUsagePanel/ContentUsageItem.js index 2518e3544..3e2edfea7 100644 --- a/components/Deck/ContentModulesPanel/ContentUsagePanel/ContentUsageItem.js +++ b/components/Deck/ContentModulesPanel/ContentUsagePanel/ContentUsageItem.js @@ -9,7 +9,7 @@ class ContentUsageItem extends React.Component { const usingDeckLink = {this.props.usageItem.title} ; const userLink = {this.props.usageItem.username} ; + href={'/user/' + this.props.usageItem.user}>{this.props.usageItem.displayName || this.props.usageItem.username} ; return (
diff --git a/components/Deck/ContentModulesPanel/ContributorsPanel/ContributorItem.js b/components/Deck/ContentModulesPanel/ContributorsPanel/ContributorItem.js index a5e78537a..d3fd97818 100644 --- a/components/Deck/ContentModulesPanel/ContributorsPanel/ContributorItem.js +++ b/components/Deck/ContentModulesPanel/ContributorsPanel/ContributorItem.js @@ -18,7 +18,7 @@ class ContributorItem extends React.Component {
- {this.props.data.username} + {this.props.data.displayName || this.props.data.username}
{this.props.data.organization}
diff --git a/components/Deck/ContentPanel/DeckModes/DeckEditPanel/DeckPropertiesEditor.js b/components/Deck/ContentPanel/DeckModes/DeckEditPanel/DeckPropertiesEditor.js index d8e4dc95a..eda26e69f 100644 --- a/components/Deck/ContentPanel/DeckModes/DeckEditPanel/DeckPropertiesEditor.js +++ b/components/Deck/ContentPanel/DeckModes/DeckEditPanel/DeckPropertiesEditor.js @@ -174,7 +174,8 @@ class DeckPropertiesEditor extends React.Component { joined: data.joined || (new Date()).toISOString(), picture: data.picture, country: data.country, - organization: data.organization + organization: data.organization, + displayName: data.displayName }); } diff --git a/components/Deck/ContentPanel/DeckModes/DeckEditPanel/GroupDetailsModal.js b/components/Deck/ContentPanel/DeckModes/DeckEditPanel/GroupDetailsModal.js index c6889cb21..9aa34eb6e 100644 --- a/components/Deck/ContentPanel/DeckModes/DeckEditPanel/GroupDetailsModal.js +++ b/components/Deck/ContentPanel/DeckModes/DeckEditPanel/GroupDetailsModal.js @@ -65,7 +65,7 @@ class GroupDetailsModal extends React.Component {