docs: #315 bug fixes for searching through a specific users comments + paginating results
This commit is contained in:
parent
9abedb4806
commit
86606185b0
@ -97,6 +97,10 @@
|
||||
<div class="related-images-frame">
|
||||
<form method="get" id="searchcommentsform">
|
||||
<input type="text" name="w" id="w" class="width-100per" value="@Model.Query" placeholder="جستجو در @Model.Title" />
|
||||
@if(Model.Profile != null)
|
||||
{
|
||||
<input type="hidden" id="userid" name="userid" value="@Model.Profile.Id" />
|
||||
}
|
||||
<input type="submit" class="width-100per" value="جستجو در @Model.Title" />
|
||||
</form>
|
||||
</div><!-- related-images-frame -->
|
||||
|
||||
@ -250,15 +250,19 @@ namespace GanjooRazor.Pages
|
||||
PaginationMetadata paginationMetadata = JsonConvert.DeserializeObject<PaginationMetadata>(paginnationMetadata);
|
||||
|
||||
string htmlText = "";
|
||||
|
||||
|
||||
if (paginationMetadata.totalPages > 1)
|
||||
{
|
||||
if(pageNumber > 1)
|
||||
if (pageNumber > 1)
|
||||
ViewData["Title"] += $" - صفحهٔ {pageNumber.ToPersianNumbers()}";
|
||||
|
||||
|
||||
htmlText = $"<div>{Environment.NewLine}";
|
||||
string queryFilterUserId = string.IsNullOrEmpty(filterUserId) ? "" : $"&userid={filterUserId}";
|
||||
if (!string.IsNullOrEmpty(Query))
|
||||
{
|
||||
queryFilterUserId += $"&w={Query}";
|
||||
}
|
||||
if (paginationMetadata.currentPage > 3)
|
||||
{
|
||||
htmlText += $"<a href=\"/hashieha/?page=1{queryFilterUserId}\"><div class=\"circled-number\">۱</div></a> …";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user