public static System.Web.WebPages.HelperResult AcceptedSolutions(AcceptedSolutionsPageModel model) { #line default #line hidden return(new System.Web.WebPages.HelperResult(__razor_helper_writer => { WriteLiteralTo(__razor_helper_writer, "\t<div"); WriteLiteralTo(__razor_helper_writer, " id=\"LikeSolutionUrl\""); WriteLiteralTo(__razor_helper_writer, " data-url=\""); WriteTo(__razor_helper_writer, model.LikeSolutionUrl); WriteLiteralTo(__razor_helper_writer, "\""); WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); WriteLiteralTo(__razor_helper_writer, "\t<p>"); WriteTo(__razor_helper_writer, MvcHtmlString.Create(model.Slide.Exercise.CommentAfterExerciseIsSolved.RenderMarkdown(model.Slide.Info.SlideFile))); WriteLiteralTo(__razor_helper_writer, "</p>\r\n"); foreach (var solution in model.AcceptedSolutions) { var id = "solution_" + solution.Id; var code = new CodeBlock(solution.Code, model.Slide.Exercise.Language); WriteLiteralTo(__razor_helper_writer, "\t\t<div"); WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 612), Tuple.Create("\"", 620) , Tuple.Create(Tuple.Create("", 617), Tuple.Create <System.Object, System.Int32>(id , 617), false) ); WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t<button"); WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 634), Tuple.Create("\"", 734) , Tuple.Create(Tuple.Create("", 642), Tuple.Create("like-left-location", 642), true) , Tuple.Create(Tuple.Create(" ", 660), Tuple.Create("btn", 661), true) , Tuple.Create(Tuple.Create(" ", 664), Tuple.Create <System.Object, System.Int32>(solution.LikedAlready ? "btn-primary" : "btn-default" , 665), false) , Tuple.Create(Tuple.Create(" ", 722), Tuple.Create("like-button", 723), true) ); WriteAttributeTo(__razor_helper_writer, "onclick", Tuple.Create(" onclick=\"", 735), Tuple.Create("\"", 771) , Tuple.Create(Tuple.Create("", 745), Tuple.Create("likeSolution(", 745), true) , Tuple.Create(Tuple.Create("", 758), Tuple.Create <System.Object, System.Int32>(solution.Id , 758), false) , Tuple.Create(Tuple.Create("", 770), Tuple.Create(")", 770), true) ); WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t<i"); WriteLiteralTo(__razor_helper_writer, " class=\"glyphicon glyphicon-heart\""); WriteLiteralTo(__razor_helper_writer, "></i>\r\n\t\t\t\t<span"); WriteLiteralTo(__razor_helper_writer, " class=\"likes-counter\""); WriteLiteralTo(__razor_helper_writer, ">"); WriteTo(__razor_helper_writer, solution.UsersWhoLike.Count); WriteLiteralTo(__razor_helper_writer, "</span>\r\n\t\t\t</button>\r\n"); WriteLiteralTo(__razor_helper_writer, "\t\t\t"); WriteTo(__razor_helper_writer, SlideHtml.Block(code, null, null)); WriteLiteralTo(__razor_helper_writer, "\r\n\t\t</div>\r\n"); } })); #line default #line hidden }
public static System.Web.WebPages.HelperResult AcceptedSolutions(AcceptedSolutionsPageModel model) { return(new System.Web.WebPages.HelperResult(__razor_helper_writer => { WebViewPage.WriteLiteralTo(@__razor_helper_writer, " <div id=\"LikeSolutionUrl\" data-url=\""); WebViewPage.WriteTo(@__razor_helper_writer, model.LikeSolutionUrl); WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\"></div>\r\n"); WebViewPage.WriteLiteralTo(@__razor_helper_writer, " <p>"); WebViewPage.WriteTo(@__razor_helper_writer, MvcHtmlString.Create(model.Slide.Exercise.CommentAfterExerciseIsSolved.RenderMarkdown(model.Slide.Info.SlideFile))); WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</p>\r\n"); WebViewPage.WriteLiteralTo(@__razor_helper_writer, " <p>Изучите решения ваших коллег. Проголосуйте за решения, в которых вы нашли что"+ "-то новое для себя.</p>\r\n"); foreach (var solution in model.AcceptedSolutions) { var id = "solution_" + solution.Id; var code = new CodeBlock(solution.Code, model.Slide.Exercise.Language); WebViewPage.WriteLiteralTo(@__razor_helper_writer, " <div id=\""); WebViewPage.WriteTo(@__razor_helper_writer, id); WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\">\r\n <button class=\"like-left-location btn "); WebViewPage.WriteTo(@__razor_helper_writer, solution.LikedAlready ? "btn-primary" : "btn-default"); WebViewPage.WriteLiteralTo(@__razor_helper_writer, " like-button\" onclick=\"likeSolution("); WebViewPage.WriteTo(@__razor_helper_writer, solution.Id); WebViewPage.WriteLiteralTo(@__razor_helper_writer, ")\">\r\n <i class=\"glyphicon glyphicon-heart\"></i>\r\n <span class=\"likes-counte"+ "r\">"); WebViewPage.WriteTo(@__razor_helper_writer, solution.UsersWhoLike.Count); WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</span>\r\n </button>\r\n\r\n"); if (model.User.HasAccessFor(model.CourseId, CourseRole.Instructor)) { WebViewPage.WriteLiteralTo(@__razor_helper_writer, " <form action=\""); WebViewPage.WriteTo(@__razor_helper_writer, solution.RemoveSolutionUrl); WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\" method=\"POST\" novalidate=\"novalidate\">\r\n <button class=\"btn btn-danger\">\r\n "+ " <i class=\"glyphicon glyphicon-remove\"></i>\r\n Удалить решение\r\n </b"+ "utton>\r\n </form>\r\n"); } WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\r\n "); WebViewPage.WriteTo(@__razor_helper_writer, SlideHtml.Block(code, null, null)); WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\r\n </div>\r\n"); } })); }
public static System.Web.WebPages.HelperResult AcceptedSolutions(AcceptedSolutionsPageModel model) { #line default #line hidden return(new System.Web.WebPages.HelperResult(__razor_helper_writer => { WriteLiteralTo(__razor_helper_writer, "\t<div"); WriteLiteralTo(__razor_helper_writer, " id=\"LikeSolutionUrl\""); WriteLiteralTo(__razor_helper_writer, " data-url=\""); WriteTo(__razor_helper_writer, model.LikeSolutionUrl); WriteLiteralTo(__razor_helper_writer, "\""); WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); WriteLiteralTo(__razor_helper_writer, "\t<p>"); WriteTo(__razor_helper_writer, MvcHtmlString.Create(model.Slide.Exercise.CommentAfterExerciseIsSolved.RenderMd(model.Slide.Info.SlideFile))); WriteLiteralTo(__razor_helper_writer, "</p>\r\n"); WriteLiteralTo(__razor_helper_writer, "\t<p>Изучите решения ваших коллег. Проголосуйте за решения, в которых вы нашли что" + "-то новое для себя.</p>\r\n"); foreach (var solution in model.AcceptedSolutions) { var id = "solution_" + solution.Id; var code = new CodeBlock(solution.Code, model.Slide.Exercise.LangId); WriteLiteralTo(__razor_helper_writer, "\t\t<div"); WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 715), Tuple.Create("\"", 723) , Tuple.Create(Tuple.Create("", 720), Tuple.Create <System.Object, System.Int32>(id , 720), false) ); WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t<button"); WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 737), Tuple.Create("\"", 836) , Tuple.Create(Tuple.Create("", 745), Tuple.Create("like-left-location", 745), true) , Tuple.Create(Tuple.Create(" ", 763), Tuple.Create("btn", 764), true) , Tuple.Create(Tuple.Create(" ", 767), Tuple.Create <System.Object, System.Int32>(solution.LikedAlready ? "btn-primary" : "btn-default" , 768), false) , Tuple.Create(Tuple.Create(" ", 824), Tuple.Create("like-button", 825), true) ); WriteAttributeTo(__razor_helper_writer, "onclick", Tuple.Create(" onclick=\"", 837), Tuple.Create("\"", 873) , Tuple.Create(Tuple.Create("", 847), Tuple.Create("likeSolution(", 847), true) , Tuple.Create(Tuple.Create("", 860), Tuple.Create <System.Object, System.Int32>(solution.Id , 860), false) , Tuple.Create(Tuple.Create("", 872), Tuple.Create(")", 872), true) ); WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t<i"); WriteLiteralTo(__razor_helper_writer, " class=\"glyphicon glyphicon-heart\""); WriteLiteralTo(__razor_helper_writer, "></i>\r\n\t\t\t\t<span"); WriteLiteralTo(__razor_helper_writer, " class=\"likes-counter\""); WriteLiteralTo(__razor_helper_writer, ">"); WriteTo(__razor_helper_writer, solution.UsersWhoLike.Count); WriteLiteralTo(__razor_helper_writer, "</span>\r\n\t\t\t</button>\r\n\r\n"); if (model.User.HasAccessFor(model.CourseId, CourseRole.Instructor)) { WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<form"); WriteAttributeTo(__razor_helper_writer, "action", Tuple.Create(" action=\"", 1098), Tuple.Create("\"", 1136) , Tuple.Create(Tuple.Create("", 1107), Tuple.Create <System.Object, System.Int32>(solution.RemoveSolutionUrl , 1107), false) ); WriteLiteralTo(__razor_helper_writer, " method=\"POST\""); WriteLiteralTo(__razor_helper_writer, " novalidate=\"novalidate\""); WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t<button"); WriteLiteralTo(__razor_helper_writer, " class=\"btn btn-danger\""); WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t<i"); WriteLiteralTo(__razor_helper_writer, " class=\"glyphicon glyphicon-remove\""); WriteLiteralTo(__razor_helper_writer, "></i>\r\n\t\t\t\t\t\tУдалить решение\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</form>\r\n"); } WriteLiteralTo(__razor_helper_writer, "\r\n"); WriteLiteralTo(__razor_helper_writer, "\t\t\t"); WriteTo(__razor_helper_writer, SlideHtml.Block(code, null)); WriteLiteralTo(__razor_helper_writer, "\r\n\t\t</div>\r\n"); } })); #line default #line hidden }