refactoring
This commit is contained in:
parent
0d8fd0606f
commit
add449c18a
7 changed files with 30 additions and 29 deletions
21
Yavsc/Views/Shared/DisplayTemplates/ApplicationUser.cshtml
Normal file
21
Yavsc/Views/Shared/DisplayTemplates/ApplicationUser.cshtml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
@model ApplicationUser
|
||||
blah
|
||||
<img src="~/Avatars/@(Model.UserName).xs.png" alt="avatar">
|
||||
@Model.UserName
|
||||
@if (Model.Posts!=null) {
|
||||
<li> <a asp-controller="Blogspot" asp-action="UserPosts"
|
||||
asp-route-id="@Model.UserName">@SR["His blog"]</a>
|
||||
</li>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(
|
||||
Model.DedicatedGoogleCalendar))
|
||||
{
|
||||
<li> @SR["Exposes his Google calendar!"]
|
||||
</li>
|
||||
}
|
||||
@if (Model.Devices?.Count>0)
|
||||
{
|
||||
<li> @SR["Uses the mobile application, and receives push notifications"]
|
||||
</li>
|
||||
}
|
||||
}
|
||||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<div class="performer @(Model.Active?"active":"inactive")">
|
||||
|
||||
<img src="~/Avatars/@(Model.Performer?.UserName).xs.png" alt="avatar">
|
||||
|
||||
@Model.Performer?.UserName
|
||||
@Html.DisplayFor(m=>m.Performer)
|
||||
|
||||
<ul>
|
||||
<li> @SR["Rating"]: @Model.Rate % </li>
|
||||
|
|
@ -17,25 +15,7 @@
|
|||
@if (Model.WebSite!=null) {
|
||||
<li>@SR["WebSite"]: @Model.WebSite</li>
|
||||
}
|
||||
@if (Model.Performer != null) {
|
||||
@if (Model.Performer.Posts!=null) {
|
||||
<li> <a asp-controller="Blogspot" asp-action="UserPosts"
|
||||
asp-route-id="@Model.Performer.UserName">@SR["His blog"]</a>
|
||||
</li>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(
|
||||
Model.Performer.DedicatedGoogleCalendar))
|
||||
{
|
||||
<li> @SR["Exposes his Google calendar!"]
|
||||
</li>
|
||||
}
|
||||
@if (Model.Performer.Devices?.Count>0)
|
||||
{
|
||||
<li> @SR["Uses the mobile application, and receives push notifications"]
|
||||
</li>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue