Add file attachment to search result (#5806)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
f1274a7ec2
Коммит
3ea091fd6d
@@ -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 FileAttachmentListContainer from './file_attachment_list_container.jsx';
|
||||
import ProfilePicture from './profile_picture.jsx';
|
||||
|
||||
import TeamStore from 'stores/team_store.jsx';
|
||||
@@ -161,6 +162,16 @@ export default class SearchResultsItem extends React.Component {
|
||||
compactClass = 'post--compact';
|
||||
}
|
||||
|
||||
let fileAttachment = null;
|
||||
if (post.file_ids && post.file_ids.length > 0) {
|
||||
fileAttachment = (
|
||||
<FileAttachmentListContainer
|
||||
post={post}
|
||||
compactDisplay={this.props.compactDisplay}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
let message;
|
||||
let flagContent;
|
||||
let rhsControls;
|
||||
@@ -341,6 +352,7 @@ export default class SearchResultsItem extends React.Component {
|
||||
</ul>
|
||||
<div className='search-item-snippet post__body'>
|
||||
{message}
|
||||
{fileAttachment}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Ссылка в новой задаче
Block a user