show performer device usage

This commit is contained in:
2016-12-09 13:40:37 +01:00
parent 0bba44f1bb
commit be61f12ed7
2 changed files with 9 additions and 3 deletions

View File

@ -48,7 +48,8 @@ namespace Yavsc.Controllers
a => a.Code == id);
return View(
_context.Performers.Include(p => p.Performer).Where
_context.Performers.Include(p => p.Performer)
.Include(p=>p.Performer.Devices).Where
(p => p.ActivityCode == id && p.Active).OrderBy(
x => x.MinDailyCost
)

View File

@ -2,9 +2,14 @@
<div class="performer @(Model.Active?"active":"inactive")">
@if (Model.Performer != null) {
@if (Model.Performer.Avatar != null) {
<img src="~/Avatars/@Model.Performer.Avatar" alt="avatar">
}
@Model.Performer.UserName
<ul>
<li>@Model.Performer.UserName (rating: @Model.Rate%)</li>
<li> @SR["Rating"]: @Model.Rate % </li>
@if (Model.MinDailyCost != null) {
<li>@SR["MinDailyCost"]: @Model.MinDailyCost&euro;</li>
}