divan/GanjooRazor/Pages/_BNumPartial.cshtml
2021-10-04 14:52:08 +03:30

109 lines
5.0 KiB
Plaintext

@model GanjooRazor.Pages._BNumPartialModel
@using DNTPersianUtils.Core
@{
Layout = null;
}
<table style="width:100%; margin-bottom:10px;">
<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" style="width: 100%;">
<select id="narrators-@Model.CoupletIndex" style="width:49%;float:right"></select>
<a role="button" id="listen-@Model.CoupletIndex" style="cursor: pointer; width: 49%; color: white; background-color: green; display: block; text-align: center; border-color: #300; padding:1px; float:left; margin-top:3px; " onclick="playCouplet(@Model.CoupletIndex)">از اینجا بخواند</a>
</div>
<script>
fillnarrations('@Model.CoupletIndex');
</script>
<div style="width: 100%; clear: both; background-color: #300;">
<a role="button" class="w3tooltip" id="copylink-@Model.CoupletIndex" style="cursor: pointer;" onclick="copyCoupletUrl(@Model.CoupletIndex)"><i class="material-icons" style="color:white;">link</i><span class="w3tooltiptext" id="copylink-tooltip-@Model.CoupletIndex">رونوشت نشانی</span></a>
<a role="button" class="w3tooltip" id="copytext-@Model.CoupletIndex" style="cursor: pointer;" onclick="copyCoupletText(@Model.CoupletIndex)"><i class="material-icons" style="color:white;">content_copy</i><span class="w3tooltiptext" id="copytext-tooltip-@Model.CoupletIndex">رونوشت متن</span></a>
<a role="button" id="share-@Model.CoupletIndex" style="cursor: pointer;" onclick="webShareCouplet(@Model.CoupletIndex)" title="همرسانی"><i class="material-icons" style="color:white;">share</i></a>
@if (Model.LoggedIn)
{
<a role="button" id="bookmark-@Model.CoupletIndex" style="cursor: pointer;" onclick="switchBookmark(@Model.PoemId, @Model.CoupletIndex)" title="@Model.BookmarkingText"><i class="material-icons" id="bookmark-icon-@Model.CoupletIndex" style="color:white;">@Model.BookmarkingIcon</i></a>
<a role="button" id="listen-@Model.CoupletIndex" style="cursor: pointer;" onclick="editCouplet(@Model.PoemId, @Model.CoupletIndex)" title="ویرایش از اینجا"><i class="material-icons" style="color:white;">edit</i></a>
}
</div>
<div id="comments-block-@Model.CoupletIndex" style="clear:both">
@foreach (var comment in Model.Comments)
{
<partial name="_CommentPartial" model=Model.GetCommentModel(comment) />
}
</div>
@if (Model.LoggedIn)
{
<script>
tinymce.init({
selector: 'textarea.editorbnum',
language: 'fa_IR',
menubar: false,
plugins: 'link paste',
toolbar: 'undo redo | alignleft aligncenter alignright alignjustify | outdent indent | link',
paste_auto_cleanup_on_paste: true,
paste_remove_styles: true,
paste_remove_styles_if_webkit: true,
paste_strip_class_attributes: true,
});
</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="inputSubmit" onclick="return postComment('@Model.CoupletIndex', '#postcomment-@Model.CoupletIndex');" style="width:100%">درج حاشیه</button>
</td>
</tr>
</table>
</fieldset>
</form>
}
else
{
<p>
در صورت ثبت نام و ورود به گنجور می‌توانید برای این بیت/مصرع/پاراگراف حاشیه بنویسید.
</p>
}