fixies the refact of blog spot index
This commit is contained in:
parent
64e00f5d90
commit
21cd878839
13 changed files with 46 additions and 31 deletions
|
|
@ -1,4 +1,4 @@
|
|||
@model IEnumerable<IGrouping<string,BlogPost>>
|
||||
@model IEnumerable<IGrouping<string,IBlogPost>>
|
||||
@{
|
||||
ViewData["Title"] = "Blogs, l'index";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,10 @@
|
|||
@using Yavsc.Abstract.Identity
|
||||
@model ApplicationUser
|
||||
@{
|
||||
var avuri = "/Avatars/"+Model.UserName+".s.png";
|
||||
var userPosted = Model.Posts!=null && Model.Posts.Count()>=1;
|
||||
var avuri = "/Avatars/" + Model.UserName + ".s.png";
|
||||
}
|
||||
<div class="userinfo">
|
||||
@if (userPosted) { <a asp-controller="Blogspot" asp-action="Index"
|
||||
asp-route-id="@Model.UserName" class="btn btn-primary">
|
||||
<img src="@avuri" asp-append-version="true" class="smalltofhol" alt="@Model.UserName" title="@Model.UserName"/>
|
||||
</a>
|
||||
} else {
|
||||
Html.DisplayFor(m=>m.UserName);
|
||||
}
|
||||
<a title="Posts" asp-controller="Blogspot" asp-action="Index" asp-route-id="@Model.UserName" class="btn btn-primary">
|
||||
<img src="@avuri" asp-append-version="true" class="smalltofhol" alt="@Model.UserName" title="@Model.UserName" />
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
@using Yavsc.Abstract.Identity
|
||||
@model IApplicationUser
|
||||
@{
|
||||
var avuri = "/Avatars/" + Model.UserName + ".s.png";
|
||||
}
|
||||
<div class="userinfo">
|
||||
<a title="Posts" asp-controller="Blogspot" asp-action="Index" asp-route-id="@Model.UserName" class="btn btn-primary">
|
||||
<img src="@avuri" asp-append-version="true" class="smalltofhol" alt="@Model.UserName" title="@Model.UserName" />
|
||||
</a>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue