diff options
| author | Michael <[email protected]> | 2017-05-17 18:56:29 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-17 18:56:29 -0400 |
| commit | 179e3dac1e99b305be769481c3f19491604a126d (patch) | |
| tree | ade8834340e1ff4fc1ae2f393406d9e762c18481 | |
| parent | e2a91f2b143c82593ef2a7675d31b95a52279a32 (diff) | |
| download | project-unite-179e3dac1e99b305be769481c3f19491604a126d.tar.gz project-unite-179e3dac1e99b305be769481c3f19491604a126d.tar.bz2 project-unite-179e3dac1e99b305be769481c3f19491604a126d.zip | |
Hide empty profile modules.
| -rw-r--r-- | Project-Unite/Views/Profiles/ViewProfile.cshtml | 13 |
1 files changed, 12 insertions, 1 deletions
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 @@ <li><strong>Topics: </strong>@Model.TopicCount</li> </ul> + @if (Model.Followers.Count() > 0) + { <h4>Followers</h4> <ul> @foreach (var f in Model.Followers) @@ -44,7 +46,10 @@ <li>@Html.UserLink(f.Follower)</li> } </ul> + } + @if (Model.Followed.Count() > 0) + { <h4>Following</h4> <ul> @foreach (var f in Model.Followed) @@ -52,7 +57,7 @@ <li>@Html.UserLink(f.Followed)</li> } </ul> - + } </div> <div class="col-xs-9"> @@ -60,6 +65,12 @@ { Html.RenderPartial("~/Views/Profiles/_NewPost.cshtml", new Project_Unite.Models.UserPost()); } + @if(Model.Posts.Count() == 0) + { + <h3>Nothing to show here...</h3> + + <p>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!</p> + } @foreach(var post in Model.Posts.OrderByDescending(x => x.PostedAt)) { |
