divan/DiwanRazor/Pages/Partials/DiwanPage/_CommentsListPartial.cshtml.cs
Anas Rashid e8f2306422 Rename Ganjoor -> Diwan throughout the code
Projects (GanjooRazor -> DiwanRazor, GanjoorService.sln -> DiwanService.sln), files,
folders, classes, namespaces, settings, API routes (/api/diwan) and DB tables (Diwan*).
External addresses (ganjoor.net, github.com/ganjoor) unchanged. Migrations renamed
consistently (no pending model changes); requires a fresh database.
Upstream RUNNING_LOCALLY/SEMANTIC_SEARCH docs archived unmodified under docs/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:49:01 +02:00

30 lines
942 B
C#

using Microsoft.AspNetCore.Mvc.RazorPages;
using RMuseum.Models.Diwan.ViewModels;
namespace DiwanRazor.Pages
{
/// <summary>
/// Model for the comments list + count message shared between the initial page render
/// (_PoemPagePartial.cshtml) and the AJAX sort-toggle refresh (OnGetCommentsPartialAsync).
/// </summary>
public class _CommentsListPartialModel : PageModel
{
public DiwanCommentSummaryViewModel[] Comments { get; set; }
public int PoemId { get; set; }
public bool LoggedIn { get; set; }
public _CommentPartialModel GetCommentModel(DiwanCommentSummaryViewModel comment)
{
return new _CommentPartialModel()
{
Comment = comment,
Error = "",
InReplyTo = null,
LoggedIn = LoggedIn,
DivSuffix = "",
PoemId = PoemId,
};
}
}
}