refactoring
This commit is contained in:
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Yavsc.ViewModel.Auth;
|
||||
|
||||
namespace Yavsc.ViewModels.Auth.Handlers
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
@foreach (var profile in Model) {
|
||||
<hr/>
|
||||
await Html.RenderPartialAsync("PerformerProfile", profile) ;
|
||||
@Html.DisplayFor(m=>m)
|
||||
<form action="~/Command/Create" >
|
||||
<input type="hidden" name="id" value="@profile.PerformerId" />
|
||||
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
|
||||
|
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>
|
||||
|
Reference in New Issue
Block a user