refactoring the blog post
This commit is contained in:
parent
9289207085
commit
ee1e49fde5
20 changed files with 40 additions and 40 deletions
|
|
@ -22,7 +22,7 @@
|
|||
<img class="blogphoto" alt="" src="@Model.Photo" title="Photo associée au post">
|
||||
<h2 title="Titre du post" class="blogtitle" id="titleview" >@Model.Title</h2>
|
||||
|
||||
<div title="Contenu du post" id="contentview">@Model.Content</div>
|
||||
<div title="Contenu du post" id="contentview">@Model.Article</div>
|
||||
|
||||
<hr>
|
||||
<form asp-controller="Blogspot" asp-action="Create">
|
||||
|
|
@ -49,11 +49,11 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group mdcoding">
|
||||
<label asp-for="Content" class="col-md-2 control-label" ></label>
|
||||
<label asp-for="Article" class="col-md-2 control-label" ></label>
|
||||
<div class="col-md-10">
|
||||
<textarea asp-for="Content" class="form-control" id="Content" data-from="contentview">
|
||||
<textarea asp-for="Article" class="form-control" id="Article" data-from="contentview">
|
||||
</textarea>
|
||||
<span asp-validation-for="Content" class="text-danger" >
|
||||
<span asp-validation-for="Article" class="text-danger" >
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@
|
|||
@Model.Author
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Content)
|
||||
@Html.DisplayNameFor(model => model.Article)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Content)
|
||||
@Html.DisplayFor(model => model.Article)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DateModified)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
method: 'POST',
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify({
|
||||
Content: $('#Comment').val(),
|
||||
Article: $('#Comment').val(),
|
||||
ReceiverId: @Model.Id
|
||||
}),
|
||||
error: function(xhr,data) {
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
if (xhr.responseJSON)
|
||||
{
|
||||
$('#commentValidation').html(
|
||||
xhr.responseJSON.Content);
|
||||
xhr.responseJSON.Article);
|
||||
} else {
|
||||
$('#commentValidation').html(
|
||||
"Une erreur est survenue : "+xhr.status+"<br/>"+
|
||||
|
|
@ -69,7 +69,7 @@ $('#commentValidation').html(
|
|||
<h1 ismarkdown>@Model.Title</h1>
|
||||
|
||||
@Html.DisplayFor(m=>m.Author)
|
||||
<asciidoc>@Html.DisplayFor(m=>m.Content)</asciidoc>
|
||||
<asciidoc>@Html.DisplayFor(m=>m.Article)</asciidoc>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ $('#commentValidation').html(
|
|||
/>
|
||||
</span>
|
||||
</div>
|
||||
<span asp-validation-for="Content" class="text-danger" ></span>
|
||||
<span asp-validation-for="Article" class="text-danger" ></span>
|
||||
</div>
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -80,12 +80,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group mdcoding">
|
||||
<label asp-for="Content" class="col-md-2 control-label" ></label>
|
||||
<label asp-for="Article" class="col-md-2 control-label" ></label>
|
||||
<div class="col-md-10">
|
||||
<textarea asp-for="Content" class="form-control"
|
||||
id="Content" data-from="contentview">
|
||||
<textarea asp-for="Article" class="form-control"
|
||||
id="Article" data-from="contentview">
|
||||
</textarea>
|
||||
<span asp-validation-for="Content" class="text-danger" >
|
||||
<span asp-validation-for="Article" class="text-danger" >
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
<hr />
|
||||
|
||||
<div id="prev">
|
||||
<asciidoc>@Model.Content</asciidoc>
|
||||
<asciidoc>@Model.Article</asciidoc>
|
||||
</div>
|
||||
|
||||
<div >
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
</a>
|
||||
<div>
|
||||
<a asp-action="Details" asp-route-id="@post.Id">
|
||||
<asciidoc summary="@maxTextLen">@post.Content</asciidoc></a>
|
||||
<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;">
|
||||
posté le @post.DateCreated.ToString("dddd d MMM yyyy à H:mm")
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<img src="@item.Photo" class="blogphoto"></a>
|
||||
</td>
|
||||
<td>
|
||||
<asciidoc>@((item.Content?.Length > 256) ? item.Content.Substring(0, 256) + " ..." : item.Content)</asciidoc>
|
||||
<asciidoc>@((item.Article?.Length > 256) ? item.Article.Substring(0, 256) + " ..." : item.Article)</asciidoc>
|
||||
<span style="font-size:x-small;">(@item.Author.UserName </span>,
|
||||
<span style="font-size:xx-small;">
|
||||
posté le @item.DateCreated.ToString("dddd d MMM yyyy à H:mm")
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
Author
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Content)
|
||||
@Html.DisplayNameFor(model => model.Article)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DateModified)
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
@item.Author?.UserName
|
||||
</td>
|
||||
<td>
|
||||
<div md-content="@item.Content"/>
|
||||
<div md-content="@item.Article"/>
|
||||
</td>
|
||||
<td>
|
||||
<table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue