divan/GanjooRazor/Pages/Hashieha.cshtml
Hamid Reza Mohammadi a1e53b7ff5 versioning files
2022-09-20 20:06:24 +04:30

225 lines
8.9 KiB
Plaintext

@page
@using DNTPersianUtils.Core;
@model GanjooRazor.Pages.HashiehaModel
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="fa-IR" dir="rtl">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
@ViewData["Title"]
</title>
<link href="/css/p8.css?version=49" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/bk.js?version=35"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";
cookieValue = getCookie("stickyEnabled");
var stickyEnabled = cookieValue != "false";
</script>
</head>
<body>
@if (!string.IsNullOrEmpty(Model.LastError))
{
@Html.Raw(Model.LastError)
}
else
{
<div id="hdr2" class="clearfix">
<h1><a href="/" title="گنجور"><img src="/image/gdapk.png" alt="گنجور" /></a></h1>
<div class="actionbox">
<form action="/search" method="get" id="searchform">
<input type="text" name="s" id="s" class="inputText" value="" placeholder="جستجو" />
<input type="hidden" name="es" id="es" value="1" />
<select name="author" id="author" onchange="onSelectedPoetChanged()">
@{
if (Model.PoetId != 0)
{
<option value="0">در آثار همهٔ سخنوران</option>
}
else
{
<option value="0" selected>در آثار همهٔ سخنوران</option>
}
if (Model.Poets != null)
{
foreach (RMuseum.Models.Ganjoor.ViewModels.GanjoorPoetViewModel poet in Model.Poets)
{
if (poet.Id == Model.PoetId)
{
<option value="@poet.Id" selected>@poet.Nickname</option>
}
else
{
<option value="@poet.Id">@poet.Nickname</option>
}
}
}
}
</select>
@{
if (Model.Poet != null)
{
<select name="cat" id="cat" style="width:150px">
<option value="0" selected>در همهٔ بخشها</option>
@{
foreach (var gran in Model.Poet.Cat.Ancestors)
{
<option value="@gran.Id">@gran.Title</option>
}
<option value="@Model.Poet.Cat.Id">@Model.Poet.Cat.Title</option>
foreach (var child in Model.Poet.Cat.Children)
{
<option value="@child.Id">@child.Title</option>
}
}
</select>
}
}
<input type="submit" value="بیاب" />
</form>
</div><!-- .actionbox -->
</div>
<!-- #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>
@if (!string.IsNullOrEmpty(Model.Profile.Bio))
{
@Html.Raw(Model.Profile.Bio)
}
</div>
<hr />
}
@if (Model.Comments.Count == 0)
{
<p>حاشیه‌ای با مشخصات مورد نظر شما پیدا نشد.</p>
}
else
foreach (var comment in Model.Comments)
{
<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 class="spacer">&nbsp;</div>
<hr />
}
</div>
@Html.Raw(Model.PagingToolsHtml)
</div>
<partial name="_FooterPartial" model=@(new _FooterPartialModel(){StickyEnabled = true}) />
</div>
<script src="/js/vaabd.js?version=2"></script>
@if (!string.IsNullOrEmpty(ViewData["GoogleAnalyticsCode"].ToString()))
{
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=@(ViewData["GoogleAnalyticsCode"])"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '@ViewData["GoogleAnalyticsCode"]');
</script>
}
}
</body>
</html>