divan/DiwanRazor/Pages/Hashieha.cshtml
Anas Rashid e8f2306422 Rename Ganjoor -> Diwan throughout the code
Projects (GanjooRazor -> DiwanRazor, GanjoorService.sln -> DiwanService.sln), files,
folders, classes, namespaces, settings, API routes (/api/diwan) and DB tables (Diwan*).
External addresses (ganjoor.net, github.com/ganjoor) unchanged. Migrations renamed
consistently (no pending model changes); requires a fresh database.
Upstream RUNNING_LOCALLY/SEMANTIC_SEARCH docs archived unmodified under docs/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:49:01 +02:00

252 lines
13 KiB
Plaintext

@page
@using DNTPersianUtils.Core;
@model DiwanRazor.Pages.HashiehaModel
@{
Layout = "_Layout";
}
@if (!string.IsNullOrEmpty(Model.LastError))
{
@Html.Raw(Model.LastError)
}
else
{
<partial name="_SearchHeaderPartial" model="@(new _SearchHeaderPartialModel(){ Poets = Model.Poets, SelectedPoetId = Model.PoetId, CurrentCategory = Model.Poet?.Cat })" />
<!-- #hdr2 -->
<div id="fa">
<partial name="_InlineLoginPartial" model="Model" />
<div id="maincnt">
<div class="sitem actionbox">
<div class="related-images-frame padding-20px">
<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 margin-top-5px" value="جستجو در @Model.Title" />
</form>
</div><!-- related-images-frame -->
</div> <!-- sitem actionbo -->
<div class="poem">
<h2>
<a href="@Model.HomeLink">
@Model.Title
</a>
</h2>
@if (Model.Profile != null)
{
<div class="text-align-center">
<small><a href="/hashieha">همهٔ حاشیه‌ها</a></small>
</div>
<div id="profile">
<p>
@Model.Profile.NickName
@if (!string.IsNullOrEmpty(Model.Profile.Website))
{
<a href="@Model.Profile.Website">🌐</a>
}
@if (Model.CanAdministerUsers)
{
<a href="/Admin/ExamineUser?id=@Model.Profile.Id">#</a>
}
</p>
<p>
<small>تاریخ پیوستن: <strong>@RMuseum.Services.Implementation.LanguageUtils.FormatDate(Model.Contributions.CreateDate)</strong></small>
</p>
@if (!string.IsNullOrEmpty(Model.Profile.Bio))
{
@Html.Raw(Model.Profile.Bio)
}
@if (
Model.Contributions.PoemCorrections > 0
||
Model.Contributions.SectionCorrections > 0
||
Model.Contributions.CatCorrections > 0
||
Model.Contributions.SuggestedSongs > 0
||
Model.Contributions.QuotedPoems > 0
||
Model.Contributions.Comments > 0
||
Model.Contributions.Recitations > 0
||
Model.Contributions.MuseumLinks > 0
||
Model.Contributions.PinterestLinks > 0
||
Model.Contributions.PoetSpecLines > 0
||
Model.Contributions.PoetPictures > 0
||
Model.Contributions.PublicUserNotes > 0
)
{
<table>
<tr>
<th colspan="2">
<span class="align-center">آمار مشارکت‌ها:</span>
</th>
</tr>
@if (Model.Contributions.Comments > 0)
{
<tr>
<td><p>حاشیه‌ها:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.Comments)</p></td>
</tr>
}
@if(Model.Contributions.PoemCorrections > 0)
{
<tr>
<td><p>ویرایش‌های تأیید شده:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.PoemCorrections)</p></td>
</tr>
}
@if (Model.Contributions.SectionCorrections > 0)
{
<tr>
<td><p>ویرایش‌های قطعات تأیید شده:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.SectionCorrections)</p></td>
</tr>
}
@if (Model.Contributions.CatCorrections > 0)
{
<tr>
<td><p>ویرایش‌های بخش‌های تأیید شده:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.CatCorrections)</p></td>
</tr>
}
@if (Model.Contributions.SuggestedSongs > 0)
{
<tr>
<td><p>ترانه‌های مرتبط تأیید شده:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.SuggestedSongs)</p></td>
</tr>
}
@if (Model.Contributions.QuotedPoems > 0)
{
<tr>
<td><p>مشق‌های پیشنهادی تأیید شده:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.QuotedPoems)</p></td>
</tr>
}
@if (Model.Contributions.Recitations > 0)
{
<tr>
<td><p>خوانش‌های تأیید شده:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.Recitations)</p></td>
</tr>
}
@if (Model.Contributions.MuseumLinks > 0)
{
<tr>
<td><p>ارتباطات پیشنهادی گنجینه:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.MuseumLinks)</p></td>
</tr>
}
@if (Model.Contributions.PinterestLinks > 0)
{
<tr>
<td><p>ارتباطات پیشنهادی تصاویر خارجی:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.PinterestLinks)</p></td>
</tr>
}
@if (Model.Contributions.PoetSpecLines > 0)
{
<tr>
<td><p>نکات پیشنهادی دربارهٔ چهرهٔ سخنوان:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.PoetSpecLines)</p></td>
</tr>
}
@if (Model.Contributions.PoetPictures > 0)
{
<tr>
<td><p>تصاویر چهرهٔ پیشنهادی:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.PoetPictures)</p></td>
</tr>
}
@if (Model.Contributions.PublicUserNotes > 0)
{
<tr>
<td><p>یادداشت‌های عمومی گنجینه:</p></td>
<td><p>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Contributions.PublicUserNotes)</p></td>
</tr>
}
</table>
}
</div>
<hr />
}
@if (Model.Comments.Count == 0)
{
<p>حاشیه‌ای با مشخصات مورد نظر شما پیدا نشد.</p>
}
else
foreach (var comment in Model.Comments)
{
<div class="diwan-comment">
<p>
@if (comment.UserId == null)
{
@comment.AuthorName
}
else
{
<a href="/hashieha/?userid=@comment.UserId">@comment.AuthorName</a>
}
<small>
در @comment.CommentDate.ToFriendlyPersianDateTextify()
@if (comment.InReplyTo != null)
{
<text>
@(" ")در پاسخ به @comment.InReplyTo.AuthorName
</text>
}
</small>
@(" ")دربارهٔ <a href="@comment.Poem.UrlSlug#comment-@comment.Id">@comment.Poem.Title</a>:
</p>
@if (comment.CoupletIndex != -1)
{
<div class="commentquote">
@comment.CoupletSummary
</div>
}
<blockquote>
@Html.Raw(comment.HtmlComment)
</blockquote>
</div>
}
</div>
@Html.Raw(Model.PagingToolsHtml)
</div>
<partial name="_FooterPartial" model=@(new _FooterPartialModel(){StickyEnabled = true}) />
</div>
@if (ViewData["TrackingScript"] != null && !string.IsNullOrEmpty(ViewData["TrackingScript"].ToString()))
{
@Html.Raw(ViewData["TrackingScript"])
}
}