poem correction history: display user infor for admin
This commit is contained in:
parent
012a74fc5d
commit
145ce7993b
@ -66,6 +66,13 @@ else
|
||||
|
||||
<div style="background-color:@color" id="correction-@correction.Id">
|
||||
<table>
|
||||
@if(Model.CanEdit)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="2"><a href="/User/Edits?UserId=@correction.UserId" target="_blank">@correction.UserId</a></td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
<tr>
|
||||
<td colspan="2"><a href="/?p=@correction.PoemId" target="_blank">مشاهدهٔ متن شعر یا بخش</a></td>
|
||||
</tr>
|
||||
|
||||
@ -19,6 +19,7 @@ namespace GanjooRazor.Areas.User.Pages
|
||||
[IgnoreAntiforgeryToken(Order = 1001)]
|
||||
public class PoemCorrectionsHistoryModel : PageModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Last Error
|
||||
/// </summary>
|
||||
@ -34,6 +35,11 @@ namespace GanjooRazor.Areas.User.Pages
|
||||
/// </summary>
|
||||
public List<GanjoorPoemCorrectionViewModel> Corrections { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// can edit
|
||||
/// </summary>
|
||||
public bool CanEdit { get; set; }
|
||||
|
||||
public GanjoorLanguage[] Languages { get; set; }
|
||||
private async Task ReadLanguagesAsync(HttpClient secureClient)
|
||||
{
|
||||
@ -51,6 +57,8 @@ namespace GanjooRazor.Areas.User.Pages
|
||||
if (string.IsNullOrEmpty(Request.Cookies["Token"]))
|
||||
return Redirect("/");
|
||||
|
||||
CanEdit = Request.Cookies["CanEdit"] == "True";
|
||||
|
||||
LastError = "";
|
||||
using (HttpClient secureClient = new HttpClient())
|
||||
if (await GanjoorSessionChecker.PrepareClient(secureClient, Request, Response))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user