using Microsoft.AspNetCore.Mvc.RazorPages; using RMuseum.Models.Divan; using RMuseum.Models.Divan.ViewModels; using System.Collections.Generic; namespace DivanRazor.Pages { public class _BNumPartialModel : PageModel { /// /// is logged on /// public bool LoggedIn { get; set; } /// /// poem id /// public int PoemId { get; set; } /// /// couplet index /// public int CoupletIndex { get; set; } /// /// is bookmarked /// public bool IsBookmarked { get; set; } /// /// bookmaring text /// public string BookmarkingText { get { return IsBookmarked ? "نشان ہٹائیں" : "نشان لگائیں"; } } /// /// bookmarking icon /// public string BookmarkingIcon { get { return IsBookmarked ? "star" : "star_border"; } } /// /// numbers /// public List Numbers { get; set; } /// /// comments /// public List Comments { get; set; } /// /// sections /// public List Sections { get; set; } /// /// a subset of sections /// public List SectionsWithMetreAndRhymes { get; set; } /// /// verses /// public List Verses { get; set; } public _CommentPartialModel GetCommentModel(DivanCommentSummaryViewModel comment) { return new _CommentPartialModel() { Comment = comment, Error = "", InReplyTo = null, LoggedIn = LoggedIn, DivSuffix = $"-{comment.CoupletIndex}", PoemId = PoemId, Bookmarked = comment.IsBookmarked, }; } } }