From a47b4566bdb519610640539a60c61f2383f3b5a2 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Tue, 28 Jan 2025 14:17:23 +0330 Subject: [PATCH] stats for poems couplet counts in categories #464 --- GanjooRazor/Pages/Simi.cshtml.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/GanjooRazor/Pages/Simi.cshtml.cs b/GanjooRazor/Pages/Simi.cshtml.cs index 71dc9d16..396e3585 100644 --- a/GanjooRazor/Pages/Simi.cshtml.cs +++ b/GanjooRazor/Pages/Simi.cshtml.cs @@ -294,6 +294,7 @@ namespace GanjooRazor.Pages if(int.TryParse(Request.Query["c1"], out int i)) { CoupletCountsFrom = i; + anyParamsGiven = anyParamsGiven || CoupletCountsFrom != 0; } } @@ -303,6 +304,7 @@ namespace GanjooRazor.Pages if (int.TryParse(Request.Query["c2"], out int i)) { CoupletCountsTo = i; + anyParamsGiven = anyParamsGiven || CoupletCountsTo != 0; } } @@ -438,7 +440,7 @@ namespace GanjooRazor.Pages title += $" - صفحهٔ {pageNumber.ToPersianNumbers()}"; if (PaginationMetadata.currentPage > 3) { - htmlText += $"
۱
…"; + htmlText += $"
۱
…"; } for (int i = PaginationMetadata.currentPage - 2; i <= (PaginationMetadata.currentPage + 2); i++) { @@ -450,13 +452,13 @@ namespace GanjooRazor.Pages } else { - htmlText += $"
{i.ToPersianNumbers()}
{Environment.NewLine}"; + htmlText += $"
{i.ToPersianNumbers()}
{Environment.NewLine}"; } } } if (PaginationMetadata.totalPages > (PaginationMetadata.currentPage + 2)) { - htmlText += $"…
{PaginationMetadata.totalPages.ToPersianNumbers()}
{Environment.NewLine}"; + htmlText += $"…
{PaginationMetadata.totalPages.ToPersianNumbers()}
{Environment.NewLine}"; } htmlText += $"{Environment.NewLine}"; }