comparison of usage stats of a selected word among all poets #471
This commit is contained in:
parent
6d8d9049f1
commit
47556018c2
@ -202,7 +202,7 @@
|
||||
<div class="expandable-content" id="expandableContent">
|
||||
<div id="wordcounts-placeholder">
|
||||
<a href="javascript:loadWordCountsByPoet('@Model.Query', @Model.PoetId, @Model.CatId)" id="load-word-counts" class="pagebutton comments-link">
|
||||
مشاهدهٔ بسامد واژگان «@Model.Query» به تفکیک سخنور
|
||||
مشاهدهٔ بسامد واژگان «@Model.Query» به تفکیک بخش
|
||||
<svg class="noindent-info-button" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#5f6368"><g><rect fill="none" height="24" width="24" /></g><g><g><g><path d="M7.5,4C5.57,4,4,5.57,4,7.5S5.57,11,7.5,11S11,9.43,11,7.5S9.43,4,7.5,4z M7.5,9C6.67,9,6,8.33,6,7.5S6.67,6,7.5,6 S9,6.67,9,7.5S8.33,9,7.5,9z M16.5,13c-1.93,0-3.5,1.57-3.5,3.5s1.57,3.5,3.5,3.5s3.5-1.57,3.5-3.5S18.43,13,16.5,13z M16.5,18 c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S17.33,18,16.5,18z M5.41,20L4,18.59L18.59,4L20,5.41L5.41,20z" /></g></g></g></svg>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@ -494,7 +494,8 @@ namespace GanjooRazor.Pages
|
||||
Model = new _WordCountsByPoetPartialModel()
|
||||
{
|
||||
Term = term,
|
||||
WordStats = wordCounts
|
||||
WordStats = wordCounts,
|
||||
Whole = catId == 0 && poetId == 0,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
@if (Model.WordStats.Length > 0)
|
||||
{
|
||||
<p>
|
||||
«@Model.Term» در مجموع @RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.WordStats.Sum(w => w.Count)) بار در گنجور ظاهر شده است که سهم هر سخنور در جدول زیر مشخص شده است.
|
||||
«@Model.Term» در مجموع @RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.WordStats.Sum(w => w.Count)) بار طبق جدول زیر در @Model.SectionName ظاهر شده است:
|
||||
</p>
|
||||
<table class="stats" id="words-stats">
|
||||
<thead>
|
||||
@ -23,7 +23,7 @@
|
||||
{
|
||||
<tr class="e">
|
||||
<td class="c1">@((i + 1).ToPersianNumbers())</td>
|
||||
<td class="c2"><a href="/search?s=@Model.Term&author=@Model.WordStats[i].PoetId">@Model.WordStats[i].Name</a></td>
|
||||
<td class="c2"><a href="/search?s=@Model.Term&author=@Model.WordStats[i].PoetId&cat=@Model.WordStats[i].CatId">@Model.WordStats[i].Name</a></td>
|
||||
<td class="c3">@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.WordStats[i].Count)</td>
|
||||
@if (Model.WordStats[i].TotalWordCount == 0)
|
||||
{
|
||||
@ -40,7 +40,7 @@
|
||||
{
|
||||
<tr>
|
||||
<td class="c1">@((i + 1).ToPersianNumbers())</td>
|
||||
<td class="c2"><a href="/search?s=@Model.Term&author=@Model.WordStats[i].PoetId">@Model.WordStats[i].Name</a></td>
|
||||
<td class="c2"><a href="/search?s=@Model.Term&author=@Model.WordStats[i].PoetId&cat=@Model.WordStats[i].CatId">@Model.WordStats[i].Name</a></td>
|
||||
<td class="c3">@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.WordStats[i].Count)</td>
|
||||
@if (Model.WordStats[i].TotalWordCount == 0)
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using RMuseum.Models.Ganjoor.ViewModels;
|
||||
|
||||
namespace GanjooRazor.Pages
|
||||
@ -7,5 +7,13 @@ namespace GanjooRazor.Pages
|
||||
{
|
||||
public string Term { get; set; }
|
||||
public PoetOrCatWordStat[] WordStats { get; set; }
|
||||
public bool Whole { get; set; }
|
||||
public string SectionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return Whole ? "گنجور" : "این بخش";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user