#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { #line 2 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" var context = new FindMyPet.Data.FindMyPetDbContext(); ViewData["Title"] = "Profile"; #line default #line hidden BeginContext(135, 604, true); WriteLiteral(@" <div class=""container""> <div class=""row""> <div class=""col-12 text-center""> <br /> <div class=""revealOnScroll"" data-animation=""bounceInDown""> <h1 class=""display-3""><strong>User Profile Page</strong></h1> </div> <br /> <hr class=""display-3"" /> <div> <br /> <h1 class=""display-4""><strong class=""revealOnScroll"" data-animation=""right"">Email</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span> <i class=""revealOnScroll"" data-animation=""left"">"); EndContext(); BeginContext(740, 11, false); #line 20 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(Model.Email); #line default #line hidden EndContext(); BeginContext(751, 259, true); WriteLiteral(@"</i></h1> <br /> <h2 class=""display-5""><strong class=""revealOnScroll"" data-animation=""right2"">FullName</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span><i class=""revealOnScroll"" data-animation=""left2"">"); EndContext(); BeginContext(1011, 14, false); #line 23 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(Model.FullName); #line default #line hidden EndContext(); BeginContext(1025, 260, true); WriteLiteral(@"</i></h2> <br /> <h2 class=""display-5""><strong class=""revealOnScroll"" data-animation=""right3"">FeedBack</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span> <i class=""revealOnScroll"" data-animation=""left3"">"); EndContext(); BeginContext(1286, 14, false); #line 26 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(Model.FeedBack); #line default #line hidden EndContext(); BeginContext(1300, 37, true); WriteLiteral("</i></h2>\r\n <br />\r\n\r\n"); EndContext(); #line 29 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" if (Model.AvatarUrl != null && Model.AvatarUrl != "") { #line default #line hidden BeginContext(1428, 89, true); WriteLiteral(" <img width=\"250\" class=\"card-image-top img-fluid img-thumbnail forms\""); EndContext(); BeginWriteAttribute("src", " src=\"", 1517, "\"", 1539, 1); #line 31 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" WriteAttributeValue("", 1523, Model.AvatarUrl, 1523, 16, false); #line default #line hidden EndWriteAttribute(); BeginContext(1540, 5, true); WriteLiteral(" />\r\n"); EndContext(); #line 32 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } else { #line default #line hidden BeginContext(1605, 20, true); WriteLiteral(" "); EndContext(); BeginContext(1625, 104, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "1b3e8addfbeb4583b26e7d4e433191ee", async() => { } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(1729, 2, true); WriteLiteral("\r\n"); EndContext(); #line 36 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(1750, 50, true); WriteLiteral(" <br />\r\n <br />\r\n\r\n"); EndContext(); #line 40 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" if (Model.DateOfBirth != null) { #line default #line hidden BeginContext(1868, 238, true); WriteLiteral(" <h2>\r\n <strong class=\"revealOnScroll\" data-animation=\"left\">Date of Birth</strong> <span class=\"revealOnScroll\" data-animation=\"forms\"> : </span> <i class=\"revealOnScroll\" data-animation=\"right\">"); EndContext(); BeginContext(2107, 17, false); #line 43 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(Model.DateOfBirth); #line default #line hidden EndContext(); BeginContext(2124, 33, true); WriteLiteral("</i>\r\n </h2>\r\n"); EndContext(); #line 45 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } else { #line default #line hidden BeginContext(2217, 284, true); WriteLiteral(@" <h2> <strong class=""revealOnScroll"" data-animation=""left"">Date of Birth</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span> <i class=""revealOnScroll"" data-animation=""right"">Not specified</i> </h2> "); EndContext(); #line 51 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(2520, 28, true); WriteLiteral("\r\n <br />\r\n\r\n"); EndContext(); #line 55 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" if (Model.PhoneNumber != null) { #line default #line hidden BeginContext(2616, 239, true); WriteLiteral(" <h2>\r\n <strong class=\"revealOnScroll\" data-animation=\"left2\">Phone Number</strong> <span class=\"revealOnScroll\" data-animation=\"forms\"> : </span> <i class=\"revealOnScroll\" data-animation=\"right2\">"); EndContext(); BeginContext(2856, 17, false); #line 58 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(Model.PhoneNumber); #line default #line hidden EndContext(); BeginContext(2873, 33, true); WriteLiteral("</i>\r\n </h2>\r\n"); EndContext(); #line 60 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } else { #line default #line hidden BeginContext(2966, 285, true); WriteLiteral(@" <h2> <strong class=""revealOnScroll"" data-animation=""left2"">Phone Number</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span> <i class=""revealOnScroll"" data-animation=""right2"">Not specified</i> </h2> "); EndContext(); #line 66 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(3270, 281, true); WriteLiteral(@" <br /> </div> <div class=""revealOnScroll"" data-animation=""left""> <h1 class=""display-3""><strong>Messages</strong></h1> <div class=""card col-12 thumbnail commentsContainer""> <br /> "); EndContext(); #line 75 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" if (ViewBag.Messages.Count < 1) { #line default #line hidden BeginContext(3628, 161, true); WriteLiteral(" <div class=\"noCommentsPresent\">\r\n <h3>No messages posted for this user.</h3>\r\n </div>\r\n"); EndContext(); #line 80 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } else { #line default #line hidden #line 84 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" foreach (var message in ViewBag.Messages) { #line default #line hidden BeginContext(3958, 128, true); WriteLiteral(" <div>\r\n <h2 class=\"contentDiv\">\r\n "); EndContext(); BeginContext(4087, 15, false); #line 88 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(message.Content); #line default #line hidden EndContext(); BeginContext(4102, 193, true); WriteLiteral("\r\n </h2>\r\n <span>\r\n Created by\r\n <strong style=\"color: grey\">"); EndContext(); BeginContext(4295, 146, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5c9ea013fd2042acb1e36f0c7db3acc4", async() => { BeginContext(4417, 20, false); #line 92 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(message.Sender.Email); #line default #line hidden EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Area = (string)__tagHelperAttribute_4.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_5.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_6.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6); if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) { throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); } BeginWriteTagHelperAttribute(); #line 92 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" WriteLiteral(message.Sender.Id); #line default #line hidden __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer; __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(4441, 90, true); WriteLiteral("</strong>\r\n on\r\n <i>"); EndContext(); BeginContext(4532, 20, false); #line 94 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(message.CreationDate); #line default #line hidden EndContext(); BeginContext(4552, 96, true); WriteLiteral("</i>\r\n <br />\r\n <br />\r\n\r\n"); EndContext(); #line 98 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" if (message.LikeDisabled == false) { #line default #line hidden BeginContext(4760, 173, true); WriteLiteral(" <strong style=\"color: darkblue\">\r\n <a class=\"btn btn-sm btn-success likeButton\" data-url=\""); EndContext(); BeginContext(4934, 85, false); #line 101 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(Url.Action("AddLike", "Messages", new { Area = "Admin", id = message.Id.ToString() })); #line default #line hidden EndContext(); BeginContext(5019, 63, true); WriteLiteral("\">Like</a>\r\n </strong>\r\n"); EndContext(); #line 103 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } else { #line default #line hidden BeginContext(5202, 178, true); WriteLiteral(" <strong style=\"color: darkblue\">\r\n <a class=\"btn btn-sm btn-danger removelikeButton\" data-url=\""); EndContext(); BeginContext(5381, 88, false); #line 107 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(Url.Action("RemoveLike", "Messages", new { Area = "Admin", id = message.Id.ToString() })); #line default #line hidden EndContext(); BeginContext(5469, 70, true); WriteLiteral("\">Remove Like</a>\r\n </strong>\r\n"); EndContext(); #line 109 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(5578, 78, true); WriteLiteral(" :\r\n <i>"); EndContext(); BeginContext(5657, 19, false); #line 111 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(message.Likes.Count); #line default #line hidden EndContext(); BeginContext(5676, 131, true); WriteLiteral("</i>\r\n <br />\r\n </span>\r\n <br />\r\n"); EndContext(); #line 115 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" if (ViewData["isAdmin"].ToString() == "True" || this.User.Identity.Name == Model.Email) { #line default #line hidden BeginContext(5964, 111, true); WriteLiteral(" <a style=\"margin: 0 auto\" class=\"deleteBtn btn btn-danger col-3\" data-url=\""); EndContext(); BeginContext(6076, 84, false); #line 117 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(Url.Action("RemoveMessage", "Users", new { Area = "Admin", messageId = message.Id })); #line default #line hidden EndContext(); BeginContext(6160, 102, true); WriteLiteral("\">\r\n Delete Message\r\n </a>\r\n"); EndContext(); #line 120 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(6297, 116, true); WriteLiteral(" <br />\r\n <br />\r\n </div>\r\n"); EndContext(); #line 124 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } #line default #line hidden #line 124 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(6463, 184, true); WriteLiteral(" <br />\r\n </div>\r\n </div>\r\n\r\n <br />\r\n <div class=\"revealOnScroll\" data-animation=\"rotateInUpLeft\">\r\n "); EndContext(); BeginContext(6647, 580, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "0536729aa0bd4b0d8a7a8698c07e7c76", async() => { BeginContext(6653, 411, true); WriteLiteral(@" <h2 class=""""><strong>Add Message</strong></h2> <div class=""form-group row""> <textarea class=""form-control messageDescription"" name=""Description"" placeholder=""Enter Comment"" minlength=""10"" required></textarea> </div> <input type=""button"" id=""btn-add-pet"" data-url="""); EndContext(); BeginContext(7065, 72, false); #line 139 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(Url.Action("AddMessage", "Users", new { Area = "Admin", id = Model.Id })); #line default #line hidden EndContext(); BeginContext(7137, 83, true); WriteLiteral("\" class=\"btn btn-success btn-lg btn-block\" value=\"Add Message\" />\r\n "); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(7227, 301, true); WriteLiteral(@" </div> <br /> <br /> <div class=""revealOnScroll"" data-animation=""rotateInUpRight""> <div class=""card-footer text-center""> <h1 class=""display-3"" style=""background: lightgreen"">Actions</h1> "); EndContext(); BeginContext(7528, 104, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2882974f19eb45269e80acdec4f6d90b", async() => { BeginContext(7624, 4, true); WriteLiteral("Home"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Area = (string)__tagHelperAttribute_4.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_8.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_8); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_9.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_9); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(7632, 86, true); WriteLiteral("\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n"); EndContext(); DefineSection("Scripts", async() => { BeginContext(7736, 1391, true); WriteLiteral(@" <script> $(""#btn-add-pet"").click(function () { let addMessageUrl = $(this).data(""url""); let id = addMessageUrl.split(""/"").pop(); let Description = $('.messageDescription').val(); $('.messageDescription').val(''); $.get(addMessageUrl, { Description: Description, id: id }).then((res) => { let currentMessage = """"; $.ajax({ url: '/Messages/GetLastMessage', method: 'GET', dataType: ""json"", success: function (currentMessage) { $("".noCommentsPresent"").fadeOut(); $('.commentsContainer') .append( "); WriteLiteral(@" ""<div>"" + ""<h2 class=\""contentDiv\"">"" + Description + ""</h2>"" + ""<span> Created by "" + ""<strong class=\""profile\"">"" + ""<a class='profileLink' href='/Admin/Users/Profile/"); EndContext(); BeginContext(9128, 25, false); #line 193 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(ViewData["CurrentUserId"]); #line default #line hidden EndContext(); BeginContext(9153, 2, true); WriteLiteral("\'>"); EndContext(); BeginContext(9156, 23, false); #line 193 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Areas\Admin\Views\Users\Profile.cshtml" Write(this.User.Identity.Name); #line default #line hidden EndContext(); BeginContext(9179, 2791, true); WriteLiteral(@"</a>"" + ""</strong> on "" + ""<i>"" + new Date().toLocaleDateString('en-gb') + "" "" + new Date().toLocaleTimeString('en-gb') + ""</i><br/><br/>"" + ""<strong style='color:darkblue'>"" + ""<a class='btn btn-sm btn-success likeButton' data-url='/Admin/Messages/AddLike/"" + currentMessage.id + ""'>Like</a>"" + ""</strong>"" + "":"" + ""<i class=\""commentLikes\"">0</i>"" + ""</span><br/><br/>"" + ""<a style='margin: 0 auto' class='deleteBtn btn btn-danger col-3' autocomplete='off' data-url='/Admin/Users/RemoveMessage?messageId="" + currentMessage.id + ""'>Delete Comment<a></strong>"" + ""<br /><br /></div>""); }, error : (err) => console.log(err) }) "); WriteLiteral(@" }); }); </script> <script> $(""body"").on(""click"", "".deleteBtn"", function () { let deleteCommentUrl = $(this).data(""url""); $.get(deleteCommentUrl); $(this).parent().fadeOut(); }); </script> <script> $(""body"").on(""click"", "".likeButton"", function () { let addLikeUrl = $(this).data(""url""); $.get(addLikeUrl); let commentId = addLikeUrl.split(""/"").slice(-1).pop() let currentLikes = Number($(this).parent().next()[0].innerText); let newLikes = currentLikes + 1; $(this).parent().next().replaceWith(""<i class=\""commentLikes\"">"" + newLikes + ""</i>""); $(this).fadeOut(() => { $(""<a class='btn btn-sm btn-danger removelikeButton' data-url='/Admin/Messages/RemoveLike/"" + commentId + ""'>Remove Like</a>"").hide().appendTo($(this).parent()).fadeIn(); }); }); </script> "); WriteLiteral(@" <script> $(""body"").on(""click"", "".removelikeButton"", function () { let removeLikeUrl = $(this).data(""url""); $.get(removeLikeUrl); let commentId = removeLikeUrl.split(""/"").slice(-1).pop() let currentLikes = Number($(this).parent().next()[0].innerText); let newLikes = currentLikes - 1; $(this).parent().next().replaceWith(""<i class=\""commentLikes\"">"" + newLikes + ""</i>""); $(this).fadeOut(() => { $(""<a class='btn btn-sm btn-success likeButton' data-url='/Admin/Messages/AddLike/"" + commentId + ""'>Like</a>"").hide().appendTo($(this).parent()).fadeIn(); }); }); </script> "); EndContext(); BeginContext(11970, 62, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2caf982e6cf14ceb92e2d7940bfa1464", async() => { } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_10); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(12032, 2, true); WriteLiteral("\r\n"); EndContext(); } ); BeginContext(12037, 2, true); WriteLiteral("\r\n"); EndContext(); }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { #line 2 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" var context = new FindMyPet.Data.FindMyPetDbContext(); ViewData["Title"] = "Profile"; #line default #line hidden BeginContext(135, 604, true); WriteLiteral(@" <div class=""container""> <div class=""row""> <div class=""col-12 text-center""> <br /> <div class=""revealOnScroll"" data-animation=""bounceInDown""> <h1 class=""display-3""><strong>User Profile Page</strong></h1> </div> <br /> <hr class=""display-3"" /> <div> <br /> <h1 class=""display-4""><strong class=""revealOnScroll"" data-animation=""right"">Email</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span> <i class=""revealOnScroll"" data-animation=""left"">"); EndContext(); BeginContext(740, 11, false); #line 20 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(Model.Email); #line default #line hidden EndContext(); BeginContext(751, 259, true); WriteLiteral(@"</i></h1> <br /> <h2 class=""display-5""><strong class=""revealOnScroll"" data-animation=""right2"">FullName</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span><i class=""revealOnScroll"" data-animation=""left2"">"); EndContext(); BeginContext(1011, 14, false); #line 23 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(Model.FullName); #line default #line hidden EndContext(); BeginContext(1025, 260, true); WriteLiteral(@"</i></h2> <br /> <h2 class=""display-5""><strong class=""revealOnScroll"" data-animation=""right3"">FeedBack</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span> <i class=""revealOnScroll"" data-animation=""left3"">"); EndContext(); BeginContext(1286, 14, false); #line 26 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(Model.FeedBack); #line default #line hidden EndContext(); BeginContext(1300, 37, true); WriteLiteral("</i></h2>\r\n <br />\r\n\r\n"); EndContext(); #line 29 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" if (Model.AvatarUrl != null && Model.AvatarUrl != "") { #line default #line hidden BeginContext(1428, 89, true); WriteLiteral(" <img width=\"250\" class=\"card-image-top img-fluid img-thumbnail forms\""); EndContext(); BeginWriteAttribute("src", " src=\"", 1517, "\"", 1539, 1); #line 31 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" WriteAttributeValue("", 1523, Model.AvatarUrl, 1523, 16, false); #line default #line hidden EndWriteAttribute(); BeginContext(1540, 5, true); WriteLiteral(" />\r\n"); EndContext(); #line 32 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } else { #line default #line hidden BeginContext(1605, 20, true); WriteLiteral(" "); EndContext(); BeginContext(1625, 104, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "eb31f6c72a8248eca98bcd37cd69a033", async() => { } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(1729, 2, true); WriteLiteral("\r\n"); EndContext(); #line 36 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(1750, 52, true); WriteLiteral(" <br />\r\n <br />\r\n\r\n\r\n"); EndContext(); #line 41 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" if (Model.DateOfBirth != null) { #line default #line hidden BeginContext(1870, 238, true); WriteLiteral(" <h2>\r\n <strong class=\"revealOnScroll\" data-animation=\"left\">Date of Birth</strong> <span class=\"revealOnScroll\" data-animation=\"forms\"> : </span> <i class=\"revealOnScroll\" data-animation=\"right\">"); EndContext(); BeginContext(2109, 17, false); #line 44 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(Model.DateOfBirth); #line default #line hidden EndContext(); BeginContext(2126, 33, true); WriteLiteral("</i>\r\n </h2>\r\n"); EndContext(); #line 46 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } else { #line default #line hidden BeginContext(2219, 284, true); WriteLiteral(@" <h2> <strong class=""revealOnScroll"" data-animation=""left"">Date of Birth</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span> <i class=""revealOnScroll"" data-animation=""right"">Not specified</i> </h2> "); EndContext(); #line 52 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(2522, 28, true); WriteLiteral("\r\n <br />\r\n\r\n"); EndContext(); #line 56 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" if (Model.PhoneNumber != null) { #line default #line hidden BeginContext(2618, 239, true); WriteLiteral(" <h2>\r\n <strong class=\"revealOnScroll\" data-animation=\"left2\">Phone Number</strong> <span class=\"revealOnScroll\" data-animation=\"forms\"> : </span> <i class=\"revealOnScroll\" data-animation=\"right2\">"); EndContext(); BeginContext(2858, 17, false); #line 59 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(Model.PhoneNumber); #line default #line hidden EndContext(); BeginContext(2875, 33, true); WriteLiteral("</i>\r\n </h2>\r\n"); EndContext(); #line 61 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } else { #line default #line hidden BeginContext(2968, 285, true); WriteLiteral(@" <h2> <strong class=""revealOnScroll"" data-animation=""left2"">Phone Number</strong> <span class=""revealOnScroll"" data-animation=""forms""> : </span> <i class=""revealOnScroll"" data-animation=""right2"">Not specified</i> </h2> "); EndContext(); #line 67 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(3272, 283, true); WriteLiteral(@" <br /> </div> <div class=""revealOnScroll"" data-animation=""left""> <h1 class=""display-3""><strong>Messages</strong></h1> <div class=""card col-12 thumbnail commentsContainer""> <br /> "); EndContext(); #line 77 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" if (ViewBag.Messages.Count < 1) { #line default #line hidden BeginContext(3632, 161, true); WriteLiteral(" <div class=\"noCommentsPresent\">\r\n <h3>No messages posted for this user.</h3>\r\n </div>\r\n"); EndContext(); #line 82 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } else { #line default #line hidden #line 85 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" foreach (var message in ViewBag.Messages) { #line default #line hidden BeginContext(3960, 128, true); WriteLiteral(" <div>\r\n <h2 class=\"contentDiv\">\r\n "); EndContext(); BeginContext(4089, 15, false); #line 89 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(message.Content); #line default #line hidden EndContext(); BeginContext(4104, 193, true); WriteLiteral("\r\n </h2>\r\n <span>\r\n Created by\r\n <strong style=\"color: grey\">"); EndContext(); BeginContext(4297, 129, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d21777911ccd4f32a83a3037851d603b", async() => { BeginContext(4402, 20, false); #line 93 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(message.Sender.Email); #line default #line hidden EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_4.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_5.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5); if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) { throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); } BeginWriteTagHelperAttribute(); #line 93 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" WriteLiteral(message.Sender.Id); #line default #line hidden __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer; __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(4426, 90, true); WriteLiteral("</strong>\r\n on\r\n <i>"); EndContext(); BeginContext(4517, 20, false); #line 95 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(message.CreationDate); #line default #line hidden EndContext(); BeginContext(4537, 96, true); WriteLiteral("</i>\r\n <br />\r\n <br />\r\n\r\n"); EndContext(); #line 99 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" if (message.LikeDisabled == false) { #line default #line hidden BeginContext(4745, 173, true); WriteLiteral(" <strong style=\"color: darkblue\">\r\n <a class=\"btn btn-sm btn-success likeButton\" data-url=\""); EndContext(); BeginContext(4919, 67, false); #line 102 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(Url.Action("AddLike", "Messages", new { id = message.Id.ToString() })); #line default #line hidden EndContext(); BeginContext(4986, 63, true); WriteLiteral("\">Like</a>\r\n </strong>\r\n"); EndContext(); #line 104 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } else { #line default #line hidden BeginContext(5169, 178, true); WriteLiteral(" <strong style=\"color: darkblue\">\r\n <a class=\"btn btn-sm btn-danger removelikeButton\" data-url=\""); EndContext(); BeginContext(5348, 70, false); #line 108 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(Url.Action("RemoveLike", "Messages", new { id = message.Id.ToString() })); #line default #line hidden EndContext(); BeginContext(5418, 70, true); WriteLiteral("\">Remove Like</a>\r\n </strong>\r\n"); EndContext(); #line 110 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(5527, 78, true); WriteLiteral(" :\r\n <i>"); EndContext(); BeginContext(5606, 19, false); #line 112 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(message.Likes.Count); #line default #line hidden EndContext(); BeginContext(5625, 135, true); WriteLiteral("</i>\r\n\r\n <br />\r\n\r\n </span>\r\n <br />\r\n"); EndContext(); #line 118 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" if (ViewData["isAdmin"].ToString() == "True" || this.User.Identity.Name == Model.Email) { #line default #line hidden BeginContext(5919, 111, true); WriteLiteral(" <a style=\"margin: 0 auto\" class=\"deleteBtn btn btn-danger col-3\" data-url=\""); EndContext(); BeginContext(6031, 66, false); #line 121 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(Url.Action("RemoveMessage", "Users", new { messageId = message.Id })); #line default #line hidden EndContext(); BeginContext(6097, 102, true); WriteLiteral("\">\r\n Delete Message\r\n </a>\r\n"); EndContext(); #line 124 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(6234, 116, true); WriteLiteral(" <br />\r\n <br />\r\n </div>\r\n"); EndContext(); #line 128 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } #line default #line hidden #line 128 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" } #line default #line hidden BeginContext(6400, 178, true); WriteLiteral(" <br />\r\n </div>\r\n </div>\r\n <br />\r\n <div class=\"revealOnScroll\" data-animation=\"rotateInUpLeft\">\r\n "); EndContext(); BeginContext(6578, 533, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "15ec882332ec4d28abe8774cbf5174ce", async() => { BeginContext(6584, 385, true); WriteLiteral(@" <h2 class=""""><strong>Add Message</strong></h2> <div class=""form-group row""> <textarea class=""form-control messageDescription"" name=""Description"" placeholder=""Enter Comment"" minlength=""10"" required></textarea> </div> <input type=""button"" id=""btn-add-pet"" data-url="""); EndContext(); BeginContext(6970, 55, false); #line 141 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(Url.Action("AddMessage", "Users", new { id = Model.Id })); #line default #line hidden EndContext(); BeginContext(7025, 79, true); WriteLiteral("\" class=\"btn btn-success btn-lg btn-block\" value=\"Add Message\" />\r\n "); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(7111, 303, true); WriteLiteral(@" </div> <br /> <br /> <div class=""revealOnScroll"" data-animation=""rotateInUpRight""> <div class=""card-footer text-center""> <h1 class=""display-3"" style=""background: lightgreen"">Actions</h1> "); EndContext(); BeginContext(7414, 87, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "479004db31764857bae7acc9ae3beadf", async() => { BeginContext(7493, 4, true); WriteLiteral("Home"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_7.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_7); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_8.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_8); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(7501, 84, true); WriteLiteral("\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n"); EndContext(); DefineSection("Scripts", async() => { BeginContext(7603, 1333, true); WriteLiteral(@" <script> $(""#btn-add-pet"").click(function () { let addMessageUrl = $(this).data(""url""); let id = addMessageUrl.split(""/"").pop(); let Description = $('.messageDescription').val(); $('.messageDescription').val(''); $.get(addMessageUrl, { Description: Description, id: id }).then((res) => { let currentMessage = """"; $.ajax({ url: '/Messages/GetLastMessage', method: 'GET', dataType: ""json"", success: function (currentMessage) { $("".noCommentsPresent"").fadeOut(); $('.commentsContainer') .append( ""<div>"" "); WriteLiteral(@" + ""<h2 class=\""contentDiv\"">"" + Description + ""</h2>"" + ""<span> Created by "" + ""<strong class=\""profile\"">"" + ""<a class='profileLink' href='/Users/Profile/"); EndContext(); BeginContext(8937, 25, false); #line 195 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(ViewData["CurrentUserId"]); #line default #line hidden EndContext(); BeginContext(8962, 2, true); WriteLiteral("\'>"); EndContext(); BeginContext(8965, 23, false); #line 195 "C:\Users\Asus\Desktop\FindMyPet\FindMyPet\FindMyPet.Web\Views\Users\Profile.cshtml" Write(this.User.Identity.Name); #line default #line hidden EndContext(); BeginContext(8988, 2532, true); WriteLiteral(@"</a>"" + ""</strong> on "" + ""<i>"" + new Date().toLocaleDateString('en-gb') + "" "" + new Date().toLocaleTimeString('en-gb') + ""</i><br/><br/>"" + ""<strong style='color:darkblue'>"" + ""<a class='btn btn-sm btn-success likeButton' data-url='/Messages/AddLike/"" + currentMessage.id + ""'>Like</a>"" + ""</strong>"" + "":"" + ""<i class=\""commentLikes\"">0</i>"" + ""</span><br/><br/>"" +""<br /><br /></div>""); }, error : (err) => console.log(err) }) }); }); </script> <script> $("".deleteBtn"").click(function () { let deleteCommentUrl = $(this).data(""url""); $.get(deleteCommentUrl); $(this).parent().fadeOut(); }); </script> "); WriteLiteral(@" <script> $(""body"").on(""click"", "".likeButton"", function () { let addLikeUrl = $(this).data(""url""); $.get(addLikeUrl); let commentId = addLikeUrl.split(""/"").slice(-1).pop() let currentLikes = Number($(this).parent().next()[0].innerText); let newLikes = currentLikes + 1; $(this).parent().next().replaceWith(""<i class=\""commentLikes\"">"" + newLikes + ""</i>""); $(this).fadeOut(() => { $(""<a class='btn btn-sm btn-danger removelikeButton' data-url='/Messages/RemoveLike/"" + commentId + ""'>Remove Like</a>"").hide().appendTo($(this).parent()).fadeIn(); }); }); </script> <script> $(""body"").on(""click"", "".removelikeButton"", function () { let removeLikeUrl = $(this).data(""url""); $.get(removeLikeUrl); let commentId = removeLikeUrl.split(""/"").slice(-1).pop() let currentLikes ="); WriteLiteral(@" Number($(this).parent().next()[0].innerText); let newLikes = currentLikes - 1; $(this).parent().next().replaceWith(""<i class=\""commentLikes\"">"" + newLikes + ""</i>""); $(this).fadeOut(() => { $(""<a class='btn btn-sm btn-success likeButton' data-url='/Messages/AddLike/"" + commentId + ""'>Like</a>"").hide().appendTo($(this).parent()).fadeIn(); }); }); </script> "); EndContext(); BeginContext(11520, 62, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "0ee8d446ac7c416e91b5af05334ba6c3", async() => { } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_9); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(11582, 2, true); WriteLiteral("\r\n"); EndContext(); } ); }