parent
069c587cde
commit
6cf118f8b2
@ -0,0 +1,45 @@
|
||||
@page "/modifquote"
|
||||
|
||||
<PageTitle>Corection des citation</PageTitle>
|
||||
|
||||
<h3>Corection des citation</h3>
|
||||
|
||||
<p>Ajouter une recherche</p>
|
||||
|
||||
@if (quotes != null)
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Image</th>
|
||||
<th>Id</th>
|
||||
<th>Contenu</th>
|
||||
<th>Personage</th>
|
||||
<th>Titre Source</th>
|
||||
<th>Likes</th>
|
||||
<th>Langue</th>
|
||||
<th>Date Source</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var quote in quotes)
|
||||
{
|
||||
<tr>
|
||||
<td><img class="imgTab" src="@quote.ImgPath" /></td>
|
||||
<td>@quote.Id</td>
|
||||
<td>
|
||||
<label>
|
||||
<input @bind="quote.Content" />
|
||||
</label>
|
||||
</td>
|
||||
<td>@quote.Charac</td>
|
||||
<td>@quote.TitleSrc</td>
|
||||
<td>@quote.Like</td>
|
||||
<td>@quote.Langue</td>
|
||||
<td>@quote.DateSrc.ToShortDateString()</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<button>Sauvegarder</button>
|
||||
</table>
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WF_WebAdmin.Model;
|
||||
|
||||
namespace WF_WebAdmin.Pages
|
||||
{
|
||||
public partial class ModifQuote
|
||||
{
|
||||
private Quote[] quotes;
|
||||
|
||||
[Inject]
|
||||
public HttpClient Http { get; set; }
|
||||
|
||||
[Inject]
|
||||
public NavigationManager NavigationManager { get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
quotes = await Http.GetFromJsonAsync<Quote[]>($"{NavigationManager.BaseUri}fake-dataModifQuote.json");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
[
|
||||
{
|
||||
"Id": 1,
|
||||
"ImgPath": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Content": "Harry POTTER JE SUIS TON PERE",
|
||||
"Charac": "Sirius Black",
|
||||
"TitleSrc": "Harry Potter",
|
||||
"Langue": "fr",
|
||||
"UserProposition": "demo",
|
||||
"DateSrc": "2001-01-01",
|
||||
"Like": 20
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"ImgPath": "https://tse2.mm.bing.net/th/id/OIP.zR4rzkK7q2wCcNwZd6jjegHaIC?w=163&h=180&c=7&r=0&o=5&pid=1.7",
|
||||
"Content": "'Une autre citation'",
|
||||
"Charac": "Un personnage",
|
||||
"TitleSrc": "Un super film",
|
||||
"Langue": "fr",
|
||||
"DateSrc": "2002-02-02",
|
||||
"Like": 0,
|
||||
"UserProposition": "exploit"
|
||||
}
|
||||
]
|
Loading…
Reference in new issue