public ActionResult ManageTemplates() { SqlAccess.SqlAccess sa = new SqlAccess.SqlAccess(); wwBuildInfo.wwBuildInfo wwbi = new wwBuildInfo.wwBuildInfo(); ViewData["VersionNumber"] = wwbi.GetVersion(); ViewData["SoftwareName"] = wwbi.GetName(); ViewData["allTemplates"] = sa.GetAllTemplates().Tables[0]; ViewData["SiteName"] = getSiteSettings()["SiteName"]; if (_signInManager.IsSignedIn(User)) { return(View()); } else { return(RedirectToAction("ViewPage", "Page")); } }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { #line 1 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" Layout = null; #line default #line hidden BeginContext(24, 1, true); WriteLiteral("\n"); EndContext(); BeginContext(45, 29, true); WriteLiteral("\n<!DOCTYPE html>\n\n<html>\n "); EndContext(); BeginContext(74, 862, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("head", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "69b2e4b850b731ecc3d957342ef9070414c942cc5355", async() => { BeginContext(80, 35, true); WriteLiteral("\n <title>Manage Templates | "); EndContext(); BeginContext(116, 20, false); #line 11 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" Write(ViewData["SiteName"]); #line default #line hidden EndContext(); BeginContext(136, 793, true); WriteLiteral(@"</title> <script src=""https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js""></script> <link rel=""stylesheet"" type=""text/css"" href=""https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css""> <script src=""https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.js""></script> <style> body { margin: 14px; /*margin-right: 14px;*/ } </style> <script> function decodeHtml(html) { var txt = document.createElement(""textarea""); txt.innerHTML = html; return txt.value; } $( document ).ready(function() { $('.dropdown').dropdown(); }); </script> "); EndContext(); } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(936, 5, true); WriteLiteral("\n "); EndContext(); BeginContext(941, 3217, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("body", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "69b2e4b850b731ecc3d957342ef9070414c942cc7708", async() => { BeginContext(947, 1333, true); WriteLiteral(@" <!--<div class=""ui inverted menu""> <a href=""/"" class=""item""> Home </a> <form class=""right item"" id=""navigateForm"" action=""/Page/NavigateForm"" method=""post""> <div class=""ui inverted transparent input""> <input type=""text"" name=""pageName"" placeholder=""Navigate to...""> </div> <button type=""submit"" class=""ui black button"">Go</button> </form> <div class=""ui inverted dropdown icon item""> <i class=""wrench icon""></i> <div class=""menu""> <a class=""item"" href=""/ViewPage/Special|List of pages""> Special|List of pages </a> <a class=""item"" href=""/NewPage""> New Page </a> <a class=""item"" href=""/ManageTemplates""> Manage Templates </a> <a "); WriteLiteral(@"class=""item"" href=""/ManageFiles""> Manage Files </a> <a class=""item"" href=""/Admin/ControlPanel""> Control Panel </a> <a class=""item"" href=""/Docs/About""> About "); EndContext(); BeginContext(2281, 24, false); #line 62 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" Write(ViewData["SoftwareName"]); #line default #line hidden EndContext(); BeginContext(2305, 213, true); WriteLiteral("\n </a>\n <a class=\"item\" href=\"/Docs/Syntax\">\n Syntax Guide\n </a>\n </div>\n </div>\n </div>-->\n "); EndContext(); BeginContext(2518, 26, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("partial", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "69b2e4b850b731ecc3d957342ef9070414c942cc10087", async() => { } ); __Microsoft_AspNetCore_Mvc_TagHelpers_PartialTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_PartialTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_PartialTagHelper.Name = (string)__tagHelperAttribute_0.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2544, 372, true); WriteLiteral(@" <div id=""customContent""> <div class=""ui header""> Manage Templates </div> <table class=""ui celled table""> <thead><tr> <th>Name</th> <th>Description</th> <th>Actions</th> </tr></thead> <tbody> "); EndContext(); #line 82 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" SqlAccess.SqlAccess sa = new SqlAccess.SqlAccess(); DataRowCollection allTemplates = sa.GetAllTemplates().Tables[0].Rows; #line default #line hidden BeginContext(3124, 20, true); WriteLiteral(" "); EndContext(); #line 86 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" foreach (DataRow row in allTemplates) { #line default #line hidden BeginContext(3205, 53, true); WriteLiteral(" <tr>\n <td>"); EndContext(); BeginContext(3259, 11, false); #line 89 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" Write(row["name"]); #line default #line hidden EndContext(); BeginContext(3270, 34, true); WriteLiteral("</td>\n <td>"); EndContext(); BeginContext(3305, 18, false); #line 90 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" Write(row["description"]); #line default #line hidden EndContext(); BeginContext(3323, 66, true); WriteLiteral("</td>\n <td><a class=\"ui yellow icon button\""); EndContext(); BeginWriteAttribute("href", " href=\"", 3389, "\"", 3420, 2); WriteAttributeValue("", 3396, "/EditTemplate/", 3396, 14, true); #line 91 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" WriteAttributeValue("", 3410, row["id"], 3410, 10, false); #line default #line hidden EndWriteAttribute(); BeginContext(3421, 65, true); WriteLiteral("><i class=\"pencil icon\"></i></a></td>\n </tr> \n"); EndContext(); #line 93 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" } #line default #line hidden BeginContext(3508, 142, true); WriteLiteral(" </tbody>\n </table>\n <div class=\"ui header\">\n New Template\n </div>\n "); EndContext(); BeginContext(3650, 317, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "69b2e4b850b731ecc3d957342ef9070414c942cc14290", async() => { BeginContext(3722, 238, true); WriteLiteral("\n <div class=\"ui action input\">\n <input type=\"text\" name=\"templateName\" placeholder=\"Title\">\n <button type=\"submit\" class=\"ui button\">Create</button>\n </div>\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); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_3.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(3967, 120, true); WriteLiteral("\n </div>\n <div class=\"ui divider\"></div>\n <span id=\"version\" class=\"ui small grey text\">Powered by "); EndContext(); BeginContext(4088, 24, false); #line 107 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" Write(ViewData["SoftwareName"]); #line default #line hidden EndContext(); BeginContext(4112, 1, true); WriteLiteral(" "); EndContext(); BeginContext(4114, 25, false); #line 107 "/home/benjamin/webweb-core/webweb/Views/Page/ManageTemplates.cshtml" Write(ViewData["VersionNumber"]); #line default #line hidden EndContext(); BeginContext(4139, 12, true); WriteLiteral("</span>\n "); EndContext(); } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(4158, 13, true); WriteLiteral("\n</html>\n\n\n\n\n"); EndContext(); }