1366 lines
96 KiB
Plaintext
1366 lines
96 KiB
Plaintext
@model GanjooRazor.Pages.IndexModel
|
|
@using DNTPersianUtils.Core
|
|
|
|
|
|
@if (Model.GanjoorPage == null)
|
|
{
|
|
return;
|
|
}
|
|
<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.GanjoorPage != null && Model.GanjoorPage.PoetOrCat != null)
|
|
{
|
|
<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 (Model.GanjoorPage.PoetOrCat != null && poet.Id == Model.GanjoorPage.PoetOrCat.Poet.Id)
|
|
{
|
|
<option value="@poet.Id" selected>@Html.Raw(poet.Nickname)</option>
|
|
}
|
|
else
|
|
{
|
|
<option value="@poet.Id">@Html.Raw(poet.Nickname)</option>
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
</select>
|
|
@{
|
|
if (!Model.IsPoetPage && Model.GanjoorPage != null && Model.GanjoorPage.PoetOrCat != null)
|
|
{
|
|
<select name="cat" id="cat">
|
|
<option value="0">در همهٔ بخشها</option>
|
|
@{
|
|
foreach (var gran in Model.GanjoorPage.PoetOrCat.Cat.Ancestors)
|
|
{
|
|
<option value="@Html.Raw(gran.Id)">@Html.Raw(gran.Title)</option>
|
|
}
|
|
<option value="@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.Id)" selected>@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.Title)</option>
|
|
|
|
foreach (var child in Model.GanjoorPage.PoetOrCat.Cat.Children)
|
|
{
|
|
<option value="@Html.Raw(child.Id)">@Html.Raw(child.Title)</option>
|
|
}
|
|
}
|
|
</select>
|
|
}
|
|
}
|
|
|
|
<input type="submit" value="بیاب">
|
|
</form>
|
|
</div><!-- .actionbox -->
|
|
</div><!-- #hdr2 -->
|
|
|
|
<div id="fa">
|
|
|
|
|
|
<partial name="_InlineLoginPartial" model="Model" />
|
|
|
|
<div id="maincnt">
|
|
|
|
@if (!string.IsNullOrEmpty(Model.LastError))
|
|
{
|
|
<div class="poem">
|
|
@if (Model.LastError != null)
|
|
{
|
|
@Model.LastError
|
|
}
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="@Model.PoemBlockClass" id="post-@Html.Raw(Model.GanjoorPage.Id.ToString())">
|
|
@if (Model.GanjoorPage.Poem != null && Model.GanjoorPage.Poem.ClaimedByMultiplePoets)
|
|
{
|
|
<div class="ribbon"><a href="#qpoems">منتسب به چند شاعر</a></div>
|
|
}
|
|
|
|
@{
|
|
if (!string.IsNullOrEmpty(Model.PinterestUrl))
|
|
{
|
|
if (!Model.LoggedIn)
|
|
{
|
|
<div class="width-100per">
|
|
<div class="width-100per text-align-center">
|
|
<p class="alert-text">
|
|
برای پیشنهاد تصاویر مرتبط با اشعار لازم است ابتدا با نام کاربری خود وارد گنجور شوید.
|
|
</p>
|
|
<p class="text-align-center">
|
|
<a href="/login">ورود به گنجور</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="width-100per display-block">
|
|
<form method="post" action="/pin">
|
|
<input type="hidden" id="RelatedImageSuggestionModel_PoemId" name="RelatedImageSuggestionModel.PoemId" value="@Model.GanjoorPage.Id">
|
|
<input type="hidden" id="RelatedImageSuggestionModel_GanjoorUrl" name="RelatedImageSuggestionModel.GanjoorUrl" value="@Model.GanjoorPage.FullUrl">
|
|
<input type="hidden" id="RelatedImageSuggestionModel_GanjoorTitle" name="RelatedImageSuggestionModel.GanjoorTitle" value="@Model.GanjoorPage.FullTitle">
|
|
<input type="hidden" id="RelatedImageSuggestionModel_PinterestUrl" name="RelatedImageSuggestionModel.PinterestUrl" value="@Model.PinterestUrl">
|
|
<input type="submit" name="pinterest_suggest" value="انتخاب شعر" class="pinterest_suggest">
|
|
</form>
|
|
@if (Model.PinterestUrl == "manual")
|
|
{
|
|
<a href="https://blog.ganjoor.net/1399/01/29/pinterest/" target="_blank">پیشنهاد آسان از اینستاگرام و پینترست با افزونهٔ فایرفاکس</a>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
}
|
|
}
|
|
<article id="garticle">
|
|
@{
|
|
|
|
if (!Model.IsPoemPage && Model.GanjoorPage.PoetOrCat == null)
|
|
{
|
|
<h2>
|
|
<a href="@Html.Raw(Model.Request.Path)" rel="bookmark">
|
|
@Model.GanjoorPage.FullTitle
|
|
</a>
|
|
</h2>
|
|
}
|
|
}
|
|
|
|
@{
|
|
if (Model.GanjoorPage.PoetOrCat != null)
|
|
{
|
|
<div class="spacer"> </div>
|
|
@if (Model.GanjoorPage.SecondPoet != null)
|
|
{
|
|
<div id="poets">
|
|
<a href="@Html.Raw(Model.GanjoorPage.PoetOrCat.Poet.FullUrl)"><img src="@(GanjooRazor.APIRoot.InternetUrl + Model.GanjoorPage.PoetOrCat.Poet.ImageUrl)" alt="@Html.Raw(Model.GanjoorPage.PoetOrCat.Poet.Nickname)" class="poets-poet"></a>
|
|
<a href="@Html.Raw(Model.GanjoorPage.SecondPoet.FullUrl)"><img src="@(GanjooRazor.APIRoot.InternetUrl + Model.GanjoorPage.SecondPoet.ImageUrl)" alt="@Html.Raw(Model.GanjoorPage.SecondPoet.Nickname)" class="poets-poet"></a>
|
|
</div>
|
|
<div id="page-hierarchy">
|
|
@{
|
|
<a href="@Html.Raw(Model.GanjoorPage.PoetOrCat.Poet.FullUrl)">@Html.Raw(Model.GanjoorPage.PoetOrCat.Poet.Nickname)</a>
|
|
|
|
<span> »</span>
|
|
<h2><a href="@Html.Raw(Model.GanjoorPage.FullUrl)">@Html.Raw(Model.GanjoorPage.Title)</a></h2>
|
|
}
|
|
</div>
|
|
|
|
}
|
|
else
|
|
{
|
|
<div id="poet-image">
|
|
<a href="@Html.Raw(Model.GanjoorPage.PoetOrCat.Poet.FullUrl)"><img src="@(GanjooRazor.APIRoot.InternetUrl + Model.GanjoorPage.PoetOrCat.Poet.ImageUrl)" alt="@Html.Raw(Model.GanjoorPage.PoetOrCat.Poet.Nickname)"></a>
|
|
</div>
|
|
<div id="page-hierarchy" class="width-100per margin-auto">
|
|
@{
|
|
foreach (var gran in Model.GanjoorPage.PoetOrCat.Cat.Ancestors)
|
|
{
|
|
<a href="@Html.Raw(gran.FullUrl)">@Html.Raw(gran.Title)</a>
|
|
|
|
<span> »</span>
|
|
}
|
|
|
|
@if (!Model.IsPoemPage && !Model.IsCatPage && !Model.IsPoetPage)
|
|
{
|
|
<a href="@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.FullUrl)">@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.Title)</a>
|
|
<text> » </text>
|
|
<h2>
|
|
<a href="@Html.Raw(Model.GanjoorPage.FullUrl)" rel="bookmark">
|
|
@Html.Raw(Model.GanjoorPage.Title)
|
|
</a>
|
|
</h2>
|
|
}
|
|
else
|
|
{
|
|
@if (Model.IsPoemPage)
|
|
{
|
|
<a href="@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.FullUrl)">@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.Title)</a>
|
|
|
|
<span> »</span>
|
|
<h2>
|
|
<a href="@Html.Raw(Model.GanjoorPage.Poem.FullUrl)" rel="bookmark">
|
|
@Html.Raw(Model.GanjoorPage.Poem.Title)
|
|
</a>
|
|
</h2>
|
|
|
|
@if (Model.HtmlLanguage == "azb")
|
|
{
|
|
<div class="notice">
|
|
مجموعهای کاملتر و معتبرتر از اشعار ترکی را در وبگاه <a href="https://minsoz.ir">مین سؤز</a> خواهید یافت.
|
|
</div>
|
|
}
|
|
|
|
@if (Model.HtmlLanguage == "ckb")
|
|
{
|
|
<div class="notice">
|
|
مجموعهای کاملتر و معتبرتر از اشعار کردی را در وبگاه <a href="https://books.vejin.net">ڤەژینبوکس</a> خواهید یافت.
|
|
</div>
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<h2><a href="@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.FullUrl)">@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.Title)</a></h2>
|
|
}
|
|
|
|
}
|
|
}
|
|
</div>
|
|
}
|
|
}
|
|
}
|
|
<partial name="_InlinePageUtilsPartial" model="Model" />
|
|
@{
|
|
@Html.Raw(Model.GanjoorPage.HtmlText)
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Id == 39401)
|
|
{
|
|
<div id="wordcounts-placeholder">
|
|
@if (Model.CategoryWordsCounts != null)
|
|
{
|
|
<text>
|
|
<partial name="_CategoryWordsCountPartial" model="Model.CategoryWordsCounts">
|
|
</text>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
</article>
|
|
|
|
@if (Model.IsCatPage || Model.IsPoetPage)
|
|
{
|
|
<div class="tabcontent related-images-frame" id="words">
|
|
<div class="century cursor-pointer" id="load-word-counts" onclick="loadWordCounts(@Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id, false)">
|
|
محاسبهٔ بسامد واژٰگان.
|
|
</div>
|
|
|
|
<div id="wordcounts-placeholder">
|
|
@if (Model.CategoryWordsCounts != null)
|
|
{
|
|
<text>
|
|
<partial name="_CategoryWordsCountPartial" model="Model.CategoryWordsCounts">
|
|
</text>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="tabcontent related-images-frame" id="recitations">
|
|
@if (Model.CategoryHasRecitations)
|
|
{
|
|
<div class="century cursor-pointer" id="load-cat-recitations" onclick="loadCatRecitations(@Model.GanjoorPage.PoetOrCat.Cat.Id)">
|
|
برای بارگذاری خوانشها کلیک کنید.
|
|
</div>
|
|
<div id="recitations-section">
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<p>این بخش هنوز خوانشی ندارد.</p>
|
|
}
|
|
</div>
|
|
|
|
@if (Model.IsPoetPage)
|
|
{
|
|
<div class="tabcontent" id="photos">
|
|
<div class="related-images-frame">
|
|
@if (Model.Photo != null)
|
|
{
|
|
<div class="century">
|
|
@Model.Photo.Title
|
|
|
|
@if (Model.Photo.ChosenOne)
|
|
{
|
|
<i class="notranslate noindent-info-button done-icon"></i>
|
|
}
|
|
</div>
|
|
|
|
<div class="clear-both">
|
|
<img src="@Html.Raw(Model.Photo.ExternalNormalSizeImageUrl.Replace("/norm/", "/orig/"))" alt="@Model.Photo.Title" class="max-width-100per">
|
|
</div>
|
|
|
|
<div class="comments-like-div">
|
|
@Html.Raw(Model.Photo.Description)
|
|
</div>
|
|
}
|
|
<a href="/photos?p=@Model.GanjoorPage.PoetOrCat.Cat.UrlSlug" role="button" class="pagebutton comments-link">مشاهده و پیشنهاد تصاویر چهره برای @Model.GanjoorPage.PoetOrCat.Poet.Nickname</a>
|
|
</div>
|
|
|
|
</div>
|
|
if (Model.GanjoorPage.SecondPoet == null)
|
|
{
|
|
<div class="tabcontent related-images-frame" id="papersources">
|
|
<div class="related-images">
|
|
@if (Model.GanjoorPage.PoetOrCat.Cat.PaperSources != null && Model.GanjoorPage.PoetOrCat.Cat.PaperSources.Any())
|
|
{
|
|
@foreach (var book in Model.GanjoorPage.PoetOrCat.Cat.PaperSources)
|
|
{
|
|
<div class="related-image-container">
|
|
<a target="_blank" href="@Html.Raw(book.BookFullUrl)">
|
|
<img src="@Html.Raw(book.CoverThumbnailImageUrl)" alt="@book.BookFullTitle" loading="lazy" class="related-image">
|
|
</a>
|
|
<div class="related-image-is-text-source">
|
|
<a target="_blank" href="@Html.Raw(book.BookFullUrl)">@book.BookFullTitle</a>
|
|
</div>
|
|
@if (Model.CanEdit)
|
|
{
|
|
<div>
|
|
<a onclick="markAsTextOriginal(@book.NaskbanBookId, @Model.GanjoorPage.PoetOrCat.Cat.Id, '@book.BookFullTitle', '@Model.GanjoorPage.PoetOrCat.Cat.Title')" class="pagebutton" role="button">منبع کاغذی شود</a>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<p>برای این بخش هنوز منبع کاغذی خاصی مشخص نشده است.</p>
|
|
}
|
|
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
|
|
@if (
|
|
Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Length > 0
|
|
)
|
|
{
|
|
<div id="catmap"></div>
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (!string.IsNullOrEmpty(Model.NextUrl) || !string.IsNullOrEmpty(Model.PreviousUrl))
|
|
{
|
|
<div class="spacer"> </div>
|
|
<nav id="nav">
|
|
<div class="navigation">
|
|
|
|
<div class="navleft">
|
|
@if (!string.IsNullOrEmpty(Model.NextUrl))
|
|
{
|
|
<a href="@Html.Raw(Model.NextUrl)">@Model.NextTitle</a>
|
|
<span> »</span>
|
|
}
|
|
</div>
|
|
<div class="navright">
|
|
@if (!string.IsNullOrEmpty(Model.PreviousUrl))
|
|
{
|
|
<span>« </span>
|
|
<a href="@Html.Raw(Model.PreviousUrl)">@Model.PreviousTitle</a>
|
|
}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div class="spacer"> </div>
|
|
}
|
|
|
|
|
|
@if (Model.IsPoemPage)
|
|
{
|
|
|
|
<div class="spacer"> </div>
|
|
|
|
@if (Model.Banner != null)
|
|
{
|
|
<div class="margin-auto">
|
|
<a href="@Model.Banner.TargetUrl"><img src="@($"{GanjooRazor.APIRoot.InternetUrl}/{Model.Banner.ImageUrl}")" alt="@Model.Banner.AlternateText"></a>
|
|
</div>
|
|
}
|
|
|
|
<div id="comments">
|
|
<div class="poempretab" id="pretab"></div>
|
|
<div class="poemtab" id="tab-items">
|
|
<div class="poemtablinks active"><a href="#pretab">اطّلاعات</a></div>
|
|
<div class="poemtablinks"><a href="#words" onclick="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)">واژگان</a></div>
|
|
<div class="poemtablinks"><a href="#manuscripts">تصاویر</a></div>
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#recitations">خوانشها</a></div>
|
|
}
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#commentaries">شرحهای صوتی</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#qpoems">مشق شعر</a></div>
|
|
@if (Model.SectionsWithRelated.Count > 0)
|
|
{
|
|
<div class="poemtablinks"><a href="#rpoems">همآهنگها</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#songs">ترانهها</a></div>
|
|
<div class="poemtablinks">
|
|
<a href="#discussions">حاشیهها</a>
|
|
</div>
|
|
</div>
|
|
<div class="poem-info">
|
|
<div class="related-images-frame poemtabcontent">
|
|
<p>
|
|
<small><i class="notranslate pageicons mouse-icon"></i> با انتخاب متن و لمس متن انتخابی میتوانید آن را در لغتنامهٔ دهخدا جستجو کنید.</small>
|
|
</p>
|
|
|
|
@if (Model.GanjoorPage.Poem.Sections.Where(s => s.SectionType == RMuseum.Models.Ganjoor.PoemSectionType.WholePoem).Any() || !string.IsNullOrEmpty(Model.GanjoorPage.Poem.OldTag) || !string.IsNullOrEmpty(Model.GanjoorPage.Poem.SourceName))
|
|
{
|
|
<table>
|
|
@if (!Model.MutiPartPoemPage)
|
|
@foreach (var s in Model.GanjoorPage.Poem.Sections.Where(s => s.SectionType == RMuseum.Models.Ganjoor.PoemSectionType.WholePoem).ToList())
|
|
{
|
|
@if (s.GanjoorMetre != null)
|
|
{
|
|
<tr>
|
|
<td>
|
|
وزن:
|
|
</td>
|
|
<td>
|
|
<a href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(s.GanjoorMetre.Rhythm)}&a={Model.GanjoorPage.PoetOrCat.Poet.Id}")">@s.GanjoorMetre.Rhythm</a>
|
|
@if (!string.IsNullOrEmpty(s.RhymeLetters))
|
|
{
|
|
<a href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(s.GanjoorMetre.Rhythm)}&g={Uri.EscapeDataString(s.RhymeLetters)}")" role="button" class="cursor-pointer" title="مشابهیابی بر اساس وزن و قافیه">
|
|
<i class="notranslate noindent-info-button rhyming-poems"></i>
|
|
</a>
|
|
}
|
|
|
|
@if (Model.LoggedIn)
|
|
{
|
|
<a href="/User/Section?poemId=@Model.GanjoorPage.Id&index=@s.Index#metre" role="button" class="cursor-pointer" title="ویرایش وزن">
|
|
<i class="notranslate noindent-info-button edit-poem-button"></i>
|
|
</a>
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
@if (s.PoemFormat != null && s.PoemFormat != RMuseum.Models.Ganjoor.GanjoorPoemFormat.Unknown)
|
|
{
|
|
<tr>
|
|
<td>
|
|
قالب شعری:
|
|
</td>
|
|
<td>
|
|
<a href="/simi/?a=@Model.GanjoorPage.PoetOrCat.Poet.Id&f=@((int)s.PoemFormat)">
|
|
@RMuseum.Services.Implementation.GanjoorPoemFormatConvertor.GetString((RMuseum.Models.Ganjoor.GanjoorPoemFormat)s.PoemFormat)
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
|
|
}
|
|
@if (!string.IsNullOrEmpty(Model.GanjoorPage.Poem.OldTag))
|
|
{
|
|
<tr>
|
|
<td>
|
|
دسته:
|
|
</td>
|
|
<td>
|
|
<a href="@Html.Raw($"{Model.GanjoorPage.Poem.OldTagPageUrl}/")">@Model.GanjoorPage.Poem.OldTag</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
@if (!string.IsNullOrEmpty(Model.GanjoorPage.Poem.SourceName))
|
|
{
|
|
<tr>
|
|
<td>
|
|
منبع اولیه:
|
|
</td>
|
|
<td>
|
|
<a href="@Html.Raw($"/sources/{Model.GanjoorPage.Poem.SourceUrlSlug}/")">@Model.GanjoorPage.Poem.SourceName</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
|
|
<tr>
|
|
<td>
|
|
تعداد ابیات:
|
|
</td>
|
|
<td>
|
|
@Model.GanjoorPage.Poem.Sections.Where(s => s.SectionType == RMuseum.Models.Ganjoor.PoemSectionType.WholePoem).Sum(s => s.CoupletsCount).ToPersianNumbers()
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
}
|
|
|
|
|
|
|
|
@if (!string.IsNullOrEmpty(Model.GanjoorPage.Poem.PoemSummary))
|
|
{
|
|
<div class="notice" id="summary" data-nosnippet>
|
|
<div class="century">خلاصه</div>
|
|
<p>
|
|
@Html.Raw(Model.GanjoorPage.Poem.PoemSummary.Replace("\n", "<br />"))
|
|
</p>
|
|
@if (Model.LoggedIn)
|
|
{
|
|
<a href="/User/Editor?id=@Model.GanjoorPage.Id#summaries" role="button" class="cursor-pointer" title="ویرایش">
|
|
<div class="circled-number">
|
|
<i class="notranslate noindent-info-button edit-poem-button"></i>
|
|
</div>
|
|
</a>
|
|
}
|
|
else
|
|
{
|
|
<a href="/login" role="button" class="cursor-pointer" title="ویرایش">
|
|
<div class="circled-number-diff">
|
|
<i class="notranslate noindent-info-button edit-poem-button"></i>
|
|
</div>
|
|
</a>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
|
|
@if (Model.GanjoorPage.Poem.Verses.Any(v => !string.IsNullOrEmpty(v.CoupletSummary)))
|
|
{
|
|
<div id="summaries" data-nosnippet>
|
|
<div class="century">
|
|
برگردان به زبان ساده
|
|
<a onclick="copySummeriesText()" role="button" class="cursor-pointer" title="رونوشت متن">
|
|
<svg class="noindent-info-button" height="24px" viewBox="0 0 24 24" width="24px" fill="#5f6368"><path d="M0 0h24v24H0V0z" fill="none" /><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" /></svg>
|
|
</a>
|
|
</div>
|
|
@for (int verseIndex = 0; verseIndex < Model.GanjoorPage.Poem.Verses.Length; verseIndex++)
|
|
{
|
|
@if (!string.IsNullOrEmpty(Model.GanjoorPage.Poem.Verses[verseIndex].CoupletSummary))
|
|
{
|
|
<div id="summary-@Model.GanjoorPage.Poem.Verses[verseIndex].VOrder" class="coupletsummary">
|
|
<blockquote id="sb-@Model.GanjoorPage.Poem.Verses[verseIndex].VOrder">
|
|
@if (Model.GanjoorPage.Poem.Verses[verseIndex].VersePosition == RMuseum.Models.Ganjoor.VersePosition.Paragraph)
|
|
{
|
|
<p><a href="#bn@(Model.GanjoorPage.Poem.Verses[verseIndex].CoupletIndex + 1)">#</a> @Model.GanjoorPage.Poem.Verses[verseIndex].Text</p>
|
|
}
|
|
else
|
|
{
|
|
|
|
@for (int nIndex = verseIndex; nIndex < Model.GanjoorPage.Poem.Verses.Length &&
|
|
|
|
(nIndex == verseIndex
|
|
||
|
|
(
|
|
Model.GanjoorPage.Poem.Verses[nIndex].VersePosition != RMuseum.Models.Ganjoor.VersePosition.Right
|
|
&& Model.GanjoorPage.Poem.Verses[nIndex].VersePosition != RMuseum.Models.Ganjoor.VersePosition.CenteredVerse1
|
|
&& Model.GanjoorPage.Poem.Verses[nIndex].VersePosition != RMuseum.Models.Ganjoor.VersePosition.Paragraph
|
|
))
|
|
; nIndex++)
|
|
{
|
|
if (nIndex == verseIndex)
|
|
{
|
|
<p>
|
|
<a href="#bn@(Model.GanjoorPage.Poem.Verses[verseIndex].CoupletIndex + 1)">#</a> @Model.GanjoorPage.Poem.Verses[nIndex].Text
|
|
</p>
|
|
}
|
|
else
|
|
{
|
|
<p>
|
|
@Model.GanjoorPage.Poem.Verses[nIndex].Text
|
|
</p>
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
</blockquote>
|
|
<div class="notice" id="sn-@Model.GanjoorPage.Poem.Verses[verseIndex].VOrder">
|
|
<p>@Model.GanjoorPage.Poem.Verses[verseIndex].CoupletSummary</p>
|
|
@if (Model.LoggedIn)
|
|
{
|
|
<a href="@($"/User/Editor?id={Model.GanjoorPage.Id}#summary-{Model.GanjoorPage.Poem.Verses[verseIndex].VOrder}")" role="button" class="cursor-pointer" title="ویرایش">
|
|
<div class="circled-number">
|
|
<i class="notranslate noindent-info-button edit-poem-button"></i>
|
|
</div>
|
|
</a>
|
|
}
|
|
else
|
|
{
|
|
<a href="/login" role="button" class="cursor-pointer" title="ویرایش">
|
|
<div class="circled-number-diff">
|
|
<i class="notranslate noindent-info-button edit-poem-button"></i>
|
|
</div>
|
|
</a>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
</div>
|
|
}
|
|
|
|
<a onclick="copyPoemText()" role="button" class="pagebutton comments-link" title="رونوشت متن">
|
|
رونوشت متن
|
|
<svg class="noindent-info-button" height="24px" viewBox="0 0 24 24" width="24px" fill="#5f6368"><path d="M0 0h24v24H0V0z" fill="none" /><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" /></svg>
|
|
</a>
|
|
|
|
<a onclick="copyPoemLink()" role="button" class="pagebutton comments-link" title="رونوشت نشانی">
|
|
رونوشت نشانی
|
|
<svg class="noindent-info-button" height="24px" viewBox="0 0 24 24" width="24px" fill="#5f6368"><path d="M0 0h24v24H0V0z" fill="none" /><path d="M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5zm-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-2zm-3-4h8v2H8z" /></svg>
|
|
</a>
|
|
|
|
<a href="/t6e?p=@Model.GanjoorPage.Id" role="button" class="pagebutton comments-link" target="_blank">
|
|
نمای مشابه کتابهای چاپی (فقط رایانه)
|
|
<svg class="noindent-info-button" height="24px" viewBox="0 0 24 24" width="24px" fill="#5f6368"><path d="M0 0h24v24H0V0z" fill="none" /><path d="M19 8h-1V3H6v5H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zM8 5h8v3H8V5zm8 12v2H8v-4h8v2zm2-2v-2H6v2H4v-4c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v4h-2z" /><circle cx="18" cy="11.5" r="1" /></svg>
|
|
</a>
|
|
|
|
@if (Model.GanjoorPage.Poem.GeoDateTags.Any())
|
|
{
|
|
<div id="catmap"></div>
|
|
}
|
|
</div>
|
|
|
|
<div class="poempretab" id="words"></div>
|
|
<div class="poemtab">
|
|
<div class="poemtablinks"><a href="#pretab">اطّلاعات</a></div>
|
|
<div class="poemtablinks active"><a href="#words" onclick="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)">واژگان</a></div>
|
|
<div class="poemtablinks"><a href="#manuscripts">تصاویر</a></div>
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#recitations">خوانشها</a></div>
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#commentaries">شرحهای صوتی</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#qpoems">مشق شعر</a></div>
|
|
@if (Model.SectionsWithRelated.Count > 0)
|
|
{
|
|
<div class="poemtablinks"><a href="#rpoems">همآهنگها</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#songs">ترانهها</a></div>
|
|
<div class="poemtablinks">
|
|
<a href="#discussions">حاشیهها</a>
|
|
</div>
|
|
</div>
|
|
<div class="related-images-frame poemtabcontent">
|
|
<div id="wordcounts-placeholder">
|
|
<a href="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)" id="load-word-counts" class="pagebutton comments-link">
|
|
محاسبهٔ بسامد واژگان
|
|
<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>
|
|
</div>
|
|
|
|
|
|
<div class="poempretab" id="manuscripts"></div>
|
|
<div class="poemtab">
|
|
<div class="poemtablinks"><a href="#pretab">اطّلاعات</a></div>
|
|
<div class="poemtablinks"><a href="#words" onclick="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)">واژگان</a></div>
|
|
<div class="poemtablinks active"><a href="#manuscripts">تصاویر</a></div>
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#recitations">خوانشها</a></div>
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#commentaries">شرحهای صوتی</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#qpoems">مشق شعر</a></div>
|
|
@if (Model.SectionsWithRelated.Count > 0)
|
|
{
|
|
<div class="poemtablinks"><a href="#rpoems">همآهنگها</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#songs">ترانهها</a></div>
|
|
<div class="poemtablinks">
|
|
<a href="#discussions">حاشیهها</a>
|
|
</div>
|
|
</div>
|
|
<div class="related-images-frame poemtabcontent">
|
|
@if (Model.GanjoorPage.Poem.Images.Length > 0)
|
|
{
|
|
<div id="images-section">
|
|
<div class="related-images">
|
|
@foreach (var image in Model.GanjoorPage.Poem.Images.Where(image => image.IsTextOriginalSource))
|
|
{
|
|
<div class="width-100per">
|
|
<div class="related-image-container-main">
|
|
<a target="_blank" href="@Html.Raw(image.TargetPageUrl)">
|
|
<div class="main-image-container">
|
|
<div class="main-image-ribbon">منبع کاغذی گنجور</div>
|
|
<img src="@Html.Raw(image.ThumbnailImageUrl)" alt="@image.AltText" loading="lazy" class="main-image-source">
|
|
<div class="related-image-is-text-source">
|
|
<div class="width-100per">@image.AltText.ToPersianNumbers()</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
@if (Model.CanEdit)
|
|
{
|
|
<a onclick="deleteRelatedImage(@((int)image.PoemRelatedImageType), '@image.Id', '@image.AltText')" class="pagebutton comments-link">حذف این ارتباط<i class="notranslate info-buttons delete-icon"></i></a>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
}
|
|
|
|
|
|
@foreach (var image in Model.GanjoorPage.Poem.Images.Where(image => image.IsTextOriginalSource == false))
|
|
{
|
|
<div class="related-image-container">
|
|
<a target="_blank" href="@Html.Raw(image.TargetPageUrl)">
|
|
<img src="@Html.Raw(image.ThumbnailImageUrl)" alt="@image.AltText" loading="lazy" class="related-image">
|
|
</a>
|
|
<div class="related-image-is-text-source"><a target="_blank" href="@Html.Raw(image.TargetPageUrl)">@image.AltText.ToPersianNumbers()</a></div>
|
|
@if (Model.CanEdit)
|
|
{
|
|
<a onclick="deleteRelatedImage(@((int)image.PoemRelatedImageType), '@image.Id', '@image.AltText')" class="pagebutton comments-link">حذف این ارتباط<i class="notranslate info-buttons delete-icon"></i></a>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
<div id="suggest-images">
|
|
<p>
|
|
<a onclick="wpopen('?pinterest_url=manual'); return false" class="pagebutton comments-link">پیشنهاد تصاویر مرتبط از منابع اینترنتی<i class="notranslate info-buttons photo_camera"></i></a>
|
|
</p>
|
|
<p>
|
|
<a href="https://blog.ganjoor.net/1398/07/12/mganjoor/" class="pagebutton" target="_blank">راهنمای نحوهٔ پیشنهاد تصاویر مرتبط از گنجینهٔ گنجور<i class="notranslate info-buttons help-button"></i></a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div id="suggest-images">
|
|
<p>
|
|
<a onclick="wpopen('?pinterest_url=manual'); return false" class="pagebutton comments-link">پیشنهاد تصاویر مرتبط از منابع اینترنتی<i class="notranslate info-buttons photo_camera"></i></a>
|
|
</p>
|
|
<p>
|
|
<a href="https://blog.ganjoor.net/1398/07/12/mganjoor/" class="pagebutton" target="_blank">راهنمای نحوهٔ پیشنهاد تصاویر مرتبط از گنجینهٔ گنجور<i class="notranslate info-buttons help-button"></i></a>
|
|
</p>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
@{
|
|
if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
|
|
<div class="poempretab" id="recitations"></div>
|
|
<div class="poemtab">
|
|
<div class="poemtablinks"><a href="#pretab">اطّلاعات</a></div>
|
|
<div class="poemtablinks"><a href="#words" onclick="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)">واژگان</a></div>
|
|
<div class="poemtablinks"><a href="#manuscripts">تصاویر</a></div>
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
<div class="poemtablinks active"><a href="#recitations">خوانشها</a></div>
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#commentaries">شرحهای صوتی</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#qpoems">مشق شعر</a></div>
|
|
@if (Model.SectionsWithRelated.Count > 0)
|
|
{
|
|
<div class="poemtablinks"><a href="#rpoems">همآهنگها</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#songs">ترانهها</a></div>
|
|
<div class="poemtablinks">
|
|
<a href="#discussions">حاشیهها</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="poemtabcontent">
|
|
<partial name="_AudioPlayerPartial" model=@Model.GetRecitationsModel(Model.GanjoorPage.Poem.Recitations, false, RMuseum.Models.GanjoorAudio.RecitationType.Normal, Model.CanEdit) />
|
|
|
|
<a onclick="switchPlayerScrollLock()" role="button" class="pagebutton comments-link">
|
|
فعال یا غیرفعالسازی قفل متن روی خوانش
|
|
<svg class="noindent-info-button" height="24px" viewBox="0 0 24 24" width="24px" fill="#5f6368"><path d="M0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0z" fill="none" /><path d="M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2h-4.66l2 2H18v5.56l2 2V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5-2.32 0-4.26 1.59-4.82 3.74L8.9 6.46V6zM4.41 4.81L3 6.22l2.04 2.04C4.42 8.6 4 9.25 4 10v10c0 1.1.9 2 2 2h12.78l1 1 1.41-1.41L4.41 4.81zM6 20V10h.78l10 10H6z" /></svg>
|
|
</a>
|
|
|
|
<a href="https://ava.ganjoor.net/about/" class="pagebutton comments-link" target="_blank">من بخوانم</a>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poempretab" id="commentaries"></div>
|
|
<div class="poemtab">
|
|
<div class="poemtablinks"><a href="#pretab">اطّلاعات</a></div>
|
|
<div class="poemtablinks"><a href="#words" onclick="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)">واژگان</a></div>
|
|
<div class="poemtablinks"><a href="#manuscripts">تصاویر</a></div>
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#recitations">خوانشها</a></div>
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poemtablinks active"><a href="#commentaries">شرحهای صوتی</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#qpoems">مشق شعر</a></div>
|
|
@if (Model.SectionsWithRelated.Count > 0)
|
|
{
|
|
<div class="poemtablinks"><a href="#rpoems">همآهنگها</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#songs">ترانهها</a></div>
|
|
<div class="poemtablinks">
|
|
<a href="#discussions">حاشیهها</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="poemtabcontent">
|
|
<partial name="_AudioPlayerPartial" model=@Model.GetRecitationsModel(Model.GanjoorPage.Poem.Recitations, false, RMuseum.Models.GanjoorAudio.RecitationType.Commentary, Model.CanEdit) />
|
|
<a onclick="switchPlayerScrollLock()" role="button" class="pagebutton comments-link">
|
|
فعال یا غیرفعالسازی قفل متن روی خوانش
|
|
<svg class="noindent-info-button" height="24px" viewBox="0 0 24 24" width="24px" fill="#5f6368"><path d="M0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0z" fill="none" /><path d="M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2h-4.66l2 2H18v5.56l2 2V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5-2.32 0-4.26 1.59-4.82 3.74L8.9 6.46V6zM4.41 4.81L3 6.22l2.04 2.04C4.42 8.6 4 9.25 4 10v10c0 1.1.9 2 2 2h12.78l1 1 1.41-1.41L4.41 4.81zM6 20V10h.78l10 10H6z" /></svg>
|
|
</a>
|
|
</div>
|
|
}
|
|
|
|
<div class="poempretab" id="qpoems"></div>
|
|
<div class="poemtab">
|
|
<div class="poemtablinks"><a href="#pretab">اطّلاعات</a></div>
|
|
<div class="poemtablinks"><a href="#words" onclick="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)">واژگان</a></div>
|
|
<div class="poemtablinks"><a href="#manuscripts">تصاویر</a></div>
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#recitations">خوانشها</a></div>
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#commentaries">شرحهای صوتی</a></div>
|
|
}
|
|
<div class="poemtablinks active"><a href="#qpoems">مشق شعر</a></div>
|
|
@if (Model.SectionsWithRelated.Count > 0)
|
|
{
|
|
<div class="poemtablinks"><a href="#rpoems">همآهنگها</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#songs">ترانهها</a></div>
|
|
<div class="poemtablinks">
|
|
<a href="#discussions">حاشیهها</a>
|
|
</div>
|
|
</div>
|
|
<div class="poemtabcontent">
|
|
@for (int i = 0; i < Math.Min(5, Model.GanjoorPage.Poem.Top6QuotedPoems.Length); i++)
|
|
{
|
|
<partial name="_QuotedPoemPartial" model=@Model.GetQuotedPoemModel(Model.GanjoorPage.Poem.Top6QuotedPoems[i], Model.GanjoorPage, Model.CanEdit) />
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Poem.Top6QuotedPoems.Length == 6)
|
|
{
|
|
<div id="more-quoted-placeholder"></div>
|
|
<div id="load-more-quoted">
|
|
<a role="button" class="pagebutton" id="load-more-quoted" onclick="loadMoreQuotedPoems(@Model.GanjoorPage.Poem.Id, 5, '@Model.GanjoorPage.PoetOrCat.Poet.ImageUrl', '@Model.GanjoorPage.PoetOrCat.Poet.Nickname', @Model.CanEdit.ToString().ToLower())">بیشتر<i class="notranslate info-buttons autorenew"></i></a>
|
|
</div>
|
|
}
|
|
@if (Model.LoggedIn)
|
|
{
|
|
<div>
|
|
<a href="/User/SuggestQuoted/?p=@Model.GanjoorPage.Id" class="pagebutton comments-link" target="_blank">پیشنهاد مشق شعر</a>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div>
|
|
<a href="https://blog.ganjoor.net/1402/11/06/suggest-quotes/" class="pagebutton comments-link" target="_blank">پیشنهاد مشق شعر</a>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
@if (Model.SectionsWithRelated.Any() || Model.SectionsWithMetreAndRhymes.Any())
|
|
{
|
|
<div class="poempretab" id="rpoems"></div>
|
|
<div class="poemtab">
|
|
<div class="poemtablinks"><a href="#pretab">اطّلاعات</a></div>
|
|
<div class="poemtablinks"><a href="#words" onclick="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)">واژگان</a></div>
|
|
<div class="poemtablinks"><a href="#manuscripts">تصاویر</a></div>
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#recitations">خوانشها</a></div>
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#commentaries">شرحهای صوتی</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#qpoems">مشق شعر</a></div>
|
|
@if (Model.SectionsWithRelated.Count > 0)
|
|
{
|
|
<div class="poemtablinks active"><a href="#rpoems">همآهنگها</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#songs">ترانهها</a></div>
|
|
<div class="poemtablinks">
|
|
<a href="#discussions">حاشیهها</a>
|
|
</div>
|
|
</div>
|
|
<div class="poemtabcontent">
|
|
@foreach (var s in Model.SectionsWithRelated)
|
|
{
|
|
@for (int i = 0; i < Math.Min(5, s.Top6RelatedSections.Length); i++)
|
|
{
|
|
<div class="inlinesimi">
|
|
<div class="poet-pic-wrap">
|
|
<a href="@Html.Raw(s.Top6RelatedSections[i].FullUrl)"><img src="@(GanjooRazor.APIRoot.InternetUrl + s.Top6RelatedSections[i].PoetImageUrl)" alt="@s.Top6RelatedSections[i].PoetName"></a>
|
|
</div>
|
|
<div class="inlinesimi-poem-title">
|
|
<a href="@Html.Raw(s.Top6RelatedSections[i].FullUrl)">@s.Top6RelatedSections[i].FullTitle</a><span></span>
|
|
</div>
|
|
<div class="simitext">
|
|
@Html.Raw(s.Top6RelatedSections[i].HtmlExcerpt)
|
|
</div>
|
|
|
|
@if (s.Top6RelatedSections[i].PoetMorePoemsLikeThisCount > 0 && s.GanjoorMetre != null && !string.IsNullOrEmpty(s.RhymeLetters))
|
|
{
|
|
@if (s.Top6RelatedSections[i].PoetMorePoemsLikeThisCount > 20)
|
|
{
|
|
<a role="button" class="pagebutton" id="@($"load-more-button-{s.Top6RelatedSections[i].PoetId}-{s.Index}")" href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(s.GanjoorMetre.Rhythm)}&g={Uri.EscapeDataString(s.RhymeLetters)}&a={s.Top6RelatedSections[i].PoetId}")" target="_blank">مشاهدهٔ بیش از @s.Top6RelatedSections[i].PoetMorePoemsLikeThisCount.ToPersianNumbers() مورد هم آهنگ دیگر از @s.Top6RelatedSections[i].PoetName<i class="notranslate info-buttons autorenew"></i></a>
|
|
}
|
|
else
|
|
{
|
|
<a role="button" class="pagebutton" id="@($"load-more-button-{s.Top6RelatedSections[i].PoetId}-{s.Index}")" onclick="loadMoreRelatedFromPoet(@s.Top6RelatedSections[i].PoetId, '@s.GanjoorMetre.Rhythm', '@s.RhymeLetters', '@Model.GanjoorPage.Poem.FullUrl', '@s.Top6RelatedSections[i].FullUrl', @s.Index)">مشاهدهٔ @s.Top6RelatedSections[i].PoetMorePoemsLikeThisCount.ToPersianNumbers() مورد هم آهنگ دیگر از @s.Top6RelatedSections[i].PoetName<i class="notranslate info-buttons autorenew"></i></a>
|
|
}
|
|
}
|
|
</div>
|
|
|
|
@if (s.Top6RelatedSections[i].PoetMorePoemsLikeThisCount > 0)
|
|
{
|
|
<div id=@($"more-related-placeholder-{s.Top6RelatedSections[i].PoetId}-{s.Index}")></div>
|
|
}
|
|
}
|
|
|
|
@if (s.Top6RelatedSections.Length == 6 && s.GanjoorMetre != null)
|
|
{
|
|
<div id="more-related-placeholder-@s.Index"></div>
|
|
<div id="load-more-related-@s.Index">
|
|
<a role="button" class="pagebutton" id="load-more-button-@s.Index" onclick="loadMoreRelatedPoems(@Model.GanjoorPage.Poem.Id, 5, '@s.GanjoorMetre.Rhythm', '@s.RhymeLetters', '@Model.GanjoorPage.Poem.FullUrl', @s.Index)">بیشتر<i class="notranslate info-buttons autorenew"></i></a>
|
|
</div>
|
|
}
|
|
}
|
|
|
|
@if (Model.SectionsWithMetreAndRhymes.Any())
|
|
{
|
|
<a href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes.First().GanjoorMetre.Rhythm)}&g={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes.First().RhymeLetters)}")" class="pagebutton comments-link">
|
|
مشابهیابی بر اساس وزن و قافیه
|
|
<svg class="noindent-info-button" height="24px" viewBox="0 0 24 24" width="24px" fill="#5f6368"><path d="M0 0h24v24H0V0z" fill="none" /><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" /></svg>
|
|
</a>
|
|
|
|
@for (int nSectionIndex = 1; nSectionIndex < Model.SectionsWithMetreAndRhymes.Count; nSectionIndex++)
|
|
{
|
|
<a href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes[nSectionIndex].GanjoorMetre.Rhythm)}&g={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes[nSectionIndex].RhymeLetters)}")" class="pagebutton comments-link">
|
|
مشابهیابی بر اساس وزن و قافیه (وزن @((nSectionIndex + 1).ToPersianNumbers()))
|
|
<svg class="noindent-info-button" height="24px" viewBox="0 0 24 24" width="24px" fill="#5f6368"><path d="M0 0h24v24H0V0z" fill="none" /><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" /></svg>
|
|
</a>
|
|
}
|
|
}
|
|
|
|
</div>
|
|
}
|
|
|
|
<div class="poempretab" id="songs"></div>
|
|
<div class="poemtab">
|
|
<div class="poemtablinks"><a href="#pretab">اطّلاعات</a></div>
|
|
<div class="poemtablinks"><a href="#words" onclick="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)">واژگان</a></div>
|
|
<div class="poemtablinks"><a href="#manuscripts">تصاویر</a></div>
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#recitations">خوانشها</a></div>
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#commentaries">شرحهای صوتی</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#qpoems">مشق شعر</a></div>
|
|
@if (Model.SectionsWithRelated.Count > 0)
|
|
{
|
|
<div class="poemtablinks"><a href="#rpoems">همآهنگها</a></div>
|
|
}
|
|
<div class="poemtablinks active"><a href="#songs">ترانهها</a></div>
|
|
<div class="poemtablinks">
|
|
<a href="#discussions">حاشیهها</a>
|
|
</div>
|
|
</div>
|
|
@if (!Model.GanjoorPage.Poem.Songs.Any())
|
|
{
|
|
<div class="poemtabcontent">
|
|
<p>
|
|
<a href="@Html.Raw($"/spotify?p={Model.GanjoorPage.Id}")" onclick="wpopen(this.href); return false" class="pagebutton comments-link">
|
|
معرفی ترانههایی که در متن آنها از این شعر استفاده شده است<i class="notranslate info-buttons music_note"></i>
|
|
</a>
|
|
</p>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="poemtabcontent" id="songs">
|
|
@foreach (var song in Model.GanjoorPage.Poem.Songs)
|
|
{
|
|
<div class="related-song">
|
|
<i class="notranslate info-buttons queue_music"></i><a target="_blank" href="@Html.Raw(song.TrackUrl)">@Html.Raw($"{song}")</a>
|
|
@if (song.TrackType == RMuseum.Models.Ganjoor.PoemMusicTrackType.Spotify)
|
|
{
|
|
<a target="_blank" href="@Html.Raw(song.TrackUrl)"><img class="spotify-track-icon" src="/image/sp16.png" alt="اسپاتیفای" height="16"></a>
|
|
}
|
|
@if (Model.CanEdit)
|
|
{
|
|
<a role="button" class="cursor-pointer" href="/User/ReviewSongs?id=@song.Id"><i class="notranslate info-buttons edit-poem-button"></i></a>
|
|
}
|
|
</div>
|
|
}
|
|
<p>
|
|
<a href="@Html.Raw($"/spotify?p={Model.GanjoorPage.Id}")" onclick="wpopen(this.href); return false" class="pagebutton comments-link">
|
|
معرفی ترانههای دیگر<i class="notranslate info-buttons music_note"></i>
|
|
</a>
|
|
</p>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<div class="poempretab" id="discussions"></div>
|
|
<div class="poemtab">
|
|
<div class="poemtablinks"><a href="#pretab">اطّلاعات</a></div>
|
|
<div class="poemtablinks"><a href="#words" onclick="javascript:countPoemWords(@Model.GanjoorPage.Id, @Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id)">واژگان</a></div>
|
|
<div class="poemtablinks"><a href="#manuscripts">تصاویر</a></div>
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#recitations">خوانشها</a></div>
|
|
}
|
|
|
|
@if (Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any())
|
|
{
|
|
<div class="poemtablinks"><a href="#commentaries">شرحهای صوتی</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#qpoems">مشق شعر</a></div>
|
|
@if (Model.SectionsWithRelated.Count > 0)
|
|
{
|
|
<div class="poemtablinks"><a href="#rpoems">همآهنگها</a></div>
|
|
}
|
|
<div class="poemtablinks"><a href="#songs">ترانهها</a></div>
|
|
<div class="poemtablinks active">
|
|
<a href="#discussions">حاشیهها</a>
|
|
</div>
|
|
</div>
|
|
<div class="related-images-frame poemtabcontent">
|
|
|
|
<div id="comments-section">
|
|
@switch (Model.GanjoorPage.Poem.Comments.Length)
|
|
{
|
|
case 0:
|
|
<p>
|
|
تا به حال حاشیهای برای این شعر نوشته نشده است. <a href="#commentform" class="comments-link" title="من حاشیه بگذارم ...">💬 من حاشیه بگذارم ...</a>
|
|
</p>
|
|
break;
|
|
case 1:
|
|
<p>
|
|
تا به حال یک حاشیه برای این شعر نوشته شده است. <a href="#commentform" class="comments-link" title="من حاشیه بگذارم ...">💬 من حاشیه بگذارم ...</a>
|
|
</p>
|
|
break;
|
|
default:
|
|
<p>
|
|
تا به حال @Html.Raw(Model.GanjoorPage.Poem.Comments.Length.ToPersianNumbers()) حاشیه برای این شعر نوشته شده است. <a href="#commentform" class="comments-link" title="من حاشیه بگذارم ...">💬 من حاشیه بگذارم ...</a>
|
|
</p>
|
|
break;
|
|
}
|
|
|
|
<div id="comments-block">
|
|
@foreach (var comment in Model.GanjoorPage.Poem.Comments)
|
|
{
|
|
<partial name="_CommentPartial" model=@Model.GetCommentModel(comment, Model.GanjoorPage.Id) />
|
|
}
|
|
</div>
|
|
|
|
@if (Model.LoggedIn)
|
|
{
|
|
|
|
<form method="post" id="commentform" action="?handler=Comment">
|
|
<fieldset>
|
|
<legend>💬 من حاشیه بگذارم ...</legend>
|
|
<table class="comment-table">
|
|
<tr>
|
|
<td>
|
|
<div class="required">
|
|
<textarea name="comment" id="comment" class="inputTextarea editor width-100per" tabindex="4" rows="10"></textarea>
|
|
</div>
|
|
<input type="hidden" name="poemId" id="poemId" value="@Model.GanjoorPage.Id">
|
|
<input type="hidden" name="coupletIndex" value="-1">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<button name="postcomment" id="postcomment" class="submitCommentButton width-100per" onclick="return postComment('', '#postcomment');">درج حاشیه</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<div class="notice">
|
|
<p>
|
|
لطفاً توجه داشته باشید که حاشیهها برای ثبت نظرات شما راجع به <strong>همین شعر</strong> در نظر گرفته شدهاند. در صورتی که در متن ثبت شدهٔ شعر در گنجور تفاوتهایی غیر از موارد قابل ویرایش یافتید، در مورد این شعر نظر یا احساس خاصی دارید یا مطلب خاصی در مورد آن میدانید یا دوست دارید دربارهٔ آن از دیگران چیزی بپرسید یک حاشیه برای آن بنویسید. <span class="red-color">لطفاً از درج مطالب غیرمرتبط با متن این شعر خاص خودداری فرمایید</span> و حتیالامکان سعی کنید متن حاشیهٔ خود را با حروف فارسی درج کنید (حاشیهها بازبینی خواهند شد و موارد غیرمرتبط و ناقض این نکات حذف میشوند).
|
|
</p>
|
|
<p>
|
|
<span class="red-color">بحثهای مذهبی و اعتقادی و ارجاع توهینآمیز نسبت به بزرگان ادیان و همینطور بحثهای قومیتی و توهین به فرهنگها و قومیتها و زبانها و بحثهای مرتبط با سیاست روز از مصادیق حاشیههای نامناسب محسوب میشوند.</span> لطفاً از هیچ قوم و مذهبی با صفات زننده صحبت نکنید و به خاطر داشته باشید که همهٔ اقوام (حتی اقوام ایرانی) در مقاطعی از تاریخ خود نسبت به اقوام دیگر بدوی محسوب میشدهاند یا با تعدی به خاک همسایگان خود نسبت به آنها ستم روا داشتهاند.
|
|
</p>
|
|
<p>
|
|
در خطاب قرار دادن کاربران دیگر -چه به شکل خاص و چه به شکل عمومی- فارغ از این که در حاشیههایشان نظرات معقولی را عنوان کردهاند یا خیر، رعایت احترام را بفرمایید. بیاحترامی به دیگر کاربران (و البته شخصیتهای دیگر از جمله هنرمندان و ...) از مصادیق حاشیههای نامناسب محسوب میشود و فارغ از ارزش محتوایی، حاشیهٔ فرد خاطی به محض دریافت گزارش تخلف حذف خواهد شد.
|
|
</p>
|
|
<p>
|
|
<span class="red-color">تذکر مهم: </span>از آنجا که گنجور فاقد نیروی انسانی کافی برای رسیدگی به حجم بالایی از تخلف در حاشیهها میباشد در صورت تکرار موارد عنوان شده توسط یک کاربر در حاشیههای متعدد، حساب کاربر متخلف بدون اخطار قبلی حذف خواهد شد. <span class="red-color">ضمناً</span> فحاشی یا هر اقدامی که نشان دهد کاربر تلاش داشته با انجام آن عامدانه خرابکاری کند یا مشکلی برای سایت ایجاد کند حتی اگر فقط یک بار اتفاق بیفتد منجر به حذف حساب کاربر متخلف بدون اخطار قبلی خواهد شد.
|
|
</p>
|
|
<p>
|
|
<span class="green-color">لطفاً در صورتی که تفاوتها را با استناد به نسخههای چاپی یا خطی گزارش میکنید این مسئله را با ذکر منبع مطرح نمایید. اشتباهات تایپی و غلطهای املایی را <a href="/User/Editor?id=@Model.GanjoorPage.Id">ویرایش</a> و تصحیح کنید.</span>
|
|
</p>
|
|
<p>
|
|
<span class="red-color">لطفاً از درج اطلاعات خصوصی مانند تلفن همراه و مانند آن در حاشیه خودداری کنید. </span> انتشار چنین اطلاعاتی به صورت عمومی ممکن است باعث سوء استفادهٔ کلاهبرداران شود.
|
|
</p>
|
|
</div>
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
|
|
<div id="id02" class="modal">
|
|
<span onclick="document.getElementById('id02').style.display='none'"
|
|
class="close" title="بستن">×</span>
|
|
<form class="modal-content animate" method="post" id="editcommentform" action="?handler=EditComment">
|
|
<table class="comment-table">
|
|
<tr>
|
|
<td>
|
|
<textarea name="editCommentText" id="editCommentText" class="inputTextarea editor width-100per" tabindex="4" rows="10"></textarea>
|
|
<input type="hidden" name="editCommentId" id="editCommentId" value="">
|
|
<input type="hidden" name="editCommentCoupletIndex" id="editCommentCoupletIndex" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<button name="editcomment" id="editcomment" class="submitCommentButton width-100per" onclick="return editComment();">ویرایش حاشیه</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="id03" class="modal">
|
|
<span onclick="document.getElementById('id03').style.display='none'"
|
|
class="close" title="بستن">×</span>
|
|
<form class="modal-content animate" method="post" id="replycommentform" action="?handler=Reply">
|
|
<table class="comment-table">
|
|
<tr>
|
|
<td>
|
|
<textarea name="replyCommentText" id="replyCommentText" class="inputTextarea editor width-100per" tabindex="4" rows="10"></textarea>
|
|
<input type="hidden" name="refPoemId" id="refPoemId" value="@Model.GanjoorPage.Id">
|
|
<input type="hidden" name="refCommentId" id="refCommentId" value="">
|
|
<input type="hidden" name="refCommentDivSuffix" id="refCommentDivSuffix" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<button name="replycomment" id="replycomment" class="submitCommentButton width-100per" onclick="return postReplyComment();">درج پاسخ به حاشیه</button>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>در پاسخ به:</p>
|
|
<div id="refComment"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</form>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="notice" id="commentform">
|
|
<p>
|
|
برای حاشیهگذاری باید در گنجور <a href="/signup" target="_blank">نامنویسی</a> کنید و با نام کاربری خود از طریق آیکون 👤 گوشهٔ پایین سمت چپ صفحات به آن وارد شوید.
|
|
</p>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div> <!-- <div id="comments"> -->
|
|
}
|
|
|
|
|
|
|
|
|
|
@if ((Model.IsCatPage || Model.IsPoetPage) && Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Length > 0)
|
|
{
|
|
<script>
|
|
var poemGeoTags = [];
|
|
var map;
|
|
var oms;
|
|
var layerGroup;
|
|
var myGeoJSONPath = '/json/world.json';
|
|
var myCustomStyle = {
|
|
stroke: true,
|
|
weight: 1,
|
|
color: '#300',
|
|
}
|
|
|
|
$.getJSON(myGeoJSONPath, function (data) {
|
|
var map = L.map('catmap').setView([34, 53.6880], 4);
|
|
L.geoJson(data, {
|
|
clickable: false,
|
|
style: myCustomStyle
|
|
}).addTo(map);
|
|
|
|
L.tileLayer.provider('OpenStreetMap').addTo(map);
|
|
|
|
oms = new OverlappingMarkerSpiderfier(map, { keepSpiderfied: true });
|
|
layerGroup = L.layerGroup().addTo(map);
|
|
poemGeoTags = @(Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.CategoryPoemGeoDateTags.Where(t => t.Location != null).ToArray(), Newtonsoft.Json.Formatting.Indented)));
|
|
|
|
var popup = new L.Popup();
|
|
oms.addListener('click', function (marker) {
|
|
|
|
var markOrder = '';
|
|
if (marker.poemGeoTag.LunarYear != null) {
|
|
markOrder = marker.order + ' - ';
|
|
}
|
|
var poemDesc = markOrder + '<a class="actionlink" onclick="viewLocation(marker.poemGeoTag.Location.Latitude, marker.poemGeoTag.Location.Longitude)">' + marker.poemGeoTag.Location.Name + '</a> <br> <a href="' + marker.poemGeoTag.Poem.FullUrl + '">' + marker.poemGeoTag.Poem.FullTitle + '</a>';
|
|
if (marker.poemGeoTag.LunarYear != null) {
|
|
poemDesc += '<br> سال ' + persianizeNumerals(marker.poemGeoTag.LunarYear.toString()) + ' قمری';
|
|
}
|
|
popup.setContent(poemDesc);
|
|
popup.setLatLng(marker.getLatLng());
|
|
map.openPopup(popup);
|
|
});
|
|
|
|
var polygon = L.polyline([
|
|
@foreach (var poemGeoTag in Model.CategoryPoemGeoDateTags.Where(t => t.Location != null && t.LunarYear != null).ToArray())
|
|
{
|
|
@($"[{poemGeoTag.Location.Latitude},{poemGeoTag.Location.Longitude}],")
|
|
}
|
|
]).addTo(map);
|
|
|
|
for (var i = 0; i < poemGeoTags.length; i++) {
|
|
var poemGeoTag = poemGeoTags[i];
|
|
marker = L.marker([poemGeoTag.Location.Latitude, poemGeoTag.Location.Longitude]);
|
|
marker.poemGeoTag = poemGeoTag
|
|
marker.order = persianizeNumerals((i + 1).toString());
|
|
marker.addTo(layerGroup);
|
|
oms.addMarker(marker);
|
|
}
|
|
});
|
|
|
|
|
|
</script>
|
|
}
|
|
|
|
@if (Model.IsPoemPage && Model.GanjoorPage.Poem.GeoDateTags.Length > 0)
|
|
{
|
|
<script>
|
|
var poemGeoTags = [];
|
|
var map;
|
|
var oms;
|
|
var layerGroup;
|
|
var myGeoJSONPath = '/json/world.json';
|
|
var myCustomStyle = {
|
|
stroke: true,
|
|
weight: 1,
|
|
color: '#300',
|
|
}
|
|
|
|
$.getJSON(myGeoJSONPath, function (data) {
|
|
poemGeoTags = @(Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.GanjoorPage.Poem.GeoDateTags.Where(t => t.Location != null).ToArray(), Newtonsoft.Json.Formatting.Indented)));
|
|
var map = L.map('catmap').setView([poemGeoTags[0].Location.Latitude, poemGeoTags[0].Location.Longitude], 4);
|
|
L.geoJson(data, {
|
|
clickable: false,
|
|
style: myCustomStyle
|
|
}).addTo(map);
|
|
|
|
L.tileLayer.provider('OpenStreetMap').addTo(map);
|
|
|
|
oms = new OverlappingMarkerSpiderfier(map, { keepSpiderfied: true });
|
|
layerGroup = L.layerGroup().addTo(map);
|
|
|
|
|
|
var popup = new L.Popup();
|
|
oms.addListener('click', function (marker) {
|
|
var poemDesc = '<a class="actionlink" onclick="viewLocation(marker.poemGeoTag.Location.Latitude, marker.poemGeoTag.Location.Longitude)">' + marker.poemGeoTag.Location.Name + '</a>';
|
|
if (marker.poemGeoTag.LunarYear != null) {
|
|
poemDesc += '<br> سال ' + persianizeNumerals(marker.poemGeoTag.LunarYear.toString()) + ' قمری';
|
|
}
|
|
popup.setContent(poemDesc);
|
|
popup.setLatLng(marker.getLatLng());
|
|
map.openPopup(popup);
|
|
});
|
|
|
|
|
|
for (var i = 0; i < poemGeoTags.length; i++) {
|
|
var poemGeoTag = poemGeoTags[i];
|
|
marker = L.marker([poemGeoTag.Location.Latitude, poemGeoTag.Location.Longitude]);
|
|
marker.poemGeoTag = poemGeoTag
|
|
marker.order = persianizeNumerals((i + 1).toString());
|
|
marker.addTo(layerGroup);
|
|
oms.addMarker(marker);
|
|
}
|
|
});
|
|
|
|
|
|
</script>
|
|
}
|
|
|
|
|
|
@if (Model.GanjoorPage.Previous != null || Model.GanjoorPage.Next != null)
|
|
{
|
|
<nav>
|
|
<div class="spacer"> </div>
|
|
<div class="navigation">
|
|
<div class="navleft">
|
|
@if (Model.GanjoorPage.Next != null)
|
|
{
|
|
<a href="@Html.Raw(Model.GanjoorPage.Next.FullUrl)">@Html.Raw(Model.GanjoorPage.Next.Title)</a>
|
|
|
|
<span> »</span>
|
|
}
|
|
</div>
|
|
<div class="navright">
|
|
@if (Model.GanjoorPage.Previous != null)
|
|
{
|
|
<span>« </span>
|
|
|
|
<a href="@Html.Raw(Model.GanjoorPage.Previous.FullUrl)">@Html.Raw(Model.GanjoorPage.Previous.Title)</a>
|
|
}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
}
|
|
|
|
|
|
@if (Model.CanEdit && !Model.IsPoemPage)
|
|
{
|
|
<div class="spacer"> </div>
|
|
<div class="related-images-frame">
|
|
<p>
|
|
<a role="button" href="/Admin/ModifyPage?id=@Model.GanjoorPage.Id" class="pagebutton">ویرایش مستقیم</a>
|
|
</p>
|
|
</div>
|
|
}
|
|
|
|
|
|
</div>
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<partial name="_FooterPartial" model=@(new _FooterPartialModel(){StickyEnabled = true, GanjoorPage = Model.GanjoorPage}) />
|
|
|
|
|
|
</div>
|