From 49d9571b8a9106920766dca8c61d1c3785c9c11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sevilla=20Marti=CC=81n?= Date: Sat, 22 Sep 2018 14:02:14 -0400 Subject: [PATCH] Make user posts page similar to discussion page, add empty text --- .../core/js/src/forum/components/PostsUserPage.js | 14 +++++++++++++- framework/core/less/forum/ActivityPage.less | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/framework/core/js/src/forum/components/PostsUserPage.js b/framework/core/js/src/forum/components/PostsUserPage.js index 95b9ed73c..ce9577653 100644 --- a/framework/core/js/src/forum/components/PostsUserPage.js +++ b/framework/core/js/src/forum/components/PostsUserPage.js @@ -1,6 +1,7 @@ import UserPage from './UserPage'; import LoadingIndicator from '../../common/components/LoadingIndicator'; import Button from '../../common/components/Button'; +import Placeholder from '../../common/components/Placeholder'; import CommentPost from './CommentPost'; /** @@ -59,6 +60,15 @@ export default class PostsUserPage extends UserPage { ); } + if (this.posts.length === 0 && !this.loading) { + const text = app.translator.trans('core.forum.user.posts_empty_text'); + return ( +
+ {Placeholder.component({text})} +
+ ); + } + return (
- {footer} +
+ {footer} +
); } diff --git a/framework/core/less/forum/ActivityPage.less b/framework/core/less/forum/ActivityPage.less index 4d3fafcb9..feea2b20a 100644 --- a/framework/core/less/forum/ActivityPage.less +++ b/framework/core/less/forum/ActivityPage.less @@ -1,5 +1,6 @@ .PostsUserPage-loadMore { text-align: center; + margin-top: 10px; .LoadingIndicator { height: 46px;