diff --git a/webapp/components/post_view/components/post.jsx b/webapp/components/post_view/components/post.jsx
index 2dce093ec8..e76701b6f0 100644
--- a/webapp/components/post_view/components/post.jsx
+++ b/webapp/components/post_view/components/post.jsx
@@ -196,6 +196,7 @@ export default class Post extends React.Component {
);
diff --git a/webapp/components/profile_picture.jsx b/webapp/components/profile_picture.jsx
index 5443b74d6d..8e14fa5fab 100644
--- a/webapp/components/profile_picture.jsx
+++ b/webapp/components/profile_picture.jsx
@@ -1,7 +1,9 @@
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-
+import * as Utils from 'utils/utils.jsx';
+import UserStore from 'stores/user_store.jsx';
import React from 'react';
+import {Popover, OverlayTrigger} from 'react-bootstrap';
export default class ProfilePicture extends React.Component {
shouldComponentUpdate(nextProps) {
@@ -25,11 +27,80 @@ export default class ProfilePicture extends React.Component {
}
render() {
+ let email = '';
let statusClass = '';
if (this.props.status) {
statusClass = 'status-' + this.props.status;
}
-
+ if (this.props.user) {
+ email = this.props.user.email;
+ var dataContent = [];
+ dataContent.push(
+
+ );
+ const fullname = Utils.getFullName(this.props.user);
+ if (fullname) {
+ dataContent.push(
+
+ );
+ }
+ if (global.window.mm_config.ShowEmailAddress === 'true' || UserStore.isSystemAdminForCurrentUser() || this.props.user.id === UserStore.getCurrentId()) {
+ dataContent.push(
+
+ );
+ }
+ return (
+
+ {dataContent}
+
+ }
+ >
+
+
+
+
+ );
+ }
return (
);
diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx
index 983469f50c..7d643bd388 100644
--- a/webapp/components/rhs_root_post.jsx
+++ b/webapp/components/rhs_root_post.jsx
@@ -284,6 +284,7 @@ export default class RhsRootPost extends React.Component {
status={this.props.status}
width='36'
height='36'
+ user={this.props.user}
/>
);
diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index 1d36f75430..a03bb22ad8 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -4,6 +4,7 @@
import $ from 'jquery';
import PostMessageContainer from 'components/post_view/components/post_message_container.jsx';
import UserProfile from './user_profile.jsx';
+import ProfilePicture from './profile_picture.jsx';
import TeamStore from 'stores/team_store.jsx';
import UserStore from 'stores/user_store.jsx';
@@ -97,11 +98,11 @@ export default class SearchResultsItem extends React.Component {
}
const profilePic = (
-
+
);
let compactClass = '';
diff --git a/webapp/sass/layout/_post.scss b/webapp/sass/layout/_post.scss
index 680c05f840..95c6e4443e 100644
--- a/webapp/sass/layout/_post.scss
+++ b/webapp/sass/layout/_post.scss
@@ -646,6 +646,10 @@ body.ios {
}
}
+ .post__img:hover {
+ cursor: pointer;
+ }
+
.post--fail {
position: relative;
}