diff --git a/Yavsc/Controllers/CircleController.cs b/Yavsc/Controllers/CircleController.cs index b1bc133d..f439d762 100644 --- a/Yavsc/Controllers/CircleController.cs +++ b/Yavsc/Controllers/CircleController.cs @@ -1,7 +1,6 @@ -using System.Linq; + using System.Threading.Tasks; using Microsoft.AspNet.Mvc; -using Microsoft.AspNet.Mvc.Rendering; using Microsoft.Data.Entity; using Yavsc.Models; using Yavsc.Models.Relationship; diff --git a/Yavsc/Controllers/CircleMemberController.cs b/Yavsc/Controllers/CircleMemberController.cs index de14f13a..bc8f76ea 100644 --- a/Yavsc/Controllers/CircleMemberController.cs +++ b/Yavsc/Controllers/CircleMemberController.cs @@ -1,7 +1,6 @@ -using System.Linq; + using System.Threading.Tasks; using Microsoft.AspNet.Mvc; -using Microsoft.AspNet.Mvc.Rendering; using Microsoft.Data.Entity; using Yavsc.Models; using Yavsc.Models.Relationship; diff --git a/Yavsc/ViewModels/Auth/FileSpotInfo.cs b/Yavsc/ViewModels/Auth/FileSpotInfo.cs index 78c079ca..1f1abf2b 100644 --- a/Yavsc/ViewModels/Auth/FileSpotInfo.cs +++ b/Yavsc/ViewModels/Auth/FileSpotInfo.cs @@ -3,11 +3,12 @@ using System.IO; using Microsoft.AspNet.Authorization; using Yavsc.Models; -namespace Yavsc { +namespace Yavsc.ViewModel.Auth { public class FileSpotInfo : IAuthorizationRequirement { - public DirectoryInfo PathInfo { get; private set; } + public DirectoryInfo PathInfo { get; private set; } + public FileSpotInfo(string path, Blog b) { PathInfo = new DirectoryInfo(path); AuthorId = b.AuthorId; diff --git a/Yavsc/ViewModels/Auth/Handlers/PostUserFileHandler.cs b/Yavsc/ViewModels/Auth/Handlers/PostUserFileHandler.cs index e72a3461..d03f39fc 100644 --- a/Yavsc/ViewModels/Auth/Handlers/PostUserFileHandler.cs +++ b/Yavsc/ViewModels/Auth/Handlers/PostUserFileHandler.cs @@ -1,5 +1,6 @@ using System.Security.Claims; using Microsoft.AspNet.Authorization; +using Yavsc.ViewModel.Auth; namespace Yavsc.ViewModels.Auth.Handlers { diff --git a/Yavsc/Views/FrontOffice/Book.cshtml b/Yavsc/Views/FrontOffice/Book.cshtml index 9acda2a1..33a8c4aa 100644 --- a/Yavsc/Views/FrontOffice/Book.cshtml +++ b/Yavsc/Views/FrontOffice/Book.cshtml @@ -7,7 +7,7 @@ @foreach (var profile in Model) {
- await Html.RenderPartialAsync("PerformerProfile", profile) ; + @Html.DisplayFor(m=>m)
diff --git a/Yavsc/Views/Shared/DisplayTemplates/ApplicationUser.cshtml b/Yavsc/Views/Shared/DisplayTemplates/ApplicationUser.cshtml new file mode 100644 index 00000000..d7e5cb4e --- /dev/null +++ b/Yavsc/Views/Shared/DisplayTemplates/ApplicationUser.cshtml @@ -0,0 +1,21 @@ +@model ApplicationUser +blah +avatar +@Model.UserName + @if (Model.Posts!=null) { +
  • @SR["His blog"] +
  • + } + @if (!string.IsNullOrEmpty( + Model.DedicatedGoogleCalendar)) + { +
  • @SR["Exposes his Google calendar!"] +
  • + } + @if (Model.Devices?.Count>0) + { +
  • @SR["Uses the mobile application, and receives push notifications"] +
  • + } + } diff --git a/Yavsc/Views/Shared/DisplayTemplates/PerformerProfile.cshtml b/Yavsc/Views/Shared/DisplayTemplates/PerformerProfile.cshtml index 58f82668..7be85db3 100644 --- a/Yavsc/Views/Shared/DisplayTemplates/PerformerProfile.cshtml +++ b/Yavsc/Views/Shared/DisplayTemplates/PerformerProfile.cshtml @@ -2,9 +2,7 @@
    - avatar - - @Model.Performer?.UserName + @Html.DisplayFor(m=>m.Performer)