build
This commit is contained in:
parent
3744d9ae9c
commit
7d1cca9df0
4 changed files with 17 additions and 13 deletions
|
|
@ -7,6 +7,7 @@ using Yavsc.Models.Blog;
|
|||
using Microsoft.Extensions.Options;
|
||||
using Yavsc.Server.Exceptions;
|
||||
using Yavsc.Server.Helpers;
|
||||
using Yavsc.Blogspot;
|
||||
|
||||
// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Security.Claims;
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Yavsc;
|
||||
using Yavsc.Blogspot;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Blog;
|
||||
using Yavsc.Server.Exceptions;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
@model IEnumerable<IBlogPost>
|
||||
@{
|
||||
ViewBag.Title = "Blogs, l'index";
|
||||
|
|
@ -51,12 +52,12 @@
|
|||
<div class="post card">
|
||||
|
||||
|
||||
<a asp-action="Details" asp-route-id="@post.Id" class="bloglink" >
|
||||
<a asp-action="Details" asp-route-id="@((IBlogPost)post).Id" class="bloglink" >
|
||||
<div class="float-left"><img class="photo card-photo" src="@post.Photo" ></div>
|
||||
<h3 class="index-post-title">@post.Title</h3>
|
||||
</a>
|
||||
<div>
|
||||
<a asp-action="Details" asp-route-id="@post.Id">
|
||||
<a asp-action="Details" asp-route-id="@((IBlogPost)post).Id">
|
||||
<asciidoc summary="@maxTextLen">@post.Article</asciidoc></a>
|
||||
<span style="font-size:x-small;">@Html.DisplayFor(m => post.Author)</span>
|
||||
<span style="font-size:xx-small;">
|
||||
|
|
@ -69,17 +70,17 @@
|
|||
<div class="actiongroup">
|
||||
@if ((await AuthorizationService.AuthorizeAsync(User, post, new ReadPermission())).Succeeded)
|
||||
{
|
||||
<a asp-action="Details" asp-route-id="@post.Id" class="btn btn-light">Details</a>
|
||||
<a asp-action="Details" asp-route-id="@((IBlogPost)post).Id" class="btn btn-light">Details</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a asp-action="Details" asp-route-id="@post.Id" class="btn btn-light">Details</a>
|
||||
<a asp-action="Details" asp-route-id="@((IBlogPost)post).Id" class="btn btn-light">Details</a>
|
||||
}
|
||||
@if ((await AuthorizationService.AuthorizeAsync(User, post, new EditPermission())).Succeeded)
|
||||
{
|
||||
<a asp-action="Edit" asp-route-id="@post.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Edit" asp-route-id="@((IBlogPost)post).Id" class="btn btn-primary">Edit</a>
|
||||
|
||||
<a asp-action="Delete" asp-route-id="@post.Id" class="btn btn-danger">Delete</a>
|
||||
<a asp-action="Delete" asp-route-id="@((IBlogPost)post).Id" class="btn btn-danger">Delete</a>
|
||||
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
@using Microsoft.AspNetCore.Mvc.Localization
|
||||
@using Yavsc
|
||||
@using Yavsc.Blogspot
|
||||
@using Yavsc.Models
|
||||
@using Yavsc.Models.Musical;
|
||||
@using Yavsc.Models.Drawing;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue