148 lines
6.9 KiB
Plaintext
148 lines
6.9 KiB
Plaintext
@model GanjooRazor.Pages._BNumPartialModel
|
|
@using DNTPersianUtils.Core
|
|
@{
|
|
Layout = null;
|
|
}
|
|
|
|
<table class="bnum-partial-table">
|
|
<tr>
|
|
<td>شماره:</td>
|
|
<td>
|
|
@((Model.CoupletIndex + 1).ToPersianNumbers())
|
|
</td>
|
|
</tr>
|
|
@foreach (var number in Model.Numbers)
|
|
{
|
|
<tr>
|
|
<td>شماره در @number.NumberingName:</td>
|
|
<td>@number.Number.ToPersianNumbers() از @number.TotalLines.ToPersianNumbers()</td>
|
|
</tr>
|
|
@if (number.SameTypeNumber != number.Number)
|
|
{
|
|
@if (number.IsPoemVerse)
|
|
{
|
|
<tr>
|
|
<td colspan="2">بیت @number.SameTypeNumber.ToPersianNumbers() از @number.TotalCouplets.ToPersianNumbers()</td>
|
|
</tr>
|
|
}
|
|
else
|
|
{
|
|
<tr>
|
|
<td colspan="2">پاراگراف @number.SameTypeNumber.ToPersianNumbers() از @number.TotalParagraphs.ToPersianNumbers()</td>
|
|
</tr>
|
|
}
|
|
}
|
|
}
|
|
</table>
|
|
|
|
<div id="play-block-@Model.CoupletIndex" class="width-100per">
|
|
<select id="narrators-@Model.CoupletIndex" class="bnum-partial-narrators"></select>
|
|
<a role="button" id="listen-@Model.CoupletIndex" class="bnum-partial-narrate-btn" onclick="playCouplet(@Model.CoupletIndex)">از اینجا بخواند</a>
|
|
</div>
|
|
<script>
|
|
fillnarrations('@Model.CoupletIndex');
|
|
</script>
|
|
|
|
<div class="bnum-partial-action-box">
|
|
<a role="button" class="w3tooltip cursor-pointer" id="copylink-@Model.CoupletIndex" onclick="copyCoupletUrl(@Model.CoupletIndex)"><i class="material-icons color-white">link</i><span class="w3tooltiptext" id="copylink-tooltip-@Model.CoupletIndex">رونوشت نشانی</span></a>
|
|
<a role="button" class="w3tooltip cursor-pointer" id="copytext-@Model.CoupletIndex" onclick="copyCoupletText(@Model.CoupletIndex)"><i class="material-icons color-white">content_copy</i><span class="w3tooltiptext" id="copytext-tooltip-@Model.CoupletIndex">رونوشت متن</span></a>
|
|
<a role="button" id="share-@Model.CoupletIndex" class="cursor-pointer" onclick="webShareCouplet(@Model.CoupletIndex)" title="همرسانی"><i class="material-icons color-white">share</i></a>
|
|
@if (Model.LoggedIn)
|
|
{
|
|
<a role="button" id="bookmark-@Model.CoupletIndex" class="cursor-pointer" onclick="switchBookmark(@Model.PoemId, @Model.CoupletIndex, '-@Model.CoupletIndex')" title="@Model.BookmarkingText"><i class="material-icons color-white" id="bookmark-icon-@Model.CoupletIndex">@Model.BookmarkingIcon</i></a>
|
|
<a role="button" id="listen-@Model.CoupletIndex" class="cursor-pointer" onclick="editCouplet(@Model.PoemId, @Model.CoupletIndex)" title="ویرایش از اینجا"><i class="material-icons color-white">edit</i></a>
|
|
}
|
|
@if (Model.SectionsWithMetreAndRhymes.Any())
|
|
{
|
|
<text>
|
|
<a role="button" class="cursor-pointer w3tooltip" href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes.First().GanjoorMetre.Rhythm)}&g={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes.First().RhymeLetters)}")"><i class="material-icons color-white">search</i><span class="w3tooltiptext">موارد هم آهنگ</span></a>
|
|
</text>
|
|
|
|
@for (int nSectionIndex = 1; nSectionIndex < Model.SectionsWithMetreAndRhymes.Count; nSectionIndex++)
|
|
{
|
|
<text>
|
|
<a role="button" class="cursor-pointer w3tooltip" href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes[nSectionIndex].GanjoorMetre.Rhythm)}&g={Uri.EscapeDataString(Model.SectionsWithMetreAndRhymes[nSectionIndex].RhymeLetters)}")"><i class="material-icons color-white">search</i><span class="w3tooltiptext">موارد هم آهنگ (وزن یا قافیهٔ @((nSectionIndex + 1).ToPersianNumbers()))</span></a>
|
|
</text>
|
|
}
|
|
}
|
|
|
|
</div>
|
|
|
|
|
|
<div id="comments-block-@Model.CoupletIndex" class="clear-both">
|
|
@foreach (var comment in Model.Comments)
|
|
{
|
|
<partial name="_CommentPartial" model=Model.GetCommentModel(comment) />
|
|
}
|
|
</div>
|
|
@if (Model.LoggedIn)
|
|
{
|
|
<script>
|
|
var userNotifiedOnEditInsteadOfComment = false;
|
|
|
|
function createInformationNotification() {
|
|
tinymce.activeEditor.notificationManager.open({
|
|
text: 'تمنا میکنیم که به جای گوشزد کردن خطاهای املایی و تایپی در حاشیهها از دکمهٔ «ویرایش» استفاده کنید و خطا را تصحیح کنید.',
|
|
type: 'info'
|
|
});
|
|
}
|
|
tinymce.init({
|
|
selector: 'textarea.editorbnum',
|
|
language: 'fa_IR',
|
|
menubar: false,
|
|
plugins: 'link paste image',
|
|
toolbar: 'undo redo | alignleft aligncenter alignright alignjustify | link',
|
|
paste_auto_cleanup_on_paste: true,
|
|
paste_remove_styles: true,
|
|
paste_remove_styles_if_webkit: true,
|
|
paste_strip_class_attributes: true,
|
|
a11y_advanced_options: true,
|
|
setup: function(editor) {
|
|
editor.on('tap', function(e) {
|
|
if(userNotifiedOnEditInsteadOfComment == false){
|
|
userNotifiedOnEditInsteadOfComment = true;
|
|
createInformationNotification();
|
|
}
|
|
},
|
|
);
|
|
editor.on('click', function(e) {
|
|
if(userNotifiedOnEditInsteadOfComment == false){
|
|
userNotifiedOnEditInsteadOfComment = true;
|
|
createInformationNotification();
|
|
}
|
|
},
|
|
);
|
|
},
|
|
});
|
|
</script>
|
|
<form method="post" id="commentform-@Model.CoupletIndex" action="?handler=Comment">
|
|
<fieldset>
|
|
<legend>💬 دربارهٔ این خط حاشیه بگذارید ...</legend>
|
|
<table style="max-width:100%; width:100%; margin:0">
|
|
<tr>
|
|
<td>
|
|
<div class="required">
|
|
<textarea name="comment" class="inputTextarea editorbnum" tabindex="4" rows="10" style="width:100%"></textarea>
|
|
</div>
|
|
<input type="hidden" name="poemId" value="@Model.PoemId" />
|
|
<input type="hidden" name="coupletIndex" value="@Model.CoupletIndex" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<button name="postcomment-@Model.CoupletIndex" id="postcomment-@Model.CoupletIndex" class="submitCommentButton" onclick="return postComment('@Model.CoupletIndex', '#postcomment-@Model.CoupletIndex');" style="width:100%">درج حاشیه</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</fieldset>
|
|
|
|
</form>
|
|
}
|
|
else
|
|
{
|
|
<p>
|
|
در صورت ثبت نام و ورود به گنجور میتوانید برای این بیت/مصرع/پاراگراف حاشیه بنویسید.
|
|
</p>
|
|
}
|
|
|