comparison of usage stats of a selected word among all poets #471

This commit is contained in:
Hamid Reza Mohammadi 2025-03-09 14:05:18 +03:30
parent bc6e094983
commit aa8411b011
3 changed files with 34 additions and 2 deletions

View File

@ -490,10 +490,10 @@ namespace GanjooRazor.Pages
return new PartialViewResult()
{
ViewName = "_WordCountsByPoetPartial",
ViewName = "_CategoryWordsCountByCatPartial",
ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), new ModelStateDictionary())
{
Model = new _CategoryWordsCountByCatTablePartialModel()
Model = new _CategoryWordsCountByCatPartialModel()
{
Term = term,
WordStats = wordCounts,

View File

@ -0,0 +1,5 @@
@model GanjooRazor.Pages._CategoryWordsCountByCatPartialModel
@{
}
<partial name="_CategoryWordsCountByCatTablePartial" model="Model.Model">

View File

@ -0,0 +1,27 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using RMuseum.Models.Ganjoor.ViewModels;
namespace GanjooRazor.Pages
{
public class _CategoryWordsCountByCatPartialModel : PageModel
{
public string Term { get; set; }
public PoetOrCatWordStat[] WordStats { get; set; }
public bool Whole { get; set; }
public int TotalCount { get; set; }
public _CategoryWordsCountByCatTablePartialModel Model
{
get
{
return new _CategoryWordsCountByCatTablePartialModel()
{
Term = Term,
WordStats = WordStats,
Whole = Whole,
TotalCount = TotalCount
};
}
}
}
}