divan/GanjooRazor/Pages/_InlinePageUtilsPartial.cshtml
Hamid Reza Mohammadi a4af5958a2 #417 improvements
2023-12-13 21:41:10 +03:30

254 lines
11 KiB
Plaintext

@model GanjooRazor.Pages.LoginPartialEnabledPageModel
@using DNTPersianUtils.Core
<div id="utils-navbar">
@if (Model.GanjoorPage != null
&&
(
Model.GanjoorPage.Poem != null
||
!string.IsNullOrEmpty(Model.PreviousUrl) || !string.IsNullOrEmpty(Model.NextUrl)
||
(Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Length > 0)
||
(Model.CategoryHasRecitations)
)
)
{
<div class="clear-both utilbar">
@if (Model.GanjoorPage.Poem != null)
{
@if (Model.LoggedIn)
{
<a href="/User/Editor?id=@Model.GanjoorPage.Id" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button edit-poem-button"></i>
</div>
<span class="w3tooltiptext">ویرایش</span>
</a>
<a href="/User/Editor?id=@Model.GanjoorPage.Id#summaries" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button edit-note-poem-button"></i>
</div>
<span class="w3tooltiptext">ویرایش یا درج خلاصه</span>
</a>
<a onclick="switchBookmark(@Model.GanjoorPage.Id, 0, '')" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number" id="bookmark">
<i class="noindent-info-button" id="bookmark-icon">star_border</i>
</div>
<span class="w3tooltiptext">نشان کردن</span>
</a>
}
<a href="#tools" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button menu-icon"></i>
</div>
<span class="w3tooltiptext">اطلاعات</span>
</a>
<a onclick="btshmr(@Model.GanjoorPage.Id)" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button format_list_numbered_rtl" id="bnum-button"></i>
</div>
<span class="w3tooltiptext">شماره‌گذاری</span>
</a>
<a onclick="copyPoemLink()" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button copylink-icon"></i>
</div>
<span class="w3tooltiptext" id="copylink-tooltip">رونوشت نشانی</span>
</a>
<a onclick="copyPoemText()" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button copytext-icon"></i>
</div>
<span class="w3tooltiptext" id="copytext-tooltip">رونوشت متن</span>
</a>
<a onclick="webSharePoem()" role="button" class="w3tooltip cursor-pointer" id="share_span">
<div class="circled-number">
<i class="noindent-info-button share-icon"></i>
</div>
<span class="w3tooltiptext">همرسانی</span>
</a>
<a href="#discussions" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button recitation-comments"></i>
</div>
<span class="w3tooltiptext">حاشیه‌ها</span>
</a>
<a href="#manuscripts" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button recitation-manuscripts"></i>
</div>
<span class="w3tooltiptext">نگاره‌ها</span>
</a>
<a href="#songs" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button recitation-music"></i>
</div>
<span class="w3tooltiptext">ترانه‌ها</span>
</a>
@if (Model.SectionsWithRelated.Count > 0)
{
<a href="#rpoems" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button recitation-explore"></i>
</div>
<span class="w3tooltiptext">هم‌آهنگ‌ها</span>
</a>
}
@if (Model.SectionsWithMetreAndRhymes != null)
{
@if (Model.SectionsWithMetreAndRhymes.Any())
{
<text>
<a href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes.First().GanjoorMetre.Rhythm)}&amp;g={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes.First().RhymeLetters)}")" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button rhyming-poems"></i>
</div>
<span class="w3tooltiptext">موارد هم آهنگ</span>
</a>
</text>
@for (int nSectionIndex = 1; nSectionIndex < Model.SectionsWithMetreAndRhymes.Count; nSectionIndex++)
{
<text>
<a href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes[nSectionIndex].GanjoorMetre.Rhythm)}&amp;g={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes[nSectionIndex].RhymeLetters)}")" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button rhyming-poems"></i>
</div>
<span class="w3tooltiptext">موارد هم آهنگ (وزن @((nSectionIndex + 1).ToPersianNumbers()))</span>
</a>
</text>
}
}
}
}
@if
(
(Model.GanjoorPage != null && Model.GanjoorPage.Poem != null && Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Normal).Any())
||
(Model.CategoryHasRecitations)
)
{
<a href="#recitations" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button recitation-listen"></i>
</div>
<span class="w3tooltiptext">خوانش‌ها</span>
</a>
}
@if
(
Model.GanjoorPage != null && Model.GanjoorPage.Poem != null && Model.GanjoorPage.Poem.Recitations.Where(a => a.RecitationType == RMuseum.Models.GanjoorAudio.RecitationType.Commentary).Any()
)
{
<a href="#commentaries" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button commentary-listen"></i>
</div>
<span class="w3tooltiptext">شرح‌های صوتی</span>
</a>
}
@if
(
(Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Length > 0)
||
(Model.GanjoorPage != null && Model.GanjoorPage.Poem != null && Model.GanjoorPage.Poem.GeoDateTags.Length > 0)
)
{
<a href="#map-section" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button map-icon"></i>
</div>
<span class="w3tooltiptext">
@if (!string.IsNullOrEmpty(Model.GanjoorPage.PoetOrCat.Cat.MapName))
{
<text>
@Model.GanjoorPage.PoetOrCat.Cat.MapName
</text>
}
else
{
<text>
جای‌ها
</text>
}
</span>
</a>
}
@if(Model.GanjoorPage.Poem == null)
{
<a href="#cat-stats" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button query_stats"></i>
</div>
<span class="w3tooltiptext">
آمار
</span>
</a>
}
@if (!string.IsNullOrEmpty(Model.PreviousUrl))
{
<a href="@Html.Raw(Model.PreviousUrl)" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button right-btn"></i>
</div>
<span class="w3tooltiptext">قبلی</span>
</a>
}
@if (!string.IsNullOrEmpty(Model.NextUrl))
{
<a href="@Html.Raw(Model.NextUrl)" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button left-btn"></i>
</div>
<span class="w3tooltiptext">بعدی</span>
</a>
}
@if (Model.CanTranslate && Model.GanjoorPage.Poem != null)
{
<a href="/Trans?p=@Model.GanjoorPage.Id&lang=8" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number">
<i class="noindent-info-button translate-button"></i>
</div>
<span class="w3tooltiptext">واج‌نویسی</span>
</a>
}
</div>
@if(Model.GanjoorPage.Poem != null)
{
<script>
</script>
<div class="clear-both margin-15px" id="fake-inline-div">
<input type="search" name="fake-inline-search" id="fake-inline-search" class="text-align-center" placeholder="جستجو در متن" size="20" value="" oninput="displayMainInlineSearch()">
</div>
}
}
</div>