From 179e3dac1e99b305be769481c3f19491604a126d Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 17 May 2017 18:56:29 -0400 Subject: [PATCH] Hide empty profile modules. --- Project-Unite/Views/Profiles/ViewProfile.cshtml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Project-Unite/Views/Profiles/ViewProfile.cshtml b/Project-Unite/Views/Profiles/ViewProfile.cshtml index 0f01d4e..32b8e0a 100644 --- a/Project-Unite/Views/Profiles/ViewProfile.cshtml +++ b/Project-Unite/Views/Profiles/ViewProfile.cshtml @@ -37,6 +37,8 @@
  • Topics: @Model.TopicCount
  • + @if (Model.Followers.Count() > 0) + {

    Followers

    + } + @if (Model.Followed.Count() > 0) + {

    Following

    - + }
    @@ -60,6 +65,12 @@ { Html.RenderPartial("~/Views/Profiles/_NewPost.cshtml", new Project_Unite.Models.UserPost()); } + @if(Model.Posts.Count() == 0) + { +

    Nothing to show here...

    + +

    This user hasn't posted anything to their profile just yet. You can follow them to get notified when they do, or you can keep checking back!

    + } @foreach(var post in Model.Posts.OrderByDescending(x => x.PostedAt)) {