mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-02-02 13:07:34 +00:00
Hide empty profile modules.
This commit is contained in:
parent
e2a91f2b14
commit
179e3dac1e
1 changed files with 12 additions and 1 deletions
|
@ -37,6 +37,8 @@
|
||||||
<li><strong>Topics: </strong>@Model.TopicCount</li>
|
<li><strong>Topics: </strong>@Model.TopicCount</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@if (Model.Followers.Count() > 0)
|
||||||
|
{
|
||||||
<h4>Followers</h4>
|
<h4>Followers</h4>
|
||||||
<ul>
|
<ul>
|
||||||
@foreach (var f in Model.Followers)
|
@foreach (var f in Model.Followers)
|
||||||
|
@ -44,7 +46,10 @@
|
||||||
<li>@Html.UserLink(f.Follower)</li>
|
<li>@Html.UserLink(f.Follower)</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (Model.Followed.Count() > 0)
|
||||||
|
{
|
||||||
<h4>Following</h4>
|
<h4>Following</h4>
|
||||||
<ul>
|
<ul>
|
||||||
@foreach (var f in Model.Followed)
|
@foreach (var f in Model.Followed)
|
||||||
|
@ -52,7 +57,7 @@
|
||||||
<li>@Html.UserLink(f.Followed)</li>
|
<li>@Html.UserLink(f.Followed)</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-9">
|
<div class="col-xs-9">
|
||||||
|
@ -60,6 +65,12 @@
|
||||||
{
|
{
|
||||||
Html.RenderPartial("~/Views/Profiles/_NewPost.cshtml", new Project_Unite.Models.UserPost());
|
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))
|
@foreach(var post in Model.Posts.OrderByDescending(x => x.PostedAt))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue