From 91bc6bb9335f057eed1e99b919d8159cabb74b20 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Fri, 10 Sep 2021 13:37:54 +0430 Subject: [PATCH] #202 link to edit the current couplet --- GanjooRazor/Pages/_BNumPartial.cshtml | 10 +++++++++- GanjooRazor/wwwroot/js/bi.js | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/GanjooRazor/Pages/_BNumPartial.cshtml b/GanjooRazor/Pages/_BNumPartial.cshtml index abaf169b..32cb534d 100644 --- a/GanjooRazor/Pages/_BNumPartial.cshtml +++ b/GanjooRazor/Pages/_BNumPartial.cshtml @@ -4,12 +4,20 @@ }
- از اینجا بخواند + از اینجا بخواند
+@if (Model.LoggedIn) +{ +
+ ویرایش از اینجا +
+} + +
@foreach (var comment in Model.Comments) { diff --git a/GanjooRazor/wwwroot/js/bi.js b/GanjooRazor/wwwroot/js/bi.js index 96083deb..13536c47 100644 --- a/GanjooRazor/wwwroot/js/bi.js +++ b/GanjooRazor/wwwroot/js/bi.js @@ -387,3 +387,8 @@ function playCouplet(coupletIndex) { } } +function editCouplet(poemId, coupletIndex) { + + var vIndex = getVerseIndexFromCoupleIndex(coupletIndex); + location.href = '/User/Editor?id=' + poemId + '#id-' + String(vIndex + 1); +} \ No newline at end of file