- translate remaining public views and page-model strings (titles, messages, relation names) - Urdu stopword list for word-frequency stats (replaces Persian list) - error pages: drop list of alternative Ganjoor services Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
96 lines
2.3 KiB
C#
96 lines
2.3 KiB
C#
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using RMuseum.Models.Diwan;
|
|
using RMuseum.Models.Diwan.ViewModels;
|
|
using System.Collections.Generic;
|
|
|
|
namespace DiwanRazor.Pages
|
|
{
|
|
public class _BNumPartialModel : PageModel
|
|
{
|
|
/// <summary>
|
|
/// is logged on
|
|
/// </summary>
|
|
public bool LoggedIn { get; set; }
|
|
|
|
/// <summary>
|
|
/// poem id
|
|
/// </summary>
|
|
public int PoemId { get; set; }
|
|
|
|
/// <summary>
|
|
/// couplet index
|
|
/// </summary>
|
|
public int CoupletIndex { get; set; }
|
|
|
|
/// <summary>
|
|
/// is bookmarked
|
|
/// </summary>
|
|
public bool IsBookmarked { get; set; }
|
|
|
|
/// <summary>
|
|
/// bookmaring text
|
|
/// </summary>
|
|
public string BookmarkingText
|
|
{
|
|
get
|
|
{
|
|
return IsBookmarked ? "نشان ہٹائیں" : "نشان لگائیں";
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// bookmarking icon
|
|
/// </summary>
|
|
public string BookmarkingIcon
|
|
{
|
|
get
|
|
{
|
|
return IsBookmarked ? "star" : "star_border";
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// numbers
|
|
/// </summary>
|
|
public List<DiwanCoupletNumberViewModel> Numbers { get; set; }
|
|
|
|
/// <summary>
|
|
/// comments
|
|
/// </summary>
|
|
public List<DiwanCommentSummaryViewModel> Comments { get; set; }
|
|
|
|
/// <summary>
|
|
/// sections
|
|
/// </summary>
|
|
public List<DiwanPoemSection> Sections { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// a subset of sections
|
|
/// </summary>
|
|
public List<DiwanPoemSection> SectionsWithMetreAndRhymes { get; set; }
|
|
|
|
/// <summary>
|
|
/// verses
|
|
/// </summary>
|
|
public List<DiwanVerseViewModel> Verses { get; set; }
|
|
|
|
public _CommentPartialModel GetCommentModel(DiwanCommentSummaryViewModel comment)
|
|
{
|
|
return new _CommentPartialModel()
|
|
{
|
|
Comment = comment,
|
|
Error = "",
|
|
InReplyTo = null,
|
|
LoggedIn = LoggedIn,
|
|
DivSuffix = $"-{comment.CoupletIndex}",
|
|
PoemId = PoemId,
|
|
Bookmarked = comment.IsBookmarked,
|
|
};
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|